/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-top {
    padding: 1.25rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo-image {
    height: 60px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.03);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-medium);
    background: var(--bg-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.user-role.admin {
    background: #f0f7ff;
    color: var(--primary-color);
}

/* Profile Box in Header */
.profile-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: fit-content;
    flex-shrink: 0;
}

.profile-box:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.15);
}

.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.profile-box:hover .profile-picture {
    border-color: var(--primary-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 120px;
    white-space: nowrap;
}

.profile-name {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.2;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-medium);
    line-height: 1.2;
}

/* ─── Searchable store dropdown (signup) ────────────────────────────────── */
.store-search-wrapper {
    position: relative;
}

.store-search-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-medium, #ccc);
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.store-search-option {
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    transition: background 0.15s;
}

.store-search-option:last-child { border-bottom: none; }

.store-search-option:hover,
.store-search-option.focused {
    background: var(--bg-light, #f0fdf8);
    color: var(--primary-color, #00a88f);
}

.store-search-option-sub {
    font-size: 0.75rem;
    color: var(--text-medium, #888);
    margin-top: 1px;
}

.store-search-empty {
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-medium, #888);
    text-align: center;
}

.profile-points {
    font-size: 0.7rem;
    color: var(--primary-color, #00a88f);
    font-weight: 600;
    line-height: 1.2;
}

.profile-box .btn-logout {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 20px;
    border-color: var(--border-light);
    margin-left: 0.25rem;
    flex-shrink: 0;
}

/* Navigation Bar */
.nav-bar {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border-light);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Scrollbar styling for navigation */
.nav-content::-webkit-scrollbar {
    height: 8px;
}

.nav-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.nav-content::-webkit-scrollbar-thumb {
    background: #06B085;
    border-radius: 4px;
}

.nav-content::-webkit-scrollbar-thumb:hover {
    background: #05a077;
}

/* Firefox scrollbar styling */
.nav-content {
    scrollbar-width: thin;
    scrollbar-color: #06B085 #f1f1f1;
}

.nav-item {
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--primary-color);
    background: rgba(0, 168, 143, 0.05);
}

.nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0, 168, 143, 0.05);
}

.nav-item.admin-only {
    color: var(--text-medium);
}

.nav-item.admin-only:hover {
    color: var(--primary-color);
}

/* Centered navigation for non-admin roles.
   'safe center' falls back to flex-start on overflow so the
   leftmost items remain reachable when the nav bar is narrow. */
.nav-content.centered {
    justify-content: safe center;
}

/* ─── Admin App-Shell Layout ─────────────────────────────────────────────── */

/* Hub body: sidebar + main content, side by side */
.hub-body {
    display: flex;
    flex: 1;
}

/* Hub main: fills remaining width, stacks sections + footer */
.hub-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* When admin is logged in: full-viewport fixed layout */
.hub-view.admin-mode {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header becomes static within the flex column (always visible, no sticky needed) */
.hub-view.admin-mode .header {
    position: relative;
    flex-shrink: 0;
}

/* Hide the horizontal nav bar for admins — sidebar replaces it */
.hub-view.admin-mode .nav-bar {
    display: none;
}

/* Hub body fills remaining height and clips overflow */
.hub-view.admin-mode .hub-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Main content area scrolls independently */
.hub-view.admin-mode .hub-main {
    overflow-y: auto;
}

/* ─── Admin Sidebar ──────────────────────────────────────────────────────── */

.admin-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid var(--border-light);
    display: none; /* shown via JS only for jti_staff */
    flex-direction: column;
    overflow-y: auto;
}

.hub-view.admin-mode .admin-sidebar {
    display: flex;
}

/* ─── Admin mobile layout ─────────────────────────────────────────────────
   On narrow viewports the admin sidebar would consume most of the screen,
   so it's hidden in favour of the mobile drawer (hamburger). The hub also
   un-clamps height/overflow so the page scrolls naturally. */
@media (max-width: 900px) {
    .hub-view.admin-mode .admin-sidebar { display: none; }
    .hub-view.admin-mode {
        height: auto;
        overflow: visible;
    }
    .hub-view.admin-mode .hub-body {
        flex: initial;
        min-height: 0;
        overflow: visible;
    }
    .hub-view.admin-mode .hub-main {
        overflow: visible;
    }
    /* Admin pages cap at 1600px on desktop — let them fill the viewport
       on mobile with a tighter gutter. */
    #userManagementSection .page-content,
    #platformMembersSection .page-content,
    #dashboardSection .page-content,
    #targetGroupsSection .page-content {
        max-width: 100%;
        padding: 1.25rem 1rem 2rem;
    }
    /* Tables in admin views scroll horizontally rather than overflow the
       viewport — preserves all columns without breaking the layout. */
    .um-table-wrapper,
    .tg-table-wrapper,
    .platform-members-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.sidebar-nav {
    padding: 1rem 0 2rem;
    flex: 1;
}

.sidebar-section {
    padding: 0.25rem 0;
}

.sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0.6rem 1.25rem 0.4rem;
    user-select: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.sidebar-item:hover {
    background: rgba(6, 176, 133, 0.07);
    color: var(--primary-color);
}

.sidebar-item.active {
    background: rgba(6, 176, 133, 0.12);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-item svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.sidebar-item:hover svg,
.sidebar-item.active svg {
    opacity: 1;
}

/* Admin-tool items get a slightly deeper default colour */
.sidebar-item.sidebar-admin {
    color: #1e3a5f;
}

.sidebar-item.sidebar-admin:hover,
.sidebar-item.sidebar-admin.active {
    color: var(--primary-color);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 1rem;
}

/* Collapsible parent sidebar item */
.sidebar-parent .sidebar-item-label {
    flex: 1;
}
.sidebar-parent .sidebar-caret {
    opacity: 0.5;
    transition: transform 0.18s ease;
}
.sidebar-parent.open .sidebar-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    padding-left: 0.25rem;
}
.sidebar-submenu.open {
    display: flex;
}
.sidebar-item.sidebar-subitem {
    padding-left: 2.75rem;
    font-size: 0.82rem;
}

/* Sub-sub-item (drill-down inside a sub-item, e.g. User Management →
 * Accounts → Types/Provinces/etc.). Visually distinct from the regular
 * subitem via deeper indent and slightly muted colour. */
.sidebar-item.sidebar-subitem.sidebar-parent .sidebar-caret {
    width: 12px;
    height: 12px;
}
.sidebar-submenu.sidebar-subsubmenu {
    padding-left: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 2.5rem;
}
.sidebar-item.sidebar-subsubitem {
    padding-left: 1rem;
    font-size: 0.78rem;
    opacity: 0.85;
}
.sidebar-item.sidebar-subsubitem.active {
    opacity: 1;
}

/* Mirror the desktop sub-sub-menu structure for the mobile drawer. */
.mob-nav-submenu.mob-nav-subsubmenu {
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 1.5rem;
}
.mob-nav-item.mob-nav-subsubitem {
    padding-left: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Footer */
.footer {
    background: #2c2c2c;
    color: white;
    padding: 2rem 2rem 1.5rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#loginView .header-content .theme-toggle {
    margin-left: 1.5rem;
}

#loginView .footer {
    padding: 0.75rem 2rem;
    gap: 0;
}

#loginView .footer-bottom {
    border-top-color: transparent;
    padding-top: 0.5rem;
    gap: 0.25rem;
}

#loginView .footer-logo {
    height: 32px;
    margin-bottom: 0;
}

.registration-view .footer {
    padding: 0.75rem 2rem;
    gap: 0;
}

.registration-view .footer-bottom {
    border-top-color: transparent;
    padding-top: 0.5rem;
    gap: 0.25rem;
}

.registration-view .footer-logo {
    height: 32px;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid #4a4a4a;
    padding-top: 2rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.page-section.active-section {
    display: block;
}

.page-header {
    background: white;
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.page-header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    text-align: center;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    line-height: 1.6;
    text-align: center;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 1rem 0;
        border-bottom: none;
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: 0;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--primary-color);
        display: inline-block;
        width: 100%;
    }

    /* Hide subtitle on mobile — title + green strip is enough */
    .page-subtitle {
        display: none;
    }

    .page-content {
        padding: 1rem 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1.125rem 0.875rem 0;
    }

    .page-title {
        font-size: 1.45rem;
        padding-bottom: 0.875rem;
    }

    .page-content {
        padding: 0.875rem 0.875rem 1.125rem;
    }
}

/* Hero Section */
.hero {
    background: white;
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    animation: fadeIn 0.8s ease-in-out;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeIn 1s ease-in-out;
}

/* Hub Content */
.hub-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* Grid Layouts */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmin(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Section Styling */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #000;
}

.section-header p {
    color: var(--text-medium);
    font-size: 1rem;
}

.info-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out;
}

.info-section:hover {
    border-color: var(--border-medium);
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.info-section p {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
}

/* Integrated Info Section */
/* ── Home welcome title ── */
.home-welcome {
    position: relative;
    text-align: center;
    padding: 2.75rem 2rem 1.25rem;
    animation: fadeIn 0.6s ease-out;
}

.home-welcome::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 1.25rem auto 0;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
    border-radius: 2px;
    opacity: 0.85;
}

.home-welcome h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.15;
    white-space: nowrap;
}

.home-welcome-greeting {
    font-weight: 500;
    color: var(--text-dark);
}

.home-welcome-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 0.5rem;
    display: inline-block;
    animation: welcomeNameIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.home-welcome-exclaim {
    color: var(--primary-color);
    font-weight: 700;
}

@keyframes welcomeNameIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Home Overview Strip ── */
.home-overview-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: calc(100% - 4rem);
    max-width: calc(1600px - 4rem);
    margin: 0 auto 2.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.375rem 1.5rem;
    position: relative;
    transition: background 0.2s ease;
    min-width: 0;
}

/* Vertical divider between every item */
.overview-item + .overview-item {
    border-left: 1px solid var(--border-light);
}

.overview-item:hover {
    background: rgba(0, 168, 143, 0.04);
}

.overview-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 168, 143, 0.12) 0%, rgba(102, 126, 234, 0.12) 100%);
    color: var(--primary-color);
}

.overview-icon svg {
    width: 21px;
    height: 21px;
}

.overview-text {
    min-width: 0;
    flex: 1;
}

.overview-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-label {
    font-size: 0.7rem;
    color: var(--text-medium);
    margin-top: 0.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* 2-column at tablet */
@media (max-width: 860px) {
    .home-overview-strip {
        grid-template-columns: repeat(2, 1fr);
        width: calc(100% - 2.5rem);
        margin: 0 auto 2rem;
    }

    /* Remove left-border dividers; add explicit borders per slot */
    .overview-item + .overview-item {
        border-left: none;
    }

    .overview-item:nth-child(2) { border-left: 1px solid var(--border-light); }
    .overview-item:nth-child(4) { border-left: 1px solid var(--border-light); }
    .overview-item:nth-child(3),
    .overview-item:nth-child(4) { border-top: 1px solid var(--border-light); }
}

/* Single column on mobile */
@media (max-width: 480px) {
    .home-overview-strip {
        grid-template-columns: 1fr;
        width: calc(100% - 2rem);
        margin: 0 auto 1.75rem;
        border-radius: 14px;
    }

    .overview-item + .overview-item {
        border-left: none;
        border-top: 1px solid var(--border-light);
    }

    .overview-item:nth-child(2),
    .overview-item:nth-child(4) { border-left: none; }
    .overview-item:nth-child(3),
    .overview-item:nth-child(4) { border-top: none; }

    .overview-item {
        padding: 1rem 1.125rem;
    }

    .overview-icon {
        width: 38px;
        height: 38px;
    }

    .overview-icon svg {
        width: 18px;
        height: 18px;
    }
}

.integrated-info-section {
    display: none !important;
    background: white;
    border-radius: 20px;
    padding: 0;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.integrated-info-section:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.info-content-wrapper {
    display: flex;
    flex-direction: column;
}

.info-intro {
    display: none !important;
    padding: 3.5rem 3.5rem 3rem;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.info-intro h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.info-intro p {
    color: var(--text-medium);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.info-intro p:last-child {
    margin-bottom: 0;
}

.info-benefits {
    display: none !important;
    padding: 3.5rem;
    background: linear-gradient(135deg, rgba(0, 168, 143, 0.03) 0%, rgba(102, 126, 234, 0.03) 100%);
}

.info-benefits h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.3px;
}

.benefits-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
}

.benefits-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.benefit-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 168, 143, 0.12);
}

.benefit-content {
    width: 100%;
}

.benefit-title-modern {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.benefit-text-modern {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
}

@media (max-width: 768px) {
    /* ── Welcome title ── */
    .home-welcome {
        padding: 1.75rem 1rem 1rem;
    }

    .home-welcome h1 {
        font-size: 1.75rem;
        letter-spacing: -0.3px;
    }

    .home-welcome-name {
        margin-left: 0.4rem;
    }

    /* ── Info section wrapper ── */
    .integrated-info-section {
        border-radius: 14px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }

    /* Remove hover transforms on touch */
    .integrated-info-section:hover {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
        border-color: var(--border-light);
    }

    /* ── Info intro ── */
    .info-intro {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .info-intro h2 {
        font-size: 1.45rem;
        margin-bottom: 1rem;
        letter-spacing: -0.3px;
        line-height: 1.25;
        position: relative;
        padding-bottom: 0.625rem;
    }

    .info-intro h2::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 44px;
        height: 3px;
        border-radius: 2px;
        background: var(--primary-color);
    }

    .info-intro p {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 0.875rem;
    }

    .info-intro p strong {
        color: var(--text-dark);
    }

    /* ── Info benefits ── */
    .info-benefits {
        padding: 1.75rem 1.25rem;
    }

    .info-benefits h3 {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
        letter-spacing: -0.2px;
        line-height: 1.3;
    }

    .benefits-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
        padding: 0 0.25rem;
    }

    .benefits-grid-modern {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .benefit-card {
        padding: 1rem 1rem 1rem 1.125rem;
        border-radius: 10px;
        border-left: 3px solid var(--primary-color);
        background: white;
    }

    .benefit-card:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border-light);
        border-left-color: var(--primary-color);
    }

    .benefit-title-modern {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }

    .benefit-text-modern {
        font-size: 0.9rem;
        line-height: 1.55;
        color: var(--text-medium);
    }
}

@media (max-width: 480px) {
    .home-welcome {
        padding: 1.375rem 0.875rem 0.75rem;
    }

    .home-welcome h1 {
        font-size: 1.5rem;
    }

    .info-intro {
        padding: 1.5rem 1rem 1.25rem;
    }

    .info-intro h2 {
        font-size: 1.3rem;
        margin-bottom: 0.875rem;
    }

    .info-intro p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .info-benefits {
        padding: 1.5rem 1rem;
    }

    .info-benefits h3 {
        font-size: 1.2rem;
    }

    .benefits-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .benefit-card {
        padding: 0.9rem 0.95rem 0.9rem 1rem;
    }

    .benefit-title-modern {
        font-size: 0.98rem;
    }

    .benefit-text-modern {
        font-size: 0.88rem;
    }
}

/* Newsletter Items */
.newsletter-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.newsletter-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.newsletter-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.newsletter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.newsletter-excerpt {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Benefit Items */
.benefit-item {
    text-align: center;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 12px;
    transition: all 0.3s;
}

.benefit-item:hover {
    background: #f0f0f0;
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.benefit-title {
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.benefit-text {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Rewards & Incentives Styles */
.rewards-hero-card {
    background: linear-gradient(135deg, #00a88f 0%, #00c9a0 100%);
    color: white;
    border-radius: 20px;
    padding: 3.5rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 168, 143, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rewards-hero-card:hover {
    box-shadow: 0 12px 40px rgba(0, 168, 143, 0.35);
}

.rewards-hero-card h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: white;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.rewards-hero-card p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.95);
    margin: 0;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.reward-feature-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.reward-feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0, 168, 143, 0.15);
}

.reward-card-header {
    margin-bottom: 1.25rem;
}

.reward-card-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.reward-description {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.reward-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reward-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.reward-list li:last-child {
    border-bottom: none;
}

.reward-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Resources & Training Styles */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.resource-feature-card {
    display: none !important;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.resource-feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary-color);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.15);
}

.resource-card-header {
    margin-bottom: 1.25rem;
}

.resource-card-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.resource-description {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ── Header: 3-column mobile layout [☰] [Logo] [●] ────────────────── */
    .header-top { padding: 0 !important; }
    .header-content {
        display: grid;
        grid-template-columns: 48px 1fr 48px;
        align-items: center;
        padding: 0.6rem 0.75rem;
        gap: 0.25rem;
    }
    .logo {
        grid-column: 2;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .logo-image { height: 38px; }
    .mob-menu-btn {
        grid-column: 1;
        display: flex;
        justify-self: start;
    }
    .mob-profile-btn {
        grid-column: 3;
        display: flex;
        justify-self: end;
    }
    /* Hide all desktop controls */
    .header-right { display: none !important; }
    .nav-bar { display: none; }
    .btn-logout { display: none; }

    /* Re-show back buttons in registration headers on mobile */
    .registration-view .header-content .btn-logout {
        display: inline-flex !important;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.875rem;
        padding: 0.45rem 0.9rem;
    }

    /* ── Login page header: logo centred, language selector pinned right ── */
    #loginView .header-content {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        padding: 0.75rem 1rem;
    }
    #loginView .header-content .logo {
        grid-column: unset;
        margin-right: auto;
    }
    #loginView .header-content .language-selector {
        position: static;
        transform: none;
        right: auto;
        top: auto;
    }
    #loginView .header-content .theme-toggle {
        margin-left: 1.5rem;
    }
    #loginView .language-btn {
        padding: 0.4rem 0.6rem;
        gap: 0.35rem;
    }
    #loginView .language-btn span {
        display: none;
    }

    /* ── Footer: hide nav links, keep logo + copyright ─────────────────── */
    .footer { display: flex !important; flex-direction: column; margin-top: 0; padding: 1.25rem 1rem 1rem; gap: 0.75rem; }
    .footer-links { display: none !important; }
    .footer-bottom { padding-top: 0.5rem; gap: 0.4rem; border-top: none; }
    .footer-logo { height: 30px; margin-bottom: 0; }
    .footer-bottom p { font-size: 0.75rem; }

    /* ── Training viewer: fill viewport on mobile ───────────────────────── */
    #trainingViewerSection {
        padding: 0.75rem !important;
        min-height: calc(100dvh - 60px);
        box-sizing: border-box;
    }
    .tv-stage { padding: 0; }
    .tv-viewport { max-width: 100%; }
    .tv-card-shell {
        /* Fixed height on mobile: full viewport minus app header (~60px) and section padding (1.5rem) */
        height: calc(100dvh - 60px - 1.5rem);
        min-height: unset;
    }

    .rewards-hero-card {
        padding: 2.5rem 2rem;
    }

    .rewards-hero-card h2 {
        font-size: 1.75rem;
    }

    .rewards-grid,
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .reward-feature-card,
    .resource-feature-card {
        padding: 2rem;
    }

    .reward-card-header h3,
    .resource-card-header h3 {
        font-size: 1.25rem;
    }

    .training-modules-grid {
        grid-template-columns: 1fr;
    }

    .training-cta-outer {
        margin-bottom: 2rem;
        border-radius: 18px;
    }

    .training-cta-img {
        width: 100%;
        height: auto;
    }

    .btn-training-cta {
        align-self: stretch;
        justify-content: center;
    }
}

/* ── Training CTA Banner ─────────────────────────────────────────────────── */

/* Outer container — the visible "additional card" wrapper (light mode default) */
.training-cta-outer {
    margin-bottom: 2.5rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f4fbf9 100%);
    border: 1px solid rgba(0, 168, 143, 0.22);
    box-shadow: 0 8px 32px rgba(13, 31, 45, 0.08);
    overflow: hidden;
}

/* Inner banner — vertical stack */
.training-cta-banner {
    display: flex;
    flex-direction: column;
}

/* Top: info section */
.training-cta-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2.25rem 2.25rem 2rem;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #eef9f5 100%);
}

/* Teal accent bar along the top edge */
.training-cta-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
}

.training-cta-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.training-cta-heading {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-dark, #0d1f2d);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.4px;
}

.training-cta-desc {
    font-size: 1.05rem;
    color: var(--text-medium, #4a5b67);
    line-height: 1.6;
    margin: 0;
    max-width: 640px;
}

.training-cta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.training-cta-pill {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(0, 168, 143, 0.12);
    border: 1px solid rgba(0, 168, 143, 0.28);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    letter-spacing: 0.02em;
}

/* Visual journey flow: 8 Modules → Earn Points → Unlock Rewards */
.training-cta-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.training-cta-flow-step {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.9rem;
    background: rgba(0, 168, 143, 0.10);
    border: 1px solid rgba(0, 168, 143, 0.30);
    border-radius: 10px;
    color: var(--text-dark, #0d1f2d);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.training-cta-flow-step:hover {
    background: rgba(0, 168, 143, 0.18);
    border-color: rgba(0, 168, 143, 0.55);
    transform: translateY(-1px);
}

.training-cta-flow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-color);
    color: #ffffff;
    flex-shrink: 0;
}

.training-cta-flow-label {
    white-space: nowrap;
}

.training-cta-flow-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .training-cta-flow {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .training-cta-flow-step {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }
    .training-cta-flow-arrow {
        transform: rotate(90deg);
    }
    .training-cta-flow-arrow svg {
        width: 20px;
        height: 12px;
    }
    .training-cta-heading {
        font-size: 1.15rem;
    }
    .training-cta-desc {
        font-size: 0.85rem;
    }
    .training-cta-info {
        padding: 1.25rem 1rem 1.1rem;
        gap: 0.6rem;
    }
}

/* "Click here to begin" indicator between info and image button */
.training-cta-click-hint {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.1rem 1rem 0.95rem;
    background: linear-gradient(135deg, #eef9f5 0%, #dff4ec 100%);
    border-bottom: 1px solid rgba(0, 168, 143, 0.18);
}

.training-cta-click-hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #00a88f), #667eea);
}

.training-cta-click-hint-text {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-color, #00a88f);
}

.training-cta-click-hint-arrow {
    color: var(--primary-color, #00a88f);
    animation: training-cta-bounce 1.4s ease-in-out infinite;
}

@keyframes training-cta-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
    .training-cta-click-hint-arrow { animation: none; }
}

/* Bottom: image as a clickable button */
.training-cta-img-btn {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
    background: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.training-cta-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover overlay with CTA label */
.training-cta-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 31, 45, 0.78) 0%, rgba(13, 31, 45, 0.1) 55%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.training-cta-img-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 168, 143, 0.45);
    transform: translateY(6px);
    transition: transform 0.3s ease;
}

.training-cta-img-btn:hover .training-cta-img {
    transform: scale(1.03);
}

.training-cta-img-btn:hover .training-cta-img-overlay {
    opacity: 1;
}

.training-cta-img-btn:hover .training-cta-img-cta {
    transform: translateY(0);
}

/* Keep .btn-training-cta for any other usages */
.btn-training-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 168, 143, 0.35);
}

.btn-training-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 168, 143, 0.45);
}

/* Training Modules Grid */
.training-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

/* Training Module Card */
.training-module-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.training-module-card.unlocked:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0, 168, 143, 0.15);
}

.training-module-card.locked {
    opacity: 0.75;
    filter: grayscale(0.3);
}

.training-module-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
    border-radius: 16px;
}

.lock-icon {
    font-size: 2rem;
}

.training-module-lock-overlay p {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    margin: 0;
}

.training-module-number {
    background: var(--primary-color);
    color: white;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -1px;
    padding: 1rem 1.5rem;
    line-height: 1;
}

.training-module-card.locked .training-module-number {
    background: var(--border-medium);
}

.training-module-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.training-module-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.training-module-tag {
    background: rgba(0, 168, 143, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
}

.training-module-card.locked .training-module-tag {
    background: var(--bg-light);
    color: var(--text-light);
}

.training-module-duration {
    font-size: 0.8rem;
    color: var(--text-light);
}

.training-module-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.training-module-desc {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Progress Bar */
.training-progress-bar-wrap {
    margin-top: 0.5rem;
}

.training-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.training-progress-track {
    height: 6px;
    background: var(--border-light);
    border-radius: 99px;
    overflow: hidden;
}

.training-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 99px;
    transition: width 0.6s ease;
}

/* Start Module Button */
.btn-start-module {
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-start-module:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.3);
}

.btn-start-module:disabled {
    background: var(--border-medium);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-module-complete {
    background: #00a650 !important;
}

/* Training module meta points pill */
.training-module-points {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #e05a00;
    background: rgba(224, 90, 0, 0.08);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
}

/* ─── Training Points Header Badge ─────────────────────────────────── */
.training-points-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #0d2137 100%);
    border: 1.5px solid rgba(0, 166, 80, 0.5);
    color: #fff;
    border-radius: 20px;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.training-points-badge:hover {
    border-color: #00a650;
    box-shadow: 0 0 10px rgba(0, 166, 80, 0.3);
    transform: translateY(-1px);
}

.points-flame { font-size: 1.1rem; }
.points-value { font-size: 1rem; color: #39ff14; letter-spacing: 0.01em; }
.points-label { font-size: 0.75rem; opacity: 0.7; }

/* ─── Cashier Points Header Badge ───────────────────────────────────── */
.cashier-points-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #2a1a0e 0%, #3d1f00 100%);
    border: 1.5px solid rgba(255, 180, 0, 0.55);
    color: #fff;
    border-radius: 20px;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.cashier-points-badge:hover {
    border-color: #ffb400;
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.35);
    transform: translateY(-1px);
}

.cashier-points-icon { font-size: 1rem; }
.cashier-points-value { font-size: 1rem; color: #ffd700; letter-spacing: 0.01em; }
.cashier-points-label { font-size: 0.75rem; opacity: 0.7; }

/* Profile page points row */
.profile-points-row { border-top: 1px solid var(--border-color, #e5e7eb); margin-top: 0.5rem; padding-top: 0.75rem; }
.profile-points-value { font-weight: 700; color: #d4a000; font-size: 1.05rem; }

/* ─── Training Viewer Shell ─────────────────────────────────────────── */



/* ═══════════════════════════════════════════════════════════════════════
   TRAINING VIEWER — Editorial redesign
   Aesthetic: warm paper canvas, Fraunces serif display, Inter UI,
              JetBrains Mono for technical/numeric, italic accent emphasis.
   Brand:     JTI teal #00a88f primary · amber #e07b2a activity ·
              navy #1a2a4a ink · cream #f2ebe0 paper.
   Layout:    Slide stage on top, ONE unified control panel at bottom
              containing Exit · Module name · Progress · Points · Back · Next.
═══════════════════════════════════════════════════════════════════════ */

:root {
    --tv-paper:    #f2ebe0;
    --tv-paper-2:  #e8e0d2;
    --tv-card:     #fbf7ee;
    --tv-ink:      #1a2a4a;
    --tv-ink-2:    #3d3830;
    --tv-ink-3:    #6b6258;
    --tv-rule:     #d4c9b3;
    --tv-rule-2:   #e2d8c4;
    --tv-accent:   #00a88f;
    --tv-accent-2: #007a6a;
    --tv-amber:    #e07b2a;
    --tv-amber-2:  #b85f1a;
    --tv-good:     #2d5e3f;
    --tv-bad:      #8a2a1a;
    --tv-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --tv-serif:    "Fraunces", Georgia, "Times New Roman", serif;
    --tv-sans:     "Inter", system-ui, -apple-system, sans-serif;
}

#trainingViewerSection {
    padding: 2rem 1.5rem !important;
    background: var(--tv-paper);
    background-image: radial-gradient(rgba(29,26,22,0.025) 1px, transparent 1px);
    background-size: 4px 4px;
    color: var(--tv-ink);
}

.tv-shell {
    font-family: var(--tv-sans);
}

/* Stage — just centres the card horizontally */
.tv-stage {
    display: flex;
    justify-content: center;
}

.tv-viewport {
    width: 100%;
    max-width: 920px;
}

/* Slide content fills the remaining card height and scrolls if needed */
.tv-slide-content {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    min-height: 0;       /* required for flex children to shrink/scroll */
}
.tv-slide-content.tv-slide-in { animation: tvSlideIn 0.32s ease forwards; }
@keyframes tvSlideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════
   TRAINING CARD SHELL — outer wrapper that IS the card.
   overflow: hidden clips slide backgrounds to the rounded corners.
   Top strip (header) + progress hairline + slide content + bottom strip (footer)
   all sit inside this single visual card.
═══════════════════════════════════════════════════════════════════════ */
.tv-card-shell {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--tv-rule-2);
    box-shadow: 0 4px 32px rgba(29,26,22,0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Fixed height so the card never resizes between slides.
       Header (~52px) + progress (3px) + footer (~58px) ≈ 113px overhead. */
    height: clamp(560px, calc(100dvh - 240px), 820px);
}

/* ── Top strip: 🔥 pts · module name · ✕ ──────────────────────────── */
.tv-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--tv-rule-2);
    flex-shrink: 0;
}

/* Points pill */
.tv-header-points {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-family: var(--tv-sans);
    font-weight: 600;
    font-size: 13px;
    color: var(--tv-ink);
    background: var(--tv-paper);
    border: 1px solid var(--tv-rule);
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.tv-header-points .points-flame { font-size: 13px; }
.tv-pts-label {
    font-family: var(--tv-mono);
    font-size: 10px;
    color: var(--tv-ink-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Module name — centred */
.tv-cp-module {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    gap: 1px;
    flex: 1;
    text-align: center;
    min-width: 0;
}
.tv-cp-eyebrow {
    font-family: var(--tv-sans);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tv-accent);
    font-weight: 600;
}
.tv-cp-title {
    font-family: var(--tv-serif);
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    font-weight: 600;
    color: var(--tv-ink);
    font-style: italic;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40ch;
}

/* ✕ Exit button — icon-only circle */
.tv-exit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1.5px solid var(--tv-rule);
    border-radius: 50%;
    color: var(--tv-ink-3);
    cursor: pointer;
    transition: all 0.18s;
    flex-shrink: 0;
    padding: 0;
}
.tv-exit-btn:hover {
    border-color: var(--tv-bad);
    color: var(--tv-bad);
    background: rgba(138,42,26,0.06);
}

/* Progress hairline between header and slide */
.tv-progress-track {
    height: 3px;
    background: var(--tv-paper-2);
    overflow: hidden;
    flex-shrink: 0;
}
.tv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tv-accent) 0%, #39d9b8 100%);
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Bottom strip: [← Previous]  Page X of Y  [Next →] ──────────── */
.tv-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
    border-top: 1px solid var(--tv-rule-2);
    flex-shrink: 0;
}

/* Page count */
.tv-page-count {
    font-family: var(--tv-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--tv-ink-3);
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.tv-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 1.4rem;
    height: 42px;
    min-width: clamp(110px, 13vw, 150px);
    border-radius: 8px;
    font-family: var(--tv-sans);
    font-size: clamp(0.9rem, 1.4vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    letter-spacing: 0.02em;
    justify-content: center;
    flex-shrink: 0;
}

.tv-btn-back {
    background: #fff;
    color: var(--tv-ink-2);
    border: 1.5px solid var(--tv-rule);
}
.tv-btn-back:hover {
    border-color: var(--tv-accent);
    color: var(--tv-accent);
    background: rgba(0,168,143,0.04);
}

.tv-btn-next {
    background: var(--tv-ink);
    color: var(--tv-paper);
    border: 1.5px solid var(--tv-ink);
    box-shadow: 0 3px 14px rgba(26,42,74,0.18);
}
.tv-btn-next:hover:not(:disabled) {
    background: var(--tv-accent);
    border-color: var(--tv-accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0,168,143,0.28);
}
.tv-btn-next:disabled {
    background: var(--tv-rule);
    border-color: var(--tv-rule);
    color: #a09a92;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.tv-btn-finish {
    background: var(--tv-accent) !important;
    border-color: var(--tv-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0,168,143,0.3) !important;
}
.tv-btn-finish:hover:not(:disabled) { background: var(--tv-accent-2) !important; border-color: var(--tv-accent-2) !important; }

@keyframes tvPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,168,143,0.45); }
    50%      { box-shadow: 0 0 0 10px rgba(0,168,143,0); }
}
.tv-btn-pulse { animation: tvPulse 1.5s ease-in-out infinite; }

/* ══════════════════════════════════════════════════════════════════════
   SLIDE BASE — uniform editorial card
═══════════════════════════════════════════════════════════════════════ */
.tv-slide {
    background: var(--tv-card);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(1.75rem, 4vw, 3rem) clamp(1.75rem, 4vw, 3.25rem);
    /* No min-height — card-shell is fixed height; slide fills its allocated space */
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    color: var(--tv-ink);
    box-sizing: border-box;
}

/* Section label (eyebrow) — like "00 · WELCOME" in the reference */
.tv-section-label {
    font-family: var(--tv-sans);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tv-accent);
    margin-bottom: 0.85rem;
    font-weight: 600;
}

/* Optional corner badge for slide types */
.tv-slide-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--tv-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 0.3rem 0.7rem;
}
.tv-badge-learn    { background: rgba(0,168,143,0.1);  color: var(--tv-accent-2); }
.tv-badge-activity { background: rgba(224,123,42,0.12); color: var(--tv-amber-2); }

/* Learning slide — paper white, teal hairline accent */
.tv-slide-light {
    background: var(--tv-card);
    border-top: 3px solid var(--tv-accent);
}

/* Activity slide — warm amber paper */
.tv-slide-activity {
    background: #fcf3e6;
}

/* Hero / dark slide */
.tv-slide-hero {
    background: linear-gradient(140deg, #0e1e30 0%, #1a3a5c 55%, #0a2840 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 3rem;
    min-height: clamp(380px, 56vh, 540px);
}
.tv-hero-left { flex: 1; }
.tv-hero-tagline {
    font-family: var(--tv-sans);
    font-size: 11px;
    font-weight: 600;
    color: rgba(160,196,255,0.85);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}
.tv-hero-title {
    font-family: var(--tv-serif);
    font-size: clamp(2.1rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.05;
    margin: 0 0 1.25rem 0;
    color: #fff;
    letter-spacing: -0.025em;
}
.tv-hero-brand {
    color: #00e6b8;
    font-style: italic;
    font-weight: 500;
}
.tv-hero-sub {
    font-family: var(--tv-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(160,196,255,0.85);
    margin: 0;
}

.tv-hero-right { flex: 0 0 200px; }
.tv-pencil-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tv-pencil {
    height: 110px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, #111 10%, #7ec928 10%, #7ec928 86%, #b5860d 86%);
}

/* ══════════════════════════════════════════════════════════════════════
   TYPOGRAPHY — editorial hierarchy
═══════════════════════════════════════════════════════════════════════ */
.tv-slide-heading {
    font-family: var(--tv-serif);
    font-size: clamp(1.75rem, 3.6vw, 2.6rem);
    font-weight: 600;
    line-height: 1.08;
    margin: 0 0 1rem 0;
    color: var(--tv-ink);
    letter-spacing: -0.025em;
}

/* Quiz-disclaimer slide — shown right before every quiz/activity slide
   for modules the cashier hasn't yet passed. */
.tv-quiz-disclaimer-slide {
    max-width: 640px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.tv-quiz-disclaimer-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #fff8d6;
    border: 1px solid #f1c40f;
    border-left: 6px solid #f1c40f;
    color: #6b4f00;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.35;
}

.tv-quiz-disclaimer-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.tv-quiz-disclaimer-intro {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.tv-quiz-disclaimer-list {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
    line-height: 1.6;
    font-size: 1rem;
}

.tv-quiz-disclaimer-list li + li {
    margin-top: 0.4rem;
}

.tv-quiz-disclaimer-foot {
    font-size: 0.95rem;
    color: var(--text-medium, #555);
    margin: 0;
}

body.dark-mode .tv-quiz-disclaimer-banner {
    background: #4a3a05;
    border-color: #f1c40f;
    color: #fde68a;
}

body.dark-mode .tv-quiz-disclaimer-foot {
    color: #cbd5e1;
}
.tv-slide-heading em,
.tv-slide-heading i {
    font-style: italic;
    color: var(--tv-accent);
    font-weight: 600;
}

.tv-slide-intro {
    font-family: var(--tv-serif);
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    font-style: italic;
    color: var(--tv-ink-2);
    margin-bottom: 1.5rem;
    line-height: 1.55;
    max-width: 62ch;
}
.tv-slide-quote {
    font-family: var(--tv-serif);
    font-size: 1.05rem;
    color: var(--tv-ink-2);
    font-style: italic;
    border-left: 3px solid var(--tv-accent);
    padding-left: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 62ch;
}
.tv-slide-body {
    font-family: var(--tv-sans);
    font-size: 0.97rem;
    color: var(--tv-ink-2);
    line-height: 1.75;
    flex: 1;
    max-width: 70ch;
}
.tv-slide-body strong { color: var(--tv-ink); font-weight: 600; }
.tv-slide-body em { color: var(--tv-ink-2); font-style: italic; }

/* Callouts — paper inset with left bar */
.tv-callout-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tv-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(0,168,143,0.05);
    border: 1px solid rgba(0,168,143,0.2);
    border-left: 3px solid var(--tv-accent);
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.25rem;
    flex: 1;
    min-width: 200px;
    font-family: var(--tv-sans);
    font-size: 0.95rem;
    color: var(--tv-ink-2);
    line-height: 1.55;
}
.tv-callout-icon { font-size: 1.4rem; }
.tv-italic-highlight {
    font-family: var(--tv-serif);
    font-style: italic;
    color: var(--tv-ink-2);
    font-size: 1rem;
    margin-bottom: 1rem;
    max-width: 62ch;
}
.tv-cta-text {
    font-family: var(--tv-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tv-ink);
}

/* Points earn banner */
.tv-points-earn-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--tv-ink);
    color: var(--tv-paper);
    border-radius: 4px;
    padding: 0.5rem 1.1rem;
    font-family: var(--tv-mono);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
}
.tv-points-earn-banner strong { color: #39ff14; font-weight: 600; }

/* Info list */
.tv-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-family: var(--tv-sans);
}
.tv-info-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--tv-rule-2);
    font-size: 0.97rem;
    color: var(--tv-ink-2);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.5;
}
.tv-info-list li:last-child { border-bottom: none; }

/* Dark slide variants */
.tv-slide-dark {
    background: linear-gradient(155deg, #0e1e30 0%, #1a3a5c 100%);
    color: #fff;
    border: none;
}
.tv-dark-header { text-align: center; margin-bottom: 2rem; }
.tv-dark-header h2 {
    font-family: var(--tv-serif);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.3rem 0;
}
.tv-dark-header p {
    font-family: var(--tv-sans);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: #a0c4ff;
    margin: 0 0 0.4rem 0;
    text-transform: uppercase;
    font-weight: 500;
}
.tv-dark-header h3 {
    font-family: var(--tv-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #a0c4ff;
    margin: 0;
    text-transform: uppercase;
}

.tv-progress-levels { display: flex; flex-direction: column; gap: 0.85rem; }
.tv-level-row { display: flex; align-items: center; gap: 0.75rem; }
.tv-level-pct {
    width: 38px;
    font-family: var(--tv-mono);
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
}
/* Track is the full-width container; bar is the colored fill inside */
.tv-level-track { flex: 1; height: 26px; background: rgba(255,255,255,0.08); border-radius: 13px; overflow: hidden; display: flex; align-items: stretch; }
.tv-level-bar { height: 100%; border-radius: 13px; display: flex; align-items: center; justify-content: flex-end; min-width: 18px; }
.tv-bar-0   { width: 5%;   background: rgba(255,255,255,0.18); }
.tv-bar-20  { width: 20%;  background: linear-gradient(90deg, #4299e1, #63b3ed); }
.tv-bar-40  { width: 40%;  background: linear-gradient(90deg, #38b2ac, #4fd1c5); }
.tv-bar-60  { width: 60%;  background: linear-gradient(90deg, #48bb78, #68d391); }
.tv-bar-80  { width: 80%;  background: linear-gradient(90deg, #e07b2a, #f5a85e); }
.tv-bar-100 { width: 100%; background: linear-gradient(90deg, #48bb78, #68d391); box-shadow: 0 0 14px rgba(72,187,120,0.5); }
.tv-level-dot { width: 11px; height: 11px; background: #fff; border-radius: 50%; margin-right: 4px; flex-shrink: 0; box-shadow: 0 0 6px rgba(255,255,255,0.8); }
.tv-level-star { background: transparent; font-size: 1.1rem; }
.tv-level-label {
    font-family: var(--tv-sans);
    font-size: 0.83rem;
    font-weight: 500;
    color: rgba(160,196,255,0.85);
    white-space: nowrap;
}
.tv-level-champion { color: #ffd700 !important; font-weight: 700; }

/* Map list */
.tv-map-list { list-style: none; padding: 0; margin: 0 0 1.5rem 0; font-family: var(--tv-sans); }
.tv-map-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; font-size: 0.97rem; color: var(--tv-ink-2); }
.tv-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.tv-dot-green { background: #48bb78; }
.tv-dot-blue  { background: #4299e1; }
.tv-dot-lock  { background: none; font-size: 1rem; }

.tv-callout-box {
    background: rgba(0,168,143,0.05);
    border-left: 3px solid var(--tv-accent);
    border-radius: 0 6px 6px 0;
    padding: 1.1rem 1.5rem;
    font-family: var(--tv-sans);
}
.tv-callout-box p { margin: 0.3rem 0; font-size: 0.93rem; color: var(--tv-ink-2); line-height: 1.6; }

/* Module 2 stat-icon — sits above the stat line */
.tv-stat-icon-wrap {
    display: flex;
    justify-content: center;
    margin: 1.2rem 0 0.4rem;
}
.tv-stat-icon {
    width: 64px;
    height: 64px;
    color: var(--tv-accent);
}

/* Module 2 stat-line — sits in the gap between intro body and callout */
.tv-slide-stat {
    font-family: var(--tv-serif);
    font-size: 1.6rem;
    color: var(--tv-accent);
    text-align: center;
    margin: 1.5rem 0;
    letter-spacing: 0.02em;
}
.tv-slide-stat strong { color: var(--tv-accent); font-weight: 700; }

/* Module 2 rejuvenation slide image */
.tv-rejuvenation-image-wrap {
    display: flex;
    justify-content: center;
    margin: 1.2rem 0;
}
.tv-rejuvenation-image {
    max-width: 100%;
    max-height: 320px;
    border-radius: 6px;
    object-fit: contain;
}

/* Disclaimer */
.tv-disclaimer-block {
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--tv-rule-2);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    max-width: 680px;
    font-family: var(--tv-sans);
}
.tv-disclaimer-title {
    font-family: var(--tv-serif);
    color: var(--tv-ink);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    font-style: italic;
}
.tv-disclaimer-block p { color: var(--tv-ink-2); line-height: 1.75; margin: 0; font-size: 0.93rem; }

/* Agenda */
.tv-agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.85rem;
}
.tv-agenda-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.95rem 1.1rem;
    border-radius: 4px;
    border: 1px solid var(--tv-rule-2);
    background: rgba(255,255,255,0.5);
    font-family: var(--tv-sans);
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--tv-ink-2);
}
.tv-agenda-item.tv-agenda-active {
    border-color: var(--tv-accent);
    background: rgba(0,168,143,0.06);
}
.tv-agenda-num {
    font-family: var(--tv-mono);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--tv-accent);
    flex-shrink: 0;
    line-height: 1;
}

/* Module start slide */
.tv-slide-module-start {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    background: var(--tv-card);
    border-top: 3px solid var(--tv-accent);
    min-height: 100%;
}
.tv-module-start-left { flex: 1; }
.tv-module-start-title {
    font-family: var(--tv-serif);
    font-size: clamp(1.85rem, 3.8vw, 2.7rem);
    font-weight: 600;
    color: var(--tv-ink);
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.025em;
}
.tv-tag-row { display: flex; align-items: center; gap: 0.75rem; }
.tv-module-tag-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-family: var(--tv-sans); }
.tv-tag-pill {
    background: rgba(0,168,143,0.1);
    color: var(--tv-accent-2);
    border-radius: 3px;
    padding: 0.32rem 0.85rem;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.tv-tag-points {
    background: var(--tv-ink);
    color: #39ff14;
    border-radius: 3px;
    padding: 0.32rem 0.85rem;
    font-family: var(--tv-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
}
.tv-module-start-right { flex: 0 0 280px; text-align: center; }
.tv-eye-icon { margin-bottom: 1rem; display: flex; justify-content: center; }
.tv-eye-img { width: 260px; height: 200px; object-fit: contain; }
.tv-start-cta {
    font-family: var(--tv-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tv-ink);
    font-style: italic;
}

/* Brand hero grid */
.tv-brand-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.tv-brand-hero-card {
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    border: 1px solid var(--tv-rule-2);
}
.tv-brand-hero-person { flex: 1; background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%); min-height: 130px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tv-brand-hero-img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.tv-brand-camel   .tv-brand-hero-person { background: linear-gradient(180deg, #f8d7d7, #e8a0a0); }
.tv-brand-winston .tv-brand-hero-person { background: linear-gradient(180deg, #d7e4f8, #a0b8e8); }
.tv-brand-glamour .tv-brand-hero-person { background: linear-gradient(180deg, #e8d7f5, #c0a0d8); }
.tv-brand-nakhla  .tv-brand-hero-person { background: linear-gradient(180deg, #d7f0e8, #a0d4c0); }
.tv-brand-logo-pill {
    padding: 0.65rem;
    font-family: var(--tv-sans);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: #fff;
    letter-spacing: 0.04em;
}
.tv-logo-camel   { background: #c8175a; }
.tv-logo-winston { background: #1a3a8c; }
.tv-logo-glamour { background: #4a2070; }
.tv-logo-nakhla  { background: #c0392b; }
/* Brand logo image (replaces pill text) */
.tv-brand-logo-img {
    max-width: 100%;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Brand profile list */
.tv-brand-profile-list { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.5rem; }
.tv-brand-profile {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(255,255,255,0.6);
    border-radius: 4px;
    border: 1px solid var(--tv-rule-2);
    font-family: var(--tv-sans);
}
.tv-brand-emoji { font-size: 1.4rem; flex-shrink: 0; }
.tv-brand-profile h3 {
    font-family: var(--tv-serif);
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    color: var(--tv-ink);
    font-weight: 600;
    font-style: italic;
}
.tv-brand-profile p { margin: 0; font-size: 0.88rem; color: var(--tv-ink-2); line-height: 1.55; }

.tv-curiosity-trigger {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(245,200,66,0.12);
    border: 1px solid #f0d484;
    border-left: 3px solid #d4a829;
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.15rem;
    font-family: var(--tv-sans);
    font-size: 0.9rem;
    color: var(--tv-ink-2);
    line-height: 1.55;
}
.tv-curiosity-trigger span { font-size: 1.25rem; flex-shrink: 0; }

/* JTI IS slide */
.tv-slide-jti-is { display: flex; align-items: center; gap: 3rem; }
.tv-jti-logo-big { flex: 0 0 180px; display: flex; align-items: center; justify-content: center; }
.tv-jti-logo-img { max-width: 160px; width: 100%; height: auto; object-fit: contain; }
.tv-jti-is-list { display: flex; flex-direction: column; gap: 0.6rem; }
.tv-jti-is-list p {
    font-family: var(--tv-serif);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--tv-ink);
    margin: 0;
    line-height: 1.3;
    font-style: italic;
}
.tv-jti-is-list strong { color: var(--tv-accent); font-style: normal; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════
   ACTIVITY / QUIZ — editorial layout
═══════════════════════════════════════════════════════════════════════ */
.tv-activity-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.tv-activity-badge {
    font-family: var(--tv-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(224,123,42,0.12);
    color: var(--tv-amber-2);
    border-radius: 3px;
    padding: 0.32rem 0.8rem;
    white-space: nowrap;
    align-self: flex-start;
}
.tv-activity-title {
    font-family: var(--tv-serif);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--tv-ink);
    margin: 0;
    letter-spacing: -0.02em;
    font-style: italic;
}
.tv-activity-instruction {
    font-family: var(--tv-sans);
    font-size: 0.93rem;
    color: var(--tv-ink-2);
    margin: 0.6rem 0 1.75rem;
    line-height: 1.6;
    padding: 0.85rem 1.15rem;
    background: rgba(224,123,42,0.06);
    border-left: 3px solid var(--tv-amber);
    border-radius: 0 6px 6px 0;
}

.tv-matching-game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 1.25rem;
    align-items: start;
}

.tv-match-col-label {
    font-family: var(--tv-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--tv-ink-3);
    margin: 0 0 0.7rem 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* Brand chip */
.tv-match-brand {
    margin-bottom: 0.6rem;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: all 0.18s;
    box-shadow: 0 2px 8px rgba(29,26,22,0.08);
}
.tv-match-brand:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(29,26,22,0.14); }
.tv-match-brand.tv-selected {
    border-color: var(--tv-amber);
    box-shadow: 0 0 0 4px rgba(224,123,42,0.2);
}
.tv-match-brand.tv-matched-correct {
    border-color: #48bb78;
    opacity: 0.6;
    pointer-events: none;
}
.tv-match-brand-name {
    padding: 1rem 1.1rem;
    font-family: var(--tv-sans);
    font-weight: 700;
    font-size: 0.97rem;
    color: #fff;
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Description card */
.tv-match-desc {
    padding: 0.9rem 1.15rem;
    border-radius: 4px;
    border: 1.5px solid var(--tv-rule);
    background: rgba(255,255,255,0.6);
    margin-bottom: 0.6rem;
    cursor: pointer;
    font-family: var(--tv-sans);
    font-size: 0.92rem;
    color: var(--tv-ink);
    transition: all 0.18s;
    line-height: 1.5;
}
.tv-match-desc:hover {
    border-color: var(--tv-amber);
    background: #fff8ee;
    transform: translateY(-1px);
}
.tv-match-desc.tv-matched-correct {
    border-color: #48bb78;
    background: #f0fff4;
    color: var(--tv-good);
    pointer-events: none;
}

/* Feedback */
.tv-match-feedback {
    padding: 0.9rem 1.15rem;
    border-radius: 4px;
    font-family: var(--tv-sans);
    font-weight: 500;
    font-size: 0.93rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tv-feedback-good { background: rgba(45,94,63,0.08); color: var(--tv-good); border-left: 3px solid var(--tv-good); }
.tv-feedback-bad  { background: rgba(138,42,26,0.08); color: var(--tv-bad);  border-left: 3px solid var(--tv-bad); }

/* Matched pairs */
.tv-match-pairs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-family: var(--tv-sans);
}
.tv-pair-chip {
    background: rgba(45,94,63,0.08);
    border: 1px solid #c6f6d5;
    border-radius: 3px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    color: var(--tv-good);
    font-weight: 600;
    letter-spacing: 0.02em;
}

@keyframes tvShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.tv-shake { animation: tvShake 0.4s ease; border-color: var(--tv-bad) !important; }

.tv-brand-bg-camel   { background: linear-gradient(135deg, #c8175a, #a01048); }
.tv-brand-bg-winston { background: linear-gradient(135deg, #1a3a8c, #102870); }
.tv-brand-bg-glamour { background: linear-gradient(135deg, #4a2070, #360f56); }
.tv-brand-bg-nakhla  { background: linear-gradient(135deg, #c0392b, #962d22); }

/* End / retention */
.tv-slide-end { text-align: center; justify-content: center; }
.tv-coming-soon-visual { display: flex; justify-content: center; align-items: center; margin: 1rem 0 2rem; }
.tv-cs-gif { max-width: 100%; max-height: 200px; width: auto; height: auto; border-radius: 8px; }
.tv-retention-quote {
    font-family: var(--tv-serif);
    font-size: clamp(1.3rem, 2.8vw, 1.55rem);
    font-weight: 600;
    font-style: italic;
    color: var(--tv-ink);
    line-height: 1.45;
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
}
.tv-retention-cta {
    font-family: var(--tv-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--tv-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Completion modal */
.tv-completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29,26,22,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: tvFadeIn 0.2s ease;
}
@keyframes tvFadeIn { from { opacity: 0; } to { opacity: 1; } }
.tv-completion-card {
    background: var(--tv-card);
    border-radius: 6px;
    padding: 2.75rem 3rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.32);
    animation: tvSlideUp 0.3s ease;
    border-top: 3px solid var(--tv-accent);
    font-family: var(--tv-sans);
}
@keyframes tvSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.tv-completion-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.tv-completion-card h2 {
    font-family: var(--tv-serif);
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0 0 0.85rem 0;
    color: var(--tv-ink);
    font-style: italic;
    letter-spacing: -0.02em;
}
.tv-completion-card p { font-size: 1rem; color: var(--tv-ink-2); margin: 0 0 1.75rem 0; line-height: 1.6; }
.tv-completion-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    #trainingViewerSection { padding: 1rem 0.75rem !important; }
    .tv-card-header { padding: 0.6rem 1rem; align-items: flex-start; }
    .tv-card-footer { padding: 0.6rem 1rem; }
    .tv-cp-module { padding-top: 0.1rem; }
    .tv-cp-title { font-size: 0.85rem; white-space: normal; overflow: visible; text-overflow: unset; }

    .tv-slide { padding: 1.25rem 1rem; min-height: 100%; }
    .tv-slide-hero, .tv-slide-module-start, .tv-slide-jti-is { flex-direction: column; gap: 0.75rem; }
    .tv-hero-right { display: none; }
    .tv-module-start-left { flex: 0 0 auto; }
    .tv-module-start-right { display: block; flex: unset; width: 100%; }
    .tv-eye-img { width: 180px; height: 140px; }
    .tv-brand-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .tv-matching-game { grid-template-columns: 1fr; gap: 1rem; }
    .tv-agenda-grid { grid-template-columns: repeat(2, 1fr); }

    .tv-nav-btn { min-width: 0; padding: 0 0.85rem; height: 40px; font-size: 0.85rem; }
    .tv-page-count { font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE HAMBURGER MENU — burger button + slide-in drawer
═══════════════════════════════════════════════════════════════════════ */

/* Hamburger button — flex always; hidden on DESKTOP via min-width query below */
.mob-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1.5px solid var(--border-light, #e0e0e0);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.mob-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-dark, #1a1a1a);
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}
.mob-menu-btn:hover { border-color: var(--primary-color, #00a88f); }
/* Animated to X when open */
body.mob-menu-active .mob-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mob-menu-active .mob-menu-btn span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.mob-menu-active .mob-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer backdrop + panel */
.mob-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}
.mob-drawer.mob-drawer-open { display: flex; }

.mob-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    animation: mobFadeIn 0.22s ease;
}
@keyframes mobFadeIn { from { opacity: 0; } to { opacity: 1; } }

.mob-drawer-panel {
    position: relative;
    z-index: 1;
    width: min(85vw, 320px);
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 32px rgba(0,0,0,0.18);
    animation: mobSlideIn 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
@keyframes mobSlideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }

/* Drawer header: logo + close */
.mob-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e8eaed;
    flex-shrink: 0;
}
.mob-drawer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.mob-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1.5px solid #e8eaed;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    transition: all 0.18s;
}
.mob-drawer-close:hover { border-color: #d1d5db; color: #374151; background: #f9fafb; }

/* Drawer nav items */
.mob-drawer-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}
.mob-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    user-select: none;
}
.mob-nav-item svg { flex-shrink: 0; color: #9ca3af; transition: color 0.15s; }
.mob-nav-item:hover { background: rgba(0,168,143,0.06); color: var(--primary-color, #00a88f); border-left-color: var(--primary-color, #00a88f); }
.mob-nav-item:hover svg { color: var(--primary-color, #00a88f); }
.mob-nav-item.active { color: var(--primary-color, #00a88f); border-left-color: var(--primary-color, #00a88f); background: rgba(0,168,143,0.06); }

/* Drawer section labels (Admin Tools / General) */
.mob-drawer-section-label {
    padding: 0.85rem 1.25rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}
.mob-drawer-divider {
    height: 1px;
    background: #e8eaed;
    margin: 0.5rem 1rem;
}

/* Collapsible parent inside the drawer (External Platform Members) */
.mob-nav-item.mob-nav-parent .mob-nav-label { flex: 1; }
.mob-nav-item.mob-nav-parent .mob-nav-caret {
    color: #9ca3af;
    transition: transform 0.18s ease;
}
.mob-nav-item.mob-nav-parent.open .mob-nav-caret {
    transform: rotate(180deg);
    color: var(--primary-color, #00a88f);
}

.mob-nav-submenu {
    display: none;
    flex-direction: column;
}
.mob-nav-submenu.open { display: flex; }
.mob-nav-item.mob-nav-subitem {
    padding-left: 3.1rem;
    font-size: 0.88rem;
}

/* Drawer footer: sign out */
.mob-drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e8eaed;
    flex-shrink: 0;
}
.mob-drawer-signout {
    width: 100%;
    padding: 0.7rem;
    background: transparent;
    border: 1.5px solid #e8eaed;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
}
.mob-drawer-signout:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.05); }

/* Prevent body scroll while drawer is open */
body.mob-menu-active { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE PROFILE BUTTON + PANEL
═══════════════════════════════════════════════════════════════════════ */

/* Profile photo button — hidden on desktop via min-width query */
.mob-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border-light, #e0e0e0);
    background: transparent;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.mob-profile-btn:hover { border-color: var(--primary-color, #00a88f); }
.mob-profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Profile panel — light mode default, dark mode via body class */
.mob-profile-panel {
    display: none;             /* hidden on desktop */
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: min(92vw, 320px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 1500;
    overflow: hidden;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease;
}
/* Dark mode panel */
body.dark-mode .mob-profile-panel {
    background: #1a2332;
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.42);
}
.mob-profile-panel.mob-pp-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Overlay to dim content behind panel */
.mob-pp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(0,0,0,0);
}
.mob-pp-overlay.mob-pp-overlay-open { display: block; }

/* User info row */
.mob-pp-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}
body.dark-mode .mob-pp-user { border-bottom-color: rgba(255,255,255,0.08); }

.mob-pp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}
body.dark-mode .mob-pp-avatar { border-color: rgba(255,255,255,0.2); }

.mob-pp-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mob-pp-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark-mode .mob-pp-name { color: #f1f5f9; }

.mob-pp-role {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
body.dark-mode .mob-pp-role { color: rgba(255,255,255,0.45); }

/* Points row */
.mob-pp-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(0,168,143,0.12);
    font-size: 0.9rem;
    font-weight: 700;
    color: #34d399;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mob-pp-pts-label {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.82rem;
    margin-left: 2px;
}
body.dark-mode .mob-pp-pts-label { color: rgba(255,255,255,0.5); }

/* Living flame icon — animated, drop-in replacement for the 🔥 emoji.
   Sizes itself to surrounding font-size via width/height="1em" on the <svg>. */
.flame-icon {
    display: inline-block;
    vertical-align: -0.15em;
    transform-origin: 50% 90%;
    animation: flame-icon-flicker 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 2px rgba(249,115,22,0.55));
    overflow: visible;
}
.flame-icon-outer {
    transform-origin: 50% 90%;
    animation: flame-icon-sway 2.3s ease-in-out infinite;
}
.flame-icon-inner {
    transform-origin: 50% 90%;
    animation: flame-icon-inner-pulse 1.1s ease-in-out infinite;
}
@keyframes flame-icon-flicker {
    0%,100% { transform: scale(1, 1); }
    20%     { transform: scale(1.04, 0.96); }
    40%     { transform: scale(0.97, 1.05); }
    60%     { transform: scale(1.03, 0.98); }
    80%     { transform: scale(0.98, 1.02); }
}
@keyframes flame-icon-sway {
    0%,100% { transform: skewX(0deg); }
    25%     { transform: skewX(-3deg); }
    75%     { transform: skewX(3deg); }
}
@keyframes flame-icon-inner-pulse {
    0%,100% { opacity: 0.9; transform: scaleY(1); }
    50%     { opacity: 1;   transform: scaleY(0.85); }
}
@media (prefers-reduced-motion: reduce) {
    .flame-icon,
    .flame-icon-outer,
    .flame-icon-inner { animation: none; }
}

/* Divider */
.mob-pp-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.25rem 0;
}

/* Divider — light and dark */
.mob-pp-divider { height: 1px; background: #e5e7eb; margin: 0.25rem 0; }
body.dark-mode .mob-pp-divider { background: rgba(255,255,255,0.08); }

/* Points row — light mode */
.mob-pp-points { background: rgba(0,168,143,0.08); border-bottom: 1px solid #e5e7eb; }
body.dark-mode .mob-pp-points { background: rgba(0,168,143,0.14); border-bottom-color: rgba(255,255,255,0.06); }

/* Action rows — light mode default */
.mob-pp-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
}
.mob-pp-row svg { flex-shrink: 0; color: #9ca3af; }
.mob-pp-row:hover { background: #f9fafb; color: #111827; }
.mob-pp-row:hover svg { color: var(--primary-color, #00a88f); }

/* Dark mode rows */
body.dark-mode .mob-pp-row { color: rgba(255,255,255,0.8); }
body.dark-mode .mob-pp-row svg { color: rgba(255,255,255,0.4); }
body.dark-mode .mob-pp-row:hover { background: rgba(255,255,255,0.06); color: #fff; }
body.dark-mode .mob-pp-row:hover svg { color: var(--primary-color, #00a88f); }

/* Language badge */
.mob-pp-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 6px;
    padding: 0.18rem 0.5rem;
    text-transform: uppercase;
}
body.dark-mode .mob-pp-badge { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

/* Language sub-menu */
.mob-pp-lang-sub {
    display: none;
    flex-direction: column;
    padding: 0.25rem 1.25rem 0.5rem 3.25rem;
    gap: 0.1rem;
}
.mob-pp-lang-sub.mob-pp-lang-open { display: flex; }
.mob-pp-lang-opt {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.87rem;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}
.mob-pp-lang-opt:hover { background: #f3f4f6; color: #111827; }
body.dark-mode .mob-pp-lang-opt { color: rgba(255,255,255,0.6); }
body.dark-mode .mob-pp-lang-opt:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Sign out */
.mob-pp-signout {
    width: calc(100% - 2.5rem);
    margin: 0.75rem 1.25rem 1rem;
    padding: 0.7rem;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    text-align: center;
}
.mob-pp-signout:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.5); color: #b91c1c; }
body.dark-mode .mob-pp-signout { color: #fca5a5; }
body.dark-mode .mob-pp-signout:hover { color: #fff; }

/* Show panel and overlay only on mobile */
@media (max-width: 768px) {
    .mob-profile-btn  { display: flex; }
    .mob-profile-panel { display: flex; }
    /* header position context */
    .header { position: relative; }
}

/* Hide hamburger and profile button on desktop */
@media (min-width: 769px) {
    .mob-menu-btn    { display: none !important; }
    .mob-profile-btn { display: none !important; }
    .mob-profile-panel { display: none !important; }
    .mob-pp-overlay  { display: none !important; }
}

/* In admin mode, the sidebar hides at <=900px — show the hamburger in
   the 769–900px gap so admins always have a way to open the menu. */
@media (min-width: 769px) and (max-width: 900px) {
    .hub-view.admin-mode .mob-menu-btn { display: flex !important; }
}

/* Hide language selector in admin mode */
.hub-view.admin-mode .language-selector { display: none !important; }

/* ─── Brand Identity Match — sequential activity ──────────────────────────── */

/* Step progress dots */
.tv-act-progress {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
}
.tv-act-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1cdc4;
    transition: background 0.3s;
}
.tv-act-dot-done  { background: #4caf50; }
.tv-act-dot-active { background: var(--tv-accent, #c0392b); transform: scale(1.2); }

/* Large brand image display */
.tv-act-brand-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.25rem;
    padding: 0.5rem;
}
.tv-act-brand-img {
    max-height: 90px;
    max-width: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Statement buttons */
.tv-act-statements {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}
.tv-act-stmt {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    background: #fff;
    font-family: var(--tv-sans, 'Inter', sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s;
    line-height: 1.4;
}
.tv-act-stmt:hover:not(:disabled) {
    border-color: var(--tv-accent, #c0392b);
    background: #fef9f9;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.tv-act-stmt-used, .tv-act-stmt[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: transparent;
    background: #f0ede8;
    text-decoration: line-through;
    color: #888;
    pointer-events: none;
}

/* Feedback bar */
.tv-act-feedback {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Completion screen */
.tv-act-complete-icon {
    font-size: 3rem;
    text-align: center;
    margin: 0.5rem 0 0.25rem;
}
.tv-act-complete-msg {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
    line-height: 1.5;
}
.tv-act-pairs-summary {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}
.tv-act-pair-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 0.9rem;
}
.tv-act-pair-brand-img {
    max-height: 32px;
    max-width: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.tv-act-pair-arrow {
    color: #aaa;
    font-weight: 700;
    flex-shrink: 0;
}
.tv-act-pair-text {
    color: #2d2d2d;
    line-height: 1.3;
}

/* Dark mode overrides */
body.dark-mode .tv-act-stmt {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    color: #e8e3d9;
}
body.dark-mode .tv-act-stmt:hover:not(:disabled) {
    background: rgba(255,255,255,0.12);
    border-color: var(--tv-accent, #c0392b);
}
body.dark-mode .tv-act-stmt-used {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.3);
}
body.dark-mode .tv-act-pair-chip {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}
body.dark-mode .tv-act-pair-text { color: #e8e3d9; }

/* ─── Module 2: Video slide ─────────────────────────────────────────────── */
.tv-slide-video { gap: 1rem; }
.tv-video-frame {
    width: 100%;
    max-width: 720px;
    margin: 0.5rem auto 1rem;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tv-video-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}
.tv-video-caption {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* ─── Module 2 quiz / feedback shared ───────────────────────────────────── */
.tv-feedback-good {
    background: rgba(76,175,80,0.12);
    color: #2e7d32;
    border: 1px solid rgba(76,175,80,0.35);
}
.tv-feedback-bad {
    background: rgba(192,57,43,0.10);
    color: #b53528;
    border: 1px solid rgba(192,57,43,0.30);
}

/* ─── Module 3: Core knowledge two-card grid ────────────────────────────── */
.tv-core-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.tv-core-card {
    border-radius: 12px;
    padding: 1.25rem 1.1rem;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tv-core-card h3 {
    margin: 0;
    font-family: var(--tv-serif);
    font-size: 1.15rem;
    color: var(--tv-ink);
    letter-spacing: -0.01em;
}
.tv-core-card p { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--tv-ink-2); }
.tv-core-card .tv-core-sub { font-size: 0.88rem; color: var(--tv-ink-2); opacity: 0.85; }
.tv-core-icon { font-size: 2rem; line-height: 1; }
.tv-core-tar { border-top: 3px solid #e67e22; }
.tv-core-nic { border-top: 3px solid #2980b9; }

/* ─── Module 3: True/False buttons ──────────────────────────────────────── */
.tv-tf-statement {
    width: 100%;
    padding: 1rem 1.25rem;
    margin: 0.5rem 0 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    font-family: var(--tv-serif);
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--tv-ink);
    text-align: center;
}
.tv-tf-buttons {
    display: flex;
    gap: 0.85rem;
    width: 100%;
}
.tv-tf-btn {
    flex: 1;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.12);
    background: #fff;
    font-family: var(--tv-sans);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    color: var(--tv-ink);
}
.tv-tf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.tv-tf-true:hover  { border-color: #4caf50; background: #f4fbf5; }
.tv-tf-false:hover { border-color: #c0392b; background: #fdf5f4; }

/* Reveal states (used after answering, both for MCQ and T/F) */
.tv-act-stmt-correct,
.tv-tf-btn-correct {
    border-color: #4caf50 !important;
    background: rgba(76,175,80,0.15) !important;
    color: #1b5e20 !important;
    opacity: 1 !important;
    text-decoration: none !important;
    pointer-events: none;
}
.tv-act-stmt-wrong,
.tv-tf-btn-wrong {
    border-color: #c0392b !important;
    background: rgba(192,57,43,0.12) !important;
    color: #8a2118 !important;
    opacity: 1 !important;
    text-decoration: line-through !important;
    pointer-events: none;
}
body.dark-mode .tv-act-stmt-correct,
body.dark-mode .tv-tf-btn-correct {
    background: rgba(76,175,80,0.22) !important;
    color: #a5d6a7 !important;
}
body.dark-mode .tv-act-stmt-wrong,
body.dark-mode .tv-tf-btn-wrong {
    background: rgba(192,57,43,0.22) !important;
    color: #f4b8b0 !important;
}

/* ─── Module 3: Title-page bulb decoration ──────────────────────────────── */
.tv-bulb-icon {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* ─── Dark mode overrides for new components ────────────────────────────── */
body.dark-mode .tv-core-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.10);
}
body.dark-mode .tv-core-card h3 { color: #f3eee3; }
body.dark-mode .tv-core-card p,
body.dark-mode .tv-core-card .tv-core-sub { color: #d8d2c5; }

body.dark-mode .tv-tf-statement {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    color: #f3eee3;
}
body.dark-mode .tv-tf-btn {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    color: #f3eee3;
}
body.dark-mode .tv-tf-true:hover  { background: rgba(76,175,80,0.15); }
body.dark-mode .tv-tf-false:hover { background: rgba(192,57,43,0.15); }

body.dark-mode .tv-feedback-good {
    background: rgba(76,175,80,0.18);
    color: #a5d6a7;
    border-color: rgba(76,175,80,0.40);
}
body.dark-mode .tv-feedback-bad {
    background: rgba(192,57,43,0.18);
    color: #f4b8b0;
    border-color: rgba(192,57,43,0.40);
}

/* ─── Module 4: Variant cards (breakdown grid) ─────────────────────────── */
.tv-variant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin: 0.5rem 0 1rem;
}
.tv-variant-card {
    border-radius: 14px;
    padding: 1.1rem 1rem;
    border: 2px solid;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 96px;
}
.tv-variant-tag {
    font-family: var(--tv-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.tv-variant-name {
    font-family: var(--tv-sans);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    margin: 0;
}
.tv-variant-mini-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: var(--tv-ink-2);
}
.tv-variant-mini-list li { line-height: 1.4; }

/* ─── Module 4: Variant detail rows ─────────────────────────────────────── */
.tv-variant-detail {
    margin: 0.75rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
}
.tv-variant-detail-head {
    padding: 0.7rem 1rem;
    font-family: var(--tv-sans);
    font-size: 1rem;
    letter-spacing: 0.01em;
}
.tv-variant-detail-body {
    list-style: disc;
    padding: 0.75rem 1.25rem 0.75rem 2rem;
    margin: 0;
    color: var(--tv-ink-2);
    font-size: 0.95rem;
    line-height: 1.5;
}
.tv-variant-detail-body li { margin: 0.25rem 0; }

/* ─── Module 4: Feature panels (per variant) ────────────────────────────── */
.tv-variant-feature {
    border-radius: 14px;
    border: 2px solid;
    padding: 1.5rem 1.25rem;
    text-align: center;
}
.tv-variant-feature-title {
    font-family: var(--tv-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}
.tv-variant-feature-sub {
    font-family: var(--tv-sans);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    color: var(--tv-ink-2);
    margin-bottom: 0.75rem;
}
.tv-variant-feature-points {
    list-style: none;
    padding: 0;
    margin: 0 auto 0.85rem;
    max-width: 420px;
    font-size: 1rem;
    color: var(--tv-ink);
    line-height: 1.7;
    text-align: left;
}
.tv-variant-feature-points li::before {
    content: '•';
    margin-right: 0.5rem;
    color: inherit;
    opacity: 0.6;
}
.tv-variant-feature-brands {
    font-size: 0.88rem;
    color: var(--tv-ink-3);
    margin: 0;
    font-style: italic;
}

/* ─── Module 4: Match-activity picker grid ──────────────────────────────── */
.tv-mod4-prompt {
    text-align: center;
    font-family: var(--tv-serif);
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--tv-ink);
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
}
.tv-variant-pick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    width: 100%;
}
.tv-variant-pick {
    border-radius: 12px;
    padding: 1rem 0.75rem;
    border: 2px solid;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.tv-variant-pick:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}
.tv-variant-pick-tag {
    font-family: var(--tv-serif);
    font-style: italic;
    font-size: 0.92rem;
}
.tv-variant-pick-name {
    font-family: var(--tv-sans);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

/* ─── Module 4: Pack thumbnails (galleries) ─────────────────────────────── */
.tv-pack-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.55);
    border-radius: 10px;
}
.tv-pack-thumb {
    width: 100%;
    height: 90px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
    transition: transform 0.18s;
}
.tv-pack-thumb:hover {
    transform: scale(1.08);
}
.tv-variant-detail-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
}
.tv-variant-hero-pack {
    width: 80px;
    height: 110px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    padding: 4px;
}
.tv-variant-detail-text {
    flex: 1;
    min-width: 0;
}
.tv-variant-pack-name {
    font-family: var(--tv-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--tv-ink);
    margin: 0 0 0.4rem 0;
    letter-spacing: 0.01em;
}
.tv-variant-detail-row .tv-variant-detail-body {
    padding: 0;
    margin: 0;
    flex: 1;
    list-style: disc;
    padding-left: 1.25rem;
}

/* ─── Module 4: Drag & drop matching activity ──────────────────────────── */
.tv-slide-mod4-match { gap: 0.5rem; }
.tv-mod4-progress-line {
    text-align: center;
    font-size: 0.92rem;
    color: var(--tv-ink-2);
    margin: 0.25rem 0 0.5rem;
}
.tv-mod4-progress-line strong { color: var(--tv-accent, #c0392b); }

.tv-drop-zone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}
.tv-drop-zone {
    border: 2px dashed;
    border-radius: 12px;
    padding: 0.85rem 0.6rem 0.55rem;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.18s, box-shadow 0.18s;
}
.tv-drop-zone-tag {
    font-family: var(--tv-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}
.tv-drop-zone-name {
    font-family: var(--tv-sans);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.45rem;
}
.tv-drop-zone-bin {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    min-height: 56px;
}
.tv-drop-zone-hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    border-style: solid;
}
.tv-dropped-pack {
    width: 36px;
    height: 50px;
    object-fit: contain;
    background: #fff;
    border-radius: 3px;
    padding: 2px;
    border: 2px solid transparent;
}
.tv-dropped-correct { border-color: #4caf50; }
.tv-dropped-wrong { border-color: #c0392b; }

.tv-pack-tray-wrap {
    background: rgba(0,0,0,0.04);
    border-radius: 12px;
    padding: 0.55rem 0.75rem 0.7rem;
}
.tv-pack-tray-label {
    font-family: var(--tv-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tv-ink-3);
    margin-bottom: 0.4rem;
}
.tv-pack-tray {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 80px;
    align-items: center;
}
.tv-pack-tray-empty {
    color: var(--tv-ink-3);
    font-style: italic;
    font-size: 0.92rem;
    margin: 0 auto;
}
.tv-pack-drag {
    width: 55px;
    height: 75px;
    object-fit: contain;
    background: #fff;
    border-radius: 5px;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.18s, box-shadow 0.18s;
}
.tv-pack-drag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}
.tv-pack-drag.tv-pack-dragging {
    cursor: grabbing;
    /* No transform while dragging — keeps the visual rect 1:1 with the
       position:fixed coords so the pack stays exactly under the cursor. */
    transform: none !important;
    box-shadow: 0 14px 28px rgba(0,0,0,0.30);
    opacity: 0.95;
    transition: none !important;
}

body.dark-mode .tv-pack-tray-wrap { background: rgba(255,255,255,0.05); }
body.dark-mode .tv-pack-drag,
body.dark-mode .tv-dropped-pack { background: rgba(255,255,255,0.92); }

@media (max-width: 640px) {
    .tv-drop-zone-grid { gap: 0.5rem; }
    .tv-drop-zone { min-height: 110px; padding: 0.7rem 0.4rem 0.45rem; }
    .tv-drop-zone-tag { font-size: 0.88rem; }
    .tv-drop-zone-name { font-size: 0.85rem; }
    .tv-dropped-pack { width: 30px; height: 42px; }
    .tv-pack-drag { width: 48px; height: 64px; }
}

/* ─── Module 4: Title page magnifier ────────────────────────────────────── */
.tv-magnifier-icon {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* ─── Dark mode for Module 4 ────────────────────────────────────────────── */
body.dark-mode .tv-variant-detail { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.10); }
body.dark-mode .tv-variant-detail-body { color: #d8d2c5; }
body.dark-mode .tv-mod4-prompt {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    color: #f3eee3;
}
body.dark-mode .tv-variant-mini-list { color: #d8d2c5; }
body.dark-mode .tv-variant-feature-points { color: #f3eee3; }
body.dark-mode .tv-variant-feature-brands { color: #b8b1a3; }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tv-core-grid { grid-template-columns: 1fr; }
    .tv-tf-buttons { flex-direction: column; }
    .tv-video-frame { aspect-ratio: 16 / 9; }
    .tv-variant-grid { grid-template-columns: 1fr; }
    .tv-variant-pick-grid { grid-template-columns: 1fr; }
    .tv-pack-gallery { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 0.5rem; }
    .tv-pack-thumb { height: 75px; }
    .tv-variant-detail-row { flex-direction: column; text-align: center; }
    .tv-variant-detail-row .tv-variant-detail-body { padding-left: 1.25rem; text-align: left; }
}

/* ─── Module 5: Brand slides (PPT-faithful table layout) ────────────────── */
.tv-mod5-brand-slide { gap: 0.4rem; padding: 0.75rem !important; }

.tv-mod5-bslide-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-bottom: 2px solid rgba(0,0,0,0.10);
    padding-bottom: 0.4rem;
    margin-bottom: 0.3rem;
}
.tv-mod5-bslide-info { display: flex; flex-direction: column; gap: 0.1rem; }
.tv-mod5-bslide-seg-title { font-weight: 700; font-size: 1rem; color: var(--tv-ink); }
.tv-mod5-bslide-info > span:last-child { font-size: 0.78rem; color: var(--tv-ink-2); line-height: 1.4; }
.tv-mod5-bslide-subtitle { font-weight: 700; font-size: 0.88rem; color: var(--tv-ink); }

/* PowerPoint-style table — light grey background, softer than harsh white */
.tv-mod5-brand-tbl {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ececec;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

/* Logo header row */
.tv-mod5-tbl-logo-row {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 1fr;
    gap: 0;
    background: #ececec;
    border-bottom: 1px solid #ccc;
}
.tv-mod5-tbl-seg-cell {
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-right: 1px solid #bfbfbf;
}
.tv-mod5-tbl-logo-cell {
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;
    min-height: 40px;
    border-right: 1px solid #bfbfbf;
}
.tv-mod5-tbl-logo-cell:last-child { border-right: none; }
.tv-mod5-tbl-logo { max-height: 28px; max-width: 90px; object-fit: contain; }
.tv-mod5-tbl-logo-pmi { max-width: 130px; }
.tv-mod5-bat-wm { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.03em; color: #1d3c6e; }

/* Body grid — single grid so segment pill can span both pack rows */
.tv-mod5-tbl-body {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    background: #ececec;
}

/* Segment label pills */
.tv-mod5-seg-pill-premium,
.tv-mod5-seg-pill-mid,
.tv-mod5-seg-pill-value {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #fff;
    padding: 0.4rem 0.2rem;
    grid-row: 1 / span 2;
    grid-column: 1;
}
.tv-mod5-seg-pill-premium { background: #b8860b; }
.tv-mod5-seg-pill-mid     { background: #1a5fa8; }
.tv-mod5-seg-pill-value   { background: #6a3d9a; grid-row: 1; }

/* Value slide: single pack row */
.tv-mod5-tbl-body-1row { grid-template-rows: auto; }
.tv-mod5-tbl-body-1row .tv-mod5-seg-pill-value { grid-row: 1; }

/* 10s slide: 3 segments × 2 companies */
.tv-mod5-tbl-logo-row-2col { grid-template-columns: 72px 1fr 1fr; }
.tv-mod5-tbl-body-3seg {
    grid-template-columns: 72px 1fr 1fr;
    grid-template-rows: auto auto auto;
}
.tv-mod5-seg-pill-1row {
    grid-row: auto !important;
    grid-column: 1;
}

/* Pack image cells */
/* Pack cells — soft grey background, with vertical separators between
   company columns (JTI / BAT / PMI). Last cell in each row drops it. */
.tv-mod5-tbl-pack-cell,
.tv-mod5-tbl-pack-cell-empty-white,
.tv-mod5-tbl-pack-pmi-value {
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    gap: 0.25rem;
    border-right: 1px solid #bfbfbf;
}
/* Drop the divider on the rightmost cell of each row. 3-company table uses
   nth-child(4n) (seg + 3 companies); 2-company table uses nth-child(3n). */
.tv-mod5-tbl-body > .tv-mod5-tbl-pack-cell:nth-child(4n),
.tv-mod5-tbl-body > .tv-mod5-tbl-pack-cell-empty-white:nth-child(4n),
.tv-mod5-tbl-body > .tv-mod5-tbl-pack-pmi-value:nth-child(4n),
.tv-mod5-tbl-body-3seg > .tv-mod5-tbl-pack-cell:nth-child(3n),
.tv-mod5-tbl-body-3seg > .tv-mod5-tbl-pack-cell-empty-white:nth-child(3n),
.tv-mod5-tbl-body-3seg > .tv-mod5-tbl-pack-pmi-value:nth-child(3n) {
    border-right: none;
}
.tv-mod5-tbl-pack-cell-empty { display: none; }
.tv-mod5-pack-multi { flex-wrap: wrap; }

/* Strip images (wide PPTX extracts) */
.tv-mod5-strip {
    width: 100%;
    max-height: 95px;
    height: auto;
    object-fit: contain;
    display: block;
}
/* Individual clean single-pack images */
.tv-mod5-solo {
    height: 85px;
    width: auto;
    max-width: 28%;
    object-fit: contain;
    flex-shrink: 0;
}
/* Rotate a landscape pack image upright */
.tv-mod5-rotate90 { transform: rotate(90deg); }
/* Force all BAT packs to the exact same rendered height */
.tv-mod5-bat-uniform {
    height: 80px !important;
    width: auto;
    max-width: 30%;
    object-fit: contain;
}
.tv-mod5-strip-solo {
    max-height: 85px;
    max-width: 45%;
    object-fit: contain;
}

@media (max-width: 640px) {
    .tv-mod5-tbl-logo-row { grid-template-columns: 52px 1fr 1fr 1fr; }
    .tv-mod5-tbl-body    { grid-template-columns: 52px 1fr 1fr 1fr; }
    /* Slide 9 (2-company variant): keep header columns matched to the
       3-seg body so JTI and BAT line up over their pack cells. Without
       this, the generic .tv-mod5-tbl-logo-row rule above clobbers the
       2-col override and the header gets 4 columns while the body has 3. */
    .tv-mod5-tbl-logo-row.tv-mod5-tbl-logo-row-2col { grid-template-columns: 52px 1fr 1fr; }
    .tv-mod5-tbl-body-3seg { grid-template-columns: 52px 1fr 1fr; }
    .tv-mod5-bat-wm { font-size: 0.95rem; }
    .tv-mod5-strip, .tv-mod5-strip-solo { max-height: 65px; }
    .tv-mod5-tbl-pack-cell { padding: 0.15rem; }
}

/* ─── Module 5: Hero title slide ────────────────────────────────────────── */
.tv-slide-mod5-hero { flex-direction: row; justify-content: space-between; align-items: center; gap: 1rem; background: #0d2240; }
.tv-mod5-hero-left { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; z-index: 1; }
.tv-mod5-hero-right { flex: 1; display: flex; justify-content: center; align-items: flex-end; max-height: 100%; }
.tv-mod5-hero-img { max-height: 280px; width: auto; object-fit: contain; }

/* ─── Module 5: Points banner ───────────────────────────────────────────── */
.tv-mod5-points-banner {
    display: flex; align-items: center; gap: 0.85rem;
    background: rgba(26,138,74,0.10); border: 1.5px solid rgba(26,138,74,0.3);
    border-radius: 10px; padding: 0.6rem 1rem; margin-bottom: 0.75rem;
}
.tv-mod5-cap { height: 42px; width: auto; }
.tv-mod5-pts-line { font-family: var(--tv-sans); font-size: 0.95rem; color: var(--tv-ink); }
.tv-mod5-pts-line strong { color: #1a8a4a; }

/* ─── Module 5: Segment table ───────────────────────────────────────────── */
.tv-segment-table { border-collapse: collapse; width: 100%; margin-top: 1rem; display: table; font-size: 0.9rem; }
.tv-seg-row { display: grid; grid-template-columns: 1.2fr 2fr 2fr 1fr; gap: 0.5rem; padding: 0.65rem 0.85rem; border-bottom: 1px solid rgba(0,0,0,0.07); align-items: center; }
.tv-seg-header { font-weight: 700; background: rgba(0,0,0,0.04); border-radius: 6px 6px 0 0; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tv-ink-2); }
.tv-seg-premium { border-left: 3px solid #b8860b; }
.tv-seg-mid      { border-left: 3px solid #1a5fa8; }
.tv-seg-value    { border-left: 3px solid #6a3d9a; }

/* ─── Module 5: Segment cards (3-column) ────────────────────────────────── */
.tv-seg-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.7rem; }
.tv-seg-cards-3col { margin-top: 0.5rem; }
.tv-seg-card { border-radius: 12px; padding: 0.85rem; border: 2px solid; font-size: 0.88rem; line-height: 1.45; }
.tv-seg-card p { margin: 0.2rem 0; }
.tv-seg-card ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.tv-seg-card li { margin: 0.2rem 0; }
.tv-seg-card-head { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }
.tv-seg-card-premium { border-color: #b8860b; background: rgba(184,134,11,0.07); }
.tv-seg-card-premium .tv-seg-card-head { color: #b8860b; }
.tv-seg-card-mid     { border-color: #1a5fa8; background: rgba(26,95,168,0.07); }
.tv-seg-card-mid .tv-seg-card-head { color: #1a5fa8; }
.tv-seg-card-value   { border-color: #6a3d9a; background: rgba(106,61,154,0.07); }
.tv-seg-card-value .tv-seg-card-head { color: #6a3d9a; }

/* ─── Module 5: Segment feature panels with company rows ────────────────── */
.tv-seg-feature-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.tv-seg-label-img { width: 130px; border-radius: 8px; flex-shrink: 0; }
.tv-seg-feature-head p { margin: 0.15rem 0; font-size: 0.88rem; color: var(--tv-ink); }
.tv-seg-brands-title { font-weight: 700; margin-top: 0.4rem !important; font-size: 0.9rem !important; }
.tv-seg-company-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.6rem; }
.tv-seg-company { border: 1px solid rgba(0,0,0,0.08); border-radius: 8px; padding: 0.5rem; background: #fff; display: flex; flex-direction: column; gap: 0.4rem; align-items: center; }
.tv-co-logo { max-height: 30px; max-width: 100px; object-fit: contain; }
.tv-co-logo-text { font-weight: 900; font-size: 1.1rem; letter-spacing: 0.05em; }
.tv-seg-feature-head-premium .tv-seg-brands-title { color: #b8860b; }
.tv-seg-feature-head-mid .tv-seg-brands-title     { color: #1a5fa8; }
.tv-seg-feature-head-value .tv-seg-brands-title   { color: #6a3d9a; }

/* ─── Module 5: Affordability / Preference / Retail cards ──────────────── */
.tv-seg-afford { border-radius: 10px; padding: 0.75rem; font-size: 0.87rem; line-height: 1.5; border: 1.5px solid; }
.tv-seg-afford ul { margin: 0.4rem 0 0.5rem; padding-left: 1.1rem; }
.tv-seg-afford li { margin: 0.15rem 0; }
.tv-seg-afford-head { font-weight: 700; font-size: 0.93rem; margin-bottom: 0.4rem; }
.tv-seg-afford-role { font-size: 0.84rem; color: var(--tv-ink-2); margin-top: 0.45rem; line-height: 1.4; }
.tv-seg-afford-premium { border-color: #b8860b; background: rgba(184,134,11,0.07); }
.tv-seg-afford-premium .tv-seg-afford-head { color: #b8860b; }
.tv-seg-afford-mid     { border-color: #1a5fa8; background: rgba(26,95,168,0.07); }
.tv-seg-afford-mid .tv-seg-afford-head     { color: #1a5fa8; }
.tv-seg-afford-value   { border-color: #6a3d9a; background: rgba(106,61,154,0.07); }
.tv-seg-afford-value .tv-seg-afford-head   { color: #6a3d9a; }

/* ─── Module 5: 3-col drop-zone grid ────────────────────────────────────── */
.tv-drop-zone-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ─── Module 5: Blend slides ────────────────────────────────────────────── */
.tv-blend-intro-row { display: flex; gap: 1rem; margin-top: 1.25rem; }
.tv-blend-teaser { flex: 1; border-radius: 10px; padding: 1rem; border: 1.5px solid rgba(0,0,0,0.12); display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.95rem; }
.tv-blend-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.tv-blend-american { border-color: #7a4f2d; background: rgba(122,79,45,0.08); }
.tv-blend-virginia { border-color: #d4a847; background: rgba(212,168,71,0.08); }
.tv-blend-feature { display: flex; gap: 2rem; align-items: center; margin-top: 0.5rem; }
.tv-blend-feature-main { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.tv-blend-icon { width: 48px; height: 48px; border-radius: 50%; }
.tv-blend-title { font-family: var(--tv-serif); font-size: 1.6rem; font-weight: 600; margin: 0; }
.tv-blend-tagline { font-size: 1.05rem; font-weight: 600; color: var(--tv-ink); margin: 0; }
.tv-blend-analogy { font-size: 0.95rem; color: var(--tv-ink-2); margin: 0; }
.tv-blend-images { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.tv-blend-tobacco { max-width: 180px; max-height: 140px; object-fit: contain; }
.tv-blend-analogy-img { max-width: 180px; max-height: 120px; object-fit: contain; }
.tv-mod5-spot-packs { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin: 0.5rem 0; }
.tv-mod5-spot-pack { height: 160px; width: auto; object-fit: contain; border-radius: 4px; }
.tv-mod5-vs { height: 60px; width: auto; }
.tv-blend-brands-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.75rem; }
.tv-blend-brands-box { border-radius: 12px; border: 2px solid rgba(0,0,0,0.12); padding: 0.75rem; }
.tv-blend-brands-american { border-color: #7a4f2d; background: rgba(122,79,45,0.06); }
.tv-blend-brands-virginia { border-color: #d4a847; background: rgba(212,168,71,0.06); }
.tv-blend-brands-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.tv-blend-brands-american .tv-blend-brands-label { color: #7a4f2d; }
.tv-blend-brands-virginia .tv-blend-brands-label { color: #b8860b; }

/* ─── Module 5: Dark mode ───────────────────────────────────────────────── */
body.dark-mode .tv-seg-card { background: rgba(255,255,255,0.04) !important; }
body.dark-mode .tv-seg-afford { background: rgba(255,255,255,0.04) !important; }
body.dark-mode .tv-seg-company { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
body.dark-mode .tv-blend-american, body.dark-mode .tv-blend-virginia { background: rgba(255,255,255,0.04); }

/* ─── Module 5: Mobile ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tv-slide-mod5-hero { flex-direction: column; overflow: hidden; }
    .tv-mod5-hero-left { flex-shrink: 0; }
    .tv-mod5-hero-right { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
    .tv-mod5-hero-img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; }
    .tv-seg-cards, .tv-seg-cards-3col { grid-template-columns: 1fr; }
    .tv-seg-company-row { grid-template-columns: 1fr; }
    .tv-seg-row { grid-template-columns: 1fr 1fr; font-size: 0.82rem; }
    .tv-drop-zone-grid-3 { grid-template-columns: 1fr; }
    .tv-blend-feature { flex-direction: column; }
    .tv-blend-brands-row { grid-template-columns: 1fr; }
    .tv-mod5-spot-pack { height: 110px; }
}

/* ─── Module 6: Variant Masterclass ─────────────────────────────────────── */
.tv-slide-mod6-hero { flex-direction: row; justify-content: space-between; align-items: center; gap: 1rem; background: #1da61d; }
.tv-mod6-hero-left { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; z-index: 1; }
.tv-mod6-hero-sub { font-size: 1.15rem; font-weight: 600; margin: 0; }
.tv-mod6-hero-right { flex: 1; display: flex; align-items: flex-end; justify-content: flex-end; max-height: 100%; overflow: hidden; }
.tv-mod6-hero-img { max-height: 280px; width: auto; object-fit: contain; }

/* Blend header bar */
.tv-mod6-blend-header { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 0.6rem; border-bottom: 2px solid rgba(0,0,0,0.10); margin-bottom: 0.75rem; }
.tv-mod6-blend-title { font-family: var(--tv-serif); font-size: 1.5rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.tv-mod6-blend-sub { font-size: 0.92rem; margin: 0.1rem 0 0; color: var(--tv-ink-2); }
.tv-mod6-blend-american .tv-mod6-blend-title { color: #5a3515; }
.tv-mod6-blend-virginia .tv-mod6-blend-title { color: #8a6800; }

/* Two-column card layout */
.tv-mod6-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.tv-mod6-col-card { border-radius: 10px; padding: 0.85rem 1rem; border: 1.5px solid; font-size: 0.88rem; line-height: 1.5; }
.tv-mod6-col-card h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.tv-mod6-col-card ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.tv-mod6-col-card li { margin: 0.2rem 0; }
.tv-mod6-col-card-brown { border-color: #7a4f2d; background: rgba(122,79,45,0.07); }
.tv-mod6-col-card-gold  { border-color: #d4a847; background: rgba(212,168,71,0.07); }
.tv-mod6-impression { font-size: 0.85rem; color: var(--tv-ink-2); margin: 0.4rem 0 0; }
.tv-mod6-insight { font-size: 0.85rem; color: var(--tv-ink-2); font-style: italic; margin: 0.4rem 0 0; }

/* Visual cues grid */
.tv-mod6-cues-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 0.75rem; }
.tv-mod6-cue-card { border-radius: 10px; background: #fafaf8; border: 1px solid rgba(0,0,0,0.08); padding: 0.65rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; font-size: 0.85rem; line-height: 1.4; }
.tv-mod6-cue-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.tv-mod6-visual-feel { font-size: 0.93rem; margin-top: 0.25rem; }

/* Key learnings rows */
.tv-mod6-learnings { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
.tv-mod6-learning-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border-radius: 10px; border-left: 4px solid; font-size: 1rem; line-height: 1.5; }

/* Feature Highlight lightbulbs */
.tv-mod6-ways-intro { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.tv-mod6-lightbulb-row { display: flex; gap: 2rem; align-items: flex-end; }
.tv-mod6-bulb { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; opacity: 0.45; }
.tv-mod6-bulb-active { opacity: 1; transform: scale(1.15); }
.tv-mod6-bulb-img { width: 56px; height: auto; }
.tv-mod6-bulb-num { font-size: 1.1rem; font-weight: 700; color: #6a3d9a; }

/* 4 Ways layout */
.tv-mod6-four-ways { display: flex; gap: 1.5rem; align-items: center; margin-top: 0.5rem; }
.tv-mod6-ways-diagram { flex: 1; display: flex; align-items: center; justify-content: center; }
.tv-mod6-diagram-img { max-width: 100%; max-height: 280px; object-fit: contain; }
.tv-mod6-ways-right { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.tv-mod6-ways-count { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tv-mod6-num-img { width: 80px; height: auto; }
.tv-mod6-ways-label { font-size: 2rem; font-weight: 900; color: #6a3d9a; letter-spacing: 0.05em; margin-top: -0.5rem; }
.tv-mod6-ways-list { display: flex; flex-direction: column; gap: 0.35rem; width: 100%; }
.tv-mod6-way-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.tv-mod6-way-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.tv-mod6-way-dot-split { background: linear-gradient(90deg, #00bcd4 50%, #9c27b0 50%); }
.tv-mod6-capsule-insight { background: rgba(106,61,154,0.08); border: 1px solid rgba(106,61,154,0.25); border-radius: 8px; padding: 0.65rem 0.85rem; font-size: 0.88rem; text-align: center; width: 100%; }

/* Feature highlight layout — cigarette left, question+buttons right */
.tv-mod6-feature-layout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    margin-top: 0.5rem;
}
.tv-mod6-cig-img {
    height: 220px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.tv-mod6-feature-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
@media (max-width: 640px) {
    .tv-mod6-feature-layout { flex-direction: column; }
    .tv-mod6-cig-img { height: 140px; }
}

/* How-many-ways? lightbulb pick buttons */
.tv-mod6-ways-pick {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-end;
    margin: 1rem 0;
}
.tv-mod6-ways-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.tv-mod6-ways-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106,61,154,0.20);
    border-color: #6a3d9a;
}
.tv-mod6-ways-btn-img {
    width: 72px;
    height: auto;
    display: block;
}
.tv-mod6-ways-btn-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #6a3d9a;
    line-height: 1;
}
.tv-mod6-ways-btn-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tv-ink-2);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
/* Reveal states */
.tv-mod6-ways-correct {
    border-color: #4caf50 !important;
    background: rgba(76,175,80,0.10) !important;
}
.tv-mod6-ways-correct .tv-mod6-ways-btn-num { color: #2e7d32; }
.tv-mod6-ways-wrong {
    border-color: #c0392b !important;
    background: rgba(192,57,43,0.10) !important;
    opacity: 0.8;
}
.tv-mod6-ways-wrong .tv-mod6-ways-btn-num { color: #c0392b; text-decoration: line-through; }

/* Dark mode */
body.dark-mode .tv-mod6-col-card { background: rgba(255,255,255,0.05) !important; }
body.dark-mode .tv-mod6-cue-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.10); }
body.dark-mode .tv-mod6-learning-row { background: rgba(255,255,255,0.04) !important; }

/* Mobile */
@media (max-width: 640px) {
    .tv-slide-mod6-hero { flex-direction: column; }
    .tv-mod6-two-col { grid-template-columns: 1fr; }
    .tv-mod6-four-ways { flex-direction: column; }
    .tv-mod6-cues-grid { grid-template-columns: 1fr 1fr; }
}

body.dark-mode .tv-pack-gallery { background: rgba(255,255,255,0.06); }
body.dark-mode .tv-pack-thumb,
body.dark-mode .tv-variant-hero-pack { background: rgba(255,255,255,0.92); }

/* ─── Module 7a: Competition – Know the Battlefield ─────────────────────── */

/* Hero slide */
.tv-slide-mod7-hero { flex-direction: row; justify-content: space-between; align-items: center; gap: 1rem; background: linear-gradient(135deg, #e8c93a 0%, #f5d96b 60%, #fffbe6 100%); }
.tv-mod7-hero-left { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; z-index: 1; }
.tv-mod7-hero-sub { font-size: 1.2rem; font-weight: 700; color: #1a1f5e; margin: 0; letter-spacing: 0.01em; }
.tv-mod7-hero-right { flex: 1; display: flex; align-items: flex-end; justify-content: flex-end; max-height: 100%; overflow: hidden; }
.tv-mod7-hero-img { max-height: 300px; width: auto; object-fit: contain; }

/* Meet Joe Camel layout */
.tv-mod7-meet-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.tv-mod7-mascot-img { width: 130px; flex-shrink: 0; object-fit: contain; }
.tv-mod7-meet-right { flex: 1; }

/* Timeline cards */
.tv-mod7-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; margin-top: 0.5rem; }
.tv-mod7-timeline-5col { grid-template-columns: repeat(5, 1fr); }
.tv-mod7-tl-card { border-radius: 10px; padding: 0.7rem 0.75rem; border-left: 4px solid; display: flex; flex-direction: column; gap: 0.3rem; }
.tv-mod7-tl-year { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; opacity: 0.85; }
.tv-mod7-tl-title { font-size: 0.8rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.03em; }
.tv-mod7-tl-body { font-size: 0.78rem; line-height: 1.45; margin: 0; color: inherit; opacity: 0.9; }
.tv-mod7-tl-gold  { background: rgba(232,201,58,0.14); border-color: #c9a000; color: #5a4000; }
.tv-mod7-tl-blue  { background: rgba(26,63,138,0.09); border-color: #1a3f8a; color: #1a3f8a; }
.tv-mod7-tl-dark  { background: rgba(30,30,50,0.07); border-color: #2c2c4a; color: #2c2c4a; }
.tv-mod7-tl-red   { background: rgba(192,57,43,0.09); border-color: #c0392b; color: #7b1c13; }
.tv-mod7-tl-green { background: rgba(39,174,96,0.10); border-color: #27ae60; color: #145a32; }

/* Ranking box */
.tv-mod7-ranking-box { margin-top: 0.85rem; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,0.10); }
.tv-mod7-rank-row { padding: 0.35rem 0.85rem; font-size: 0.88rem; font-weight: 700; color: #fff; letter-spacing: 0.03em; }
.tv-mod7-rank-camel { background: #e8c93a !important; color: #1a1f5e !important; font-size: 0.95rem; }

/* Enemy intro */
.tv-mod7-enemy-intro-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.tv-mod7-enemy-mascot { width: 110px; flex-shrink: 0; object-fit: contain; }
.tv-mod7-enemy-intro-right { flex: 1; }

/* Enemies comparison table */
.tv-mod7-enemies-table { display: flex; flex-direction: column; gap: 0.55rem; }
.tv-mod7-enemies-header { display: grid; grid-template-columns: 110px 30px 1fr; gap: 0.5rem; padding: 0 0.25rem 0.3rem; border-bottom: 2px solid rgba(0,0,0,0.10); }
.tv-mod7-eh-camel { font-size: 0.75rem; font-weight: 700; color: #c9a000; text-transform: uppercase; letter-spacing: 0.04em; }
.tv-mod7-eh-comp  { font-size: 0.75rem; font-weight: 700; color: #6b1c1c; text-transform: uppercase; letter-spacing: 0.04em; }
.tv-mod7-enemy-row { display: grid; grid-template-columns: 110px 30px 1fr; gap: 0.5rem; align-items: center; padding: 0.4rem 0.25rem; border-radius: 8px; background: rgba(0,0,0,0.02); }
.tv-mod7-camel-cell { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.tv-mod7-pack-img  { height: 70px; width: auto; object-fit: contain; border-radius: 3px; }
.tv-mod7-pack-label { font-size: 0.68rem; font-weight: 700; text-align: center; color: #444; letter-spacing: 0.01em; }
.tv-mod7-arrow-cell { font-size: 1.1rem; color: #6b1c1c; text-align: center; }
.tv-mod7-comp-cell  { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tv-mod7-comp-item  { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.tv-mod7-comp-name  { font-size: 0.62rem; font-weight: 600; text-align: center; color: #555; max-width: 72px; line-height: 1.2; }
.tv-mod7-pack-rotate { transform: rotate(-90deg); }

/* Activate name change */
.tv-mod7-rename-layout { display: flex; gap: 1.25rem; align-items: flex-start; }
.tv-mod7-rename-left { flex-shrink: 0; }
.tv-mod7-activate-pack { height: 160px; width: auto; object-fit: contain; }
.tv-mod7-rename-right { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.tv-mod7-rename-callout { background: rgba(232,201,58,0.12); border-left: 3px solid #c9a000; border-radius: 6px; padding: 0.5rem 0.7rem; font-size: 0.88rem; line-height: 1.45; }
.tv-mod7-rename-callout p { margin: 0; }

/* Camel wins layout */
.tv-mod7-wins-layout { display: flex; gap: 1.25rem; align-items: center; }
.tv-mod7-wins-mascot { width: 110px; flex-shrink: 0; object-fit: contain; }
.tv-mod7-wins-right { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.tv-mod7-wins-intro { font-size: 1rem; font-weight: 600; color: #6a0d8a; margin: 0; }
.tv-mod7-wins-big { font-size: 1.5rem; font-weight: 900; color: #6a0d8a; line-height: 1.1; margin: 0; letter-spacing: 0.02em; }
.tv-mod7-wins-and { font-size: 1.6rem; font-weight: 900; color: #6a0d8a; margin: 0.1rem 0; }

/* Completion banner */
.tv-mod7-complete-banner { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.tv-mod7-complete-icon { font-size: 2rem; }
.tv-mod7-badge-row { display: flex; align-items: center; gap: 0.6rem; background: rgba(232,201,58,0.15); border-radius: 8px; padding: 0.5rem 0.85rem; margin-bottom: 0.75rem; }
.tv-mod7-badge-icon { font-size: 1.4rem; }
.tv-mod7-badge-label { font-size: 0.95rem; font-weight: 600; color: #5a4000; }

/* Dark mode */
body.dark-mode .tv-mod7-tl-card { opacity: 0.92; }
body.dark-mode .tv-mod7-enemy-row { background: rgba(255,255,255,0.04); }
body.dark-mode .tv-mod7-rename-callout { background: rgba(232,201,58,0.08); }

/* Mobile */
@media (max-width: 640px) {
    .tv-slide-mod7-hero { flex-direction: column; }
    .tv-mod7-hero-right { max-height: 200px; align-items: center; justify-content: center; }
    .tv-mod7-hero-img { max-height: 200px; max-width: 100%; }
    .tv-mod7-timeline { grid-template-columns: 1fr 1fr; }
    .tv-mod7-timeline-5col { grid-template-columns: 1fr 1fr; }
    .tv-mod7-meet-layout, .tv-mod7-enemy-intro-layout, .tv-mod7-wins-layout { flex-direction: column; }
    .tv-mod7-rename-layout { flex-direction: column; }
    .tv-mod7-enemies-header { grid-template-columns: 90px 24px 1fr; }
    .tv-mod7-enemy-row { grid-template-columns: 90px 24px 1fr; }
    .tv-mod7-pack-img { height: 55px; }
}

/* ─── Module 8 (7b): Winston — The Global Giant ──────────────────────────── */

/* Hero slide — Winston deep navy / red */
.tv-slide-mod8-hero { flex-direction: row; justify-content: space-between; align-items: center; gap: 1rem; background: linear-gradient(135deg, #0f2167 0%, #1a3a9f 60%, #2550c8 100%); }
.tv-mod8-hero-left  { flex: 1; display: flex; flex-direction: column; gap: 0.65rem; z-index: 1; }
.tv-mod8-hero-sub   { font-size: 1.2rem; font-weight: 700; color: #ffd700; margin: 0; letter-spacing: 0.01em; }
.tv-mod8-hero-right { flex: 1; display: flex; align-items: flex-end; justify-content: flex-end; max-height: 100%; overflow: hidden; }
.tv-mod8-hero-img   { max-height: 300px; width: auto; object-fit: contain; }

/* Mascot for content slides */
.tv-mod8-mascot-img { width: 130px; flex-shrink: 0; object-fit: contain; }

/* Timeline colour variants for Winston */
.tv-mod8-tl-red    { background: rgba(192,57,43,0.09); border-color: #c0392b; color: #7b1c13; }
.tv-mod8-tl-navy   { background: rgba(15,33,103,0.09); border-color: #0f2167; color: #0f2167; }
.tv-mod8-tl-silver { background: rgba(100,110,130,0.09); border-color: #5d6d7e; color: #2c3e50; }

/* Pack strip for timeline images */
.tv-mod8-pack-strip { display: flex; gap: 0.75rem; justify-content: center; margin-top: 0.65rem; flex-wrap: wrap; }
.tv-mod8-timeline-img { max-height: 90px; width: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* Spot the Difference layout */
.tv-mod8-diff-layout { display: flex; gap: 0.75rem; align-items: flex-start; justify-content: center; margin-top: 0.5rem; }
.tv-mod8-diff-card   { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; flex: 1; max-width: 160px; padding: 0.75rem; border-radius: 10px; border: 2px solid rgba(0,0,0,0.10); background: #fafaf8; }
.tv-mod8-diff-label  { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; color: #fff; flex-shrink: 0; }
.tv-mod8-diff-label-1 { background: #c0392b; }
.tv-mod8-diff-label-2 { background: #0f2167; }
.tv-mod8-diff-pack   { height: 130px; width: auto; object-fit: contain; }
.tv-mod8-diff-name   { font-weight: 700; font-size: 0.9rem; color: var(--tv-ink); text-align: center; }
.tv-mod8-diff-specs  { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; }
.tv-mod8-spec-tag    { background: rgba(15,33,103,0.10); color: #0f2167; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 4px; }
.tv-mod8-diff-desc   { font-size: 0.72rem; color: var(--tv-ink-2); text-align: center; line-height: 1.35; margin: 0; }
.tv-mod8-diff-vs     { font-size: 1.2rem; font-weight: 900; color: #c0392b; align-self: center; flex-shrink: 0; }

/* Three Unique Features */
.tv-mod8-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; margin-top: 0.5rem; }
.tv-mod8-feature-card  { border-radius: 10px; padding: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; text-align: center; border: 1.5px solid; }
.tv-mod8-feat-red      { border-color: #c0392b; background: rgba(192,57,43,0.07); }
.tv-mod8-feat-navy     { border-color: #0f2167; background: rgba(15,33,103,0.07); }
.tv-mod8-feat-silver   { border-color: #7f8c8d; background: rgba(127,140,141,0.07); }
.tv-mod8-feat-img      { height: 80px; width: auto; object-fit: contain; }
.tv-mod8-feat-img-wide { max-width: 100%; height: 30px; object-fit: contain; }
.tv-mod8-feat-label    { font-weight: 700; font-size: 0.82rem; color: var(--tv-ink); }
.tv-mod8-feat-desc     { font-size: 0.75rem; color: var(--tv-ink-2); line-height: 1.4; margin: 0; }

/* Wins layout */
.tv-mod8-wins-layout  { display: flex; gap: 1.25rem; align-items: center; }
.tv-mod8-wins-mascot  { width: 110px; flex-shrink: 0; object-fit: contain; }

/* "Do You Remember?" drag-drop */
.tv-mod8-drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.85rem; }
.tv-mod8-drop-zone {
    border: 2px dashed;
    border-radius: 12px;
    padding: 0.85rem 0.7rem 0.6rem;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.18s, box-shadow 0.18s;
}
.tv-mod8-dz-icon { font-size: 1.1rem; line-height: 1; }
.tv-mod8-dz-name { font-family: var(--tv-sans); font-weight: 800; font-size: 1rem; letter-spacing: 0.03em; margin: 0.15rem 0 0.3rem; }
.tv-mod8-dz-desc { font-size: 0.78rem; color: var(--tv-ink-2); line-height: 1.35; margin: 0 0 0.55rem; }
.tv-mod8-dz-bin  { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; align-items: center; width: 100%; margin-top: auto; min-height: 60px; }
.tv-mod8-dz-empty { font-size: 0.75rem; font-style: italic; color: var(--tv-ink-3); }
.tv-mod8-drop-hover { transform: scale(1.03); box-shadow: 0 6px 18px rgba(0,0,0,0.15); border-style: solid; }

.tv-mod8-dropped-img { width: 44px; height: 60px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px; border: 2px solid transparent; }
.tv-mod8-dropped-chip { display: inline-block; background: #fff; color: #0f2167; font-size: 0.74rem; font-weight: 700; padding: 0.3rem 0.55rem; border-radius: 999px; border: 2px solid transparent; box-shadow: 0 1px 3px rgba(0,0,0,0.10); }
.tv-mod8-dropped-correct { border-color: #4caf50; }
.tv-mod8-dropped-wrong   { border-color: #c0392b; }

.tv-mod8-tray { gap: 0.6rem; }
.tv-mod8-drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; transition: transform 0.18s, box-shadow 0.18s; }
.tv-mod8-drag:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 14px rgba(0,0,0,0.18); }
.tv-mod8-drag-img { width: 60px; height: 82px; object-fit: contain; background: #fff; border-radius: 5px; padding: 3px; box-shadow: 0 2px 6px rgba(0,0,0,0.10); }
.tv-mod8-drag-chip {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #0f2167;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid rgba(15,33,103,0.18);
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    white-space: nowrap;
}
.tv-mod8-drag.tv-mod8-dragging {
    cursor: grabbing;
    transform: none !important;
    box-shadow: 0 14px 28px rgba(0,0,0,0.30);
    opacity: 0.95;
    transition: none !important;
}

/* Dark mode */
body.dark-mode .tv-mod8-diff-card    { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); }
body.dark-mode .tv-mod8-feature-card { opacity: 0.92; }
body.dark-mode .tv-mod8-drag-img,
body.dark-mode .tv-mod8-dropped-img  { background: rgba(255,255,255,0.92); }
body.dark-mode .tv-mod8-drag-chip,
body.dark-mode .tv-mod8-dropped-chip { background: rgba(255,255,255,0.92); }
body.dark-mode .tv-mod8-dz-desc      { color: rgba(255,255,255,0.72); }
body.dark-mode .tv-mod8-dz-empty     { color: rgba(255,255,255,0.5); }

/* Mobile */
@media (max-width: 640px) {
    .tv-slide-mod8-hero { flex-direction: column; overflow: hidden; }
    .tv-mod8-hero-left  { flex-shrink: 0; }
    .tv-mod8-hero-right { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
    .tv-mod8-hero-img   { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; }
    .tv-mod8-diff-layout { gap: 0.5rem; }
    .tv-mod8-diff-pack { height: 100px; }
    .tv-mod8-features-grid { grid-template-columns: 1fr; }
    .tv-mod8-wins-layout { flex-direction: column; }
    .tv-mod8-drop-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .tv-mod8-drop-zone { min-height: 140px; padding: 0.7rem 0.55rem 0.5rem; }
    .tv-mod8-dz-name   { font-size: 0.92rem; }
    .tv-mod8-dz-desc   { font-size: 0.72rem; }
    .tv-mod8-drag-img  { width: 52px; height: 70px; }
    .tv-mod8-drag-chip { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
    .tv-mod8-dropped-img { width: 36px; height: 50px; }
    .tv-mod8-dropped-chip { font-size: 0.68rem; padding: 0.22rem 0.45rem; }
}
