/* Bundled CSS - Generated automatically */

/* === core-variables.css === */
/**
 * NativeCore Framework - Core Variables
 * 
 * ⚠️ FRAMEWORK INTERNAL USE ONLY - DO NOT MODIFY ⚠️
 * 
 * These variables are reserved for NativeCore's built-in components.
 * All variables are prefixed with --nc- to prevent conflicts.
 * 
 * For your own components and customization, use variables.css instead.
 * 
 * Optional Theming: You can override framework colors by setting
 * --nc-theme-* variables in variables.css (see examples at bottom).
 */

:root {
    /* ============================================
       CORE BRAND COLORS (Framework Reserved)
       ============================================ */
    --nc-primary: var(--nc-theme-primary, #10b981);
    --nc-primary-light: var(--nc-theme-primary-light, #34d399);
    --nc-primary-dark: var(--nc-theme-primary-dark, #059669);
    --nc-secondary: var(--nc-theme-secondary, #3b82f6);
    --nc-accent: var(--nc-theme-accent, #0f172a);
    
    /* ============================================
       SEMANTIC COLORS
       ============================================ */
    --nc-success: #10b981;
    --nc-success-light: #34d399;
    --nc-success-dark: #059669;
    
    --nc-warning: #f59e0b;
    --nc-warning-light: #fbbf24;
    --nc-warning-dark: #d97706;
    
    --nc-danger: #ef4444;
    --nc-danger-light: #f87171;
    --nc-danger-dark: #dc2626;
    
    --nc-info: #3b82f6;
    --nc-info-light: #60a5fa;
    --nc-info-dark: #2563eb;
    
    /* ============================================
       NEUTRAL COLORS
       ============================================ */
    --nc-white: #ffffff;
    --nc-black: #000000;
    
    --nc-gray-50: #f8fafc;
    --nc-gray-100: #f1f5f9;
    --nc-gray-200: #e2e8f0;
    --nc-gray-300: #cbd5e1;
    --nc-gray-400: #94a3b8;
    --nc-gray-500: #64748b;
    --nc-gray-600: #475569;
    --nc-gray-700: #334155;
    --nc-gray-800: #1e293b;
    --nc-gray-900: #0f172a;
    
    /* ============================================
       TEXT COLORS
       ============================================ */
    --nc-text: #0f172a;
    --nc-text-secondary: #64748b;
    --nc-text-muted: #94a3b8;
    --nc-text-inverse: var(--nc-white);
    
    /* ============================================
       BACKGROUND COLORS
       ============================================ */
    --nc-bg: var(--nc-white);
    --nc-bg-secondary: var(--nc-gray-50);
    --nc-bg-tertiary: var(--nc-gray-100);
    --nc-bg-dark: var(--nc-gray-900);
    
    /* ============================================
       BORDER & DIVIDERS
       ============================================ */
    --nc-border: var(--nc-gray-200);
    --nc-border-dark: var(--nc-gray-300);
    --nc-divider: var(--nc-gray-100);
    
    /* ============================================
       GRADIENTS
       ============================================ */
    --nc-gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --nc-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --nc-gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --nc-gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --nc-gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
    
    /* ============================================
       SHADOWS
       ============================================ */
    --nc-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --nc-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --nc-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --nc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --nc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --nc-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --nc-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* Colored shadows for components */
    --nc-shadow-primary: 0 4px 12px rgba(16, 185, 129, 0.25);
    --nc-shadow-success: 0 4px 12px rgba(16, 185, 129, 0.25);
    --nc-shadow-danger: 0 4px 12px rgba(239, 68, 68, 0.25);
    
    /* ============================================
       TYPOGRAPHY
       ============================================ */
    --nc-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --nc-font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    --nc-font-size-xs: 0.75rem;      /* 12px */
    --nc-font-size-sm: 0.875rem;     /* 14px */
    --nc-font-size-base: 1rem;       /* 16px */
    --nc-font-size-lg: 1.125rem;     /* 18px */
    --nc-font-size-xl: 1.25rem;      /* 20px */
    --nc-font-size-2xl: 1.5rem;      /* 24px */
    
    --nc-font-weight-normal: 400;
    --nc-font-weight-medium: 500;
    --nc-font-weight-semibold: 600;
    --nc-font-weight-bold: 700;
    
    --nc-line-height-tight: 1.25;
    --nc-line-height-normal: 1.5;
    --nc-line-height-relaxed: 1.75;
    
    /* ============================================
       SPACING SYSTEM
       ============================================ */
    --nc-spacing-xs: 0.25rem;    /* 4px */
    --nc-spacing-sm: 0.5rem;     /* 8px */
    --nc-spacing-md: 1rem;       /* 16px */
    --nc-spacing-lg: 1.5rem;     /* 24px */
    --nc-spacing-xl: 2rem;       /* 32px */
    --nc-spacing-2xl: 3rem;      /* 48px */
    
    /* ============================================
       BORDER RADIUS
       ============================================ */
    --nc-radius-sm: 0.25rem;     /* 4px */
    --nc-radius-md: 0.5rem;      /* 8px */
    --nc-radius-lg: 0.75rem;     /* 12px */
    --nc-radius-xl: 1rem;        /* 16px */
    --nc-radius-2xl: 1.5rem;     /* 24px */
    --nc-radius-full: 9999px;
    
    /* ============================================
       TRANSITIONS & ANIMATIONS
       ============================================ */
    --nc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --nc-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --nc-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --nc-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --nc-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --nc-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ============================================
       Z-INDEX SCALE
       ============================================ */
    --nc-z-base: 1;
    --nc-z-dropdown: 1000;
    --nc-z-sticky: 1020;
    --nc-z-fixed: 1030;
    --nc-z-modal-backdrop: 1040;
    --nc-z-modal: 1050;
    --nc-z-popover: 1060;
    --nc-z-tooltip: 1070;
    --nc-z-notification: 1080;
    
    /* ============================================
       COMPONENT-SPECIFIC
       ============================================ */
    
    /* Buttons */
    --nc-button-padding-sm: var(--nc-spacing-xs) var(--nc-spacing-md);
    --nc-button-padding-md: var(--nc-spacing-sm) var(--nc-spacing-lg);
    --nc-button-padding-lg: var(--nc-spacing-md) var(--nc-spacing-xl);
    --nc-button-radius: var(--nc-radius-md);
    
    /* Inputs */
    --nc-input-padding: var(--nc-spacing-sm) var(--nc-spacing-md);
    --nc-input-radius: var(--nc-radius-md);
    --nc-input-border: 1px solid var(--nc-border);
    --nc-input-focus-border: var(--nc-primary);
    
    /* Cards */
    --nc-card-padding: var(--nc-spacing-lg);
    --nc-card-radius: var(--nc-radius-lg);
    --nc-card-shadow: var(--nc-shadow-sm);
    
    /* Header */
    --nc-header-height: 70px;
    --nc-header-bg: var(--nc-bg);
    --nc-header-border: var(--nc-border);
    
    /* Sidebar */
    --nc-sidebar-width: 280px;
    --nc-sidebar-bg: var(--nc-bg);
    --nc-sidebar-border: var(--nc-border);
}

/* ============================================
   THEMING EXAMPLE (for developers)
   ============================================
   
   To customize the framework's primary color, add this to variables.css:
   
   :root {
     --nc-theme-primary: #your-color;
     --nc-theme-primary-light: #your-light-color;
     --nc-theme-primary-dark: #your-dark-color;
   }
   
   ============================================ */

/* === core.css === */


/**
 * NativeCore Framework - Core Styles
 * Default framework styling including modern scrollbars
 */

/* Modern Scrollbar Styling (All Browsers) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Dark mode scrollbar */
@media (prefers-color-scheme: dark) {
    * {
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }
    
    *::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }
    
    *::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}
/* Header — sticky grid item, spans both columns */
.app-header {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 1002;
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.app-header.scrolled {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    padding: 0 var(--spacing-xl);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.logo .logo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-header .nanc-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.app-header .nanc-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.app-header .nanc-link.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Authenticated user pill */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
}

.header-logout-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.header-logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Sign in button */
.header-login-btn {
    background: var(--gradient-primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.header-login-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================================
   APP LAYOUT — CSS Grid
   ============================================================ */

#app {
    display: grid;
    grid-template-areas:
        "header  header"
        "sidebar main";
    grid-template-rows: var(--header-height) 1fr;
    grid-template-columns: 250px 1fr;
    height: 100vh;
    overflow: hidden;
    transition: grid-template-columns var(--transition-base);
}

/* JS adds this class to #app when sidebar is collapsed */
#app.sidebar-collapsed {
    grid-template-columns: 64px 1fr;
}

/* No sidebar present (public shell with optional header) */
#app.no-sidebar {
    grid-template-areas:
        "header"
        "main";
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-height) auto;
    min-height: 100vh;
    height: auto;
    overflow: visible;
}

#app.no-sidebar app-sidebar {
    display: none;
}

/* Minimal scaffold shell — content only, no reserved chrome */
#app.minimal-shell {
    display: block;
    grid-template-areas: none;
    grid-template-columns: none;
    grid-template-rows: none;
    min-height: 100vh;
    height: auto;
    overflow: visible;
    /* Match home terminal band so leftover viewport is not a white strip */
    background: #070b10;
}

#app.minimal-shell .main-content {
    display: block;
    overflow: visible;
    min-height: 0;
}

#app.minimal-shell .main-content .page {
    max-width: none;
    margin: 0;
    min-height: 0;
}

/* Grid area assignments */
.app-header   { grid-area: header; }
app-sidebar   { grid-area: sidebar; display: flex; flex-direction: column; }
.main-content { grid-area: main; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }

.main-content {
    /*padding: var(--spacing-xl);*/
    overflow-y: auto;
    overflow-x: hidden;
}

.main-content .page {
    flex: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Public shell should use normal document flow so the footer sits after content. */
#app.no-sidebar .main-content {
    overflow: visible;
    min-height: calc(100vh - var(--header-height));
}

#app.no-sidebar .main-content .page {
    min-height: calc(100vh - var(--header-height) - 96px);
}

/* Keep footer at the bottom of the scroll area on short pages */
.main-content app-footer {
    margin-top: auto;
}

body.sidebar-enabled app-footer {
    display: none;
}

/* Persistent Sidebar */
.app-sidebar {
    flex: 1;
    width: 250px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    z-index: 1001;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.sidebar-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    overflow: visible;
    transition: padding var(--transition-base), border-color var(--transition-base);
}

.sidebar-branding {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    max-width: 150px;
    opacity: 1;
    transform: translateX(0);
    overflow: hidden;
    transition: opacity 0.18s ease, transform 0.22s ease, max-width 0.22s ease;
}

.sidebar-branding__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #10b981;
}

.sidebar-branding__title {
    font-size: 1rem;
    color: #0f172a;
}

.sidebar-collapse-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: #475569;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.22s ease, box-shadow 0.22s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.sidebar-collapse-btn:hover {
    background: linear-gradient(180deg, #ffffff, #eef2f7);
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.sidebar-collapse-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-collapse-btn__divider {
    opacity: 0.45;
}

.sidebar-collapse-btn__chevron {
    transform-origin: 15px 12px;
    transition: transform 0.22s ease;
}

.sidebar-collapse-btn.is-collapsed .sidebar-collapse-btn__chevron {
    transform: rotate(180deg);
}

.sidebar-collapse-btn.is-collapsed {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body.sidebar-enabled .app-sidebar {
    opacity: 1;
    visibility: visible;
}

.app-sidebar.collapsed {
    width: 58px;
}

/* Section label */
.sidebar-section-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 1.25rem 1.25rem 0.5rem;
}

.app-sidebar.collapsed .sidebar-section-label {
    display: none;
}

.sidebar-nav {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 1rem 0.55rem 1.25rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    position: relative;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, padding var(--transition-base);
}

.sidebar-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-left-color: #cbd5e1;
}

.sidebar-item.active {
    background: #ecfdf5;
    color: #059669;
    border-left-color: #10b981;
    font-weight: 600;
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.sidebar-item:hover .sidebar-icon {
    background: #cbd5e1;
}

.sidebar-item.active .sidebar-icon {
    background: #d1fae5;
    color: #059669;
}

.sidebar-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.sidebar-text {
    display: block;
    font-size: 0.875rem;
    opacity: 1;
    max-width: 120px;
    transform: translateX(0);
    visibility: visible;
    transition: opacity 0.18s ease, transform 0.22s ease, max-width 0.22s ease, visibility 0.22s ease;
    overflow: hidden;
    white-space: nowrap;
}

.app-sidebar.collapsed .sidebar-item {
    padding: 0.45rem 0;
    justify-content: center;
    border-left-width: 0;
    border-left-color: transparent;
}

.app-sidebar.collapsed .sidebar-text,
.app-sidebar.collapsed .sidebar-section-label,
.app-sidebar.collapsed .sidebar-branding {
    opacity: 0;
    max-width: 0;
    transform: translateX(-8px);
    visibility: hidden;
    pointer-events: none;
}

.app-sidebar.collapsed .sidebar-icon {
    margin: 0 auto;
}

.app-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0.6rem 0 0.5rem;
}

.app-sidebar.collapsed .sidebar-collapse-btn {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border-radius: 11px;
    transform: none;
}

.app-sidebar.collapsed .sidebar-collapse-btn svg {
    transform: translateX(0.5px);
}

.app-sidebar.collapsed .sidebar-collapse-btn__divider {
    opacity: 0;
}

.app-sidebar.collapsed .sidebar-collapse-btn__chevron {
    transform: translateX(-1px) rotate(180deg);
}

.app-sidebar.collapsed .sidebar-nav,
.app-sidebar.collapsed .sidebar-footer {
    align-items: center;
}

.app-sidebar.collapsed .sidebar-footer {
    padding: 0.45rem 0;
}

.app-sidebar.mobile-open .sidebar-header {
    display: flex;
}

.app-sidebar.mobile-open .sidebar-branding,
.app-sidebar.mobile-open .sidebar-text {
    display: initial;
}

/* Sidebar collapse toggle — always visible in the header */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
    padding: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.burger-line {
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: all 0.15s ease;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    /* Single column on mobile — no sidebar in grid flow.
       Must beat #app.sidebar-collapsed (64px 1fr) after rotate-from-landscape. */
    #app,
    #app.sidebar-collapsed {
        grid-template-areas:
            "header"
            "main"
            "footer";
        grid-template-columns: 1fr;
    }

    /* Sidebar overlays on mobile */
    app-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: min(280px, calc(100vw - 2.5rem));
        height: calc(100vh - var(--header-height));
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        background: var(--nc-bg-secondary, #f1f5f9);
        overflow: hidden;
    }

    app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-sidebar {
        width: 100%;
        max-width: 100%;
        min-height: 100%;
        box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24);
    }

    .app-sidebar.collapsed {
        width: 100%;
        overflow-y: auto;
        border-right: 1px solid #e2e8f0;
    }

    .app-sidebar.collapsed .sidebar-item {
        padding: 0.55rem 1rem 0.55rem 1.25rem;
        justify-content: flex-start;
    }

    .app-sidebar.collapsed .sidebar-text,
    .app-sidebar.collapsed .sidebar-branding,
    .app-sidebar.collapsed .sidebar-header {
        display: initial;
    }

    .app-sidebar.collapsed .sidebar-text,
    .app-sidebar.collapsed .sidebar-branding {
        opacity: 1;
        max-width: none;
        transform: none;
        visibility: visible;
        pointer-events: auto;
    }

    .app-sidebar.collapsed .sidebar-header {
        display: flex;
        justify-content: space-between;
        padding: 1rem 1.25rem 0.85rem;
    }

    .app-sidebar.collapsed .sidebar-icon {
        margin: 0;
    }

    .app-sidebar.collapsed .sidebar-collapse-btn {
        width: 36px;
        height: 36px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide sidebar toggle when sidebar is open on mobile */
    body.sidebar-open .mobile-menu-toggle {
        opacity: 0;
        pointer-events: none;
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-base);
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .component-library {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .app-footer .container {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .mobile-drawer {
        display: none;
    }
    
    .hamburger {
        display: none;
    }
    
    .sidebar-overlay {
        display: none;
    }

}

/* === variables.css === */
/**
 * Project theme entry point.
 *
 * Swap the theme imports below to change brand. Structural tokens (spacing,
 * typography, radius) live in tokens/base.css and rarely need changing.
 *
 * Framework --nc-* tokens are in core-variables.css (do not edit).
 * Set --nc-theme-* bridge vars in your theme file, not here.
 */
/* @import src/styles/tokens/base.css */
/**
 * Structural design tokens — theme-agnostic.
 * Colors and brand semantics live in src/styles/themes/.
 */
:root {
    /* Typography */
    --font-family: 'Outfit', 'Segoe UI', sans-serif;
    --font-family-display: 'Source Serif 4', Georgia, serif;
    --font-family-mono: 'Geist Mono', 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-max-width: 100%;
    --header-height: 70px;

    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Neutral shadows (no brand tint) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* @import src/styles/themes/firsttuesday.css */
/**
 * First Tuesday brand theme — light mode defaults.
 *
 * Swap this file via variables.css to use a different brand theme.
 * Bridge --nc-theme-* vars so nc-* framework components match your brand.
 */
:root {
    /* Brand primitives */
    --ft-blue: #004b8b;
    --ft-blue-dark: #003570;
    --ft-blue-deep: #002548;
    --ft-orange: #db6944;
    --ft-orange-light: #f28b6b;

    /* Shell chrome — header, sidebar, layout (used by shell.css and app-* components) */
    --shell-header-bg: var(--ft-blue-deep);
    --shell-sidebar-bg: var(--ft-blue-deep);
    --shell-sidebar-width: 280px;
    --shell-logo-mark-bg: var(--ft-orange);
    --shell-sidebar-mobile-shadow: 0 24px 48px rgba(0, 37, 72, 0.4);

    /* Semantic colors — derived from brand primitives */
    --color-primary: var(--ft-blue);
    --color-primary-light: #1a6bb0;
    --color-primary-dark: var(--ft-blue-dark);
    --color-primary-deep: var(--ft-blue-deep);
    --color-secondary: var(--ft-orange);
    --color-secondary-light: var(--ft-orange-light);
    --color-accent: var(--ft-blue-dark);

    --color-primary-white: #ffffff;

    /* Framework bridge — keeps nc-* components on-brand */
    --nc-theme-primary: #004b8b;
    --nc-theme-primary-light: #1a6bb0;
    --nc-theme-primary-dark: #003570;
    --nc-theme-secondary: #db6944;
    --nc-theme-accent: #003570;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #004b8b 0%, #003570 100%);
    --gradient-secondary: linear-gradient(135deg, #db6944 0%, #c45635 100%);
    --gradient-accent: linear-gradient(145deg, #002548 0%, #004b8b 55%, #0a3d6e 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-subtle: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
    --gradient-hero: linear-gradient(145deg, #002548 0%, #004b8b 50%, #003570 100%);
    --gradient-course-hero: linear-gradient(135deg, var(--color-primary-deep) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);

    --gradient-gold: linear-gradient(135deg, #db6944 0%, #c45635 100%);
    --gradient-silver: linear-gradient(135deg, #64748b 0%, #475569 100%);
    --gradient-platinum: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-bronze: linear-gradient(135deg, #db6944 0%, #c45635 100%);

    /* Neutral palette */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Semantic status colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Text */
    --color-text: #1a2a3a;
    --color-text-secondary: #64748b;
    --color-text-muted: #6b7280;

    /* Backgrounds */
    --color-bg: #ffffff;
    --color-bg-secondary: #f1f5f9;
    --color-bg-tertiary: #e8eef4;
    --color-border: #e2e8f0;

    /* Surfaces — cards, panels, page canvas */
    --color-surface: #ffffff;
    --color-surface-muted: #f1f5f9;
    --color-page-bg-start: #f7fafc;
    --color-page-bg-end: #eef3f8;
    --portal-page-accent: rgba(0, 75, 139, 0.06);

    /* Headings on surfaces */
    --color-heading: var(--color-primary-deep);

    /* Achievement / certificate callouts */
    --achievement-card-bg: linear-gradient(135deg, #fffbea 0%, #fff8d6 100%);
    --achievement-card-border: #c8a400;
    --achievement-card-text: #3f3f3f;
    --achievement-card-title: #b38600;
    --achievement-card-muted: #888;

    /* Exam step surfaces */
    --color-info-surface: #eff6ff;
    --color-info-text: #1d4ed8;
    --color-warning-surface: #fffbeb;
    --color-warning-text: #92400e;
    --color-success-surface: #dcfce7;
    --color-success-text: #15803d;
    --color-error-surface: #fef2f2;
    --color-error-text: #b91c1c;
    --color-primary-focus-ring: rgba(0, 75, 139, 0.18);

    /* Step 2 reader shell (outline + toolbar) */
    --reader-shell-bg: #ffffff;
    --reader-outline-bg: #f8fafc;
    --reader-stage-bg: #f3f5f8;
    --reader-chrome-bg: #f8fafc;
    --reader-page-well-bg: #ffffff;
    --reader-text: var(--color-text);
    --reader-text-muted: var(--color-text-secondary);
    --reader-heading: var(--color-primary-deep);
    --reader-btn-bg: #ffffff;
    --reader-btn-text: #1a2a3a;
    --reader-btn-border: #cbd5e1;
    --reader-outline-hover: #e2e8f0;
    --reader-outline-current-bg: #dbeafe;
    --reader-outline-current-text: #1d4ed8;
    --reader-outline-done-bg: #ecfdf3;
    --reader-outline-done-hover: #dcfce7;

    /* Course lesson HTML inside ft-course-page (course-export.css) */
    --course-page-bg: #ffffff;
    --course-page-text: #000000;
    --course-page-heading: rgb(0, 75, 139);
    --course-page-link: #0b6bcb;
    --course-page-surface: #fafafa;
    --course-page-surface-elevated: #ffffff;
    --course-page-border: #e5e7eb;
    --course-page-border-muted: #eef2f6;
    --course-page-marker: #000000;
    --course-page-control-border: #ccd2da;
    --course-page-quiz-bg: rgb(222, 239, 239);

    /* Skeleton shimmer */
    --nc-skeleton-base: var(--color-bg-tertiary);
    --nc-skeleton-highlight: var(--color-surface-muted);

    /* Short aliases */
    --primary: var(--color-primary);
    --primary-dark: var(--color-primary-dark);
    --secondary: var(--color-secondary);
    --secondary-dark: #c45635;
    --success: var(--color-success);
    --danger: var(--color-error);
    --text: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    --bg: var(--color-bg);
    --bg-secondary: var(--color-bg-secondary);
    --border: var(--color-border);
    --surface: var(--color-surface);

    /* Brand-tinted shadows */
    --shadow-primary: 0 4px 12px rgba(0, 75, 139, 0.28);
    --shadow-secondary: 0 4px 12px rgba(219, 105, 68, 0.3);
    --shadow-success: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* @import src/styles/themes/firsttuesday.dark.css */
/**
 * First Tuesday dark mode overrides.
 * Applied when <html data-theme="dark"> (via uiStore.setTheme / resolveTheme).
 */
[data-theme="dark"] {
    /* Text */
    --color-text: #e8eef4;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #7b8ea8;

    /* Backgrounds */
    --color-bg: #0a1628;
    --color-bg-secondary: #112240;
    --color-bg-tertiary: #1a2f4d;
    --color-border: #243b5c;

    /* Surfaces — cards, panels, page canvas */
    --color-surface: #0f1f38;
    --color-surface-muted: #152a47;
    --color-page-bg-start: #0a1628;
    --color-page-bg-end: #0d1c32;
    --portal-page-accent: rgba(74, 159, 217, 0.1);

    /* Skeleton shimmer — subtle contrast, no bright white flash */
    --nc-skeleton-base: #152a47;
    --nc-skeleton-highlight: #1f3a5c;

    /* Brand headings stay readable on dark surfaces */
    --color-heading: #b8d4f0;
    --color-primary: #6eb5e8;
    --color-primary-light: #8eb8e8;
    --color-primary-dark: #4a9fd9;
    --color-primary-deep: #0a2545;

    /* Course hero — keep deep, no washed-out left edge */
    --gradient-course-hero: linear-gradient(135deg, #051222 0%, #0a2848 50%, #0f3560 100%);

    /* Achievement / certificate callouts */
    --achievement-card-bg: linear-gradient(135deg, #1f1a08 0%, #141106 100%);
    --achievement-card-border: #8b6914;
    --achievement-card-text: #e8eef4;
    --achievement-card-title: #e8c84a;
    --achievement-card-muted: #94a3b8;

    /* Exam step surfaces */
    --color-info-surface: rgba(74, 159, 217, 0.14);
    --color-info-text: #8eb8e8;
    --color-warning-surface: rgba(245, 158, 11, 0.12);
    --color-warning-text: #fbbf24;
    --color-success-surface: rgba(16, 185, 129, 0.14);
    --color-success-text: #4ade80;
    --color-error-surface: rgba(239, 68, 68, 0.12);
    --color-error-border: rgba(239, 68, 68, 0.35);
    --color-error-text: #fca5a5;
    --color-primary-focus-ring: rgba(110, 181, 232, 0.22);

    /* Step 2 reader shell */
    --reader-shell-bg: var(--color-surface);
    --reader-outline-bg: var(--color-bg-secondary);
    --reader-stage-bg: var(--color-bg);
    --reader-chrome-bg: var(--color-bg-secondary);
    --reader-page-well-bg: transparent;
    --reader-page-well-border: transparent;
    --reader-text: var(--color-text);
    --reader-text-muted: var(--color-text-secondary);
    --reader-heading: var(--color-heading);
    --reader-btn-bg: var(--color-surface-muted);
    --reader-btn-text: var(--color-text);
    --reader-btn-border: var(--color-border);
    --reader-outline-hover: var(--color-bg-tertiary);
    --reader-outline-current-bg: rgba(74, 159, 217, 0.18);
    --reader-outline-current-text: #8eb8e8;
    --reader-outline-done-bg: rgba(16, 185, 129, 0.12);
    --reader-outline-done-hover: rgba(16, 185, 129, 0.18);

    /* Course lesson HTML inside ft-course-page */
    --course-page-bg: var(--color-surface);
    --course-page-text: var(--color-text);
    --course-page-heading: var(--color-heading);
    --course-page-link: #6eb5e8;
    --course-page-surface: var(--color-surface-muted);
    --course-page-surface-elevated: var(--color-bg-tertiary);
    --course-page-border: var(--color-border);
    --course-page-border-muted: var(--color-border);
    --course-page-marker: var(--color-text-secondary);
    --course-page-control-border: var(--color-border);
    --course-page-quiz-bg: var(--color-bg-tertiary);

    /* Short aliases */
    --text: var(--color-text);
    --text-secondary: var(--color-text-secondary);
    --bg: var(--color-bg);
    --bg-secondary: var(--color-bg-secondary);
    --border: var(--color-border);
    --surface: var(--color-surface);

    /* Shell chrome */
    --shell-header-bg: #061525;
    --shell-sidebar-bg: #061525;
    --shell-sidebar-mobile-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);

    /* Framework bridge — keeps nc-* components readable on dark surfaces */
    --nc-theme-primary: #4a9fd9;
    --nc-theme-primary-light: #6eb5e8;
    --nc-theme-primary-dark: #2d7ab8;
    --nc-theme-secondary: #e8876a;
    --nc-theme-accent: #8eb8e8;

    /* NativeCore semantic surfaces used by nc-* components */
    --nc-text: #e8eef4;
    --nc-text-secondary: #94a3b8;
    --nc-text-muted: #7b8ea8;
    --nc-bg: #0f1f38;
    --nc-bg-secondary: #152a47;
    --nc-bg-tertiary: #1c3558;
    --nc-border: #2a4366;
    --nc-border-dark: #355278;
    --nc-divider: #1c3558;

    /* Gradients and shadows */
    --gradient-subtle: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.03) 100%);
    --shadow-primary: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-secondary: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-success: 0 4px 12px rgba(16, 185, 129, 0.2);

    color-scheme: dark;
}

[data-theme="dark"] * {
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* Portal surfaces that still use legacy hardcoded light values in main.css */
[data-theme="dark"] .dashboard-hero {
    background:
        radial-gradient(circle at top left, rgba(74, 159, 217, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(219, 105, 68, 0.1), transparent 30%),
        linear-gradient(140deg, var(--color-surface) 0%, var(--color-bg-secondary) 48%, var(--color-bg-tertiary) 100%);
    border-color: var(--color-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .dashboard-kpi-card,
[data-theme="dark"] .dashboard-note-card,
[data-theme="dark"] .dashboard-component-card,
[data-theme="dark"] .dashboard-metric-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .course-group-card,
[data-theme="dark"] .ovcc-empty,
[data-theme="dark"] .lc-exam-skeleton__card,
[data-theme="dark"] .lc-card,
[data-theme="dark"] .quiz-card,
[data-theme="dark"] .quiz-q,
[data-theme="dark"] .ft-profile__card,
[data-theme="dark"] .cert-card,
[data-theme="dark"] .ab-panel,
[data-theme="dark"] .ab-toc,
[data-theme="dark"] .games-card,
[data-theme="dark"] .prep-app-store-card,
[data-theme="dark"] .prep-app-empty,
[data-theme="dark"] .games-flashcards-launch,
[data-theme="dark"] .games-empty,
[data-theme="dark"] .audio-glossary-track,
[data-theme="dark"] .audio-glossary-sample,
[data-theme="dark"] .audio-glossary-full__card,
[data-theme="dark"] .audio-glossary-empty,
[data-theme="dark"] .certificate-category-placeholder,
[data-theme="dark"] .certificate-table-wrap,
[data-theme="dark"] .certificate-guidance {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .dashboard-panel__title {
    color: var(--color-heading, var(--color-text));
}

[data-theme="dark"] .lc-card-title,
[data-theme="dark"] .notary-instruction__title,
[data-theme="dark"] .notary-page .np-reader-title,
[data-theme="dark"] .certificate-panel__header h2,
[data-theme="dark"] .certificate-guidance__header h2,
[data-theme="dark"] .certificate-category-placeholder h2,
[data-theme="dark"] .certificate-infographic summary {
    color: var(--color-heading, var(--color-primary));
}

[data-theme="dark"] .dashboard-panel__meta,
[data-theme="dark"] .lc-slot-date,
[data-theme="dark"] .ovcc-meta,
[data-theme="dark"] .ovcc-empty {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .lc-card-action,
[data-theme="dark"] .quiz-btn--secondary {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .games-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .games-card__image {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .games-flashcards-launch {
    background: linear-gradient(
        135deg,
        var(--color-info-surface),
        var(--color-surface-muted)
    );
}

[data-theme="dark"] .ft-certificates nc-tabs {
    --nc-bg-secondary: var(--color-surface-muted);
    --nc-bg-tertiary: var(--color-bg-tertiary);
}

[data-theme="dark"] .certificate-table thead th {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .certificate-table tbody tr:hover {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .certificate-guidance__link {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-primary);
}

[data-theme="dark"] .certificate-guidance__link:hover {
    background: var(--color-bg-tertiary);
}

[data-theme="dark"] .ce-renewal-video__title,
[data-theme="dark"] .ce-survey-block__title,
[data-theme="dark"] .ce-survey-dialog__head h2,
[data-theme="dark"] .renewal-section h2,
[data-theme="dark"] .renewal-section__sub {
    color: var(--color-heading, var(--color-primary));
}

[data-theme="dark"] .ce-survey-dialog {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .ce-survey-dialog__close {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .ce-survey-dialog__close:hover {
    background: var(--color-bg-tertiary);
}

[data-theme="dark"] .certificate-infographic summary {
    background: var(--color-surface-muted);
}

[data-theme="dark"] .login-atmosphere,
[data-theme="dark"] .boot-skeleton--login .boot-skeleton__login {
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(219, 105, 68, 0.14), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(74, 159, 217, 0.18), transparent 50%),
        linear-gradient(155deg, #061525 0%, #0a2545 48%, #112240 100%);
}

[data-theme="dark"] #app.minimal-shell {
    background: var(--color-bg);
}

[data-theme="dark"] #app.minimal-shell .main-content {
    background: transparent;
}

[data-theme="dark"] .ce-module-card {
    background: var(--color-bg-secondary);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .ce-module-card:hover:not(:disabled) {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .ce-module-card.is-active {
    background: var(--color-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-focus-ring);
}

[data-theme="dark"] .ce-module-card.is-complete {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .ce-module-panel,
[data-theme="dark"] .ce-exam-row,
[data-theme="dark"] .ce-exam-section-card,
[data-theme="dark"] .ce-stat {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .ce-module-panel__head {
    background: var(--color-bg-secondary);
    border-color: var(--color-border);
}

[data-theme="dark"] .ce-module-panel__btn {
    background: var(--color-surface-muted, var(--color-bg-tertiary));
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .ce-module-panel__btn:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
    background: var(--color-bg-tertiary);
}

[data-theme="dark"] .ce-exam-row.is-complete {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .ce-exam-row.is-loading {
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
    background: var(--color-surface);
    opacity: 1;
}

[data-theme="dark"] .login-panel,
[data-theme="dark"] .boot-skeleton__panel {
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .boot-skeleton__bone {
    background: linear-gradient(
        90deg,
        var(--nc-skeleton-base) 0%,
        var(--nc-skeleton-highlight) 50%,
        var(--nc-skeleton-base) 100%
    );
    background-size: 200% 100%;
}



/* === shell.css === */
/**
 * App shell chrome — project-owned overrides on framework core.css.
 * Uses --shell-* tokens from themes/*.css; swap theme to rebrand the shell.
 */

.app-header {
    background: var(--shell-header-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#app {
    grid-template-columns: var(--shell-sidebar-width) 1fr;
}

@media (max-width: 960px) {
    /* Flex shell on mobile — grid sidebar track was still squeezing main. */
    #app,
    #app.sidebar-collapsed {
        display: flex;
        flex-direction: column;
        grid-template-areas: none;
        grid-template-columns: none;
        grid-template-rows: none;
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
    }

    app-header {
        flex: 0 0 auto;
        width: 100%;
    }

    app-sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        flex: none;
        grid-area: unset;
        grid-column: unset;
        grid-row: unset;
        background: var(--shell-sidebar-bg);
        box-shadow: none;
    }

    .main-content {
        flex: 1 1 auto;
        scrollbar-gutter: auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        overflow-x: clip;
    }

    app-sidebar.mobile-open {
        box-shadow: var(--shell-sidebar-mobile-shadow);
    }

    .app-sidebar {
        box-shadow: none;
    }

    app-sidebar.mobile-open .app-sidebar {
        box-shadow: none;
    }
}

/* Let sidebar nav scroll inside the grid cell instead of clipping overflow */
app-sidebar {
    min-height: 0;
    overflow: hidden;
}

#app.minimal-shell {
    background: transparent;
}

#app.minimal-shell app-header,
#app.minimal-shell app-sidebar {
    display: none !important;
}

.main-content {
    scrollbar-gutter: stable;
    background: var(--color-bg);
}


/* === main.css === */
/**
 * Main Styles
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    background-color: var(--color-bg);
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: white;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Responsive Grid Utilities */
.grid {
    display: grid;
    gap: var(--nc-spacing-lg);
    width: 100%;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Auto-fit responsive grid (recommended) */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--nc-spacing-lg);
    width: 100%;
}

/* Flexbox responsive layout */
.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: var(--nc-spacing-lg);
}

.flex-wrap > * {
    flex: 1 1 300px;
    min-width: 0;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}



/* Page transition animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.page-transition-exit {
    animation: fadeOut 0.08s ease-out forwards;
}

.page-transition-enter {
    animation: fadeIn 0.12s ease-out forwards;
}

/* Page navigation spinner */
@keyframes nc-spin {
    to { transform: rotate(360deg); }
}

#page-progress {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: conic-gradient(
        var(--color-primary) 0deg,
        var(--color-primary) 270deg,
        transparent 270deg
    );
    -webkit-mask: radial-gradient(circle, transparent 9px, black 10px);
    mask: radial-gradient(circle, transparent 9px, black 10px);
}

#page-progress.loading {
    opacity: 1;
    animation: nc-spin 0.7s linear infinite;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
}


.component-library {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-xl);
    box-sizing: border-box;
    width: 100%;
}

/* Component Library Sections */
.page-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--color-border);
    margin-top: var(--spacing-xl);
}

.page-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin: 0;
}

.page-eyebrow {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 var(--spacing-sm);
}

/* Generic card grid ? used by the make:view scaffold and any simple grid layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

/* Base card ? clean, modern, minimal */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-primary-light, #6ee7b7);
}

/* make:view scaffold ? toggled via wire-class="cardActive:card--wired-active" */
.card.card--wired-active {
    border-color: var(--color-primary, #22c55e);
    box-shadow: var(--shadow-md);
}

.card__icon {
    font-size: 1.25rem;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.card__body {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.card__body code {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85em;
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
}

/* Scaffold hero banner ? generated by make:view */
.scaffold-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: clamp(3rem, 8vw, 5rem) 2rem;
    text-align: center;
}

.scaffold-hero__inner {
    max-width: 640px;
    margin: 0 auto;
}

.scaffold-hero .page-eyebrow {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.scaffold-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 var(--spacing-md);
    line-height: 1.15;
}

.scaffold-hero__desc {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0;
}

/* Scaffold body ? padding between hero and cards */
.scaffold-body {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
}

/* Page-level CTA row ? used below card grids in generated views */
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-2xl);
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .page-actions > * {
        width: 100%;
    }
}

.component-section {
    margin-bottom: var(--spacing-3xl);
    padding: var(--spacing-2xl);
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.component-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-bg-secondary);
}

.component-demo {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    min-height: 100px;
}

/* Docs Page */
.docs-page {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-3xl);
}

.docs-page__header {
    text-align: left;
}

.docs-page__eyebrow {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.docs-page__status {
    margin: var(--spacing-md) 0 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.docs-page__toc-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 var(--spacing-lg);
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.docs-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 39;
}

.docs-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: var(--spacing-xl);
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 12px;
    align-self: start;
    height: calc(100vh - 24px);
}

.docs-sidebar__card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.docs-sidebar__title {
    margin: 0 0 var(--spacing-md);
    font-size: var(--font-size-lg);
    color: var(--color-text);
}

.docs-toc {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 6px;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
    padding-bottom: 24px;
    scrollbar-width: thin;
}

.docs-toc::-webkit-scrollbar {
    width: 8px;
}

.docs-toc::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 999px;
}

.docs-toc::-webkit-scrollbar-track {
    background: transparent;
}

.docs-toc__link {
    display: block;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.docs-toc__link:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}

.docs-toc__link--chapter {
    font-weight: 600;
}

.docs-toc__link--active {
    background: color-mix(in srgb, var(--color-primary) 12%, white);
    color: var(--color-primary-dark);
}

.docs-toc__link--h3 {
    padding-left: 22px;
    font-size: var(--font-size-sm);
}

.docs-toc__link--h4 {
    padding-left: 34px;
    font-size: var(--font-size-sm);
}

.docs-toc__empty {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.docs-content {
    min-width: 0;
}

.docs-article {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 3vw, 40px);
}

.docs-reader {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.docs-reader__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-secondary);
}

.docs-reader__meta {
    min-width: 0;
    text-align: center;
    font-weight: 700;
    color: var(--color-text);
}

.docs-reader__meta-compact,
.docs-reader__button-compact {
    display: none;
}

.docs-reader__body {
    min-width: 0;
}

.docs-reader__button {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    min-width: min(220px, 100%);
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.docs-reader__button-detail {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.docs-reader__button:hover:not(:disabled) {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.docs-reader__button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.docs-reader__button--next {
    text-align: right;
    align-items: flex-end;
}

.docs-article h1,
.docs-article h2,
.docs-article h3,
.docs-article h4 {
    color: var(--color-text);
    scroll-margin-top: 100px;
}

.docs-article h1 {
    font-size: var(--font-size-4xl);
    margin: 0 0 var(--spacing-lg);
}

.docs-article h2 {
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-2xl);
}

.docs-article h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.docs-article h4 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-lg);
}

.docs-article p,
.docs-article li,
.docs-article blockquote {
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.docs-article a {
    color: var(--color-primary);
    text-decoration: none;
}

.docs-article a:hover {
    text-decoration: underline;
}

.docs-article ul,
.docs-article ol {
    padding-left: 1.4rem;
}

.docs-article blockquote {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid var(--color-primary-light);
    background: var(--color-bg-secondary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.docs-article hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--spacing-xl) 0;
}

.docs-article pre {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: #111827;
    color: #e5e7eb;
}

.docs-article code {
    font-family: 'Geist Mono', monospace;
    font-size: 0.95em;
}

.docs-article p code,
.docs-article li code,
.docs-article blockquote code {
    background: var(--color-bg-secondary);
    color: var(--color-text);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.docs-article table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    font-size: var(--font-size-sm);
}

.docs-article table th,
.docs-article table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    vertical-align: top;
}

.docs-article table th {
    background: var(--color-bg-secondary);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}

.docs-article table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--color-bg-secondary) 50%, transparent);
}

.docs-article table tbody tr:hover {
    background: color-mix(in srgb, var(--color-primary) 6%, transparent);
}

.docs-error {
    padding: var(--spacing-xl);
    border: 1px solid var(--color-danger-light);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--color-danger) 8%, white);
}

@media (max-width: 980px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100vh;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        padding: 12px 10px 12px 12px;
        box-sizing: border-box;
    }

    .docs-sidebar.is-open {
        transform: translateX(0);
    }

    .docs-sidebar__card {
        height: 100%;
    }

    .docs-toc {
        overflow-y: auto;
    }

    .docs-page__toc-toggle {
        display: inline-flex;
    }

    .docs-reader__nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 0.5rem;
        padding: 0.65rem;
    }

    .docs-reader__button,
    .docs-reader__button--next {
        min-width: 0;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 0.6rem;
        gap: 0;
    }

    .docs-reader__button-label,
    .docs-reader__button-detail,
    .docs-reader__meta-full {
        display: none;
    }

    .docs-reader__button-compact,
    .docs-reader__meta-compact {
        display: block;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .docs-reader__meta {
        font-size: 0.82rem;
        padding: 0 0.2rem;
    }

    .docs-reader__button--next {
        align-items: center;
    }
}



.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--color-bg-secondary);
}

.mobile-menu-toggle .burger-line {
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.logo:hover {
    transform: translateY(-2px);
    color: var(--color-primary-dark);
}

.logo-icon {
    font-size: 2rem;
    line-height: 1;
}

.logo-text {
    font-size: 1.5rem;
}


.nanc-link {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--color-text);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.nanc-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-secondary);
}

.nanc-link.active {
    color: var(--color-primary);
    background: var(--color-bg-secondary);
}


.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-name {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    z-index: 1001;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.hamburger:hover {
    background: var(--color-bg-secondary);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    visibility: hidden;
}

.mobile-drawer.open {
    pointer-events: all;
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 1;
}

.mobile-drawer.open .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 2;
}

.mobile-drawer.open .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.drawer-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.drawer-close:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

.drawer-nav {
    flex: 1;
    padding: var(--spacing-md) 0;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--color-text);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: var(--font-size-base);
}

.drawer-link:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}

.drawer-link.active {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

.drawer-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.drawer-user {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.drawer-user-icon {
    font-size: 2.5rem;
}

.drawer-user-details {
    display: flex;
    flex-direction: column;
}

.drawer-user-name {
    font-weight: 600;
    color: var(--color-text);
}

.drawer-user-email {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.desktop-only {
    display: flex;
}

/* Footer */
/* Reserve space before the custom element upgrades to prevent layout shift */
app-footer {
    display: block;
    min-height: 80px;
}

.app-footer {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
}

.app-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-footer p {
    color: var(--color-text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--color-text);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--color-primary-dark);
}



/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Checkbox styles */
.checkbox-group {
    margin-bottom: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    max-width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-text {
    font-weight: 400;
    color: var(--color-text-secondary);
}

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.alert-error {
    background: #fee;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert-success {
    background: #efe;
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.small .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner.large .spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

.loading-message {
    margin-top: var(--spacing-md);
    color: var(--color-text-secondary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pages */
.page {
    /*padding: var(--spacing-xl);*/
}

/* Home Page */
.hero {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    background: var(--gradient-hero);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 0;
    margin-bottom: 0;
}

.hero h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
    background: var(--gradient-subtle);
    background-color:white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero p {
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.features {
    margin-top: var(--spacing-2xl);
}

.features h2 {
    text-align: center;
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xl);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    align-items: stretch;
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-2xl);
    background: white;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    /*border: 1px solid var(--color-border);*/
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    /*border-color: var(--color-primary-light);*/
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    transition: color var(--transition-fast);
    font-weight: 600;
}

.feature-card:hover h3 {
    color: var(--color-primary);
}

.feature-card p {
    flex: 1;
    margin: 0;
}

/* Page wrapper ? centered on public shell */
.page {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

/* On protected shell, page takes full available width ? no centering */
body.sidebar-enabled .page {
    max-width: 100%;
    margin: 0;
}

/* Login Page ? First Tuesday elevated guest auth */
.login-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    font-family: var(--font-family);
}

.login-atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(219, 105, 68, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(26, 107, 176, 0.35), transparent 50%),
        linear-gradient(155deg, var(--color-primary-deep) 0%, var(--color-primary) 48%, var(--color-primary-dark) 100%);
}

.login-atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.login-stage {
    width: min(440px, 100%);
    display: grid;
    gap: 1.75rem;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #fff;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-brand.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.login-brand__mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--color-secondary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.04em;
    box-shadow: 0 10px 28px rgba(219, 105, 68, 0.4);
}

.login-brand__name {
    margin: 0;
    font-family: var(--font-family-display);
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.login-brand__sub {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.72);
}

.login-panel {
    background: var(--color-surface, rgba(255, 255, 255, 0.97));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.35));
    border-radius: 20px;
    padding: clamp(1.75rem, 4vw, 2.35rem);
    box-shadow: 0 28px 70px rgba(0, 37, 72, 0.35);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.login-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.login-panel__title {
    margin: 0;
    font-family: var(--font-family-display);
    font-size: clamp(1.65rem, 3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--color-heading, var(--color-text));
}

.login-panel__copy {
    margin: 0.55rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.login-alert {
    margin-top: 1.15rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--color-error-surface, #fef2f2);
    border: 1px solid var(--color-error-border, #fecaca);
    color: var(--color-error-text, #b91c1c);
    font-size: 0.875rem;
    line-height: 1.45;
}

.login-alert[hidden] {
    display: none;
}

.login-form {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.35rem;
}

.login-field {
    display: grid;
    gap: 0.45rem;
}

.login-field__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.login-field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.login-field__forgot {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
}

.login-field__forgot:hover,
.login-field__forgot:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.login-field__input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-bg-secondary, var(--color-surface, #fff));
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-field__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-focus-ring, rgba(0, 75, 139, 0.15));
}

.login-field__input.is-error {
    border-color: var(--color-error);
}

.login-field__error {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-error);
}

.login-field__error[hidden] {
    display: none;
}

.login-form__utility {
    display: flex;
    align-items: center;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.login-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-secondary);
    cursor: pointer;
}

.login-submit {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: var(--color-secondary);
    color: #fff;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 8px 20px rgba(219, 105, 68, 0.28);
}

.login-submit:hover:not(:disabled) {
    background: var(--color-secondary-light);
    transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 640px) {
    .login-page {
        padding: 1.25rem;
        align-items: flex-start;
        padding-top: clamp(2rem, 12vh, 4rem);
    }

    .login-panel {
        border-radius: 16px;
    }
}

/* Dashboard Page */
.dashboard-container {
    max-width: 100%;
    margin: 0;
    display: grid;
    gap: 1.5rem;
    padding: 1.25rem;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
    gap: 1.5rem;
    padding: 1.8rem;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 30%),
        linear-gradient(140deg, #f8fafc 0%, #eefbf6 48%, #eff6ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    border-radius: 32px;
}

.dashboard-hero__content,
.dashboard-hero__spotlight {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.dashboard-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    margin: 0;
    color: #0f172a;
}

.dashboard-subtitle {
    font-size: 1.02rem;
    color: #475569;
    margin: 0;
    max-width: 60ch;
    line-height: 1.7;
}

.dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.dashboard-hero__actions > * {
    min-width: 0;
}

.dashboard-hero__proofs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dashboard-spotlight-card {
    padding: 1.25rem;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.dashboard-popover-copy {
    padding: 0.95rem 1rem;
    color: #334155;
    line-height: 1.65;
}

.dashboard-spotlight-card__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(167, 243, 208, 0.9);
}

.dashboard-spotlight-card__value {
    display: block;
    margin-top: 0.6rem;
    font-size: 2.6rem;
    line-height: 1;
}

.dashboard-spotlight-card__copy {
    margin: 0.7rem 0 0;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.65;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.dashboard-kpi-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.3rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
    border-radius: 24px;
}

.dashboard-kpi-card__value {
    display: block;
    margin-top: 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1;
    color: #0f172a;
}

.dashboard-kpi-card__copy {
    margin: 0.65rem 0 0;
    color: #475569;
    line-height: 1.6;
}

.dashboard-main-grid,
.dashboard-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
}

.dashboard-hero,
.dashboard-kpi-card,
.dashboard-panel,
.dashboard-note-card,
.dashboard-component-card,
.dashboard-metric-card {
    min-width: 0;
}

.dashboard-panel {
    padding: 1.4rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
    border-radius: 28px;
}

.dashboard-panel--wide {
    min-width: 0;
}

.dashboard-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.dashboard-panel__title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #0f172a;
}

.dashboard-panel__meta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.dashboard-panel__header--compact {
    margin-bottom: 1rem;
}

.dashboard-panel__title--small {
    margin-top: 0.65rem;
    font-size: 1.1rem;
}

.dashboard-health-list {
    display: grid;
    gap: 1.1rem;
}

.dashboard-health-row {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
}

.dashboard-health-row:first-child {
    border-top: none;
    padding-top: 0;
}

.dashboard-health-row strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.dashboard-health-row span {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
}

.dashboard-panel--showcase {
    padding-bottom: 1.7rem;
}

.dashboard-panel--embedded {
    padding: 1rem;
}

.dashboard-content-stack {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.dashboard-note-card {
    padding: 1.1rem 1.15rem;
    border-radius: 22px;
}

.dashboard-note-card h3 {
    margin: 0 0 0.45rem;
    color: #0f172a;
}

.dashboard-note-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.dashboard-component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.dashboard-component-card {
    padding: 1.2rem;
    min-height: 180px;
    border-radius: 22px;
}

.dashboard-signal-lab-card {
    display: grid;
    gap: 1rem;
}

.dashboard-signal-lab-grid,
.dashboard-data-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-data-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    align-items: start;
}

.dashboard-metric-card {
    padding: 1rem;
    border-radius: 20px;
    display: grid;
    gap: 0.7rem;
}

.dashboard-metric-card__value {
    font-size: 1.9rem;
    line-height: 1;
    color: #0f172a;
}

.dashboard-component-card h3 {
    margin: 0.9rem 0 0.5rem;
    color: #0f172a;
}

.dashboard-component-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.dashboard-actions {
    margin-top: var(--spacing-xl);
}

@media (max-width: 1024px) {
    .dashboard-hero,
    .dashboard-main-grid,
    .dashboard-showcase-grid,
    .dashboard-data-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 0.75rem;
        gap: 1rem;
    }

    .dashboard-hero {
        padding: 1rem;
        gap: 1rem;
        border-radius: 22px;
    }

    .dashboard-title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .dashboard-subtitle {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .dashboard-hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-hero__actions nc-button {
        width: 100%;
    }

    .dashboard-hero__actions nc-a {
        width: 100%;
        --nc-a-host-width: 100%;
        --nc-a-width: 100%;
    }

    .dashboard-hero__proofs {
        gap: 0.5rem;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-card {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .dashboard-signal-lab-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-data-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel,
    .dashboard-component-card,
    .dashboard-note-card,
    .dashboard-metric-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .dashboard-panel--embedded {
        padding: 0.85rem;
    }

    .dashboard-panel__header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.5rem;
    }

    .dashboard-title {
        font-size: clamp(1.8rem, 11vw, 2.4rem);
    }

    .dashboard-hero,
    .dashboard-kpi-card,
    .dashboard-panel {
        border-radius: 18px;
    }
}

/* Error Page */
.error-page {
    text-align: center;
    padding: var(--spacing-2xl);
}

.error-page h1 {
    font-size: 4rem;
    color: var(--color-error);
    margin-bottom: var(--spacing-md);
}

.error-page h1 {
    font-size: 4rem;
    color: var(--color-error);
    margin-bottom: var(--spacing-md);
}

/* User Detail Page */
.user-detail-header {
    margin-bottom: var(--spacing-xl);
}

.user-detail-header h1 {
    margin-bottom: var(--spacing-xs);
}

.user-detail-header p {
    color: var(--color-text-secondary);
}

.user-details {
    background: var(--color-bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: var(--color-text);
}

.detail-row .value {
    color: var(--color-text-secondary);
}

.user-actions {
    display: flex;
    gap: var(--spacing-md);
}

.user-actions {
    display: flex;
    gap: var(--spacing-md);
}

/* About Page */
.about-hero {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-xl);
}

.about-hero h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.about-hero .lead {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: var(--spacing-2xl);
}

.about-section h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: var(--spacing-sm) 0;
    font-size: var(--font-size-lg);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.tech-item {
    padding: var(--spacing-lg);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tech-item h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.cta-section {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
}

.cta-section h2 {
    margin-bottom: var(--spacing-md);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-xl);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-secondary);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    
}

@media (min-width: 769px) {
    
}

/* ============================================
   HOME PAGE STYLES
   ============================================ */

/* Hero Section */
.hero {
    background: #0f172a;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    left: auto;
    right: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 6rem 2rem 5rem;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.4rem 1.1rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.hero h1 {
    font-size: clamp(2.75rem, 5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.12;
    color: #ffffff;
    margin: 0;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
    max-width: 600px;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    border: none;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: #fff;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.35);
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    opacity: 0.92;
    color: #fff;
}

.hero-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.hero-btn-ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

/* Shared section layout helpers */
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.75px;
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.section-head p,
.section-head .subtitle,
.section-head .section-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Why NativeCore Section */
.why-section {
    background: #ffffff;
    padding: 6rem 2rem;
}

.why-cards {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.comparison-card {
    flex: 1;
    min-width: 280px;
    max-width: 460px;
    padding: 2.5rem;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.comparison-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
}

.comparison-card .card-icon {
    font-size: 2.25rem;
    text-align: center;
    display: block;
    margin-bottom: 1rem;
}

.comparison-card h3 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1.75rem;
    color: #0f172a;
}

.comparison-card .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.comparison-card .feature-list li {
    padding-left: 1.4rem;
    position: relative;
    font-size: 0.97rem;
    color: #475569;
    line-height: 1.55;
}

.comparison-card .feature-list li::before {
    content: "?";
    position: absolute;
    left: 0;
    font-weight: bold;
    line-height: 1.55;
}

.comparison-card.problem .feature-list li::before { color: #ef4444; }
.comparison-card.solution .feature-list li::before { color: #10b981; }

/* Features Section */
.features-section {
    padding: 6rem 2rem;
    background: #f8fafc;
    text-align: center;
}

.features-section .section-head h2 {
    color: #0f172a;
}

.features-section .subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #0f172a;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #64748b;
    margin: 0;
}

/* Comparison Table Section */
.comparison-section {
    padding: 6rem 2rem;
    background: #ffffff;
    text-align: center;
}

.comparison-section .section-head h2 {
    color: #0f172a;
}

.comparison-section .subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
}

.comparison-table {
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px #e2e8f0;
}

.comparison-table th {
    background: #0f172a;
    color: white;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.95rem;
}

.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: #f8fafc; }

.framework-name { font-weight: 700; color: #667eea; }
.check { color: #10b981; font-weight: bold; margin-right: 0.4rem; }
.cross { color: #ef4444; margin-right: 0.4rem; opacity: 0.7; }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3.5rem; }
    .hero-stats { gap: 2rem; }
    .why-section,
    .features-section,
    .comparison-section { padding: 4rem 1.25rem; }
    .why-cards { gap: 1.25rem; }
    .comparison-card { max-width: 100%; }
    .features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .comparison-table {
        overflow: visible;
    }

    .comparison-table table,
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table th,
    .comparison-table td {
        display: block;
        width: 100%;
    }

    .comparison-table thead {
        display: none;
    }

    .comparison-table table {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .comparison-table tbody {
        display: grid;
        gap: 1rem;
    }

    .comparison-table tr {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        padding: 0.35rem 0;
        text-align: left;
    }

    .comparison-table td {
        display: grid;
        grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.65rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.92rem;
    }

    .comparison-table td:last-child {
        border-bottom: none;
    }

    .comparison-table td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
    }
}

@keyframes metallic-shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    line-height: 1.15;
    color: #ffffff;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* Problem/Solution Section */
.problem-solution {
    padding: 5rem 2rem;
    position: relative;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.problem-solution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 30%);
    pointer-events: none;
}

.problem-box, .solution-box {
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-box:hover, .solution-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.problem-box {
    border-left: 4px solid var(--danger-color);
}

.solution-box {
    border-left: 4px solid var(--success-color);
}

.box-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 24px;
    flex-shrink: 0;
}

.icon-badge.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
}

.icon-badge.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.15) 100%);
}

.box-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-list li {
    padding: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.feature-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Features Grid */
.features-section {
    display:flex;
    flex-direction:column;
    justify-content: center;
    align-items:center;
    padding: 4rem 2rem;
    width: 100%;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.features-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 45%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 55%,
        transparent 100%
    );
    animation: metallic-shimmer 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.features-section > * {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.comparison-section {
    display:flex;
    flex-direction:column;
    justify-content: center;
    align-items:center;
    padding: 4rem 2rem;
    width: 100%;
    position: relative;
    background: #f8fafc;
}

.comparison-section::before {
    content: none;
}

.comparison-section > * {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.features-section h2, .comparison-section h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.features-section h2 {
    color: white;
}

.comparison-section h2 {
    color: var(--text);
}

.features-section .subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-section .subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.feature-card {
    box-sizing: border-box;
    min-width: 0;
    padding: 1.75rem;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin-top: 2rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.comparison-table th {
    background: #0f172a;
    color: white;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table th:last-child {
    border-right: none;
}

.comparison-table th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.comparison-table th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.comparison-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-right: 1px solid rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.comparison-table td:last-child {
    border-right: none;
}

.comparison-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

.comparison-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

.comparison-table tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

.comparison-table small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: normal;
    opacity: 0.8;
}

.framework-name {
    font-weight: 700;
    color: #667eea !important;
    font-size: 1.05rem;
}

.check { 
    color: var(--success-color); 
    font-weight: bold; 
    font-size: 1.3rem;
    margin-right: 0.5rem;
}

.cross { 
    color: var(--danger-color); 
    font-size: 1.3rem;
    margin-right: 0.5rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.5rem 2rem;
    }

    .hero-actions {
        width: 100%;
        align-items: center;
    }

    .hero-actions nc-a {
        --nc-a-host-width: min(100%, 22rem);
        --nc-a-width: 100%;
    }

    .problem-solution-grid {
        gap: 2rem;
    }

    .features-section {
        padding: 4rem 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        width: 100%;
        padding: 1.25rem;
    }
}

/* ============================================================
   COMPONENTS PAGE
   ============================================================ */

.components-coming-soon {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.coming-soon-inner {
    text-align: center;
    max-width: 560px;
}

.coming-soon-badge {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-bottom: 1.5rem;
}

.components-coming-soon h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.components-coming-soon p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.coming-soon-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-top: 0.2rem;
}

/* ============================================================
   COMPONENT DEMOS (components page shared layout)
   ============================================================ */

.components-demo {
    padding: var(--spacing-xl, 2rem);
    max-width: 900px;
    margin: 0 auto;
}

.demo-section {
    margin-bottom: 2.5rem;
}

.demo-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.demo-row--align-center {
    align-items: center;
}

.demo-row--col {
    flex-direction: column;
    gap: 1.5rem;
}

/* Component card ? wraps a single component demo with header + sections */
.demo-component {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--background-secondary, var(--nc-bg-secondary));
    border: 1px solid var(--border-color, var(--nc-border));
    border-radius: var(--nc-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.demo-component + .demo-component {
    margin-top: 0;
}

.demo-component__header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.demo-component__tag {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.demo-component__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.4rem 0 0.75rem;
}

.demo-component__usage {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    color: var(--nc-primary);
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    display: block;
}

.demo-component__usage-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.demo-component__usage-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.demo-section-desc {
    font-size: 0.82rem;
    color: var(--text-muted, var(--text-secondary));
    margin: -0.4rem 0 0.75rem;
    line-height: 1.5;
}

/* ============================================
   HOME ? enterprise starter welcome
   ============================================ */

[data-view="home"] {
    --home-bg: #070b10;
    --term-bg: #050805;
    --term-panel: #0a100c;
    --term-green: #3dff9a;
    --term-green-dim: rgba(61, 255, 154, 0.55);
    --term-green-mute: rgba(61, 255, 154, 0.38);
    --term-arg: #b8ffd9;
    min-height: 100%;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(16, 185, 129, 0.08), transparent 55%),
        linear-gradient(180deg, #0b1220 0%, var(--home-bg) 100%);
    color: #e2e8f0;
}

.home-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: min(48vh, 26rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 7vw, 5rem) 1.35rem clamp(2.25rem, 4vw, 3rem);
    background: transparent;
    color: #f8fafc;
}

.home-hero__wash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% -10%, rgba(16, 185, 129, 0.12), transparent 58%);
    pointer-events: none;
    animation: home-hero-wash 1.1s ease-out both;
}

.home-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
    justify-items: start;
    text-align: left;
    animation: home-hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-hero__brand {
    margin: 0;
    font-size: clamp(2.35rem, 6vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
    color: #fff;
}

.home-hero__headline {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: rgba(248, 250, 252, 0.92);
}

.home-hero__lead {
    margin: 0;
    max-width: 34rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.72);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.home-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.home-hero__btn:hover {
    transform: translateY(-1px);
}

.home-hero__btn--primary {
    background: #10b981;
    color: #041016;
}

.home-hero__btn--primary:hover {
    background: #34d399;
}

.home-hero__btn--ghost {
    background: transparent;
    color: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(248, 250, 252, 0.28);
}

.home-hero__btn--ghost:hover {
    border-color: rgba(248, 250, 252, 0.55);
    background: rgba(248, 250, 252, 0.06);
}

.home-start {
    width: 100%;
    padding: clamp(1.75rem, 4vw, 2.75rem) 1.35rem clamp(2.5rem, 5vw, 3.5rem);
    background: transparent;
    color: inherit;
}

.home-start__inner {
    max-width: 40rem;
    margin: 0 auto;
    animation: home-start-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.home-start__inner h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #f8fafc;
}

.home-start__lead {
    margin: 0 0 1.15rem;
    max-width: 34rem;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.68);
    line-height: 1.6;
}

.home-start__lead a {
    color: var(--term-green);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.home-start__lead a:hover {
    color: #6effb4;
}

.home-term {
    overflow: hidden;
    border: 1px solid rgba(61, 255, 154, 0.18);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(61, 255, 154, 0.04), transparent 28%),
        var(--term-panel);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 18px 40px rgba(0, 0, 0, 0.4),
        0 0 36px rgba(16, 185, 129, 0.07);
}

.home-term__chrome {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid rgba(61, 255, 154, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.home-term__traffic {
    display: inline-flex;
    gap: 0.4rem;
}

.home-term__traffic i {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.35);
}

.home-term__traffic i:nth-child(1) { background: #ff5f57; }
.home-term__traffic i:nth-child(2) { background: #febc2e; }
.home-term__traffic i:nth-child(3) { background: #28c840; }

.home-term__title {
    justify-self: center;
    margin-right: 3.2rem;
    font-family: var(--font-family-mono, 'Geist Mono', monospace);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: rgba(226, 232, 240, 0.45);
}

.home-term__body {
    position: relative;
    padding: 0.95rem 1.1rem 1.1rem;
    font-family: var(--font-family-mono, 'Geist Mono', monospace);
    font-size: clamp(0.78rem, 1.6vw, 0.88rem);
    line-height: 1.55;
    color: var(--term-green);
    background:
        linear-gradient(rgba(61, 255, 154, 0.03) 1px, transparent 1px);
    background-size: 100% 1.55em;
}

.home-term__body::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(61, 255, 154, 0.03) 50%,
        transparent 100%
    );
    background-size: 100% 4px;
    opacity: 0.35;
}

.home-term__line,
.home-term__comment {
    position: relative;
    z-index: 1;
    margin: 0;
}

.home-term__comment {
    margin-top: 0.7rem;
    color: var(--term-green-mute);
}

.home-term__comment:first-child {
    margin-top: 0;
}

.home-term__line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--term-green);
}

.home-term__prompt {
    flex: 0 0 auto;
    color: var(--term-green);
    font-weight: 700;
    text-shadow: 0 0 12px rgba(61, 255, 154, 0.35);
}

.home-term__cmd {
    color: var(--term-green-dim);
}

.home-term__arg {
    color: var(--term-arg);
}

.home-term__line--live {
    margin-top: 0.85rem;
    align-items: center;
}

.home-term__cursor {
    width: 0.55rem;
    height: 1.05em;
    background: var(--term-green);
    box-shadow: 0 0 10px rgba(61, 255, 154, 0.55);
    animation: home-term-blink 1.05s steps(1, end) infinite;
}

@keyframes home-hero-wash {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes home-hero-rise {
    from {
        opacity: 0;
        transform: translateY(0.85rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-start-rise {
    from {
        opacity: 0;
        transform: translateY(0.65rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-term-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@media (max-width: 768px) {
    .home-hero__actions {
        width: 100%;
    }

    .home-hero__btn {
        width: min(100%, 22rem);
    }

    .home-term__title {
        margin-right: 0;
        justify-self: start;
    }

    .home-term__chrome {
        grid-template-columns: auto;
        gap: 0.45rem;
    }

    .home-term__body {
        padding: 1.1rem 1rem 1.25rem;
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__wash,
    .home-hero__inner,
    .home-start__inner {
        animation: none;
    }

    .home-term__cursor {
        animation: none;
        opacity: 1;
    }
}

/* ============================================================
   FT Portal ? Dashboard / Profile / Shell
   ============================================================ */

.portal-page {
    padding: 1.5rem 1.75rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    background:
        radial-gradient(ellipse at top right, var(--portal-page-accent), transparent 42%),
        linear-gradient(180deg, var(--color-page-bg-start) 0%, var(--color-page-bg-end) 100%);
    min-height: 100%;
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title {
    font-family: var(--font-family-display);
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
    letter-spacing: -0.02em;
    margin: 0;
}

.page-subtitle {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.ft-muted {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.portal-loading {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 14rem;
    padding: 0;
}

.portal-loading[hidden] {
    display: none !important;
}

/* Before the CE upgrades, unknown elements collapse to empty — show placeholder bones. */
nc-skeleton:not(:defined) {
    display: block;
    width: 100%;
    min-height: 0.85rem;
    border-radius: 6px;
    background: var(--nc-skeleton-base, var(--color-bg-tertiary, #e2e8f0));
}

nc-skeleton:not(:defined)[variant='rect'],
nc-skeleton:not(:defined)[variant='card'] {
    min-height: 4.5rem;
}

.portal-skeleton {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.portal-skeleton__title {
    display: grid;
    gap: 0.65rem;
    width: 100%;
}

.portal-skeleton__banner {
    display: block;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.portal-skeleton__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
}

.portal-skeleton__group {
    display: grid;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    padding: 1.15rem 1.25rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

.portal-skeleton__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    width: 100%;
}

.portal-skeleton__cards--profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-skeleton__bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.portal-skeleton > nc-skeleton,
.portal-skeleton__banner,
.portal-skeleton__stats > nc-skeleton,
.portal-skeleton__cards > nc-skeleton,
.portal-skeleton__bottom > nc-skeleton {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 960px) {
    .portal-skeleton__stats,
    .portal-skeleton__bottom,
    .portal-skeleton__cards--profile {
        grid-template-columns: 1fr;
    }
}

.portal-error {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 600;
}

.portal-error[hidden] {
    display: none !important;
}

.ft-dashboard__status,
.ft-profile__status {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.ft-dashboard__status.is-error,
.ft-profile__status.is-error {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.stat-icon {
    width: 10px;
    height: 36px;
    border-radius: 999px;
    background: var(--color-primary);
}

.stat-icon.blue { background: var(--color-primary); }
.stat-icon.orange { background: var(--color-secondary); }
.stat-icon.green { background: #10b981; }
.stat-icon.purple { background: #7c3aed; }

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-heading, var(--color-primary-deep));
    line-height: 1.1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.course-group-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.25rem;
    margin-bottom: 1.25rem;
}

.course-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.course-group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
}

.course-group-heading {
    display: grid;
    gap: 0.2rem;
}

.course-group-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.course-group-stats {
    display: flex;
    gap: 1rem;
}

.course-group-stat {
    text-align: right;
}

.course-group-stat-value {
    display: block;
    font-weight: 800;
    color: var(--color-primary);
}

.course-group-stat-label {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
}

.course-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
}

.course-icon.ci-blue { background: var(--color-primary); }
.course-icon.ci-orange { background: var(--color-secondary); }
.course-icon.ci-purple { background: #7c3aed; }
.course-icon.ci-green { background: #059669; }

.course-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

.badge-active {
    background: rgba(219, 105, 68, 0.12);
    color: #c45635;
}

.badge-done {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.course-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-text);
}

.course-code {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.course-prog-row {
    display: grid;
    gap: 0.35rem;
}

.course-prog-labels {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.course-prog-label {
    color: var(--color-text-secondary);
    font-weight: 600;
}

.course-prog-value {
    font-weight: 600;
    color: var(--color-text);
}

.course-prog-optional {
    font-weight: 400;
    color: var(--color-text-secondary);
    font-size: 0.7rem;
}

.progress-bar-bg {
    height: 6px;
    border-radius: 999px;
    background: var(--color-bg-tertiary);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--color-primary);
}

.progress-bar-fill.done {
    background: #10b981;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.course-exam-date {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.btn-course {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-course:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-course-primary {
    background: var(--color-secondary);
    color: #fff;
}

.btn-course-secondary {
    background: #e8eef4;
    color: var(--color-primary-deep);
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.info-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
}

.info-card-title {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.timeline-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: var(--color-primary);
    flex-shrink: 0;
}

.timeline-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline-desc {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.exam-schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.exam-schedule-item:last-child {
    border-bottom: none;
}

.exam-course-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
}

.exam-note {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
}

.exam-date-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--color-bg-tertiary);
    color: var(--color-info-text, var(--color-primary));
    white-space: nowrap;
}

.exam-date-badge.available {
    background: var(--color-success-surface, rgba(16, 185, 129, 0.14));
    color: var(--color-success-text, #047857);
}

.exam-open {
    color: var(--color-secondary);
    font-weight: 700;
}

.ft-shell__panel {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.ft-shell__note {
    margin: 0;
    color: var(--color-text-secondary);
}

.certificate-notice {
    margin-bottom: 1rem;
}

.ft-certificates {
    font-family: var(--font-family);
}

.ft-certificates .page-title {
    font-family: var(--font-family);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ft-certificates nc-tabs {
    --nc-bg-secondary: var(--color-surface-muted, #eaf1f7);
    --nc-bg-tertiary: var(--color-bg-tertiary, #dfe9f2);
    --nc-border: var(--color-border);
    --nc-font-family: var(--font-family);
    --nc-primary: var(--color-primary);
    --nc-text: var(--color-text);
    --nc-text-secondary: var(--color-text-secondary);
    margin-top: 0.75rem;
}

.certificate-tab-content {
    min-width: 0;
}

.certificate-category-placeholder {
    display: grid;
    min-height: 18rem;
    align-content: center;
    justify-items: center;
    gap: 0.55rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 35, 55, 0.04);
}

.certificate-category-placeholder__eyebrow {
    color: var(--color-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certificate-category-placeholder h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.35rem;
}

.certificate-category-placeholder p {
    max-width: 34rem;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.88rem;
}

.certificate-panel__eyebrow {
    display: block;
    color: var(--color-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certificate-panel {
    margin-top: 0.5rem;
}

.certificate-panel__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.certificate-panel__header h2 {
    margin: 0.22rem 0 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.certificate-panel__header p {
    margin: 0.28rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.82rem;
}

.certificate-table-wrap {
    overflow-x: auto;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.certificate-table {
    width: 100%;
    min-width: 40rem;
    border-collapse: collapse;
    text-align: left;
}

.certificate-table thead th {
    padding: 0.78rem 1rem;
    color: var(--color-text-secondary);
    background: var(--color-surface-muted, #f5f8fb);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.certificate-table td,
.certificate-table tbody th {
    padding: 0.95rem 1rem;
    color: var(--color-text);
    border-top: 1px solid var(--color-border, #e8eef4);
    font-size: 0.84rem;
    vertical-align: middle;
}

.certificate-table tbody tr {
    transition: background-color 0.15s ease;
}

.certificate-table tbody tr:hover {
    background: var(--color-surface-muted, #f9fbfd);
}

.certificate-table tbody tr.is-complete th:first-child {
    color: var(--color-primary);
    font-weight: 700;
}

.certificate-table__course {
    width: 48%;
}

.certificate-table__date {
    color: var(--color-text-secondary) !important;
    white-space: nowrap;
}

.certificate-table__action-heading,
.certificate-table__action {
    text-align: right;
    white-space: nowrap;
}

.certificate-status {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.certificate-status.is-complete {
    color: var(--color-success-text, #047857);
    background: var(--color-success-surface, #ecfdf5);
}

.certificate-status.is-locked {
    color: var(--color-text-secondary);
    background: var(--color-surface-muted, #f1f5f9);
}

.certificate-download-link {
    flex-shrink: 0;
    padding: 0;
    color: var(--color-primary);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    white-space: nowrap;
}

.certificate-download-link:hover {
    color: var(--color-primary-light, var(--color-primary));
}

.certificate-download-link:focus-visible,
.certificate-guidance__link:focus-visible,
.certificate-infographic summary:focus-visible {
    outline: 3px solid rgba(0, 75, 139, 0.28);
    outline-offset: 3px;
}

.certificate-locked-label {
    flex-shrink: 0;
    color: var(--color-text-muted, #94a3b8);
    font-size: 0.76rem;
    font-weight: 800;
}

.certificate-empty {
    padding: 1.25rem;
}

.certificate-guidance {
    margin-top: 2rem;
    padding: 1.35rem;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.certificate-guidance__header h2 {
    margin: 0.25rem 0 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.certificate-guidance__header p {
    max-width: 52rem;
    margin: 0.45rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
}

.certificate-guidance__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.15rem;
}

.certificate-guidance__link {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    color: var(--color-primary);
    background: var(--color-surface-muted, #f5f8fb);
    border: 1px solid var(--color-border, #dce7f0);
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
}

.certificate-guidance__link:hover {
    background: var(--color-bg-tertiary, #edf4fa);
    border-color: var(--color-border);
}

.certificate-guidance__link span {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.ce-renewal-video {
    margin-top: 1.35rem;
}

.ce-renewal-video__title,
.ce-survey-block__title {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.ce-renewal-video__frame {
    position: relative;
    margin-top: 0.75rem;
    width: 100%;
    max-width: 40rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #0f172a;
}

.ce-renewal-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ce-survey-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.ce-survey-block__copy,
.ce-survey-block__done {
    max-width: 42rem;
    margin: 0.4rem 0 1rem;
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
}

.ce-survey-block__done {
    margin-bottom: 0;
    color: var(--color-success-text, #166534);
    font-weight: 600;
}

.ce-survey-dialog {
    width: min(720px, calc(100vw - 1.5rem));
    max-width: none;
    max-height: min(88vh, 900px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border, #dce7f0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #0f172a);
    box-shadow: 0 24px 64px rgba(2, 21, 38, 0.35);
}

.ce-survey-dialog::backdrop {
    background: rgba(2, 21, 38, 0.72);
}

.ce-survey-dialog__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(88vh, 900px);
}

.ce-survey-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem 0.85rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.ce-survey-dialog__head h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.ce-survey-dialog__head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
    line-height: 1.45;
}

.ce-survey-dialog__close {
    flex-shrink: 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--color-border, #cbd5e1);
    border-radius: 8px;
    background: var(--color-surface-muted, #f8fafc);
    color: var(--color-text, #0f172a);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

.ce-survey-dialog__close:hover {
    background: var(--color-bg-tertiary, #edf4fa);
}

.ce-survey-dialog__body {
    padding: 0.35rem 1.2rem 1.25rem;
    overflow: auto;
}

.ce-survey-skeleton {
    display: grid;
    gap: 0.35rem;
    padding: 0.35rem 0 0.5rem;
}

.ce-survey-skeleton__block {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.ce-survey-skeleton__block:last-child {
    border-bottom: 0;
}

.renewal-page {
    max-width: 52rem;
}

.renewal-page__eyebrow {
    margin: 0 0 0.35rem;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.renewal-section {
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--color-border);
}

.renewal-section h2 {
    margin: 0 0 0.55rem;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.renewal-section p {
    margin: 0 0 0.75rem;
    color: var(--color-text);
    font-size: 0.92rem;
    line-height: 1.6;
}

.renewal-section__sub {
    margin: 1.15rem 0 0.55rem;
    color: var(--color-heading, var(--color-primary));
    font-size: 0.98rem;
}

.renewal-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.renewal-list li + li {
    margin-top: 0.4rem;
}

.renewal-list a {
    color: var(--color-primary);
    font-weight: 600;
}

.renewal-video {
    position: relative;
    margin: 0.75rem 0 1rem;
    width: 100%;
    max-width: 36rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #0f172a;
}

.renewal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.renewal-actions {
    margin: 0.85rem 0;
}

.renewal-section--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}

@media (max-width: 720px) {
    .renewal-section--split {
        grid-template-columns: 1fr;
    }
}

.certificate-infographics {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.certificate-infographic {
    overflow: hidden;
    border: 1px solid var(--color-border, #dce7f0);
    border-radius: 10px;
}

.certificate-infographic summary {
    padding: 0.85rem 0.95rem;
    color: var(--color-heading, var(--color-primary));
    background: var(--color-surface-muted, #f8fafc);
    font-size: 0.86rem;
    font-weight: 750;
    cursor: pointer;
}

.certificate-infographic[open] summary {
    border-bottom: 1px solid var(--color-border, #dce7f0);
}

.certificate-infographic p {
    margin: 0;
    padding: 0.85rem 0.95rem 0;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.certificate-infographic__map {
    position: relative;
    width: min(100%, 865px);
    margin: 0.85rem auto 0;
    line-height: 0;
}

.certificate-infographic__map img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.certificate-infographic__hotspot {
    position: absolute;
    top: var(--hotspot-top);
    left: var(--hotspot-left);
    display: block;
    width: var(--hotspot-width);
    height: var(--hotspot-height);
    border-radius: 0.2rem;
    cursor: pointer;
}

.certificate-infographic__hotspot:hover,
.certificate-infographic__hotspot:focus-visible {
    background: rgba(0, 75, 139, 0.14);
    outline: 2px solid rgba(0, 75, 139, 0.75);
    outline-offset: 2px;
}

.ft-profile__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.ft-profile__grid[hidden] {
    display: none !important;
}

.ft-profile__card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.35rem 1.4rem 1.5rem;
}

.ft-profile__card-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
}

.ft-profile__form {
    display: grid;
    gap: 0.85rem;
}

.ft-profile__alert {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

.ft-profile__alert.is-success {
    background: var(--color-success-surface, #ecfdf5);
    color: var(--color-success-text, #047857);
    border: 1px solid color-mix(in srgb, var(--color-success-text, #047857) 35%, transparent);
}

.ft-profile__alert.is-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-error, #b91c1c);
    border: 1px solid color-mix(in srgb, var(--color-error, #b91c1c) 35%, transparent);
}

.ft-field-row {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.8fr;
    gap: 0.75rem;
}

.ft-field {
    display: grid;
    gap: 0.35rem;
}

.ft-field__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
}

.ft-field__input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-bg-secondary, #fff);
}

.ft-field__input:focus {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    border-color: var(--color-primary);
}

.ft-field__input:disabled,
.ft-field__input[readonly] {
    background: var(--color-surface-muted, #f1f5f9);
    color: var(--color-text-secondary);
}

.ft-field__error {
    margin: 0;
    color: #b91c1c;
    font-size: 0.78rem;
}

.ft-field__hint {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.ft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.35rem;
    padding: 0.75rem 1.1rem;
    border-radius: 10px;
    border: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ft-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ft-btn--primary {
    background: var(--color-primary);
    color: #fff;
}

.ft-btn--secondary {
    background: var(--color-secondary);
    color: #fff;
}

@media (max-width: 960px) {
    .stats-row,
    .bottom-grid,
    .ft-profile__grid {
        grid-template-columns: 1fr;
    }

    .portal-page,
    .lc-page {
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .ce-module-grid {
        grid-template-columns: 1fr;
    }

    .ce-section-card .ce-module-grid {
        padding: 0 1rem 1rem;
    }
}

@media (max-width: 640px) {
    .portal-page {
        padding: 1rem 1rem 2rem;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .lc-page {
        padding: 1rem 1rem 2rem;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .ce-module-grid {
        grid-template-columns: 1fr;
    }

    .ce-section-card .ce-module-grid {
        padding: 0 1rem 1rem;
    }

    .certificate-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .certificate-guidance {
        padding: 1.1rem;
    }

    .certificate-guidance__links {
        grid-template-columns: 1fr;
    }

    .ft-field-row {
        grid-template-columns: 1fr;
    }

    .course-group-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* FT sidebar light-DOM nav (slotted into app-sidebar) */
app-sidebar .sidebar-item {
    color: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
    margin: 0 0.35rem;
    padding: 0.7rem 0.85rem;
    gap: 0.75rem;
    width: auto;
}

app-sidebar .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

app-sidebar .sidebar-item.active {
    background: rgba(219, 105, 68, 0.22);
    color: #fff;
    font-weight: 700;
}

app-sidebar .sidebar-icon {
    min-width: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
    color: inherit;
}

app-sidebar .sidebar-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke: currentColor;
}

app-sidebar .sidebar-text {
    max-width: none;
    color: inherit;
}

app-sidebar.collapsed .sidebar-text {
    display: none;
}

/* Boot placeholder (replaces loading-spinner before first route paints) */
.boot-skeleton {
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

.boot-skeleton__login,
.boot-skeleton__portal {
    display: none;
}

.boot-skeleton--login .boot-skeleton__login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 100vh;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(219, 105, 68, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(26, 107, 176, 0.35), transparent 50%),
        linear-gradient(155deg, var(--color-primary-deep) 0%, var(--color-primary) 48%, var(--color-primary-dark) 100%);
}

.boot-skeleton--portal .boot-skeleton__portal {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.5rem 2rem;
}

.boot-skeleton__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.boot-skeleton__mark {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.boot-skeleton__lines {
    display: grid;
    gap: 0.45rem;
}

.boot-skeleton__panel {
    width: min(100%, 420px);
    display: grid;
    gap: 0.85rem;
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    background: var(--color-surface, rgba(255, 255, 255, 0.94));
    border: 1px solid var(--color-border, transparent);
    box-shadow: 0 24px 48px rgba(0, 37, 72, 0.28);
}

.boot-skeleton__stats,
.boot-skeleton__cards {
    display: grid;
    gap: 0.75rem;
}

.boot-skeleton__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boot-skeleton__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boot-skeleton__bone {
    display: block;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--nc-skeleton-base, #e8eef5) 0%,
        var(--nc-skeleton-highlight, #f7fafc) 50%,
        var(--nc-skeleton-base, #e8eef5) 100%
    );
    background-size: 200% 100%;
    animation: boot-skeleton-wave 1.4s ease-in-out infinite;
    height: 2.75rem;
}

.boot-skeleton--login .boot-skeleton__brand .boot-skeleton__bone {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.32) 50%, rgba(255, 255, 255, 0.18) 100%);
    background-size: 200% 100%;
}

.boot-skeleton__bone--sm { width: 7rem; height: 0.7rem; }
.boot-skeleton__bone--md { width: 9.5rem; height: 0.85rem; }
.boot-skeleton__bone--title { width: 40%; height: 1.6rem; }
.boot-skeleton__bone--copy { width: 75%; height: 0.85rem; }
.boot-skeleton__bone--field { height: 2.75rem; }
.boot-skeleton__bone--btn { height: 2.85rem; margin-top: 0.35rem; }
.boot-skeleton__bone--banner { height: 6.5rem; }
.boot-skeleton__bone--card { height: 10rem; }

.boot-skeleton__stats .boot-skeleton__bone {
    height: 4.5rem;
}

@keyframes boot-skeleton-wave {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@media (max-width: 900px) {
    .boot-skeleton__stats,
    .boot-skeleton__cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .boot-skeleton__stats,
    .boot-skeleton__cards {
        grid-template-columns: 1fr;
    }
}

/* -- Licensing course hub / quiz / exam ----------------------------------- */
.lc-page {
    /* inherit .portal-page centering (max-width 1200px) */
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.75rem 2.5rem;
    box-sizing: border-box;
}

.lc-skeleton__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.lc-skeleton__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem 1.35rem 1.5rem;
}

@media (max-width: 720px) {
    .lc-skeleton__steps {
        grid-template-columns: 1fr;
    }
}

.ovcc-skeleton__toc {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1.35rem;
}

.ovcc-page {
    max-width: 960px;
}

.ovcc-head {
    margin: 0 0 0.85rem;
}

.ovcc-eyebrow {
    margin: 0 0 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary);
}

.ovcc-title {
    margin: 0;
    font-family: var(--font-family-display, inherit);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-heading, var(--color-primary));
    line-height: 1.2;
}

.ovcc-meta {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.ovcc-lead {
    margin: 0 0 1.25rem;
    max-width: 42rem;
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.ovcc-lead p {
    margin: 0;
}

.ovcc-lead p + p {
    margin-top: 0.55rem;
}

.ovcc-toc-block {
    background: transparent;
}

.ovcc-toc-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.7rem;
}

.ovcc-toc-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.ovcc-toc-sub {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.ovcc-preview {
    margin-top: 1.15rem;
    max-width: 640px;
}

.ovcc-preview-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.ovcc-preview-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ovcc-empty {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    padding: 1.5rem 1.6rem;
    color: var(--color-text-secondary);
}

.ovcc-empty .ovcc-title {
    margin-bottom: 0.65rem;
}

.ovcc-empty a { color: var(--color-primary); }

.prep-book-preview {
    margin-top: 1.15rem;
}

.prep-book-preview img,
.prep-book-cover img {
    display: block;
    width: 110px;
    height: auto;
    max-height: 148px;
    object-fit: contain;
}

.prep-book-cover {
    margin: 0 0 1.15rem;
}

.prep-book-cover__inner {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.prep-book-cover__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.prep-book-cover__actions a,
.prep-book-cover__actions button {
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.prep-book-cover__actions a:hover,
.prep-book-cover__actions button:hover {
    text-decoration: underline;
}

.prep-book-cover__art {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.prep-book-practice {
    margin-top: 2rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.prep-book-practice__head {
    margin-bottom: 0.85rem;
}

.prep-book-practice__head h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.prep-book-practice__head p {
    margin: 0.35rem 0 0;
    max-width: 42rem;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.prep-app-page {
    max-width: 960px;
}

.prep-app-head {
    margin: 0 0 0.85rem;
}

.prep-app-eyebrow,
.prep-app-step {
    margin: 0 0 0.3rem;
    color: var(--color-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prep-app-title {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.prep-app-meta {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
}

.prep-app-intro {
    max-width: 46rem;
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.prep-app-intro p {
    margin: 0.65rem 0;
}

.prep-app-hero {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface-muted, #f8fafc);
}

.prep-app-hero img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 310px;
    object-fit: contain;
}

.prep-app-empty {
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    color: var(--color-text-secondary);
}

.prep-app-empty .prep-app-title {
    margin-bottom: 0.65rem;
}

.prep-app-empty a,
.prep-app-store-card a {
    color: var(--color-primary);
    font-weight: 700;
}

.prep-app-downloads,
.prep-app-login,
.prep-app-benefits {
    margin-top: 1.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.prep-app-downloads__head h2,
.prep-app-login h2,
.prep-app-benefits h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.05rem;
}

.prep-app-downloads__head p,
.prep-app-login p {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.prep-app-store-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.prep-app-store-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 190px;
    padding: 0.9rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    background: var(--color-surface, #fff);
}

.prep-app-store-card h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 0.92rem;
}

.prep-app-store-card p {
    margin: 0.35rem 0 0.65rem;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.prep-app-qr-wrap {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    /* QR codes scan most reliably on a light background */
    background: #fff;
}

.prep-app-qr-wrap img {
    display: block;
    width: 138px;
    height: 138px;
}

.prep-app-login {
    max-width: 46rem;
}

.prep-app-login h2 {
    margin-top: 0.2rem;
}

.prep-app-benefits ul,
.prep-app-features ul {
    display: grid;
    gap: 0.55rem;
    margin: 0.8rem 0 0;
    padding-left: 1.15rem;
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.prep-app-empty .prep-app-features {
    margin: 1.15rem 0;
}

.audio-glossary-page {
    max-width: 960px;
}

.audio-glossary-head {
    margin: 0 0 0.85rem;
}

.audio-glossary-eyebrow {
    margin: 0 0 0.3rem;
    color: var(--color-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.audio-glossary-title {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.audio-glossary-meta {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
}

.audio-glossary-cover-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0 1.25rem;
}

.audio-glossary-cover {
    display: block;
    width: min(100%, 190px);
    height: auto;
    object-fit: contain;
}

.audio-glossary-intro {
    max-width: 46rem;
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.audio-glossary-intro p {
    margin: 0.65rem 0;
}

.audio-glossary-empty {
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    color: var(--color-text-secondary);
}

.audio-glossary-empty .audio-glossary-title {
    margin-bottom: 0.65rem;
}

.audio-glossary-empty a,
.audio-glossary-actions a,
.audio-glossary-actions button,
.audio-glossary-downloads a,
.audio-glossary-downloads button {
    color: var(--color-primary);
    font-weight: 700;
}

.audio-glossary-section,
.audio-glossary-full,
.audio-glossary-samples {
    margin-top: 1.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.audio-glossary-section-head h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.05rem;
}

.audio-glossary-section-head p {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

.audio-glossary-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.1rem;
    color: var(--color-text-secondary);
    font-size: 0.84rem;
}

.audio-glossary-actions a,
.audio-glossary-actions button {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 7px;
    background: var(--color-surface-muted, #eff6ff);
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.audio-glossary-actions a:hover,
.audio-glossary-actions button:hover {
    background: var(--color-bg-tertiary, #dbeafe);
}

.audio-glossary-tracks {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.audio-glossary-track ft-audio-player,
.audio-glossary-sample ft-audio-player {
    display: block;
}

.audio-glossary-track .ab-player-card,
.audio-glossary-sample .ab-player-card {
    padding: 20px 24px;
}

.audio-glossary-track .ab-player-card > audio,
.audio-glossary-sample .ab-player-card > audio {
    display: none;
}

.audio-glossary-track,
.audio-glossary-sample,
.audio-glossary-full__card {
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    background: var(--color-surface, #fff);
}

.audio-glossary-track__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.audio-glossary-track__title h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 0.92rem;
}

.audio-glossary-track__title span {
    flex-shrink: 0;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.audio-glossary-track audio,
.audio-glossary-sample audio {
    display: block;
    width: 100%;
    height: 38px;
}

.audio-glossary-track__status {
    margin-top: 0.4rem;
    color: var(--color-text-secondary);
    font-size: 0.76rem;
}

.audio-glossary-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
}

.audio-glossary-downloads a,
.audio-glossary-downloads button {
    text-decoration: none;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.audio-glossary-downloads a:hover,
.audio-glossary-downloads button:hover {
    text-decoration: underline;
}

.audio-glossary-full__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
}

.audio-glossary-full__card strong {
    color: var(--color-primary);
    font-size: 0.9rem;
}

.audio-glossary-samples__grid {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.audio-glossary-sample {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 42%);
    align-items: center;
    gap: 1rem;
}

@media (max-width: 760px) {
    .prep-app-store-grid {
        grid-template-columns: 1fr;
    }

    .prep-app-store-card {
        min-height: 0;
    }

    .audio-glossary-actions,
    .audio-glossary-full__card {
        align-items: flex-start;
        flex-direction: column;
    }

    .audio-glossary-sample {
        grid-template-columns: 1fr;
    }

    .ovcc-toc-head {
        flex-direction: column;
        gap: 0.15rem;
    }
}

.lc-body { margin-top: 0; }
.lc-not-enrolled {
    background: var(--color-surface);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 1.75rem;
    color: var(--color-text-secondary);
}
.lc-not-enrolled .lc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
    margin: 0 0 0.65rem;
}
.lc-not-enrolled a { color: var(--color-primary); }

.lc-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
}
.lc-card--pad { padding: 2rem 2.5rem; }
.lc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.lc-card-title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-heading, var(--color-primary-deep));
}
.lc-card-sub {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.lc-card-action {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-text);
}
.lc-book-row { display: flex; gap: 1.25rem; align-items: flex-start; }
.lc-book-meta { display: flex; flex-direction: column; gap: 0.65rem; align-items: flex-start; }
.lc-anchor-dl,
.lc-hero-btn {
    display: inline-block;
    background: var(--color-secondary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: 9px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(219, 105, 68, 0.35);
}
.lc-hero-btn--sm { font-size: 0.8rem; padding: 0.5rem 1rem; }
.lc-hero-btn:hover:not(:disabled) { filter: brightness(1.05); }
.lc-card-head-action {
    flex-shrink: 0;
    align-self: center;
}
.lc-card-head-action .lc-hero-btn,
.lc-card-head-action .lc-anchor-dl {
    white-space: nowrap;
}
.lc-anchor-dl:disabled,
.lc-card-action:disabled {
    background: #94a3b8;
    color: #f8fafc;
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}
.lc-anchor-updates {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.lc-anchor-updates:hover { text-decoration: underline; }
.lc-anchor-booknote { margin: 0; font-size: 0.85rem; color: var(--color-text-secondary); }

.lc-exam-status-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.lc-exam-status-item {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    position: relative;
    overflow: visible;
}
.lc-exam-status-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    margin-bottom: 0.3rem;
}
.lc-exam-status-val-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.lc-exam-status-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
}
.lc-exam-status-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
    position: relative;
}
.lc-exam-status-info:hover,
.lc-exam-status-info:focus-visible {
    border-color: var(--color-border);
    color: var(--color-text);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 159, 217, 0.2);
}
.lc-exam-status-info::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 16rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 500;
    font-style: normal;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}
.lc-exam-status-info:hover::after,
.lc-exam-status-info:focus-visible::after {
    opacity: 1;
    visibility: visible;
}
.lc-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.lc-badge--green { background: var(--color-success-surface); color: var(--color-success-text); }
.lc-badge--orange { background: var(--color-warning-surface); color: var(--color-warning-text); }
.lc-badge--gray { background: var(--color-surface-muted); color: var(--color-text-secondary); }

.lc-rules-list {
    margin: 0 0 1.25rem;
    padding-left: 1.15rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}
.lc-anchor-slots-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
    margin-bottom: 0.5rem;
}
.lc-slot-reset-note {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: var(--color-warning-surface);
    color: var(--color-warning-text);
    font-size: 0.78rem;
    line-height: 1.45;
}
.lc-slot-reset-note[hidden] {
    display: none !important;
}
.lc-slot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.lc-slot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
}
.lc-slot-open { border-color: rgba(251, 146, 60, 0.45); background: var(--color-warning-surface); }
.lc-slot-taken { opacity: 0.7; }
.lc-slot-label { font-weight: 700; color: var(--color-heading, var(--color-primary-deep)); }
.lc-slot-date { color: var(--color-text-secondary); }
.lc-cert-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--color-info-surface);
    color: var(--color-info-text);
    font-size: 0.85rem;
    font-weight: 600;
}

.lc-cert-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.15rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}
.quiz-btn--primary { background: var(--color-secondary); color: #fff; }
.quiz-btn--secondary {
    background: var(--color-surface-muted, #f1f5f9);
    color: var(--color-text, var(--color-primary-deep));
    border: 1px solid var(--color-border, #e2e8f0);
}
.quiz-btn--lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.quiz-btn:disabled {
    cursor: wait;
    opacity: 0.85;
}
.quiz-btn.is-loading {
    justify-content: center;
    pointer-events: none;
}
.quiz-btn.is-loading::before {
    content: '';
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: quiz-btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes quiz-btn-spin {
    to { transform: rotate(360deg); }
}
.quiz-result { text-align: center; }
.quiz-result-score,
.exam-result-score {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.quiz-result-score--pass,
.exam-result-score--pass { color: var(--color-success-text, #22c55e); }
.quiz-result-score--fail,
.exam-result-score--fail { color: var(--color-error, #ef4444); }
.quiz-result-label,
.exam-result-label { font-size: 1rem; margin-bottom: 1.5rem; color: var(--color-text); }
.quiz-result-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.quiz-breakdown { text-align: left; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.65rem; }
.quiz-breakdown-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid;
}
.quiz-breakdown-row--correct {
    background: var(--color-success-surface, #f0fdf4);
    border-color: color-mix(in srgb, var(--color-success-text, #16a34a) 45%, transparent);
}
.quiz-breakdown-row--wrong {
    background: rgba(239, 68, 68, 0.12);
    border-color: color-mix(in srgb, var(--color-error, #dc2626) 45%, transparent);
}
.quiz-breakdown-indicator { font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.quiz-breakdown-row--correct .quiz-breakdown-indicator { color: var(--color-success-text, #16a34a); }
.quiz-breakdown-row--wrong .quiz-breakdown-indicator { color: var(--color-error, #dc2626); }
.quiz-breakdown-q { font-size: 0.85rem; font-weight: 600; color: var(--color-text, #1a2a3a); margin-bottom: 0.25rem; line-height: 1.4; }
.quiz-breakdown-meta { display: flex; gap: 1rem; font-size: 0.75rem; flex-wrap: wrap; }
.quiz-breakdown-given { color: var(--color-error, #dc2626); }
.quiz-breakdown-correct { color: var(--color-success-text, #16a34a); font-weight: 600; }
.exam-result { text-align: center; }
.exam-result-note {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin: 0 auto 0.85rem;
    max-width: 36rem;
    line-height: 1.5;
}
.exam-result-policy {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin: 0 auto 1.5rem;
    max-width: 36rem;
    line-height: 1.45;
}

.lc-exam-skeleton__card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    box-sizing: border-box;
}

.lc-exam-skeleton__card nc-skeleton {
    max-width: 100%;
    box-sizing: border-box;
}

.lc-exam-skeleton__card > nc-skeleton[data-section] {
    margin-top: 0.6rem;
}

.lc-exam-skeleton__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.exam-ready { max-width: 720px; margin-inline: auto; }
.exam-ready-title {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-heading, var(--color-primary));
    letter-spacing: -0.02em;
    text-align: center;
}
.exam-ready-meta {
    margin: 0 0 1.1rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}
.exam-ready-warn {
    margin: 0 0 1.35rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--color-warning-text, #92400e) 35%, transparent);
    background: var(--color-warning-surface, #fffbeb);
    color: var(--color-warning-text, #92400e);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}
.exam-ready-section { margin-bottom: 1.15rem; }
.exam-ready-heading {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-heading, var(--color-primary));
}
.exam-ready-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}
.exam-ready-list li { margin-bottom: 0.35rem; }
.exam-ready-copy {
    margin: 0.25rem 0 1.25rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.45;
}
.exam-ready-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

body.quiz-open,
body.exam-open,
html.reader-focus-open,
body.reader-focus-open,
html.afa-focus-open,
body.afa-focus-open {
    overflow: hidden;
    overscroll-behavior: none;
    width: 100%;
    max-width: 100%;
}

/* Access for All — focus overlay (inset stage over dimmed SPA, like course focus).
   Avoid live backdrop-filter: it re-blurs the whole SPA under an animating iframe and feels sluggish. */
.afa-focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    margin: 0;
    padding: clamp(0.5rem, 1.5vw, 1rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.82);
}
.afa-focus-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    cursor: pointer;
}
.afa-focus-close {
    position: absolute;
    top: clamp(0.65rem, 1.5vw, 1rem);
    right: clamp(0.65rem, 1.5vw, 1rem);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.afa-focus-close:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.35);
}
.afa-focus-close:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
.afa-focus-stage {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
    background: #000;
    /* Promote the game to its own layer so SPA paint under the overlay does less work. */
    transform: translateZ(0);
    contain: layout paint;
}
.afa-focus-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

/* -- Video Principles reader (outline + page) ----------------------------- */
.vprin-reader { margin-top: 0.25rem; }
.vprin-shell {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--reader-shell-bg, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    min-height: 70vh;
}
.vprin-outline-panel {
    width: 280px;
    flex-shrink: 0;
    min-width: 0;
    border-right: 1px solid var(--color-border, #e2e8f0);
    background: var(--reader-outline-bg, #f8fafc);
    max-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    transition:
        width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        border-right-color 0.28s ease,
        opacity 0.24s ease;
}
/* Keep inner layout width stable while the panel width animates. */
.vprin-outline-panel > * {
    min-width: 280px;
    box-sizing: border-box;
}
/* Desktop: collapse outline smoothly; lesson stays max 900px. */
.vprin-reader:not(.is-outline-open) .vprin-outline-panel {
    width: 0;
    min-width: 0;
    border-right-color: transparent;
    opacity: 0;
    pointer-events: none;
}
.vprin-reader:not(.is-outline-open) .vprin-outline-panel > * {
    min-width: 0;
}
.vprin-outline-chrome {
    display: block;
    padding: 0.85rem 0.75rem 0.75rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    flex-shrink: 0;
}
.vprin-outline-chrome-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.vprin-outline-chrome-text { min-width: 0; flex: 1; }
.vprin-outline-scroll {
    overflow: auto;
    flex: 1;
    min-height: 0;
    padding: 0.65rem 0.75rem 1.25rem;
}
.vprin-outline-title { font-size: 0.95rem; font-weight: 800; color: var(--reader-heading, #002548); }
.vprin-outline-sub { margin-top: 0.2rem; font-size: 0.78rem; color: var(--reader-text-muted, #64748b); font-weight: 600; }
.vprin-outline-section { margin-bottom: 0.25rem; }
.vprin-outline-chapter {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.4rem;
    align-items: start;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 0.5rem 0.4rem;
    font: inherit;
    cursor: pointer;
    color: var(--reader-text, #1a2a3a);
}
.vprin-outline-chapter:hover:not(:disabled) { background: var(--reader-outline-hover, #e2e8f0); }
.vprin-outline-chapter.is-locked,
.vprin-outline-section.is-locked .vprin-outline-chapter {
    opacity: 0.45;
    cursor: not-allowed;
}
.vprin-outline-chapter-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--reader-text-muted, #64748b);
    padding-top: 0.15rem;
}
.vprin-outline-chapter-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--reader-heading, #002548);
}
.vprin-outline-chevron {
    width: 8px;
    height: 8px;
    margin-top: 0.35rem;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}
.vprin-outline-section.is-open .vprin-outline-chevron { transform: rotate(45deg); }
.vprin-outline-pages { padding: 0.15rem 0 0.35rem 0.35rem; }
.vprin-outline-page {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--reader-text, #334155);
    cursor: pointer;
}
.vprin-outline-page:hover:not(:disabled) { background: var(--reader-outline-hover, #e2e8f0); }
.vprin-outline-page.is-quiz-done { background: var(--reader-outline-done-bg, #ecfdf3); }
.vprin-outline-page.is-quiz-done:hover:not(:disabled) { background: var(--reader-outline-done-hover, #dcfce7); }
.vprin-outline-page.is-current { background: var(--reader-outline-current-bg, #dbeafe); color: var(--reader-outline-current-text, #1d4ed8); font-weight: 700; }
.vprin-outline-page.is-current.is-quiz-done { background: var(--reader-outline-current-bg, #dbeafe); }
.vprin-outline-page.is-current.is-quiz-done:hover:not(:disabled) { background: var(--reader-outline-current-bg, #dbeafe); }
.vprin-outline-page.is-locked { opacity: 0.4; cursor: not-allowed; }
.vprin-outline-page-check {
    color: #15803d;
    font-weight: 900;
    font-size: 0.95em;
}
.vprin-outline-page.is-current .vprin-outline-page-check { color: #15803d; }
.vprin-kk-link {
    display: block;
    margin: 0.15rem 0.5rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #c2410c;
    text-decoration: none;
}
.vprin-kk-link:hover { text-decoration: underline; }

.vprin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--reader-stage-bg, #f3f5f8);
}
.vprin-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: var(--reader-chrome-bg, #f8fafc);
}
.vprin-toolbar-start,
.vprin-toolbar-end {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.vprin-toolbar-start {
    justify-self: start;
}
.vprin-toolbar-end {
    justify-self: end;
}
.vprin-toolbar-center {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-self: center;
}
.vprin-study-downloads {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.vprin-ebook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0.15rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: var(--color-surface, #fff);
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vprin-ebook-btn:hover {
    border-color: var(--color-primary, #004b8b);
    box-shadow: 0 2px 8px rgba(0, 37, 72, 0.12);
}
.vprin-ebook-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.vprin-ebook-btn__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}
.vprin-outline-toggle {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.vprin-focus-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 1px solid var(--reader-btn-border, #cbd5e1);
    border-radius: 10px;
    background: var(--reader-btn-bg, #fff);
    color: var(--reader-btn-text, #1a2a3a);
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        color 0.15s ease,
        background 0.15s ease;
}
.vprin-focus-toggle:hover {
    border-color: var(--color-primary, #004b8b);
    color: var(--color-primary, #004b8b);
}
.vprin-focus-toggle.is-active {
    border-color: var(--color-primary, #004b8b);
    background: var(--reader-outline-current-bg, #dbeafe);
    color: var(--reader-outline-current-text, #1d4ed8);
}
.vprin-focus-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #004b8b);
    outline-offset: 2px;
}
.vprin-focus-toggle--toolbar {
    width: 2.35rem;
    height: 2.35rem;
}
.vprin-content {
    flex: 1;
    overflow: auto;
    max-height: calc(100vh - 220px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.25rem 1.5rem 1.75rem;
    box-sizing: border-box;
    background: var(--reader-stage-bg, #f3f5f8);
}
/* Soft stage around the 900px lesson so collapsed outline doesn't feel empty. */
.vprin-page-well {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: var(--reader-page-well-bg, #fff);
    border: 1px solid var(--reader-page-well-border, var(--color-border, #e2e8f0));
    border-radius: 10px;
    padding: 0.75rem 1rem 1.25rem;
    box-sizing: border-box;
}
/* Lesson HTML styles live in ft-course-page Shadow DOM (course-export.css). */
.vprin-page-well ft-course-page {
    width: 100%;
    max-width: 900px;
    display: block;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}
.vprin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
    background: var(--reader-chrome-bg, #f8fafc);
}
.vprin-nav-center { font-weight: 700; color: var(--reader-text-muted, #64748b); font-size: 0.9rem; }

.vprin-btn {
    border: 1px solid var(--reader-btn-border, #cbd5e1);
    background: var(--reader-btn-bg, #fff);
    color: var(--reader-btn-text, #1a2a3a);
    border-radius: 10px;
    padding: 0.55rem 0.95rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}
.vprin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vprin-btn--primary { background: var(--color-primary, #004b8b); border-color: var(--color-primary, #004b8b); color: #fff; }
.vprin-btn--ghost { background: transparent; }
.vprin-btn.is-active { border-color: var(--color-primary, #3b82f6); color: var(--reader-outline-current-text, #1d4ed8); }

.vprin-outline-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 40;
}

/* Focus mode: full-viewport reader with blurred dark backdrop. */
.vprin-reader.is-focus-mode {
    position: fixed;
    inset: 0;
    z-index: 1100;
    margin: 0;
    padding: clamp(0.5rem, 1.5vw, 1rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.vprin-focus-scrim {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    cursor: default;
}
.vprin-reader.is-focus-mode .vprin-focus-scrim {
    display: block;
}
.vprin-focus-close {
    position: absolute;
    top: clamp(0.65rem, 1.5vw, 1rem);
    right: clamp(0.65rem, 1.5vw, 1rem);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.vprin-focus-close:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.35);
}
.vprin-focus-close:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
.vprin-reader.is-focus-mode .vprin-shell {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}
.vprin-reader.is-focus-mode .vprin-outline-panel,
.vprin-reader.is-focus-mode .vprin-main {
    min-height: 0;
    max-height: none;
    height: auto;
    align-self: stretch;
}
@media (min-width: 961px) {
    .vprin-reader.is-focus-mode .vprin-outline-panel {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        transform: none !important;
        width: 280px;
        opacity: 1;
        pointer-events: auto;
        box-shadow: none;
    }
}
.vprin-reader.is-focus-mode .vprin-outline-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.vprin-reader.is-focus-mode .vprin-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vprin-reader.is-focus-mode .vprin-content {
    max-height: none;
    flex: 1;
    min-height: 0;
    overflow: auto;
}
@media (min-width: 961px) {
    .vprin-reader.is-focus-mode .vprin-outline-backdrop {
        display: none !important;
    }
}

@media (max-width: 960px) {
    .vprin-shell {
        display: block;
        min-width: 0;
        max-width: 100%;
    }

    .vprin-main {
        width: 100%;
        min-width: 0;
    }

    .vprin-outline-panel {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        width: min(320px, 88vw);
        max-height: none;
        opacity: 1;
        pointer-events: auto;
        border-right: 1px solid var(--color-border, #e2e8f0);
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
    }
    .vprin-outline-panel > * {
        min-width: 0;
        width: 100%;
    }
    .vprin-reader:not(.is-outline-open) .vprin-outline-panel {
        width: min(320px, 88vw);
        opacity: 1;
        transform: translateX(-105%);
        pointer-events: none;
    }
    .vprin-reader.is-outline-open .vprin-outline-panel { transform: translateX(0); }
    .vprin-reader.is-outline-open .vprin-outline-backdrop { display: block; }

    /* Focus mode on mobile: full-width content, outline as slide-over drawer. */
    .vprin-reader.is-focus-mode {
        padding: 0;
        width: 100%;
        max-width: 100vw;
    }
    .vprin-reader.is-focus-mode .vprin-shell {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        min-height: 100%;
    }
    .vprin-reader.is-focus-mode .vprin-outline-panel {
        z-index: 1201;
    }
    .vprin-reader.is-focus-mode.is-outline-open .vprin-outline-backdrop {
        display: block !important;
        z-index: 1200;
    }
    .vprin-reader.is-focus-mode .vprin-main {
        width: 100%;
        min-width: 0;
    }
    .vprin-reader.is-focus-mode .vprin-toolbar {
        grid-template-columns: auto 1fr auto;
        padding: 0.55rem 0.65rem;
    }
    .vprin-reader.is-focus-mode .vprin-toolbar-start .vprin-btn,
    .vprin-reader.is-focus-mode .vprin-toolbar-end .vprin-btn {
        padding: 0.45rem 0.65rem;
        font-size: 0.8rem;
    }
    .vprin-reader.is-focus-mode .vprin-ebook-btn {
        width: 2.1rem;
        height: 2.1rem;
    }
    .vprin-reader.is-focus-mode .vprin-outline-toggle {
        font-size: 0.78rem;
        padding: 0.45rem 0.65rem;
    }
    .vprin-outline-chrome .vprin-focus-toggle {
        display: none;
    }
    .vprin-focus-close {
        top: 0.45rem;
        right: 0.45rem;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    /* Within Step 2 reader only: use more of the available width for the lesson. */
    .vprin-content {
        padding: 0.35rem 0.25rem 0.75rem;
        background: var(--reader-stage-bg, #f3f5f8);
    }
    .vprin-page-well {
        max-width: none;
        border: 1px solid var(--reader-page-well-border, var(--color-border, #e2e8f0));
        border-radius: 8px;
        padding: 0.35rem 0.2rem 0.85rem;
        background: var(--reader-page-well-bg, #fff);
    }
    .vprin-page-well ft-course-page {
        max-width: none;
    }
    .vprin-toolbar {
        padding: 0.65rem 0.75rem;
        gap: 0.5rem;
    }
    .vprin-nav {
        padding: 0.75rem;
    }
}

@media (max-width: 800px) {
    .lc-exam-status-row { grid-template-columns: 1fr 1fr; }
    .lc-card--pad { padding: 1.25rem; }
}

/* Practice course: Step 1 supplemental materials */
.lc-practice-supplements { margin-top: 20px; }

.lc-practice-sup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.lc-practice-sup-grid--in-card { padding: 0 22px 22px; }

.lc-practice-sup-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lc-practice-sup-card[role="button"] { cursor: pointer; }
.lc-practice-sup-card[role="button"]:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}
.lc-practice-sup-grid--in-card .lc-practice-sup-card {
    border-radius: 0 0 var(--radius, 12px) var(--radius, 12px);
}
.lc-practice-sup-img-link { display: block; text-align: center; }
.lc-practice-sup-img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform .2s;
}
.lc-practice-sup-img-link:hover .lc-practice-sup-img { transform: scale(1.02); }
.lc-practice-sup-img--small { max-height: 120px; }

.lc-practice-sup-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.lc-practice-sup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.lc-practice-sup-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.55;
    flex: 1;
}
.lc-practice-sup-btn {
    display: inline-block;
    background: var(--color-secondary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .15s;
    margin-top: auto;
}
.lc-practice-sup-btn:hover { background: var(--color-secondary-light); }
.lc-practice-sup-btn:disabled { opacity: .65; cursor: wait; }

.lc-practice-sup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.lc-practice-sup-btn--secondary {
    background: transparent;
    color: var(--color-secondary, #0074ae);
    border: 1px solid currentColor;
}

.lc-practice-sup-btn--secondary:hover {
    background: rgba(0, 116, 174, 0.08);
}

.lc-practice-sup-required {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 5px;
    padding: 2px 7px;
    text-transform: uppercase;
    letter-spacing: .05em;
    flex-shrink: 0;
}

.lc-afa-required-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-warning-surface);
    color: var(--color-warning-text);
    font-size: 13px;
    line-height: 1.55;
}
.lc-afa-required-notice[hidden] {
    display: none !important;
}
.lc-afa-required-notice svg { flex-shrink: 0; margin-top: 2px; color: #d97706; }

@media (max-width: 900px) {
    .lc-practice-sup-grid { grid-template-columns: 1fr; }
    .lc-practice-sup-grid--in-card { padding: 0 16px 16px; }
}

/* Practice audiobook player */
.ab-inline { margin-top: 20px; }
.ab-breadcrumb { margin-bottom: 16px; }
.ab-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.ab-breadcrumb-link:hover { text-decoration: underline; }

.ab-hero {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
    border-radius: var(--radius, 12px);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,75,139,.25);
}
.ab-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .6;
    margin-bottom: 6px;
}
.ab-hero-title { font-size: 22px; font-weight: 800; margin: 0 0 8px; line-height: 1.25; }
.ab-hero-sub { font-size: 13px; opacity: .8; margin: 0; }

.ab-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.ab-toc {
    background: var(--color-surface, var(--card-bg, #fff));
    border: 1px solid var(--color-border, var(--border, #e2e8f0));
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08));
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h, 64px) - 60px);
    position: sticky;
    top: calc(var(--header-h, 64px) + 12px);
}
.ab-toc-head {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-muted, var(--text-muted, #64748b));
    border-bottom: 1px solid var(--color-border, var(--border, #e2e8f0));
    background: var(--color-surface-muted, #f8fafc);
    position: sticky;
    top: 0;
    z-index: 1;
}
.ab-toc-chapter { border-bottom: 1px solid var(--color-border, var(--border, #e2e8f0)); }
.ab-toc-chapter:last-child { border-bottom: none; }
.ab-toc-chapter-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 16px 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-primary);
    background: var(--color-surface-muted, #f8fafc);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}
.ab-toc-chapter-label:hover,
.ab-toc-chapter-label--active { background: var(--color-info-surface, #eff6ff); }
.ab-toc-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 7px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--color-text, var(--text-primary, #0f172a));
    line-height: 1.4;
    transition: background .12s;
}
.ab-toc-item:hover { background: var(--color-surface-muted, #f1f5f9); }
.ab-toc-item--active {
    background: var(--color-info-surface, #eff6ff) !important;
    color: var(--color-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-secondary);
    padding-left: 13px;
}
.ab-toc-num {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.ab-toc-item--active .ab-toc-num { background: var(--color-secondary); color: #fff; }
.ab-toc-item-title { flex: 1; }
.ab-toc-time {
    flex-shrink: 0;
    font-size: 10.5px;
    color: var(--text-muted, #64748b);
    font-variant-numeric: tabular-nums;
    margin-top: 1px;
}

.ab-player-card {
    width: 100%;
    background: linear-gradient(165deg, #1a3a5c 0%, #000d1a 100%);
    border-radius: var(--radius, 12px);
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    padding: 28px 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    position: relative;
    overflow: hidden;
}
.ab-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,13,26,.88);
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}
.ab-loading-overlay[hidden] { display: none; }
.ab-loading-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8); }
.ab-player-left { flex-shrink: 0; width: 120px; }
.ab-cover-img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
}
.ab-audio-icon {
    width: 132px;
    height: 172px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.ab-player-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.ab-track-book {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255,255,255,.5);
    margin-bottom: 2px;
}
.ab-track-chapter { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); margin-bottom: 4px; }
.ab-track-section { font-size: 16px; font-weight: 600; color: #fff; line-height: 1.4; }

.ab-seek-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ab-time {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.ab-seek-slider,
.ab-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 2px;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    outline: none;
}
.ab-seek-slider::-webkit-slider-thumb,
.ab-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    cursor: pointer;
}

.ab-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ab-mute-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
}
.ab-mute-btn:hover { color: #fff; }

.ab-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ab-ctrl-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,.85);
    font-size: 12px;
    font-weight: 700;
    transition: background .15s, transform .12s;
}
.ab-ctrl-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.ab-ctrl-btn:active { transform: scale(.94); }
.ab-ctrl-btn--play {
    width: 56px;
    height: 56px;
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
    font-size: 16px;
}
.ab-ctrl-btn--play:hover { background: var(--color-secondary-light); }

@media (max-width: 900px) {
    .ab-layout { grid-template-columns: 1fr; }
    .ab-toc { position: static; max-height: 320px; }
    .ab-hero { padding: 20px; }
}
@media (max-width: 680px) {
    .ab-player-card {
        flex-direction: column;
        align-items: center;
        padding: 20px 16px 18px;
        gap: 16px;
    }
    .ab-player-left { width: 100px; }
    .ab-audio-icon { width: 110px; height: 140px; }
    .ab-player-right { width: 100%; }
}

.games-page {
    max-width: 1080px;
}

.games-head {
    margin: 0 0 0.85rem;
}

.games-eyebrow {
    margin: 0 0 0.3rem;
    color: var(--color-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.games-title {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.games-meta,
.games-section-head p,
.games-flashcards-launch p,
.games-intro {
    color: var(--color-text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
}

.games-meta {
    margin: 0.35rem 0 0;
}

.games-intro {
    max-width: 50rem;
    margin: 0.85rem 0 0;
    font-size: 0.92rem;
}

.games-section {
    margin-top: 1.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.games-section-head h2,
.games-flashcards-launch h2 {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-size: 1.05rem;
}

.games-section-head p {
    margin: 0.35rem 0 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.games-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.games-card:hover {
    border-color: var(--color-primary-light, #93c5fd);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}

.games-card__link {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.games-card__image {
    display: block;
    width: 100%;
    height: 142px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: var(--color-surface-muted, #f8fafc);
    object-fit: contain;
}

.games-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.85rem 0.9rem 0.9rem;
}

.games-card h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 0.96rem;
}

.games-card p {
    margin: 0.4rem 0 0.8rem;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.games-card__launch {
    margin-top: auto;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.games-flashcards-launch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1.65rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--color-border, #bfdbfe);
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--color-info-surface, #eff6ff),
        var(--color-surface-muted, #f8fafc)
    );
}

.games-flashcards-launch .games-eyebrow {
    margin-bottom: 0.25rem;
}

.games-flashcards-launch p {
    max-width: 42rem;
    margin: 0.35rem 0 0;
}

.games-flashcards-launch button,
.games-flashcards-actions button {
    flex-shrink: 0;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--color-primary);
    border-radius: 7px;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.games-flashcards-launch button:hover,
.games-flashcards-actions button:hover {
    background: var(--color-primary-dark, #003766);
}

.games-flashcards-launch button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.games-empty {
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    color: var(--color-text-secondary);
}

.games-empty .games-title {
    margin-bottom: 0.65rem;
}

.games-empty a {
    color: var(--color-primary);
    font-weight: 700;
}

.games-flashcards-modal {
    width: min(100vw, 1120px);
    max-width: none;
    height: min(100vh, 860px);
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: var(--color-primary-deep, #0f2740);
    color: var(--color-primary-white, #fff);
}

.games-flashcards-modal::backdrop {
    background: rgba(2, 21, 38, 0.78);
}

.games-flashcards-surface {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex-direction: column;
    padding: clamp(1rem, 3vw, 2rem);
    overflow: auto;
}

.games-flashcards-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.games-flashcards-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 3vw, 1.75rem);
}

.games-icon-button {
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
}

.games-icon-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.games-flashcards-controls {
    display: grid;
    grid-template-columns: minmax(150px, 0.65fr) minmax(220px, 1.35fr);
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.games-flashcards-controls label {
    display: grid;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.games-flashcards-controls select {
    min-width: 0;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: var(--color-bg-tertiary, #173b5f);
    color: var(--color-primary-white, #fff);
    font: inherit;
    font-size: 0.84rem;
}

.games-flashcards-status {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.85rem 0 0.65rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.games-flashcard {
    position: relative;
    flex: 1;
    min-height: 260px;
    perspective: 1200px;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.games-flashcard:focus-visible {
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.75);
}

.games-flashcard__face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    backface-visibility: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: rotateY(0deg);
    transition: transform 260ms ease;
}

.games-flashcard__face--front {
    flex-direction: column;
    background: var(--color-bg-tertiary, #173b5f);
    color: var(--color-heading, var(--color-primary-white, #fff));
}

.games-flashcard__face--back {
    flex-direction: column;
    background: #244d73;
    color: var(--color-primary-white, #fff);
    transform: rotateY(180deg);
}

.games-flashcard.is-flipped .games-flashcard__face--front {
    transform: rotateY(180deg);
}

.games-flashcard.is-flipped .games-flashcard__face--back {
    transform: rotateY(360deg);
}

.games-flashcard__label {
    margin-bottom: 1rem;
    color: var(--color-text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.games-flashcard__face--back .games-flashcard__label {
    color: rgba(255, 255, 255, 0.7);
}

.games-flashcard p {
    max-width: 54rem;
    margin: 0;
    font-size: clamp(1.15rem, 3vw, 1.8rem);
    font-weight: 700;
    line-height: 1.45;
}

.games-flashcards-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.games-flashcards-actions button {
    min-width: 92px;
}

.games-flashcards-actions button:first-child,
.games-flashcards-actions button:last-child {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.games-flashcards-actions button:first-child:hover,
.games-flashcards-actions button:last-child:hover {
    background: rgba(255, 255, 255, 0.12);
}

.games-orientation-note {
    margin: 0.75rem 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    text-align: center;
}

.games-flashcards-modal:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

@media (max-width: 850px) {
    .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .games-flashcards-launch {
        align-items: flex-start;
        flex-direction: column;
    }

    .games-flashcards-controls {
        grid-template-columns: 1fr;
    }

    .games-flashcards-status {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

.video-supplements-page {
    max-width: 960px;
}

.video-supplements-head {
    margin: 0 0 1.25rem;
}

.video-supplements-eyebrow {
    margin: 0 0 0.3rem;
    color: var(--color-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.video-supplements-title {
    margin: 0;
    color: var(--color-primary-deep);
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.video-supplements-intro {
    max-width: 52rem;
    margin-top: 0.65rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.6;
}

.video-supplements-intro p {
    margin: 0.45rem 0;
}

.video-supplements-section {
    margin-top: 1.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.video-supplements-section h2 {
    margin: 0;
    color: var(--color-primary-deep);
    font-size: 1.08rem;
}

.video-supplements-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.video-supplements-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 11px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.video-supplements-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 9px 22px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}

.video-supplements-card__button {
    display: flex;
    width: 100%;
    min-height: 190px;
    flex-direction: column;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.video-supplements-card__button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.55);
    outline-offset: -3px;
}

.video-supplements-card__image {
    display: block;
    width: 100%;
    height: 152px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: #f1f5f9;
    object-fit: cover;
}

.video-supplements-card.has-missing-image .video-supplements-card__button::before {
    display: grid;
    height: 152px;
    place-items: center;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: linear-gradient(135deg, #dbeafe, #e2e8f0);
    color: var(--color-primary-deep);
    content: 'Video supplement';
    font-size: 0.8rem;
    font-weight: 700;
}

.video-supplements-card__content {
    display: flex;
    min-height: 72px;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem;
}

.video-supplements-card__content strong {
    color: var(--color-primary-deep);
    font-size: 0.88rem;
    line-height: 1.35;
}

.video-supplements-card__action {
    margin-top: auto;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 700;
}

.video-supplements-empty {
    padding: 1.5rem 1.6rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    color: #64748b;
}

.video-supplements-empty .video-supplements-title {
    margin-bottom: 0.65rem;
}

.video-supplements-empty a {
    color: var(--color-primary);
    font-weight: 700;
}

.video-supplements-dialog {
    width: min(960px, calc(100vw - 2rem));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #0f2740;
    color: #fff;
}

.video-supplements-dialog::backdrop {
    background: rgba(2, 21, 38, 0.78);
}

.video-supplements-dialog__surface {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.video-supplements-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.video-supplements-dialog__head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
}

.video-supplements-close {
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
}

.video-supplements-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.video-supplements-player {
    overflow: hidden;
    border-radius: 9px;
    background: #000;
}

.video-supplements-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.video-supplements-dialog__summary,
.video-supplements-dialog__reading {
    margin: 0.85rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.84rem;
    line-height: 1.55;
}

.video-supplements-dialog__reading {
    color: #bfdbfe;
    font-style: italic;
}

@media (max-width: 650px) {
    .video-supplements-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Notary course hub ----------------------------------------------------- */
.notary-page.lc-page {
    max-width: 1200px;
}

.notary-page .np-reader {
    font-family: var(--font-family);
    font-size: 1rem;
}

.notary-page .np-pdf-well {
    max-width: none;
    padding: 0.85rem 1rem 1rem;
}

.notary-page .np-reader-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.notary-page .np-reader-title {
    margin: 0;
    color: var(--color-heading, var(--color-primary));
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 800;
}

.notary-page .np-reader-meta,
.notary-page .np-reader-gate {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

.notary-page .np-reader-gate { margin: 0 0 0.65rem; }

.notary-page .np-reader-timer {
    color: #15803d;
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.notary-page .np-reader-timer.is-done { color: #64748b; }

.notary-page .np-reader-pdfbar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.55rem;
}

.notary-page .np-reader-open {
    border: 0;
    background: none;
    color: var(--color-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0;
}

.notary-page .np-reader-open:disabled { opacity: 0.45; cursor: not-allowed; }

.notary-page .np-pdf-host {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.notary-page .np-pdf-frame {
    display: block;
    width: 100%;
    height: min(78vh, 1100px);
    border: 0;
    background: #fff;
}

.notary-page .np-reader .status {
    color: #64748b;
    font-size: 0.88rem;
    padding: 2rem 1rem;
    text-align: center;
}

.notary-page a.lc-card-action {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.notary-instructions {
    display: grid;
    gap: 1rem;
}

.notary-instruction__title {
    margin: 0 0 0.35rem;
    color: var(--color-heading, var(--color-primary));
    font-size: 0.95rem;
}

.notary-instruction__body {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.notary-prep-materials {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
    justify-items: start;
}

.notary-glossary-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
}

.notary-glossary-tile img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.notary-glossary-tile:hover span,
.notary-glossary-tile:focus-visible span {
    text-decoration: underline;
}

.notary-glossary-tile:disabled {
    opacity: 0.65;
    cursor: wait;
}

.notary-resource-links a,
.notary-resource-list a {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.88rem;
}

.notary-resource-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.45rem;
    color: var(--color-text-secondary);
}

.notary-infographic-map {
    width: min(100%, 865px);
    margin: 0.25rem auto 0;
}

.notary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: .9rem;
}

.notary-button {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 8px;
    padding: .65rem .9rem;
    background: var(--color-secondary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
}

.notary-button--secondary {
    background: var(--color-surface-muted, #eff6ff);
    color: var(--color-primary);
}

.notary-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.notary-muted {
    color: var(--color-text-secondary);
    font-size: .85rem;
}

.notary-error {
    margin: 0 0 1rem;
    padding: .7rem .85rem;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 760px) {
    .notary-page { padding-inline: 1rem; }
}

/* -- Continuing Education package / module -------------------------------- */
.lc-step-panel[hidden] {
    display: none !important;
}

.ce-page {
    max-width: 1200px;
}

.ce-stats {
    margin-bottom: 0.15rem;
}

.ce-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.ce-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
}

.ce-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ce-stat-icon--blue { background: var(--color-info-surface, #eff6ff); color: var(--color-info-text, #1d4ed8); }
.ce-stat-icon--green { background: var(--color-success-surface, #f0fdf4); color: var(--color-success-text, #15803d); }
.ce-stat-icon--orange { background: var(--color-warning-surface, #fff4ee); color: var(--color-warning-text, #c2410c); }
.ce-stat-icon--gray { background: var(--color-bg-tertiary, #f1f5f9); color: var(--color-text-secondary, #64748b); }

.ce-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text, #1a2a3a);
    line-height: 1.15;
}

.ce-stat-label {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary, #64748b);
}

.ce-reminder-list {
    margin: 0;
    padding: 0 0 0 1.15rem;
    display: grid;
    gap: 0.45rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ce-step1-actions {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.ce-sections {
    display: grid;
    gap: 1rem;
}

.ce-section-card .ce-module-grid {
    padding: 0 1.25rem 1.25rem;
}

.ce-section-card.is-locked {
    opacity: 0.72;
}

.ce-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.25rem), 1fr));
    gap: 0.75rem;
    min-width: 0;
}

@media (max-width: 960px) {
    .ce-section-card,
    .ce-module-grid,
    .ce-module-expand-host,
    .ce-module-panel,
    .ce-module-panel__reader {
        min-width: 0;
        max-width: 100%;
    }

    .ce-module-grid {
        grid-template-columns: 1fr;
    }
}

.ce-module-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    margin: 0;
    padding: 1rem 1.05rem;
    text-align: left;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-bg-secondary, #f8fafc);
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ce-module-card:hover:not(:disabled) {
    border-color: var(--color-primary, #004b8b);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.ce-module-card:disabled,
.ce-module-card.is-locked {
    cursor: not-allowed;
    opacity: 0.65;
}

.ce-module-card.is-complete {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.06);
}

.ce-module-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
    line-height: 1.3;
}

.ce-module-card__meta,
.ce-module-card__detail {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.ce-module-card.is-active {
    border-color: var(--color-primary, #004b8b);
    box-shadow: 0 0 0 2px var(--color-primary-focus-ring, rgba(0, 75, 139, 0.18));
    background: var(--color-surface, #fff);
}

.ce-module-expand-host {
    margin: 0 1.25rem 1.25rem;
}

.ce-module-expand-host[hidden] {
    display: none !important;
}

.ce-module-panel {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    overflow: hidden;
}

.ce-module-panel--error {
    padding: 1.1rem 1.2rem;
    font-size: 0.9rem;
    color: var(--color-error-text, #b91c1c);
}

.ce-module-panel--loading .ce-module-panel__body {
    min-height: 320px;
}

.ce-module-skeleton-shell {
    display: grid;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.ce-module-skeleton-outline,
.ce-module-skeleton-main {
    min-width: 0;
}

.ce-module-skeleton-outline {
    padding: 0.35rem 0.25rem 0.35rem 0.15rem;
    border-right: 1px solid var(--color-border, #e2e8f0);
}

@media (max-width: 760px) {
    .ce-module-skeleton-shell {
        grid-template-columns: 1fr;
    }

    .ce-module-skeleton-outline {
        border-right: none;
        border-bottom: 1px solid var(--color-border, #e2e8f0);
        padding: 0 0 0.85rem;
    }
}

.ce-module-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    background: var(--color-bg-secondary, #f8fafc);
}

.ce-module-panel__titles {
    min-width: 0;
}

.ce-module-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-heading, var(--color-primary-deep));
    line-height: 1.3;
}

.ce-module-panel__actions {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.ce-module-panel__updates-link {
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: right;
}

.ce-module-panel__sub {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.ce-module-panel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.125rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #1a2a3a);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.ce-module-panel__btn:hover {
    border-color: var(--color-primary, #004b8b);
    text-decoration: none;
    color: var(--color-text, #1a2a3a);
}

.ce-module-panel__btn--ebook .ce-module-panel__ebook-icon {
    display: block;
    width: 22px;
    height: auto;
    flex-shrink: 0;
}

.ce-module-panel__ebook-label {
    color: inherit;
}

.ce-module-panel__body {
    padding: 0.85rem 0.85rem 1rem;
}

.ce-module-panel__empty {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.ce-module-panel__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.ce-module-panel__reader {
    min-height: 320px;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.ce-module-panel__reader .vprin-reader,
.ce-module-panel__reader .vprin-shell,
.ce-module-panel__reader .vprin-main {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 960px) {
    .ce-module-panel__reader .vprin-shell {
        min-height: 0;
    }

    .ce-module-panel__reader .vprin-content {
        max-height: min(58vh, 520px);
    }
}

.ce-module-panel__reader .vprin-reader {
    margin-top: 0;
}

.ce-exam-list {
    display: grid;
    gap: 1rem;
    padding: 0 1.25rem 1.25rem;
}

.ce-exam-section-card.is-locked {
    opacity: 0.72;
}

.ce-exam-section-list {
    display: grid;
    gap: 0.65rem;
    padding: 0 1.25rem 1.25rem;
}

.ce-exam-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.05rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-bg-secondary, #f8fafc);
}

.ce-exam-row.is-complete {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.06);
}

.ce-exam-row.is-locked {
    opacity: 0.72;
}

.ce-exam-row.is-loading {
    border-color: color-mix(in srgb, var(--color-primary, #2563eb) 35%, var(--color-border, #e2e8f0));
    background: var(--color-bg, #fff);
    opacity: 1;
}

.ce-exam-row__spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.75rem;
}

.ce-exam-row__spinner .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.ce-exam-row.is-loading .ce-exam-row__status {
    color: var(--color-text-secondary);
}

.ce-exam-row .lc-hero-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.ce-exam-row__text {
    min-width: 0;
    flex: 1;
}

.ce-exam-row__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-primary-deep));
}

.ce-exam-row__meta,
.ce-exam-row__status {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.ce-exam-row__note {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--color-text-muted, var(--color-text-secondary));
    line-height: 1.45;
}

.ce-exam-row__note--progress {
    color: var(--color-warning, #d97706);
    font-weight: 600;
}

.ce-exam-row.is-in-progress {
    border-color: color-mix(in srgb, var(--color-warning, #d97706) 35%, transparent);
}

.ce-exam-row__cert-link {
    flex-shrink: 0;
    text-decoration: none;
    text-align: center;
}

.ce-exam-row__cert-link:hover {
    text-decoration: none;
}

.ce-empty {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.ce-backlink {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.ce-backlink a {
    color: var(--color-primary);
    text-decoration: none;
}

.ce-backlink a:hover {
    text-decoration: underline;
}

.ce-reader-outline {
    margin: 0;
    padding: 0 1.25rem 1.25rem 2.4rem;
    display: grid;
    gap: 0.4rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.ce-reader-outline__more {
    font-style: italic;
}

@media (max-width: 860px) {
    .ce-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .ce-module-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .ce-module-panel__actions {
        justify-content: flex-start;
    }

    .ce-exam-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .ce-stats-row {
        grid-template-columns: 1fr;
    }
}

.library-page {
    max-width: 1180px;
}

.library-hero {
    display: grid;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
    border-radius: 16px;
    background: var(
        --gradient-course-hero,
        linear-gradient(135deg, #002548 0%, #004b8b 60%, #1a6bb0 100%)
    );
    box-shadow: var(--shadow-primary, 0 4px 12px rgba(0, 75, 139, 0.28));
    text-align: center;
    color: #fff;
}

.library-logo {
    display: block;
    width: min(100%, 360px);
    margin: 0 auto;
}

.library-intro {
    max-width: 52rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.65;
}

.library-notice {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    background: var(--color-surface, #fff);
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    line-height: 1.6;
}

.library-section {
    margin-top: 1.75rem;
}

.library-section-title {
    margin: 0 0 0.85rem;
    color: var(--color-heading, var(--color-primary));
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    text-align: center;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.95rem;
}

.library-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.95rem;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    background: var(--color-surface, #fff);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.library-card__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background: var(--color-surface-muted, #f8fafc);
}

.library-card__image {
    display: block;
    width: 100%;
    max-width: 205px;
    height: auto;
    object-fit: contain;
}

.library-card__title {
    margin: 0;
    color: var(--color-text);
    font-size: 0.92rem;
    line-height: 1.35;
}

.library-card__edition {
    margin: 0.35rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
}

.library-card__updates {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.library-card__updates:hover {
    text-decoration: underline;
}

.library-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.85rem;
}

.library-btn {
    min-height: 2.35rem;
    border-radius: 999px;
    border: 1px solid var(--color-border, #cbd5e1);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.library-btn--ghost {
    background: var(--color-surface-muted, #f8fafc);
    color: var(--color-primary);
}

.library-btn--primary {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.library-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.library-modal {
    width: min(92vw, 640px);
    max-width: none;
    max-height: min(88vh, 900px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: none;
    border-radius: 14px;
    background: transparent;
    box-shadow: 0 24px 64px rgba(2, 21, 38, 0.35);
}

.library-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.library-modal-surface {
    overflow: hidden;
    border-radius: 14px;
    background: var(--color-surface, #fff);
}

.library-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light, #38bdf8));
    color: #fff;
}

.library-modal-head h2 {
    margin: 0;
    font-size: 1rem;
}

.library-modal-body {
    max-height: 60vh;
    overflow: auto;
    padding: 1.25rem 1.5625rem;
    color: var(--color-text, #333);
    font-size: 0.88rem;
    line-height: 1.8;
    text-align: left;
}

.library-icon-button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
}

@media (max-width: 640px) {
    .library-card__actions {
        grid-template-columns: 1fr;
    }
}



