/* ===== css/variables.css ===== */
/* design tokens - adapted from nexhacks liquid glass system */

/* self-hosted inter (latin subset) - removes google fonts as a render-blocking third party */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('/assets/fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: optional;
  src: url('/assets/fonts/inter-800.woff2') format('woff2');
}

/* adjusted system-ui fallback that matches inter metrics to eliminate CLS on font swap */
@font-face {
  font-family: 'Inter Fallback';
  size-adjust: 107.64%;
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans'), local('DejaVu Sans');
}

/* dark theme (default) */
:root {
  /* mountain meadow palette */
  --meadow-50: #ecfdf7;
  --meadow-100: #d1faec;
  --meadow-200: #a7f3da;
  --meadow-300: #6ee7bf;
  --meadow-400: #34d39e;
  --meadow-500: #10b981;
  --meadow-600: #059666;
  --meadow-700: #047852;
  --meadow-800: #065f42;
  --meadow-900: #064e36;
  --meadow-950: #022c1e;
  --meadow-100-rgb: 209, 250, 236;
  --meadow-200-rgb: 167, 243, 218;
  --meadow-300-rgb: 110, 231, 191;
  --meadow-400-rgb: 52, 211, 158;
  --meadow-500-rgb: 16, 185, 129;
  --meadow-600-rgb: 5, 150, 102;

  /* backgrounds */
  --bg-primary: #000000;
  --bg-secondary: #0d0d0d;
  --bg-tertiary: #171717;
  --bg-hover: #1f1f1f;

  /* text */
  --text-primary: #fafafa;
  --text-secondary: #e5e5e5;
  --text-muted: #a3a3a3;

  /* borders */
  --border: #262626;
  --border-hover: #404040;

  /* accent */
  --accent: var(--meadow-400);
  --accent-hover: var(--meadow-500);
  --accent-glow: rgba(var(--meadow-400-rgb), 0.3);
  --accent-dim: rgba(var(--meadow-400-rgb), 0.15);

  /* gold (prestige / completed) */
  --gold: #f59e0b;
  --gold-hover: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.3);
  --gold-dim: rgba(245, 158, 11, 0.08);

  /* status */
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --info: #3b82f6;

  /* radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* transitions */
  --transition: 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-theme: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);

  /* glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(24px) saturate(200%);

  /* video background -- dark mode uses black since canvas is inverted */
  --video-bg: #000000;

  /* z-index layering system */
  /* layers spaced to allow insertion without renumbering */
  --z-background: -1;
  /* background orbs, decorative elements */
  --z-default: 0;
  /* normal document flow */
  --z-raised: 1;
  /* cards, slight layering within sections */
  --z-content: 2;
  /* content overlays, video layers */
  --z-footer: 3;
  /* footer above content */
  --z-stepper: 50;
  /* lesson stepper sidebar elements */
  --z-stepper-backdrop: 48;
  /* sidebar mobile backdrop */
  --z-stepper-reopen: 55;
  /* sidebar reopen button */
  --z-stepper-panel: 90;
  /* sidebar panel (mobile overlay) */
  --z-stepper-backdrop-mobile: 91;
  /* sidebar backdrop (mobile overlay) */
  --z-stepper-nav: 95;
  /* lesson bottom nav */
  --z-nav: 100;
  /* sticky navigation bar */
  --z-dropdown: 200;
  /* dropdowns, user menu */
  --z-modal-backdrop: 9998;
  /* modal/overlay dim background */
  --z-modal: 9999;
  /* auth modal, confirmation dialogs */
  --z-toast: 10000;
  /* achievement toasts, XP notifications */
  --z-toast-top: 10001;
  /* quest panel, level-up (above toasts) */

  /* visualization tokens */
  --viz-text-primary: #fafafa;
  --viz-text-secondary: rgba(255, 255, 255, 0.7);
  --viz-text-dim: rgba(255, 255, 255, 0.4);
  --viz-bg-tooltip: rgba(0, 0, 0, 0.85);
  --viz-border: rgba(255, 255, 255, 0.15);
  --viz-line: rgba(255, 255, 255, 0.1);

  /* breakpoints (reference only -- CSS cant use vars in media queries) */
  /* --bp-sm: 480px   */
  /* --bp-md: 768px   */
  /* --bp-lg: 900px   (sidebar breakpoint) */
  /* --bp-xl: 1024px  */
  /* --bp-2xl: 1200px */
}

/* light theme */
[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f0f2;
  --bg-hover: #e8e8ed;

  --text-primary: #000000;
  --text-secondary: #1a1a1a;
  --text-muted: #333333;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);

  --accent: var(--meadow-500);
  --accent-hover: var(--meadow-600);
  --accent-glow: rgba(var(--meadow-500-rgb), 0.2);
  --accent-dim: rgba(var(--meadow-500-rgb), 0.12);

  --gold: #d97706;
  --gold-hover: #b45309;
  --gold-glow: rgba(217, 119, 6, 0.2);
  --gold-dim: rgba(217, 119, 6, 0.06);

  --danger: #ff3b30;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* visualization tokens */
  --viz-text-primary: #000000;
  --viz-text-secondary: rgba(0, 0, 0, 0.7);
  --viz-text-dim: rgba(0, 0, 0, 0.4);
  --viz-bg-tooltip: rgba(255, 255, 255, 0.95);
  --viz-border: rgba(0, 0, 0, 0.1);
  --viz-line: rgba(0, 0, 0, 0.08);

  --video-bg: #ffffff;
}

/* smooth theme transition -- only active after first user toggle
   prevents FOUC on initial page load */
html.theme-ready,
html.theme-ready *,
html.theme-ready *::before,
html.theme-ready *::after {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease !important;
}

/* opt out elements that have their own transitions */
html.theme-ready .quiz-progress-fill,
html.theme-ready .sidebar-panel,
html.theme-ready .sidebar-step,
html.theme-ready .sidebar-backdrop,
html.theme-ready .landing-nav-hamburger-line {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0.01s linear;
    --transition-fast: 0.01s linear;
    --transition-slow: 0.01s linear;
    --transition-theme: 0.01s linear;
    --transition-smooth: 0.01s linear;
  }
}


/* ===== css/base.css ===== */
/* base.css -- foundational styles every page needs
   includes: reset, css variables, dark mode, typography, container,
   sticky header, tab navigation, disclaimer, icons, narrative sections,
   cards, badges, card grids, callout boxes, learn-more expandable,
   buttons, filter bar, peptide card, spectrum/stats, timeline,
   modal, footer (learn page), svg container, entrance animations,
   touch enhancements, scrollbar, comparison slots, tier list,
   scale container, body diagram container, calculator layout,
   btn-reset, landing hero (styles.css version), landing stats,
   landing sections, learning path, course grid (styles.css version),
   pricing grid (styles.css version), faq, landing footer ref,
   course page styles, explorer credits badge, cert cta, community card,
   gated loading skeleton */

/* ============================================== */
/* Reset and base */
/* ============================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #4b5563;
    --color-border: #e0e0e0;
    --color-primary: var(--meadow-400, #34d39e);
    --color-primary-hover: var(--meadow-500, #10b981);
    --color-disabled: #9ca3af;
    --color-disabled-bg: #f3f4f6;
    --color-success: var(--meadow-500, #10b981);
    --color-warning: #f97316;
    --color-danger: #ef4444;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Consolas, monospace;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 150ms ease;

    /* spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* glass and animation */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: blur(12px) saturate(180%);
    --color-bg-alt: #f0f2f5;
    --color-bg-card: rgba(0, 0, 0, 0.03);
    --color-text-secondary: #444444;
    --color-muted: #4b5563;
    --color-amber: #d97706;
    --color-accent-glow: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.15);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    --section-bg-odd: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.02);

    /* amino acid property colors */
    --aa-hydrophobic: #d97706;
    --aa-polar: #2563eb;
    --aa-positive: #dc2626;
    --aa-negative: #7c3aed;
    --aa-special: var(--meadow-600, #059666);

    /* evidence tier colors */
    --tier-approved: var(--meadow-500, #10b981);
    --tier-human-data: #eab308;
    --tier-animal: #f97316;
    --tier-anecdotal: #ef4444;

    /* tab */
    --header-height: auto;
}

/* ============================================== */
/* Dark mode */
/* ============================================== */

html.dark {
    --color-bg: #111114;
    --color-surface: #1c1c20;
    --color-text: #e8e8ec;
    --color-text-muted: #b4b4b8;
    --color-border: #333338;
    --color-primary: var(--meadow-400, #34d39e);
    --color-primary-hover: var(--meadow-500, #10b981);
    --color-disabled: #6b7280;
    --color-disabled-bg: #232328;
    --color-success: var(--meadow-400, #34d39e);
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px) saturate(150%);
    --color-bg-alt: #18181c;
    --color-bg-card: rgba(255, 255, 255, 0.05);
    --color-text-secondary: rgba(255, 255, 255, 0.85);
    --color-muted: rgba(255, 255, 255, 0.7);
    --color-amber: #f59e0b;
    --color-accent-glow: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.25);
    --section-bg-odd: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.04);

    --aa-hydrophobic: #fbbf24;
    --aa-polar: #60a5fa;
    --aa-positive: #f87171;
    --aa-negative: #a78bfa;
    --aa-special: #34d399;

    --tier-approved: #34d399;
    --tier-human-data: #fbbf24;
    --tier-animal: #fb923c;
    --tier-anecdotal: #f87171;
}

html.dark body {
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(52, 211, 153, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(52, 211, 153, 0.05) 0%, transparent 50%);
}

html.dark .sticky-header {
    background: rgba(17, 17, 20, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark .card:hover {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .callout-box {
    background: linear-gradient(135deg,
            rgba(52, 211, 153, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(52, 211, 153, 0.05) 100%);
    border-color: rgba(52, 211, 153, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark .callout-content {
    color: #c7d2fe;
}

html.dark .callout-box.callout-warning {
    background: linear-gradient(135deg,
            rgba(251, 191, 36, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(251, 191, 36, 0.05) 100%);
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark .callout-box.callout-warning .callout-content {
    color: #fcd34d;
}

html.dark .callout-box.callout-warning .callout-icon {
    color: #fbbf24;
}

html.dark .callout-box.callout-danger {
    background: linear-gradient(135deg,
            rgba(248, 113, 113, 0.08) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(248, 113, 113, 0.05) 100%);
    border-color: rgba(248, 113, 113, 0.2);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark .callout-box.callout-danger .callout-content {
    color: #fca5a5;
}

html.dark .callout-box.callout-info {
    background: linear-gradient(135deg,
            rgba(var(--meadow-400-rgb, 52, 211, 158), 0.10) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(var(--meadow-400-rgb, 52, 211, 158), 0.06) 100%);
    border-color: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.22);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark .callout-box.callout-info .callout-content {
    color: #6ee7bf;
}

html.dark .callout-box.callout-info .callout-icon {
    color: #34d39e;
}

html.dark .callout-box.callout-study {
    background: linear-gradient(135deg,
            rgba(var(--meadow-200-rgb, 167, 243, 218), 0.10) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(var(--meadow-300-rgb, 110, 231, 191), 0.06) 100%);
    border-color: rgba(var(--meadow-300-rgb, 110, 231, 191), 0.22);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html.dark .callout-box.callout-study .callout-content {
    color: #a7f3da;
}

html.dark .callout-box.callout-study .callout-icon {
    color: #6ee7bf;
}

html.dark .callout-box.callout-danger .callout-icon {
    color: #f87171;
}

html.dark .modal {
    background: rgba(0, 0, 0, 0.75);
}

html.dark .modal-content {
    background: rgba(28, 28, 32, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .disclaimer-banner {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.2);
}

html.dark .tab-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

html.dark .interactive-area {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .badge {
    background: rgba(255, 255, 255, 0.08);
}

html.dark .learn-more-content {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================== */
/* Base typography and body */
/* ============================================== */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(52, 211, 153, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    text-transform: lowercase;
}

/* ============================================== */
/* Breadcrumbs                                    */
/* ============================================== */

.breadcrumbs-container {
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-md) 0;
    margin-top: 72px;
    position: relative;
    z-index: 10;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.breadcrumb-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

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

.breadcrumb-separator {
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--color-text);
}

/* ============================================== */
/* Container */
/* ============================================== */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-sm);
    padding-top: var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

/* ============================================== */
/* Sticky header with tab navigation */
/* ============================================== */

.sticky-header {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 -1px 0 rgba(255, 255, 255, 0.5);
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: box-shadow var(--transition-smooth), background var(--transition-smooth);
}

.sticky-header-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.sticky-header h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
    color: var(--color-text);
}

.sticky-header .subtitle {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}

@media (min-width: 768px) {
    .sticky-header {
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .sticky-header h1 {
        font-size: 1.35rem;
        margin-bottom: 0.2rem;
    }

    .sticky-header .subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
}

/* theme toggle */
.academy-header-actions .theme-toggle {
    position: absolute;
    right: 0;
    top: 0.25rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
    -webkit-tap-highlight-color: transparent;
}

.academy-header-actions .theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.academy-header-actions .theme-toggle [data-lucide] {
    width: 16px;
    height: 16px;
}

.academy-header-actions .theme-toggle .icon-moon {
    display: block;
}

.academy-header-actions .theme-toggle .icon-sun {
    display: none;
}

html.dark .academy-header-actions .theme-toggle .icon-moon {
    display: none;
}

html.dark .academy-header-actions .theme-toggle .icon-sun {
    display: block;
}

/* ============================================== */
/* Tab navigation */
/* ============================================== */

.tab-nav {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 2rem;
    justify-content: center;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
}

.tab-btn:hover {
    color: var(--color-text);
    background: var(--color-disabled-bg);
}

.tab-btn.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 1px 3px rgba(52, 211, 153, 0.3);
}

@media (min-width: 768px) {
    .tab-nav {
        gap: 0.35rem;
    }

    .tab-btn {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }
}

/* ============================================== */
/* Tab content */
/* ============================================== */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================== */
/* Medical disclaimer banner */
/* ============================================== */

.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 0.6rem 0.75rem;
    margin-bottom: var(--spacing-md);
    font-size: 0.78rem;
    line-height: 1.5;
    color: #991b1b;
}

.disclaimer-banner .disclaimer-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.disclaimer-banner a {
    color: inherit;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .disclaimer-banner {
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
        gap: 0.75rem;
    }

    .disclaimer-banner .disclaimer-icon {
        width: 18px;
        height: 18px;
    }
}

/* ============================================== */
/* Lucide icons */
/* ============================================== */

[data-lucide] {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* ============================================== */
/* Narrative sections */
/* ============================================== */

.narrative-section {
    margin-bottom: var(--spacing-lg);
}

.section-intro {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}


@media (min-width: 768px) {
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
}

.section-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .section-description {
        font-size: 1rem;
        line-height: 1.7;
    }
}

.section-description strong {
    color: var(--color-text);
}

/* section divider */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    margin: var(--spacing-lg) auto;
    max-width: 150px;
}

@media (min-width: 768px) {
    .section-divider {
        margin: var(--spacing-xl) auto;
        max-width: 200px;
    }
}

/* ============================================== */
/* Card - glassmorphic container */
/* ============================================== */

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    box-shadow:
        var(--shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

@media (min-width: 768px) {
    .card {
        padding: var(--spacing-md);
    }
}

.card:hover {
    box-shadow:
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .card-header {
        margin-bottom: 1rem;
    }
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .card-header h3 {
        font-size: 1.125rem;
    }
}

/* ============================================== */
/* Badges */
/* ============================================== */

.badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--color-disabled-bg);
    color: var(--color-text-muted);
    font-weight: 500;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .badge {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }
}

.badge-approved {
    background: rgba(16, 185, 129, 0.12);
    color: var(--tier-approved);
}

.badge-research {
    background: rgba(234, 179, 8, 0.12);
    color: var(--tier-human-data);
}

.badge-animal {
    background: rgba(249, 115, 22, 0.12);
    color: var(--tier-animal);
}

.badge-anecdotal {
    background: rgba(239, 68, 68, 0.12);
    color: var(--tier-anecdotal);
}

.badge-category {
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-primary);
}

/* ============================================== */
/* Card grids */
/* ============================================== */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (min-width: 900px) {
    .card-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================== */
/* Callout boxes */
/* ============================================== */

.callout-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

@media (min-width: 768px) {
    .callout-box {
        gap: 1rem;
        padding: 1.25rem;
    }
}

.callout-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

@media (min-width: 768px) {
    .callout-icon {
        width: 24px;
        height: 24px;
    }
}

.callout-icon [data-lucide] {
    width: 100%;
    height: 100%;
}

.callout-content {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #3730a3;
}

@media (min-width: 768px) {
    .callout-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

.callout-box.callout-warning {
    background: #fef3c7;
    border-color: #fcd34d;
}

.callout-box.callout-warning .callout-icon {
    color: #d97706;
}

.callout-box.callout-warning .callout-content {
    color: #92400e;
}

.callout-box.callout-danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.callout-box.callout-danger .callout-icon {
    color: #dc2626;
}

.callout-box.callout-danger .callout-content {
    color: #991b1b;
}

.callout-box.callout-info {
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.08);
    border: 1px solid rgba(var(--meadow-400-rgb, 52, 211, 158), 0.22);
}

.callout-box.callout-info .callout-icon {
    color: #047852;
}

.callout-box.callout-info .callout-content {
    color: #065f42;
}

.callout-box.callout-study {
    background: rgba(var(--meadow-200-rgb, 167, 243, 218), 0.16);
    border: 1px solid rgba(var(--meadow-300-rgb, 110, 231, 191), 0.28);
}

.callout-box.callout-study .callout-icon {
    color: #059666;
}

.callout-box.callout-study .callout-content {
    color: #065f42;
}

/* ============================================== */
/* Learn more expandable */
/* ============================================== */

.learn-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color var(--transition);
    font-family: var(--font-sans);
}

.learn-more-toggle:hover {
    color: var(--color-primary-hover);
}

.learn-more-toggle [data-lucide] {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-smooth);
}

.learn-more-toggle.expanded [data-lucide] {
    transform: rotate(180deg);
}

.learn-more-content {
    display: none;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.learn-more-content.expanded {
    display: block;
}

/* ============================================== */
/* Buttons */
/* ============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-smooth);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:hover,
.btn:active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(52, 211, 153, 0.05);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.btn [data-lucide] {
    width: 16px;
    height: 16px;
}

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

.btn-primary:hover,
.btn-primary:active {
    background: var(--color-primary-hover);
    color: #fff;
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* ============================================== */
/* Button reset utility */
/* ============================================== */

.btn-reset {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================== */
/* Filter bar for catalog */
/* ============================================== */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: var(--spacing-md);
    justify-content: center;
}

.filter-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
    background: var(--color-disabled-bg);
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
    color: var(--color-text);
    background: var(--color-border);
}

.filter-btn.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

@media (min-width: 768px) {
    .filter-btn {
        padding: 0.35rem 0.85rem;
        font-size: 0.78rem;
    }
}

/* ============================================== */
/* Peptide catalog card */
/* ============================================== */

.peptide-card {
    cursor: pointer;
}

.peptide-card .card-header {
    margin-bottom: 0.5rem;
}

.peptide-card .peptide-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.peptide-card .peptide-alias {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.peptide-card .peptide-summary {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.peptide-card .peptide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

@media (min-width: 768px) {
    .peptide-card .peptide-name {
        font-size: 1.05rem;
    }

    .peptide-card .peptide-summary {
        font-size: 0.875rem;
    }
}

/* ============================================== */
/* Spectrum / slider visualization */
/* ============================================== */

.spectrum-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-success), var(--color-warning));
    position: relative;
    margin: var(--spacing-md) 0;
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

/* ============================================== */
/* Stats / metrics */
/* ============================================== */

.stat-block {
    text-align: center;
    padding: var(--spacing-sm);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    font-family: var(--font-mono);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
}

.stat-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

/* ============================================== */
/* Timeline */
/* ============================================== */

.timeline-section {
    margin: 0;
    padding: 0;
}

.timeline-container {
    position: relative;
    width: 100%;
    height: 220px;
    margin: 0 auto;
    padding: 0 0.5rem;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
    .timeline-container {
        height: 200px;
        padding: 0 1rem;
        overflow-x: visible;
    }
}

.timeline-path {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1200px;
    height: 120px;
    transform: translateY(-50%);
    pointer-events: none;
    overflow: visible;
}

@media (min-width: 900px) {
    .timeline-path {
        width: 100%;
    }
}

.timeline-wave {
    fill: none;
    stroke: url(#timeline-gradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 8 4;
    filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.15));
}

.timeline-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 1200px;
    height: 100%;
}

@media (min-width: 900px) {
    .timeline-points {
        width: 100%;
    }
}

.timeline-point {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: var(--z-content);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: inherit;
}

.timeline-point[data-wave="up"] {
    transform: translate(-50%, calc(-50% - 25px));
}

.timeline-point[data-wave="down"] {
    transform: translate(-50%, calc(-50% + 25px));
}

.point-icon {
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    color: var(--color-text-muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.point-icon [data-lucide] {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .point-icon {
        width: 44px;
        height: 44px;
    }
}

.timeline-point:hover .point-icon,
.timeline-point:active .point-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: scale(1.15);
    box-shadow:
        0 4px 12px rgba(52, 211, 153, 0.3),
        0 0 0 4px rgba(52, 211, 153, 0.1);
}

.point-year {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
    transition: color 0.3s ease;
}

@media (min-width: 768px) {
    .point-year {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
}

.timeline-point:hover .point-year {
    color: var(--color-primary);
}

.point-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: 0.75rem;
    width: 200px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: var(--z-dropdown);
}

@media (min-width: 768px) {
    .point-tooltip {
        bottom: calc(100% + 15px);
        padding: 1rem;
        width: 240px;
    }
}

.point-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--color-surface);
}

.point-tooltip.tooltip-left {
    left: auto;
    right: 0;
    transform: translateX(0) scale(0.9);
}

.point-tooltip.tooltip-left::after {
    left: auto;
    right: 15px;
}

.timeline-point:hover .point-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.timeline-point:hover .point-tooltip.tooltip-left {
    transform: translateX(0) scale(1);
}

.point-tooltip h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.point-tooltip p {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 768px) {
    .point-tooltip h4 {
        font-size: 0.875rem;
    }

    .point-tooltip p {
        font-size: 0.78rem;
        line-height: 1.5;
    }
}

html.dark .point-tooltip {
    background: rgba(28, 28, 32, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

html.dark .point-tooltip::after {
    border-top-color: rgba(28, 28, 32, 0.95);
}

/* ============================================== */
/* Modal */
/* ============================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .modal-content {
        padding: 2rem;
    }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
    background: var(--color-disabled-bg);
}

.modal-close [data-lucide] {
    width: 20px;
    height: 20px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    padding-right: 2.5rem;
}

@media (min-width: 768px) {
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* ============================================== */
/* Footer (learn page version) */
/* ============================================== */

.footer {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: var(--spacing-lg);
}

@media (min-width: 768px) {
    .footer {
        font-size: 0.875rem;
        margin-top: 2rem;
    }
}

.footer-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.footer-credit a {
    display: inline-flex;
    align-items: center;
}


.footer-sources {
    margin-top: 0.5rem;
    font-size: 0.72rem;
}

.footer-sources a {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-sources a:hover {
    text-decoration: underline;
}

/* ============================================== */
/* SVG containers */
/* ============================================== */

.svg-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.svg-container svg {
    max-width: 100%;
    height: auto;
}

/* ============================================== */
/* Entrance animations */
/* ============================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow),
        transform var(--transition-slow);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* stagger children within grids */
.animate-on-scroll.is-visible .card {
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.animate-on-scroll.is-visible .card:nth-child(1) {
    animation-delay: 0ms;
}

.animate-on-scroll.is-visible .card:nth-child(2) {
    animation-delay: 80ms;
}

.animate-on-scroll.is-visible .card:nth-child(3) {
    animation-delay: 160ms;
}

.animate-on-scroll.is-visible .card:nth-child(4) {
    animation-delay: 240ms;
}

.animate-on-scroll.is-visible .card:nth-child(5) {
    animation-delay: 320ms;
}

.animate-on-scroll.is-visible .card:nth-child(6) {
    animation-delay: 400ms;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-on-scroll.is-visible .card {
        animation: none;
    }
}

/* noscript fallback */
.no-js .animate-on-scroll {
    opacity: 1;
    transform: none;
}

/* ============================================== */
/* Touch-friendly enhancements */
/* ============================================== */

@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
    }

    .point-icon {
        width: 48px;
        height: 48px;
    }

    .timeline-point:active .point-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) scale(1);
    }

    .timeline-point:active .point-tooltip.tooltip-left {
        transform: translateX(0) scale(1);
    }
}

/* ============================================== */
/* Scrollbar styling */
/* ============================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

.timeline-container::-webkit-scrollbar {
    height: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: var(--color-disabled-bg);
    border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* ============================================== */
/* Comparison tool placeholder */
/* ============================================== */

.comparison-slots {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.comparison-slot {
    width: 180px;
    min-height: 200px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--spacing-sm);
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.comparison-slot:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(52, 211, 153, 0.03);
}

.comparison-slot.filled {
    border-style: solid;
    border-color: var(--color-primary);
    background: rgba(52, 211, 153, 0.05);
}

@media (min-width: 768px) {
    .comparison-slot {
        width: 220px;
        min-height: 250px;
    }
}

/* ============================================== */
/* Evidence tier visualization */
/* ============================================== */

.tier-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.tier-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius);
    background: var(--color-surface);
    border-left: 4px solid transparent;
}

.tier-item.tier-1 {
    border-left-color: var(--tier-approved);
}

.tier-item.tier-2 {
    border-left-color: var(--tier-human-data);
}

.tier-item.tier-3 {
    border-left-color: var(--tier-animal);
}

.tier-item.tier-4 {
    border-left-color: var(--tier-anecdotal);
}

.tier-label {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    min-width: 65px;
    text-align: center;
}

.tier-1 .tier-label {
    background: rgba(16, 185, 129, 0.12);
    color: var(--tier-approved);
}

.tier-2 .tier-label {
    background: rgba(234, 179, 8, 0.12);
    color: var(--tier-human-data);
}

.tier-3 .tier-label {
    background: rgba(249, 115, 22, 0.12);
    color: var(--tier-animal);
}

.tier-4 .tier-label {
    background: rgba(239, 68, 68, 0.12);
    color: var(--tier-anecdotal);
}

.tier-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.tier-description strong {
    color: var(--color-text);
}

/* ============================================== */
/* Balance scale placeholder */
/* ============================================== */

.scale-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--spacing-md);
    min-height: 250px;
    padding: var(--spacing-md) 0;
}

.scale-pan {
    width: 45%;
    max-width: 300px;
    min-height: 200px;
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scale-pan.benefits {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.scale-pan.risks {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.scale-pan h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.scale-card {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.4;
    cursor: grab;
    transition: all var(--transition);
}

.scale-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.benefits .scale-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.risks .scale-card {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ============================================== */
/* Body diagram placeholder */
/* ============================================== */

.body-diagram-container {
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 400px;
    padding: var(--spacing-md) 0;
}

@media (min-width: 768px) {
    .body-diagram-container {
        min-height: 500px;
    }
}

/* ============================================== */
/* Reconstitution calculator placeholder */
/* ============================================== */

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 700px) {
    .calculator-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.calculator-inputs label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

.calculator-inputs input,
.calculator-inputs select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    margin-bottom: var(--spacing-sm);
}

.calculator-inputs input:focus,
.calculator-inputs select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.calculator-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================== */
/* Landing hero (styles.css version) */
/* ============================================== */

.landing-hero {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.landing-hero-inner {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.landing-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

@media (min-width: 768px) {
    .landing-hero-title {
        font-size: 3.25rem;
    }
}

.landing-hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .landing-hero-subtitle {
        font-size: 1.15rem;
    }
}

.landing-hero-ctas {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================== */
/* Landing stats bar */
/* ============================================== */

.landing-stats {
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    text-align: center;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    padding: var(--spacing-xs);
}

.stat-item .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
    line-height: 1.2;
}

.stat-item .stat-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: lowercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
    display: block;
}

/* ============================================== */
/* Landing sections */
/* ============================================== */

.landing-section {
    padding: var(--spacing-xl) 0;
}

.landing-section-alt {
    background: var(--section-bg-odd);
}

/* ============================================== */
/* Learning path cards */
/* ============================================== */

.learning-path {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 700px;
    margin: 0 auto;
}

.path-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-smooth);
    position: relative;
}

.path-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--color-accent-glow);
    transform: translateY(-2px);
}

html.dark .path-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .path-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

.path-card-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    background: rgba(52, 211, 153, 0.08);
    border-radius: 50%;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.path-card-content {
    flex: 1;
    min-width: 0;
}

.path-card-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.path-card-content p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.path-card-features {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.path-card-features span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.path-card-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.badge-free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

/* ============================================== */
/* Course grid (styles.css version / landing page) */
/* ============================================== */

.course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 600px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.course-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-smooth);
}

.course-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

html.dark .course-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .course-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

.course-card-header {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.course-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.course-card-aliases {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 0.35rem;
}

.course-card-summary {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0.75rem;
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.course-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.course-card-preview {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* ============================================== */
/* Pricing grid (styles.css version) */
/* ============================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 700px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-smooth);
}

.pricing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

html.dark .pricing-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.pricing-card-featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

html.dark .pricing-card-featured {
    border-color: var(--color-primary);
}

.pricing-card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.pricing-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
}

.pricing-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.pricing-period {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.pricing-savings {
    font-size: 0.75rem;
    color: var(--color-success);
    font-weight: 500;
    margin-top: 0.25rem;
}

.pricing-features {
    list-style: none;
    flex: 1;
    margin-bottom: var(--spacing-md);
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.pricing-features li [data-lucide] {
    color: var(--color-success);
    flex-shrink: 0;
}

.pricing-cta {
    width: 100%;
    justify-content: center;
}

/* ============================================== */
/* FAQ */
/* ============================================== */

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}

html.dark .faq-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.faq-item.open {
    border-color: var(--color-primary);
}

.faq-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem var(--spacing-sm);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.faq-toggle [data-lucide] {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.faq-item.open .faq-toggle [data-lucide] {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.faq-answer {
    display: none;
    padding: 0 var(--spacing-sm) var(--spacing-sm);
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ============================================== */
/* Landing footer reference */
/* ============================================== */

.landing-footer {
    padding: 80px 40px 32px;
    margin-top: 80px;
}

/* tighter footer on learn pages with sidebar */
.learn-page--with-sidebar~.landing-footer {
    margin-top: 0;
    padding-top: 48px;
}

/* ============================================== */
/* Course page styles */
/* ============================================== */

.course-badges {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.course-aliases {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.course-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.quick-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .quick-facts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-fact {
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
}

html.dark .quick-fact {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.quick-fact-label {
    display: block;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.quick-fact-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

/* community sentiment block */
.sentiment-block {
    margin-top: 2rem;
}

.sentiment-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: lowercase;
    color: var(--color-text);
}

/* community sentiment card */
.sentiment-card {
    position: relative;
    max-width: 820px;
    padding: 1.5rem;
    padding-right: 7rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

html.dark .sentiment-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.sentiment-mascot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.sentiment-content {
    text-align: left;
}

.sentiment-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sentiment-pct {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.sentiment-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sentiment-bar-track {
    width: 100%;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

html.dark .sentiment-bar-track {
    background: rgba(255, 255, 255, 0.08);
}

.sentiment-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.sentiment-disclaimer {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.sentiment-summary {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.6;
}

/* sentiment color variants */
.sentiment--positive .sentiment-pct,
.sentiment--positive .sentiment-label { color: var(--mountain-meadow-500, #10b981); }
.sentiment--positive .sentiment-bar-fill { background: var(--mountain-meadow-500, #10b981); }

.sentiment--mixed .sentiment-pct,
.sentiment--mixed .sentiment-label { color: #f59e0b; }
.sentiment--mixed .sentiment-bar-fill { background: #f59e0b; }

.sentiment--low .sentiment-pct,
.sentiment--low .sentiment-label { color: #ef4444; }
.sentiment--low .sentiment-bar-fill { background: #ef4444; }

/* course content lists */
.course-list {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.course-list-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-item {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.risk-item {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.12);
}

/* course sources */
.course-sources {
    max-width: 600px;
    margin: 0 auto;
}

.course-source {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border);
}

.course-source:last-child {
    border-bottom: none;
}

/* ============================================== */
/* Explorer credits badge */
/* ============================================== */

.explorer-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

/* ============================================== */
/* Certification CTA */
/* ============================================== */

.cert-cta {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.cert-cta svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.cert-cta-earned svg {
    color: var(--color-success);
}

.cert-cta-ready svg {
    color: var(--color-primary);
}

.cert-cta-progress svg {
    color: var(--color-muted);
}

.cert-cta-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.cert-cta-desc {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.cert-name-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.cert-name-input {
    flex: 1;
    min-width: 180px;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.85rem;
}

.cert-name-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.cert-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.cert-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.cert-progress-label {
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* ============================================== */
/* Community card */
/* ============================================== */

.community-card {
    max-width: 500px;
    margin: 0 auto;
}

.community-card-inner {
    text-align: center;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
}

.community-card-inner svg {
    margin-bottom: 1rem;
}

.community-card-inner h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.community-card-inner p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.community-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================== */
/* Loading skeleton for gated content */
/* ============================================== */

.gated-loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0;
}

.skeleton-block {
    height: 120px;
    border-radius: var(--radius-lg, 12px);
    background: linear-gradient(90deg,
            var(--color-border) 25%,
            rgba(52, 211, 153, 0.06) 50%,
            var(--color-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-block:nth-child(2) {
    height: 80px;
}

.skeleton-block:nth-child(3) {
    height: 60px;
    width: 75%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-block {
        animation: none;
        opacity: 0.5;
    }
}

/* ============================================== */
/* Blog next best paths */
/* ============================================== */

.blog-next-paths {
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 8px);
    background: var(--color-bg-surface, rgba(0, 0, 0, 0.02));
}

.blog-next-paths-title {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text);
}

.blog-next-paths-subtitle {
    margin: 0.45rem 0 0.9rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.blog-next-paths-grid {
    display: grid;
    gap: 0.65rem;
}

.blog-next-path-card {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    background: var(--color-disabled-bg);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.blog-next-path-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

.blog-next-path-label {
    display: block;
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.blog-next-path-desc {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

@media (min-width: 768px) {
    .blog-next-paths-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ===== css/nav.css ===== */
/* navigation styles extracted from landing.css */
/* includes: .landing-nav, .theme-toggle, .sound-toggle-btn, .user-menu, hamburger menu */

/* navigation */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  background: var(--landing-nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

.landing-nav.is-scrolled {
  background: var(--landing-nav-bg-scrolled);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.landing-nav-logo svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.landing-nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.landing-nav-links a:hover {
  color: var(--text-primary);
}

.landing-nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.landing-nav-links--learning {
  gap: 14px;
}

.landing-nav-cta {
  background: var(--accent);
  color: var(--accent-contrast) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease !important;
}

.landing-nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* theme toggle (landing pages) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--button-ghost-border);
  background: var(--button-ghost-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  background: var(--button-ghost-bg-hover);
  border-color: var(--button-ghost-border-hover);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.theme-toggle-icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle-icon--sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-icon--moon {
  display: block;
}

/* theme toggle (styles.css version - learn module pages with .academy-header-actions) */
.academy-header-actions .theme-toggle {
  position: absolute;
  right: 0;
  top: 0.25rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.academy-header-actions .theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.academy-header-actions .theme-toggle [data-lucide] {
  width: 16px;
  height: 16px;
}

.academy-header-actions .theme-toggle .icon-moon {
  display: block;
}

.academy-header-actions .theme-toggle .icon-sun {
  display: none;
}

html.dark .academy-header-actions .theme-toggle .icon-moon {
  display: none;
}

html.dark .academy-header-actions .theme-toggle .icon-sun {
  display: block;
}

/* nav credit badge */
.nav-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

.nav-credits-badge svg {
  flex-shrink: 0;
}

/* hamburger menu button */
.landing-nav-hamburger {
  display: none;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.landing-nav-hamburger:hover {
  opacity: 0.7;
}

.landing-nav-hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.landing-nav-hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landing-nav-hamburger-line {
  width: 100%;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.landing-nav.nav-open .landing-nav-hamburger-line:nth-child(1) {
  transform: translateY(6.75px) rotate(45deg);
}

.landing-nav.nav-open .landing-nav-hamburger-line:nth-child(2) {
  opacity: 0;
}

.landing-nav.nav-open .landing-nav-hamburger-line:nth-child(3) {
  transform: translateY(-6.75px) rotate(-45deg);
}

/* sound toggle (landing.css version - uses --text-muted / --text vars) */
.sound-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
  padding: 0;
}

.sound-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .sound-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 480px) {
  .sound-toggle-btn {
    width: 44px;
    height: 44px;
  }
}

/* sound toggle (styles.css version - uses --color-text-muted / --color-text vars) */
/* this override applies on learn module pages which use styles.css variables */
/*
.sound-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    padding: 0;
}

.sound-toggle-btn:hover {
    color: var(--color-text);
    background: var(--color-border);
}

@media (max-width: 480px) {
    .sound-toggle-btn {
        width: 28px;
        height: 28px;
    }

    .sound-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
}
*/

/* user menu */
.user-menu {
  position: relative;
}

.user-menu-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: lowercase;
}

.user-menu-avatar:hover {
  background: rgba(52, 211, 153, 0.25);
  transform: scale(1.05);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.user-menu-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

[data-theme="light"] .user-menu-dropdown {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.75) 100%);
  border-color: rgba(0, 0, 0, 0.1);
}

.user-menu-email {
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-menu-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ---- responsive: nav-only rules from mixed @media (max-width: 768px) ---- */

/* note: the main 768px media query in landing.css mixes nav, hero, orb, footer,
   and other selectors. the nav-specific rules are duplicated here for reference.
   the original mixed media query in landing.css is NOT modified. */

@media (max-width: 768px) {
  body.nav-menu-open {
    overflow: hidden;
  }

  .landing-nav {
    padding: 14px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .landing-nav::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: calc(var(--z-dropdown) - 1);
  }

  [data-theme="light"] .landing-nav::before {
    background: rgba(15, 23, 42, 0.45);
  }

  .landing-nav.nav-open::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .landing-nav-hamburger {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: calc(var(--z-dropdown) + 1);
  }

  .landing-nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 8, 12, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: none;
    padding: 80px 24px 32px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    pointer-events: none;
  }

  [data-theme="light"] .landing-nav-links {
    background: rgba(248, 250, 252, 0.99);
    border-top: none;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
  }

  .landing-nav.nav-open .landing-nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .landing-nav-links a:not(.landing-nav-cta):not(.auth-nav-btn) {
    display: block;
    padding: 16px 4px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--glass-border);
  }

  .landing-nav.nav-open .landing-nav-links a:not(.landing-nav-cta):not(.auth-nav-btn) {
    display: block;
  }

  .landing-nav-links a:last-of-type:not(.landing-nav-cta):not(.auth-nav-btn) {
    border-bottom: none;
  }

  [data-theme="light"] .landing-nav-links a:not(.landing-nav-cta):not(.auth-nav-btn) {
    border-bottom-color: rgba(15, 23, 42, 0.08);
  }

  .landing-nav-cta {
    margin-top: 8px;
    display: block;
    text-align: center;
  }

  .landing-nav-links--learning a {
    display: block;
    padding: 16px 4px;
  }

  .landing-nav.nav-open .landing-nav-links--learning a {
    display: inline-flex;
  }

  /* auth buttons in mobile nav */
  .landing-nav-links .auth-nav-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 14px 0;
  }

  .landing-nav-links .auth-nav-btn--signup {
    margin-top: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
  }

  .landing-nav-links .auth-nav-btn--login {
    margin-top: 16px;
    padding: 14px 0;
    color: var(--text-secondary);
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .landing-nav-links .theme-toggle {
    margin: 16px auto 0;
  }

  .user-menu-dropdown {
    right: 0;
    max-width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-nav,
  .landing-nav-link,
  .landing-nav-cta,
  .landing-nav-hamburger,
  .landing-nav-links,
  .theme-toggle,
  .user-menu-dropdown,
  .user-menu-item,
  .cookie-banner {
    transition: none;
  }
}

/* ---- cookie consent banner ---- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-toast);
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner--hidden {
  opacity: 0;
  transform: translateY(100%);
}

.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cookie-banner-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.cookie-banner-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.cookie-banner-btn--decline {
  color: var(--text-muted);
  border-color: var(--border);
}

.cookie-banner-btn--decline:hover {
  background: var(--border);
  color: var(--text-primary);
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-btn {
    width: 100%;
  }
}

/* ===== css/background.css ===== */
/* background orb styles extracted from landing.css */
/* includes: .landing-bg, .landing-bg-orb variants, orb keyframe animations */

/* animated background orbs */
.landing-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.landing-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  will-change: transform;
}

.landing-bg-orb--1 {
  width: 600px;
  height: 600px;
  background: rgba(52, 211, 153, 0.25);
  top: -10%;
  left: -5%;
  animation: orbFloat1 18s ease-in-out infinite alternate;
}

.landing-bg-orb--2 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.2);
  top: 30%;
  right: -10%;
  animation: orbFloat2 22s ease-in-out infinite alternate;
}

.landing-bg-orb--3 {
  width: 400px;
  height: 400px;
  background: rgba(168, 85, 247, 0.15);
  bottom: -5%;
  left: 30%;
  animation: orbFloat3 20s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.15); }
}

@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, 40px) scale(1.1); }
}

@keyframes orbFloat3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -50px) scale(1.2); }
}

/* ===== responsive: orb-only rules from mixed @media (max-width: 768px) ===== */

/* note: the main 768px media query in landing.css mixes orb styles with nav, hero,
   footer, and other selectors. the orb-specific rules are duplicated here for reference.
   the original mixed media query in landing.css is NOT modified. */

/* light mode: soften orbs against light backgrounds */
[data-theme="light"] .landing-bg-orb {
  opacity: 0.15;
}

@media (max-width: 768px) {
  /* performance: reduce orb blur and size on mobile */
  .landing-bg-orb {
    filter: blur(60px);
    will-change: auto;
  }
  .landing-bg-orb--1 { width: 300px; height: 300px; }
  .landing-bg-orb--2 { width: 250px; height: 250px; }
  .landing-bg-orb--3 { width: 200px; height: 200px; }
  .landing-bg-orb--1,
  .landing-bg-orb--2,
  .landing-bg-orb--3 {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-bg-orb--1,
  .landing-bg-orb--2,
  .landing-bg-orb--3 {
    animation: none;
  }
}


/* ===== css/learn.css ===== */
@import url('./course.css?v=ecfce369c6a7');

/* learn page layout, sections, and navigation
   extracted from styles.css -- do not duplicate in the source file */

/* prevent flash of unstyled content while lesson-stepper restructures DOM */
body.learn-loading {
    opacity: 0;
}

body.learn-ready {
    opacity: 1;
    transition: opacity 0.12s ease;
}

/* ============================================== */
/* Learn page styles */
/* ============================================== */

.learn-page {
    padding-top: 100px;
}

html {
    scroll-padding-top: 88px;
}

.breadcrumb {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb svg {
    width: 12px;
    height: 12px;
}

.breadcrumb-sep {
    opacity: 0.4;
}

.learn-header {
    margin-bottom: var(--spacing-xl);
}

.learn-module-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    padding: 0.2rem 0.6rem;
    background: rgba(52, 211, 153, 0.08);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.learn-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--color-text);
    line-height: 1.15;
}

.learn-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 640px;
    line-height: 1.7;
}

/* next module CTA */
.learn-next {
    text-align: center;
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-lg);
}

.learn-next-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ============================================== */
/* Hero section (learn pages only) */
/* ============================================== */

.learn-page .hero {
    padding: var(--spacing-lg) 0 var(--spacing-md);
    min-height: auto;
    display: block;
    position: static;
}

.learn-page .hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--color-text);
    line-height: 1.15;
    text-transform: lowercase;
}

@media (min-width: 768px) {
    .learn-page .hero-title {
        font-size: 2.4rem;
    }
}

.learn-page .hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    text-transform: lowercase;
}

.learn-page .hero-description {
    max-width: none;
}

@media (min-width: 768px) {
    .learn-page .hero-description {
        font-size: 0.95rem;
    }
}

.learn-page--with-sidebar #quiz-container .quiz-container,
.learn-page--with-sidebar #exercise-container .exercise-container {
    margin-left: 0;
    margin-right: auto;
}

/* ============================================== */
/* Narrative sections */
/* ============================================== */

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

.section-intro {
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--color-text);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 1.35rem;
    }
}

/* section divider */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    margin: var(--spacing-xl) auto;
    max-width: 150px;
}

@media (min-width: 768px) {
    .section-divider {
        margin: 3.5rem auto;
        max-width: 200px;
    }
}

/* ============================================== */
/* Entrance animations */
/* ============================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow),
        transform var(--transition-slow);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* stagger children within grids */
.animate-on-scroll.is-visible .card {
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.animate-on-scroll.is-visible .card:nth-child(1) {
    animation-delay: 0ms;
}

.animate-on-scroll.is-visible .card:nth-child(2) {
    animation-delay: 80ms;
}

.animate-on-scroll.is-visible .card:nth-child(3) {
    animation-delay: 160ms;
}

.animate-on-scroll.is-visible .card:nth-child(4) {
    animation-delay: 240ms;
}

.animate-on-scroll.is-visible .card:nth-child(5) {
    animation-delay: 320ms;
}

.animate-on-scroll.is-visible .card:nth-child(6) {
    animation-delay: 400ms;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-on-scroll.is-visible .card {
        animation: none;
    }
}

/* noscript fallback */
.no-js .animate-on-scroll {
    opacity: 1;
    transform: none;
}

/* ============================================== */
/* Card - glassmorphic container */
/* ============================================== */

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: var(--spacing-sm);
    box-shadow:
        var(--shadow-sm),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

@media (min-width: 768px) {
    .card {
        padding: var(--spacing-md);
    }
}

.card:hover {
    box-shadow:
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .card-header {
        margin-bottom: 1rem;
    }
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: lowercase;
}

@media (min-width: 768px) {
    .card-header h3 {
        font-size: 1.125rem;
    }
}

/* ============================================== */
/* Card grids */
/* ============================================== */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.course-comparison-grid {
    margin-top: var(--spacing-md);
}

.course-comparison-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
    color: var(--color-text);
}

.course-comparison-meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.course-comparison-kicker {
    font-size: 0.72rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.course-comparison-desc {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.course-comparison-desc--tight {
    line-height: 1.5;
}

.course-year-tag {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.course-year-tag--primary {
    color: var(--color-primary);
}

.course-year-tag--success {
    color: var(--color-success);
}

.course-year-tag--warning {
    color: var(--color-warning);
}

.course-year-tag--danger {
    color: var(--color-danger);
}

.regulatory-card-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.course-link-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.course-link-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--color-text);
}

.course-link-chip-sub {
    opacity: 0.7;
    font-size: 0.9em;
    text-transform: lowercase;
}

.btn-top-gap {
    margin-top: 1rem;
}

.course-grid--narrow {
    max-width: 700px;
    margin: 0 auto;
}

.content-hidden {
    display: none;
}

.routes-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.route-card {
    text-align: center;
}

.route-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.18rem 0.45rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    text-transform: lowercase;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-primary);
}

.route-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
}

.route-metric {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.route-note {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.calculator-result-panel {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--color-disabled-bg);
    border-radius: var(--radius);
}

.calculator-result-label {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.calculator-result-label--spaced {
    margin-top: 0.5rem;
}

.calculator-result-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.calculator-vial-svg {
    width: 160px;
    height: auto;
}

.icon-sm {
    width: 14px;
    height: 14px;
}

.icon-md {
    width: 16px;
    height: 16px;
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (min-width: 900px) {
    .card-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================== */
/* Spectrum / slider visualization */
/* ============================================== */

.spectrum-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-success), var(--color-warning));
    position: relative;
    margin: var(--spacing-md) 0;
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

/* ============================================== */
/* Lesson sidebar */
/* ============================================== */

/* wider container when sidebar is present */
.learn-page--with-sidebar {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* flex layout: sidebar + content */
.learn-layout {
    display: flex;
    gap: 0;
    position: relative;
    min-height: 100vh;
}

/* main content area */
.learn-content {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    flex-direction: column;
}

/* sidebar container */
.lesson-sidebar {
    position: relative;
    flex-shrink: 0;
    z-index: var(--z-stepper);
    min-width: 48px;
    transition: min-width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    text-transform: lowercase !important;
}

.lesson-sidebar * {
    text-transform: lowercase !important;
}

/* shrink sidebar container when panel is collapsed */
.lesson-sidebar:has(.sidebar-panel-collapsed) {
    min-width: 0;
    width: 0;
    border-right-color: transparent;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* sidebar toggle button (lives inside sidebar title area) */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

/* reopen button: visible only when sidebar panel is collapsed */
.sidebar-reopen {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: fixed;
    top: calc(var(--stepper-nav-offset, 84px) + 24px);
    left: 12px;
    z-index: var(--z-stepper-reopen);
    margin: 0;
}

.sidebar-reopen:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

.sidebar-panel-collapsed~.sidebar-reopen {
    display: flex;
}

/* sidebar panel */
.sidebar-panel {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    width: 280px;
    overflow-y: auto;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-lg);
    border-right: none;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
        padding 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
    display: flex;
    flex-direction: column;
}

.sidebar-panel::-webkit-scrollbar {
    width: 4px;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

/* collapsed state */
.sidebar-panel-collapsed {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    opacity: 0;
}

/* ── sidebar module header ── */
.sidebar-module-header {
    padding: 0 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.sidebar-module-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.sidebar-module-header-top .sidebar-toggle {
    position: relative;
    top: auto;
    left: auto;
    margin: 0;
    flex-shrink: 0;
}

.sidebar-unit-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: lowercase !important;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    background: var(--color-disabled-bg);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.sidebar-module-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
    text-transform: lowercase !important;
}

/* ── sidebar meta (lesson count + progress %) ── */
.sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
    padding: 0 0.25rem;
    white-space: nowrap;
}

.sidebar-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: lowercase !important;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.sidebar-meta-pct {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    font-family: var(--font-mono);
    text-transform: lowercase;
}

/* sidebar progress bar */
.sidebar-progress {
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.sidebar-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* step list */
.sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-family: var(--font-sans);
    font-weight: 400;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.sidebar-step:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
}

/* active step */
.sidebar-step-active {
    background: rgba(52, 211, 153, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.sidebar-step-active:hover {
    background: rgba(52, 211, 153, 0.12);
}

html.dark .sidebar-step-active {
    background: rgba(52, 211, 153, 0.1);
}

html.dark .sidebar-step-active:hover {
    background: rgba(52, 211, 153, 0.15);
}

.sidebar-step-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--color-primary);
}

.sidebar-step-active .sidebar-step-icon {
    color: var(--color-primary);
    background: rgba(52, 211, 153, 0.15);
}

html.dark .sidebar-step-active .sidebar-step-icon {
    background: rgba(52, 211, 153, 0.18);
}

/* completed step */
.sidebar-step-complete {
    color: var(--color-text-muted);
}

.sidebar-step-complete .sidebar-step-icon {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.12);
}

.sidebar-step-complete.sidebar-step-active {
    color: var(--color-success);
}

.sidebar-step-complete.sidebar-step-active::before {
    background: var(--color-success);
}

.sidebar-step-complete.sidebar-step-active .sidebar-step-icon {
    background: rgba(16, 185, 129, 0.18);
}

/* step icon */
.sidebar-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.15s ease;
}

.stepper-num {
    font-size: 0.65rem;
    font-weight: 600;
}

/* step label */
.sidebar-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* step type tags */
.sidebar-step-tag {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: lowercase !important;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.sidebar-step-tag--quiz {
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-primary);
}

.sidebar-step-tag--exercise {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* backdrop for mobile overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: var(--z-stepper-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* ── course directory (migrated from injected styles) ── */

.sidebar-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    margin: var(--spacing-md) 0.25rem var(--spacing-sm);
}

.sidebar-units-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.55rem;
    margin-bottom: 0.35rem;
}

.sidebar-units-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.sidebar-units {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--spacing-sm);
}

.sidebar-unit-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.sidebar-unit-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
}

.sidebar-unit-link-active {
    color: var(--color-text);
    font-weight: 600;
    background: rgba(52, 211, 153, 0.06);
}

.sidebar-unit-link-active:hover {
    background: rgba(52, 211, 153, 0.08);
}

/* completed unit */
.sidebar-unit-link--complete {
    color: var(--color-text-muted);
}

.sidebar-unit-status--complete {
    color: var(--color-primary);
    opacity: 1;
}

/* locked unit -- non-interactive */
.sidebar-unit-link--locked {
    cursor: default;
    opacity: 0.45;
}

.sidebar-unit-link--locked:hover {
    background: transparent;
    color: var(--color-text-muted);
    opacity: 0.6;
}

.sidebar-unit-num {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    opacity: 0.5;
    min-width: 1.2rem;
}

.sidebar-unit-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    margin-left: auto;
}

/* locked tooltip */
.sidebar-unit-tooltip {
    position: absolute;
    left: 0.55rem;
    top: 100%;
    z-index: 10;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
    font-size: 0.7rem;
    color: var(--color-text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: tooltipFadeIn 0.2s ease;
    pointer-events: auto;
}

.sidebar-unit-tooltip a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-unit-tooltip a:hover {
    text-decoration: underline;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* unlock CTA at bottom of course units */
.sidebar-unlock-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.55rem;
    margin-top: 0.25rem;
    border-radius: var(--radius);
    border: none;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-primary);
    background: transparent;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-unlock-cta:hover {
    background: rgba(52, 211, 153, 0.08);
}

.sidebar-unlock-cta svg {
    width: 12px;
    height: 12px;
}

/* shared course unlock modal */
.courses-unlock-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop, 999);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.courses-unlock-modal.is-visible {
    opacity: 1;
}

.courses-unlock-card {
    max-width: 420px;
    width: 100%;
    padding: 32px 28px;
    border-radius: 20px;
    background: var(--bg-primary, #0a0a0a);
    border: 1px solid rgba(52, 211, 153, 0.2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.25s ease;
}

.courses-unlock-modal.is-visible .courses-unlock-card {
    transform: scale(1) translateY(0);
}

[data-theme="light"] .courses-unlock-card {
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.courses-unlock-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent, #34d399);
    margin-bottom: 14px;
}

.courses-unlock-card-icon svg {
    width: 24px;
    height: 24px;
}

.courses-unlock-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.courses-unlock-card p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.courses-unlock-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.courses-unlock-card-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #000;
    background: var(--accent, #34d399);
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.courses-unlock-card-confirm:hover {
    opacity: 0.9;
}

.courses-unlock-card-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.courses-unlock-card-confirm svg {
    width: 16px;
    height: 16px;
}

.courses-unlock-card-cancel {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #888;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.courses-unlock-card-cancel:hover {
    color: #333;
}

.courses-unlock-card-note {
    font-size: 0.72rem;
    color: #999;
    margin-top: 8px;
    margin-bottom: 0;
}

/* sidebar signup cta for logged-out users */
.sidebar-signup-cta {
    margin-top: auto;
    padding: 0.75rem 0.55rem 0.5rem;
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.06));
    text-align: center;
}

.sidebar-signup-text {
    font-size: 0.72rem;
    color: var(--text-secondary, #a3a3a3);
    margin: 0 0 0.4rem 0;
}

.sidebar-signup-btn {
    display: inline-block;
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius, 8px);
    background: rgba(52, 211, 153, 0.08);
    color: var(--accent, #34d399);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sidebar-signup-btn:hover {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.5);
}

/* dark mode glassmorphism */
html.dark .lesson-sidebar {
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-right-color: rgba(255, 255, 255, 0.07);
}

html.dark .lesson-sidebar:has(.sidebar-panel-collapsed) {
    background: transparent;
    border-right-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.dark .sidebar-toggle {
    background: rgba(24, 24, 28, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .sidebar-unit-tooltip {
    background: rgba(24, 24, 28, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* lesson bottom navigation */

.lesson-nav {
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.lesson-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.lesson-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.82rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-transform: lowercase;
}

.lesson-nav-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.lesson-nav-next {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.lesson-nav-next:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.lesson-nav-next-module {
    background: var(--color-success);
    border-color: var(--color-success);
}

.lesson-nav-next-module:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.lesson-nav-counter {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

/* responsive sidebar + nav */

@media (max-width: 1280px) {
    .learn-layout {
        display: block;
    }

    .lesson-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: var(--z-stepper-panel);
        pointer-events: none;
        min-width: 0;
    }

    /* below the laptop breakpoint, the sidebar becomes a fixed overlay */
    .sidebar-reopen {
        display: flex;
        position: fixed;
        top: 92px;
        left: var(--spacing-xs);
        z-index: var(--z-stepper-nav);
        pointer-events: auto;
        margin: 0;
    }

    /* JS still controls whether the reopen button is visible */
    .sidebar-panel-collapsed~.sidebar-reopen {
        display: flex;
    }

    .sidebar-panel:not(.sidebar-panel-collapsed)~.sidebar-reopen {
        display: none;
    }

    .sidebar-panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        width: 85vw;
        max-width: 320px;
        padding-top: 80px;
        transform: translateX(-100%);
        z-index: var(--z-stepper-backdrop-mobile);
        opacity: 1;
        background: var(--color-surface);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-right: 1px solid var(--glass-border);
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
        overflow: hidden;
    }

    html.dark .sidebar-panel {
        background: rgba(13, 13, 13, 0.95);
    }

    .lesson-sidebar {
        background: transparent;
        border-right: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .sidebar-panel-collapsed {
        width: 85vw;
        max-width: 320px;
        padding: var(--spacing-md) var(--spacing-sm) var(--spacing-lg);
        padding-top: 80px;
        opacity: 1;
        transform: translateX(-100%);
        overflow: hidden;
    }

    .sidebar-panel:not(.sidebar-panel-collapsed) {
        transform: translateX(0);
        overflow-y: auto;
    }

    .sidebar-backdrop {
        display: block;
    }

    body.sidebar-overlay-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-overlay-open .lesson-sidebar {
        pointer-events: auto;
    }

    .sidebar-step-label {
        white-space: normal;
    }

    .lesson-nav-btn span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

}

@media (max-width: 900px) {
    .learn-content {
        padding: var(--spacing-md) var(--spacing-sm);
    }

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

@media (max-width: 480px) {
    .lesson-nav-btn {
        padding: 0.5rem 0.65rem;
        font-size: 0.75rem;
    }

    .lesson-nav-btn span {
        max-width: 80px;
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {

    .sidebar-panel,
    .sidebar-step,
    .sidebar-toggle,
    .sidebar-progress-bar,
    .sidebar-backdrop,
    .sidebar-unit-link {
        transition: none;
    }

    .sidebar-unit-tooltip {
        animation: none;
    }
}

/* tighter footer on learn pages with sidebar */
.learn-page--with-sidebar~.landing-footer {
    margin-top: 0;
    padding-top: 48px;
}

/* course outline — "what this course covers" block on unit 1 index pages */
.course-outline {
    margin-top: 2rem;
    max-width: 820px;
}

.course-outline-grid {
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.course-outline-label {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--color-text);
    margin: 0 0 0.75rem 0;
}

.course-outline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2.5rem;
}

@media (max-width: 600px) {
    .course-outline-grid {
        grid-template-columns: 1fr;
    }
}

.course-outline-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--glass-border);
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.875rem;
    transition: color 0.15s;
}

.course-outline-row:hover {
    color: var(--color-primary);
}

.course-outline-num {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-primary);
    opacity: 0.75;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.course-outline-title {
    flex: 1;
}

.course-outline-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    background: rgba(52, 211, 153, 0.12);
    color: var(--color-primary);
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}

/* paid lock badge for outline rows 2+ */
.course-outline-badge--paid {
    background: rgba(110, 231, 191, 0.08);
    color: var(--color-text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.course-outline-badge--paid svg,
.course-outline-badge--paid i {
    width: 10px;
    height: 10px;
}


/* ===== css/interactive.css ===== */
/* interactive visualization container styles
   extracted from styles.css -- do not duplicate in the source file
   note: SVG content itself is generated in JS, these are container styles only */

/* ============================================== */
/* Interactive areas */
/* ============================================== */

.interactive-area {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.07) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl, 20px);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 16px rgba(255, 255, 255, 0.02);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.interactive-area--course-shell {
    padding: 0;
}

/* top edge highlight */
.interactive-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    pointer-events: none;
}

@media (min-width: 768px) {
    .interactive-area {
        padding: var(--spacing-lg);
    }

    .interactive-area--course-shell {
        padding: 0;
    }
}

.interactive-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    padding: 0.2rem 0.5rem;
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.1);
    border-radius: 4px;
}

@media (min-width: 768px) {
    .interactive-label {
        font-size: 0.75rem;
    }
}

/* dark mode interactive area */
html.dark .interactive-area {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.07) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 0 16px rgba(255, 255, 255, 0.02);
}

/* light mode interactive area */
[data-theme="light"] .interactive-area {
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.01) 50%,
            rgba(0, 0, 0, 0.02) 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* dark mode: boost muted white svg text to full readability */
.interactive-area text[fill^="rgba(255,255,255,"] {
    fill: rgba(255, 255, 255, 0.88);
}

.interactive-area text[fill="#fff"],
.interactive-area text[fill="white"] {
    fill: #fff;
}

/* light mode svg overrides for interactive visualizations */
/* css fill/stroke properties override svg presentation attributes */
[data-theme="light"] .interactive-area text[fill="#fff"],
[data-theme="light"] .interactive-area text[fill="white"] {
    fill: var(--text-primary);
}

[data-theme="light"] .interactive-area text[fill^="rgba(255,255,255,"] {
    fill: var(--text-muted);
}

[data-theme="light"] .interactive-area line[stroke^="rgba(255,255,255,"],
[data-theme="light"] .interactive-area path[stroke^="rgba(255,255,255,"] {
    stroke: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .interactive-area rect[stroke^="rgba(255,255,255,"] {
    stroke: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .interactive-area rect[fill^="rgba(255,255,255,"] {
    fill: rgba(0, 0, 0, 0.04);
}

/* preserve white text inside tooltip overlays (dark bg) */
[data-theme="light"] .interactive-area [id*="tooltip"] text {
    fill: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .interactive-area [id*="tooltip"] text[fill^="rgba(255,255,255,"] {
    fill: rgba(255, 255, 255, 0.7);
}

/* ============================================== */
/* SVG containers */
/* ============================================== */

.svg-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.svg-container svg {
    max-width: 100%;
    height: auto;
}

/* ============================================== */
/* Amino acid explorer */
/* ============================================== */

.aa-explorer {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.aa-group-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}

.aa-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.aa-group-btn:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.aa-group-btn.active {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.08);
    color: var(--color-text);
}

.aa-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aa-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 0.35rem;
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .aa-palette {
        grid-template-columns: repeat(10, 1fr);
    }
}

.aa-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.2rem;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
    min-height: 48px;
}

.aa-tile:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.aa-tile.selected {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.08);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.aa-tile.dimmed {
    opacity: 0.25;
    pointer-events: none;
}

.aa-tile-code {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
}

.aa-tile-name {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

/* amino acid detail panel */
.aa-detail {
    min-height: 80px;
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.aa-detail-placeholder {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    padding: var(--spacing-sm) 0;
}

.aa-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.aa-detail-big {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-mono);
    border: 2.5px solid;
    border-radius: 8px;
    flex-shrink: 0;
}

.aa-detail-names {
    flex: 1;
    min-width: 0;
}

.aa-detail-name {
    font-size: 1rem;
    font-weight: 600;
}

.aa-detail-abbr {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.aa-detail-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.aa-detail-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.35rem;
}

.aa-detail-mw {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.aa-detail-mw strong {
    color: var(--color-text);
}

/* chain builder */
.aa-chain-section {
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.aa-chain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.aa-chain-title {
    font-size: 0.85rem;
    font-weight: 600;
}

.aa-chain-clear {
    font-size: 0.72rem;
}

.aa-chain {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-height: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.aa-chain-placeholder {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
}

.aa-chain-residue {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    background: var(--color-surface);
}

.aa-chain-bond {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    letter-spacing: -2px;
}

.aa-chain-info {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}

.aa-chain-seq {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-primary);
}

/* ============================================== */
/* Bond formation animation */
/* ============================================== */

.bf-svg {
    transition: opacity 0.3s ease;
}

/* chemistry formulas and abbreviations must keep authored case */
.bf-svg text,
.bf-description {
    text-transform: none;
}

.bf-description {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    padding: 0.5rem 0.5rem var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .bf-description {
        font-size: 0.9rem;
    }
}

.bf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.bf-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bf-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
}

.bf-dot-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    transition: all var(--transition);
    background: var(--color-surface);
}

.bf-step-dot.active .bf-dot-inner {
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.bf-step-dot:hover .bf-dot-inner {
    border-color: var(--color-primary);
}

.bf-dot-label {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    transition: color var(--transition);
    white-space: nowrap;
}

.bf-step-dot.active .bf-dot-label {
    color: var(--color-primary);
    font-weight: 600;
}

.bf-prev,
.bf-next {
    min-width: 60px;
}

.bf-prev:disabled,
.bf-next:disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* water release animation */
.bf-water-release {
    animation: bf-float 2s ease-in-out infinite alternate;
}

@keyframes bf-float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(5px, -5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bf-water-release {
        animation: none;
    }
}

/* ============================================== */
/* Folding visualizer */
/* ============================================== */

.fv-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.fv-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.fv-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.35rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-smooth);
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
}

.fv-tab:hover {
    border-color: var(--tab-color, var(--color-primary));
    transform: translateY(-1px);
}

.fv-tab.active {
    border-color: var(--tab-color, var(--color-primary));
    background: color-mix(in srgb, var(--tab-color, var(--color-primary)) 6%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tab-color, var(--color-primary)) 15%, transparent);
}

.fv-tab-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    background: var(--color-disabled-bg);
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    transition: all var(--transition);
}

.fv-tab.active .fv-tab-num {
    background: var(--tab-color, var(--color-primary));
    color: white;
}

.fv-tab-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
}

.fv-tab-sub {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 500px) {
    .fv-tab-sub {
        display: none;
    }
}

/* folding content area */
.fv-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 600px) {
    .fv-content {
        grid-template-columns: 1fr 1fr;
    }
}

.fv-svg-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: var(--spacing-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.fv-desc-area {
    padding: var(--spacing-sm);
}

.fv-detail-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.fv-detail-example {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.5;
    padding: 0.5rem;
    background: var(--color-disabled-bg);
    border-radius: 4px;
}

/* ============================================== */
/* Body diagram interactive */
/* ============================================== */

.body-diagram-container {
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 400px;
    padding: var(--spacing-md) 0;
}

@media (min-width: 768px) {
    .body-diagram-container {
        min-height: 500px;
    }
}

.bd-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    align-items: start;
}

@media (min-width: 600px) {
    .bd-layout {
        grid-template-columns: auto 1fr;
        gap: var(--spacing-md);
    }
}

.bd-svg-wrap {
    display: flex;
    justify-content: center;
}

.bd-silhouette .bd-hotspot {
    transition: opacity var(--transition);
}

.bd-silhouette .bd-hotspot:hover circle,
.bd-silhouette .bd-hotspot.active circle {
    opacity: 0.8;
}

/* pulse animation for hotspot rings */
@keyframes bd-pulse {

    0%,
    100% {
        opacity: 0.2;
        transform-origin: center;
    }

    50% {
        opacity: 0.5;
    }
}

.bd-pulse-ring {
    animation: bd-pulse 2.5s ease-in-out infinite;
}

.bd-hotspot.active .bd-pulse-ring {
    animation: bd-pulse 1.8s ease-in-out infinite;
}

.bd-detail-wrap {
    min-height: 200px;
}

.bd-detail-placeholder {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    padding: var(--spacing-lg) var(--spacing-sm);
    text-transform: lowercase;
}

.bd-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.bd-detail-header h4 {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    text-transform: lowercase;
}

.bd-detail-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bd-detail-count {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.bd-peptide-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bd-peptide-item {
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.bd-peptide-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    text-transform: lowercase;
}

.bd-peptide-role {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    text-transform: lowercase;
}

/* site list for mobile and alternative navigation */
.bd-site-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.bd-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    text-transform: lowercase;
}

.bd-site-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

.bd-site-btn.active {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.08);
    color: var(--color-text);
    font-weight: 600;
}

.bd-site-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================== */
/* Receptor demo interactive */
/* ============================================== */

.rd-description {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    padding: 0.5rem 0.5rem var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .rd-description {
        font-size: 0.9rem;
    }
}

.rd-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.rd-steps {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rd-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
}

.rd-dot-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    transition: all var(--transition);
    background: var(--color-surface);
}

.rd-step-dot.active .rd-dot-inner {
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.rd-step-dot:hover .rd-dot-inner {
    border-color: var(--color-primary);
}

.rd-dot-label {
    font-size: 0.55rem;
    color: var(--color-text-muted);
    transition: color var(--transition);
    white-space: nowrap;
    max-width: 55px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-step-dot.active .rd-dot-label {
    color: var(--color-primary);
    font-weight: 600;
}

@media (max-width: 500px) {
    .rd-dot-label {
        display: none;
    }
}

.rd-prev,
.rd-next {
    min-width: 60px;
}

.rd-prev:disabled,
.rd-next:disabled {
    opacity: 0.35;
    pointer-events: none;
}


/* ===== css/quiz.css ===== */
/* quiz engine styles
   extracted from styles.css -- do not duplicate in the source file */

/* ---- quiz ---- */

.quiz-container {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.quiz-header {
    margin-bottom: var(--spacing-lg);
}

.quiz-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    text-transform: lowercase;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--color-surface);
    border-radius: 3px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-progress-text {
    font-size: 0.8rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.quiz-question-text {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    text-transform: lowercase;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
    text-transform: lowercase;
}

.quiz-option:hover:not(.quiz-option-disabled) {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.06);
}

.quiz-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--color-muted);
}

.quiz-option-text {
    flex: 1;
    line-height: 1.4;
}

.quiz-option-disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-option-correct {
    border-color: var(--color-success) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    opacity: 1 !important;
}

.quiz-option-correct .quiz-option-letter {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}

.quiz-option-incorrect {
    border-color: var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    opacity: 1 !important;
}

.quiz-option-incorrect .quiz-option-letter {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: #fff;
}

.quiz-feedback {
    margin-top: var(--spacing-md);
}

.quiz-feedback-inner {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.5;
}

.quiz-feedback-correct {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.quiz-feedback-incorrect {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.quiz-feedback-icon {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.quiz-feedback-text {
    color: var(--color-text);
    margin: 0;
    text-transform: lowercase;
}

.quiz-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-md);
}

.quiz-next-btn {
    font-size: 0.85rem;
}

/* quiz results */

.quiz-results {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.quiz-results-icon {
    margin-bottom: var(--spacing-md);
}

.quiz-results-pass {
    color: var(--color-success);
}

.quiz-results-fail {
    color: var(--color-warning);
}

.quiz-results-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    text-transform: lowercase;
}

.quiz-score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    margin-bottom: 0.25rem;
}

.quiz-score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.quiz-score-divider {
    font-size: 1.5rem;
    color: var(--color-muted);
}

.quiz-score-total {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-muted);
}

.quiz-score-percent {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: var(--spacing-sm);
}

.quiz-score-message {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

.quiz-results-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.quiz-retry-btn {
    font-size: 0.85rem;
}

/* post-quiz upsell */
.quiz-next-steps {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    text-align: center;
}

.quiz-next-steps-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    margin-bottom: var(--spacing-sm);
}

.quiz-next-steps-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.quiz-next-step-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent, #34d39e);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.quiz-next-step-link:hover {
    opacity: 0.8;
}


/* ===== css/exercises.css ===== */
/* exercise engine styles (drag-to-order, fill-in-blank, matching)
   extracted from styles.css -- do not duplicate in the source file */

/* ===== exercises ===== */
.exercise-container {
    max-width: 700px;
    margin: 0 auto;
}

.exercise-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.exercise-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
}

.exercise-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.exercise-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
}

.exercise-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.exercise-progress-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.exercise-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--color-primary);
    color: #fff;
}

.exercise-question {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.fill-blank-inline {
    display: inline-block;
    min-width: 80px;
    border-bottom: 2px dashed var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    text-align: center;
    padding: 0 0.25rem;
}

.exercise-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* drag-to-order */
.drag-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drag-order-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: grab;
    user-select: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
}

.drag-order-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.drag-order-item:active {
    cursor: grabbing;
}

.drag-order-dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.drag-handle {
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.drag-order-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.drag-order-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text);
}

.drag-order-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.drag-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s, color 0.15s;
}

.drag-arrow:hover:not(:disabled) {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.drag-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.exercise-item-correct {
    border-color: var(--color-success) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.exercise-item-incorrect {
    border-color: var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

/* fill-in-the-blank */
.fill-blank-area {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fill-blank-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fill-blank-slot {
    flex: 1;
    min-width: 140px;
}

.fill-blank-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.fill-blank-dropzone {
    min-height: 44px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.fill-blank-dropzone:hover {
    border-color: var(--color-primary);
}

.fill-blank-dropzone-hover {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.06);
}

.fill-blank-placed {
    font-weight: 500;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.exercise-slot-correct {
    border-color: var(--color-success) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.exercise-slot-correct .fill-blank-placed {
    color: var(--color-success);
}

.exercise-slot-incorrect {
    border-color: var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.exercise-slot-incorrect .fill-blank-placed {
    color: var(--color-danger);
    text-decoration: line-through;
}

.fill-blank-correct-answer {
    display: block;
    font-size: 0.75rem;
    color: var(--color-success);
    margin-top: 0.2rem;
    font-weight: 600;
}

.fill-blank-bank {
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.fill-blank-bank-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: lowercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.fill-blank-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fill-blank-word {
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: transparent;
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.fill-blank-word:hover {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.06);
}

.fill-blank-word-selected {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.12);
    color: var(--color-primary);
    font-weight: 500;
}

/* matching */
.matching-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.matching-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: start;
}

.matching-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.matching-lines {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matching-item {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background-color 0.15s;
    line-height: 1.4;
}

.matching-item:hover {
    border-color: var(--color-primary);
}

.matching-item-active {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.12);
    box-shadow: 0 0 0 2px rgba(var(--meadow-400-rgb, 52, 211, 158), 0.22);
}

.matching-item-matched {
    border-color: var(--color-primary);
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.08);
    opacity: 0.8;
}

.matching-pairs-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 32px;
}

.matching-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.matching-pair-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: rgba(var(--meadow-400-rgb, 52, 211, 158), 0.1);
    border: 1px solid rgba(var(--meadow-400-rgb, 52, 211, 158), 0.22);
    font-size: 0.75rem;
    color: var(--color-primary);
}

.matching-pair-chip svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* exercise feedback */
.exercise-feedback {
    margin-top: 1rem;
}

.exercise-feedback-inner {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border-left: 3px solid;
}

.exercise-feedback-correct {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--color-success);
}

.exercise-feedback-incorrect {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--color-danger);
}

.exercise-feedback-icon {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.exercise-feedback-correct .exercise-feedback-icon {
    color: var(--color-success);
}

.exercise-feedback-incorrect .exercise-feedback-icon {
    color: var(--color-danger);
}

.exercise-feedback-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* exercise results */
.exercise-results {
    text-align: center;
    padding: 2rem;
}

.exercise-results-icon {
    margin-bottom: 1rem;
}

.exercise-results-pass { color: var(--color-success); }
.exercise-results-fail { color: var(--color-warning); }

.exercise-results-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.exercise-score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.exercise-score-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.exercise-score-divider {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.exercise-score-total {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.exercise-score-percent {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.exercise-results-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* responsive */
@media (max-width: 480px) {
    .exercise-header {
        gap: 0.5rem;
    }

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

    .matching-lines {
        display: none;
    }

    .matching-column {
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        padding: 0.5rem;
    }

    .drag-order-item {
        padding: 0.5rem 0.65rem;
    }

    .fill-blank-slots {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .drag-order-item,
    .fill-blank-word,
    .matching-item {
        transition: none;
    }
}


/* ===== css/stepper.css ===== */
/* stepper.css
   Compatibility shim: stepper styles are now maintained in learn.css.
   Keep this file so existing HTML imports remain valid without duplicate CSS.
*/


/* ===== css/auth.css ===== */
/* authentication styles extracted from landing.css */
/* includes: nav auth buttons, user menu, auth modal, consent checkboxes */

/* ==========================================================================
   SOURCE: landing.css -- nav auth buttons
   ========================================================================== */

/* nav auth buttons */
.auth-nav-btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
}

.auth-nav-btn--login {
  color: var(--text-secondary);
}

.auth-nav-btn--login:hover {
  color: var(--text-primary);
}

.auth-nav-btn--signup {
  color: var(--accent);
  padding: 6px 16px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
}

.auth-nav-btn--signup:hover {
  background: rgba(52, 211, 153, 0.25);
  border-color: var(--accent);
}

/* ==========================================================================
   SOURCE: landing.css -- user menu
   ========================================================================== */

/* user menu */
.user-menu {
  position: relative;
}

.user-menu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: lowercase;
}

.user-menu-avatar--image {
  padding: 0;
  color: transparent;
  overflow: hidden;
}

.user-menu-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.user-menu-avatar:hover {
  background: rgba(52, 211, 153, 0.25);
  transform: scale(1.05);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.user-menu-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

[data-theme="light"] .user-menu-dropdown {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.75) 100%
  );
  border-color: rgba(0, 0, 0, 0.1);
}

.user-menu-email {
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.user-menu-stats {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-menu-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.user-menu-stat-label {
  color: var(--text-muted);
}

.user-menu-stat-value {
  color: var(--accent);
  font-weight: 600;
}

.user-menu-xp-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.user-menu-xp-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-menu-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ==========================================================================
   SOURCE: landing.css -- auth modal overlay
   ========================================================================== */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.auth-modal-overlay--visible {
  opacity: 1;
  visibility: visible;
}

[data-theme="light"] .auth-modal-overlay {
  background: rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   SOURCE: landing.css -- auth modal card
   ========================================================================== */

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 20px;
  padding: 40px 32px 32px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(8px);
  transition: transform var(--transition-fast);
}

.auth-modal-overlay--visible .auth-modal {
  transform: translateY(0);
}

[data-theme="light"] .auth-modal {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.65) 100%
  );
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.auth-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ==========================================================================
   SOURCE: landing.css -- auth modal tabs
   ========================================================================== */

.auth-modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.auth-modal-tab {
  flex: 1;
  padding: 10px 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.auth-modal-tab:hover {
  color: var(--text-secondary);
}

.auth-modal-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   SOURCE: landing.css -- auth modal form
   ========================================================================== */

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-modal-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.auth-modal-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.auth-modal-input:focus {
  border-color: var(--accent);
}

.auth-modal-input::placeholder {
  color: var(--text-muted);
}

/* ==========================================================================
   SOURCE: landing.css -- forgot password link
   ========================================================================== */

.auth-modal-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 8px;
}

.auth-modal-forgot-link {
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.auth-modal-forgot-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   SOURCE: auth hint text (username field)
   ========================================================================== */

.auth-modal-hint {
  font-size: 0.75rem;
  color: var(--text-muted, rgba(255,255,255,0.45));
  margin-top: 4px;
  line-height: 1.3;
}

.auth-modal-hint--error {
  color: var(--danger, #ef4444);
}

.auth-modal-hint--success {
  color: var(--accent, #4ade80);
}

/* ==========================================================================
   SOURCE: landing.css -- submit button
   ========================================================================== */

.auth-modal-submit {
  width: 100%;
  padding: 11px 20px;
  margin-top: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-contrast);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-modal-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   SOURCE: landing.css -- error message
   ========================================================================== */

.auth-modal-error {
  font-size: 0.82rem;
  color: var(--danger);
  display: none;
  text-align: center;
  line-height: 1.4;
}

/* ==========================================================================
   SOURCE: landing.css -- note
   ========================================================================== */

.auth-modal-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   purchase context banner (shown when signup is triggered from paywall)
   ========================================================================== */

.auth-modal-purchase-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-sm);
}

.auth-modal-purchase-banner svg {
  flex-shrink: 0;
}

/* ==========================================================================
   email confirmation success state
   ========================================================================== */

.auth-modal-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  text-align: center;
}

.auth-modal-confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.auth-modal-confirmation-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-modal-confirmation-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 280px;
}

.auth-modal-confirmation-close {
  margin-top: 8px;
  padding: 9px 24px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-modal-confirmation-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ==========================================================================
   SOURCE: landing.css -- responsive auth
   ========================================================================== */

@media (max-width: 768px) {
  .auth-nav-btn--login,
  .auth-nav-btn--signup {
    font-size: 0.9rem;
  }

  .auth-nav-btn--signup {
    padding: 8px 16px;
  }

  .auth-modal {
    margin: 16px;
    padding: 32px 24px 24px;
  }

  .user-menu-dropdown {
    right: 0;
    max-width: calc(100vw - 32px);
  }
}

/* ==========================================================================
   SOURCE: landing.css -- auth modal consent checkboxes
   ========================================================================== */

.auth-modal-consent {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-modal-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-modal-checkbox a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-modal-checkbox a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   BLOG: first-time signup nudge for logged-out visitors
   ========================================================================== */

.blog-signup-nudge {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  max-width: 360px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 15, 26, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 10px;
  color: #e2e8f0;
}

.blog-signup-nudge__text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.35;
}

.blog-signup-nudge__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-signup-nudge__btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #e2e8f0;
  font-size: 0.76rem;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.blog-signup-nudge__btn--primary {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}

.blog-signup-nudge__close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  .blog-signup-nudge {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal-overlay,
  .auth-modal,
  .auth-modal-input,
  .auth-modal-submit,
  .auth-modal-tab,
  .auth-modal-checkbox,
  .auth-modal-close,
  .auth-modal-forgot-link,
  .blog-signup-nudge {
    transition: none;
  }
}


/* ===== css/gamification.css ===== */
/* gamification styles extracted from styles.css and landing.css */
/* includes: xp bar, xp toast, level toast, streak badge, sound toggle, achievement toast, daily quests */

/* ==========================================================================
   SOURCE: styles.css -- XP bar + toast system
   ========================================================================== */

.xp-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    margin: 0 0.75rem;
}

.xp-bar-level {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-warning);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.xp-bar-level svg {
    color: var(--color-warning);
    flex-shrink: 0;
}

.xp-bar-level-num {
    font-variant-numeric: tabular-nums;
}

.xp-bar-track {
    width: 80px;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.xp-bar-text {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* xp toast */
.xp-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.xp-toast-exit {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.xp-toast-amount {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-success);
}

.xp-toast-reason {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* level up toast */
.level-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-xl, 20px);
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.15), var(--shadow-lg);
    z-index: var(--z-toast-top);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-toast-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-toast-exit {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.level-toast-icon {
    color: var(--color-warning);
    display: flex;
    align-items: center;
    animation: levelPulse 0.6s ease-in-out infinite alternate;
}

.level-toast-text {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--color-warning), var(--color-danger));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes levelPulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .xp-toast,
    .level-toast {
        transition: opacity 0.15s ease;
    }
    .level-toast-icon {
        animation: none;
    }
    .xp-bar-fill {
        transition: none;
    }
}

/* responsive xp bar */
@media (max-width: 768px) {
    .xp-bar-container {
        margin: 0 0.35rem;
    }
    .xp-bar-track {
        width: 50px;
    }
    .xp-bar-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .xp-bar-track {
        width: 36px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- streak badge
   ========================================================================== */

.streak-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-warning);
    margin: 0 0.35rem;
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: default;
}

.streak-badge:hover {
    background: rgba(251, 146, 60, 0.15);
    transform: scale(1.05);
}

.streak-icon {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.streak-icon.streak-active {
    color: var(--color-warning);
    fill: var(--color-warning);
    filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.5));
}

.streak-count {
    line-height: 1;
}

.streak-badge-new {
    animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .streak-badge-new {
        animation: none;
    }
}

@media (max-width: 480px) {
    .streak-badge {
        padding: 0.15rem 0.35rem;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- sound toggle
   ========================================================================== */

.sound-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    padding: 0;
}

.sound-toggle-btn:hover {
    color: var(--color-text);
    background: var(--color-border);
}

@media (max-width: 480px) {
    .sound-toggle-btn {
        width: 28px;
        height: 28px;
    }

    .sound-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- achievement toast
   ========================================================================== */

.achievement-toast {
    position: fixed;
    top: 80px;
    right: -360px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: var(--color-bg-card, #1e1e2e);
    border: 1px solid var(--color-border, rgba(255,255,255,0.08));
    border-left: 3px solid #a855f7;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: var(--z-toast-top);
    max-width: 320px;
    transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-toast-visible {
    right: 20px;
}

.achievement-toast-exit {
    right: -360px;
    opacity: 0;
    transition: right 0.4s ease-in, opacity 0.3s ease;
}

.achievement-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    flex-shrink: 0;
}

.achievement-toast-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    color: #a855f7;
    margin-bottom: 0.1rem;
}

.achievement-toast-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text, #fafafa);
}

.achievement-toast-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted, #94a3b8);
    margin-top: 0.1rem;
}

@media (prefers-reduced-motion: reduce) {
    .achievement-toast {
        transition: none;
    }
    .achievement-toast-visible {
        right: 20px;
    }
    .achievement-toast-exit {
        display: none;
    }
}

@media (max-width: 480px) {
    .achievement-toast {
        top: auto;
        bottom: -120px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .achievement-toast-visible {
        bottom: 20px;
        right: 10px;
    }
    .achievement-toast-exit {
        bottom: -120px;
        right: 10px;
    }
}

/* ==========================================================================
   SOURCE: styles.css -- daily quests
   ========================================================================== */

.quest-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-muted);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: var(--z-modal);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.quest-toggle.quest-toggle-nav {
    position: relative;
    bottom: auto;
    right: auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    z-index: auto;
    flex-shrink: 0;
}

.quest-toggle.quest-toggle-nav:hover {
    color: var(--color-text);
    background: var(--color-border);
    transform: none;
}

.quest-toggle:hover {
    color: var(--color-text);
    background: var(--color-border);
    transform: none;
}

.quest-toggle-active {
    color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.quest-toggle-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-danger, #ef4444);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.quest-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 280px;
    background: var(--color-bg-card, #1e1e2e);
    border: 1px solid var(--color-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: var(--z-modal-backdrop);
    padding: 1rem;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.quest-panel.quest-panel-nav {
    top: 74px;
    right: 24px;
    bottom: auto;
}

.quest-panel-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.quest-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.quest-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text, #fafafa);
    margin: 0;
}

.quest-panel-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.quest-panel-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.quest-item-done {
    opacity: 0.6;
}

.quest-item-done .quest-item-text {
    text-decoration: line-through;
}

.quest-item-check {
    flex-shrink: 0;
    color: var(--color-success, #10b981);
}

.quest-item-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-border, rgba(255,255,255,0.15));
}

.quest-item-content {
    flex: 1;
    min-width: 0;
}

.quest-item-text {
    font-size: 0.78rem;
    color: var(--color-text, #fafafa);
    display: block;
    margin-bottom: 0.25rem;
}

.quest-item-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--color-border, rgba(255,255,255,0.08));
    overflow: hidden;
}

.quest-item-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--color-primary, #6366f1);
    transition: width 0.3s ease;
}

.quest-item-done .quest-item-bar-fill {
    background: var(--color-success, #10b981);
}

.quest-item-progress {
    font-size: 0.68rem;
    color: var(--color-text-muted, #94a3b8);
    flex-shrink: 0;
}

.quest-panel-complete {
    margin-top: 0.75rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success, #10b981);
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .quest-panel {
        transition: none;
    }
}

@media (max-width: 480px) {
    .quest-toggle {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
    .quest-toggle.quest-toggle-nav {
        width: 28px;
        height: 28px;
    }
    .quest-panel {
        bottom: 68px;
        right: 16px;
        left: 16px;
        width: auto;
    }
    .quest-panel.quest-panel-nav {
        top: 70px;
        bottom: auto;
        right: 12px;
        left: 12px;
    }
}

/* ==========================================================================
   SOURCE: landing.css -- XP bar for landing nav
   ========================================================================== */

.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
}

.xp-bar-level {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: #f59e0b;
  font-weight: 600;
  font-size: 0.78rem;
  white-space: nowrap;
}

.xp-bar-level svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.xp-bar-level-num {
  font-variant-numeric: tabular-nums;
}

.xp-bar-track {
  width: 72px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

[data-theme="light"] .xp-bar-track {
  background: rgba(0, 0, 0, 0.08);
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #10b981);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.xp-bar-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* xp toast (shared across both css systems) */
.xp-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--glass-bg, rgba(255,255,255,0.05));
  backdrop-filter: var(--glass-blur, blur(24px));
  -webkit-backdrop-filter: var(--glass-blur, blur(24px));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: var(--z-toast);
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.xp-toast-exit {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.xp-toast-amount {
  font-weight: 700;
  font-size: 0.95rem;
  color: #22c55e;
}

.xp-toast-reason {
  font-size: 0.8rem;
  color: var(--text-muted, #737373);
}

/* level up toast */
.level-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg, rgba(255,255,255,0.05));
  backdrop-filter: var(--glass-blur, blur(24px));
  -webkit-backdrop-filter: var(--glass-blur, blur(24px));
  border: 1px solid #f59e0b;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(249,115,22,0.15), 0 8px 24px rgba(0,0,0,0.5);
  z-index: var(--z-toast-top);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-toast-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.level-toast-exit {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.level-toast-icon {
  color: #f59e0b;
  display: flex;
  align-items: center;
  animation: levelPulse 0.6s ease-in-out infinite alternate;
}

.level-toast-text {
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes levelPulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .xp-toast,
  .level-toast {
    transition: opacity 0.15s ease;
  }
  .level-toast-icon {
    animation: none;
  }
  .xp-bar-fill {
    transition: none;
  }
}

@media (max-width: 768px) {
  .xp-bar-container {
    gap: 0.3rem;
  }
  .xp-bar-track {
    width: 44px;
  }
  .xp-bar-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .xp-bar-track {
    width: 32px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- streak badge
   ========================================================================== */

.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0.35rem;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: default;
}

.streak-badge:hover {
  background: rgba(251, 146, 60, 0.15);
  transform: scale(1.05);
}

.streak-icon {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.streak-icon.streak-active {
  color: #fb923c;
  fill: #fb923c;
  filter: drop-shadow(0 0 3px rgba(251, 146, 60, 0.5));
}

.streak-count {
  line-height: 1;
}

.streak-badge-new {
  animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

[data-theme="light"] .streak-badge {
  background: rgba(251, 146, 60, 0.08);
  border-color: rgba(251, 146, 60, 0.15);
  color: #ea580c;
}

[data-theme="light"] .streak-icon.streak-active {
  color: #ea580c;
  fill: #ea580c;
}

@media (prefers-reduced-motion: reduce) {
  .streak-badge-new {
    animation: none;
  }
}

@media (max-width: 480px) {
  .streak-badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- sound toggle
   ========================================================================== */

.sound-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
  padding: 0;
}

.sound-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .sound-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 480px) {
  .sound-toggle-btn {
    width: 28px;
    height: 28px;
  }

  .sound-toggle-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- achievement toast
   ========================================================================== */

.achievement-toast {
  position: fixed;
  top: 80px;
  right: -360px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid #a855f7;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: var(--z-toast-top);
  max-width: 320px;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.achievement-toast-visible {
  right: 20px;
}

.achievement-toast-exit {
  right: -360px;
  opacity: 0;
  transition: right 0.4s ease-in, opacity 0.3s ease;
}

.achievement-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  flex-shrink: 0;
}

.achievement-toast-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: #a855f7;
  margin-bottom: 0.1rem;
}

.achievement-toast-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.achievement-toast-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

[data-theme="light"] .achievement-toast {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

@media (prefers-reduced-motion: reduce) {
  .achievement-toast {
    transition: none;
  }
  .achievement-toast-visible {
    right: 20px;
  }
  .achievement-toast-exit {
    display: none;
  }
}

@media (max-width: 480px) {
  .achievement-toast {
    top: auto;
    bottom: -120px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  .achievement-toast-visible {
    bottom: 20px;
    right: 10px;
  }
  .achievement-toast-exit {
    bottom: -120px;
    right: 10px;
  }
}

/* ==========================================================================
   SOURCE: landing.css -- daily quests
   ========================================================================== */

.quest-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  z-index: var(--z-modal);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.quest-toggle.quest-toggle-nav {
  position: relative;
  bottom: auto;
  right: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  z-index: auto;
  flex-shrink: 0;
}

.quest-toggle.quest-toggle-nav:hover {
  color: var(--text-primary);
  background: var(--border);
  transform: none;
}

.quest-toggle:hover {
  color: var(--text-primary);
  background: var(--border);
  transform: none;
}

.quest-toggle-active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.quest-toggle-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.quest-panel {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: var(--z-modal-backdrop);
  padding: 1rem;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.quest-panel.quest-panel-nav {
  top: 74px;
  right: 24px;
  bottom: auto;
}

.quest-panel-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.quest-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.quest-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.quest-panel-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.quest-panel-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.quest-item-done {
  opacity: 0.6;
}

.quest-item-done .quest-item-text {
  text-decoration: line-through;
}

.quest-item-check {
  flex-shrink: 0;
  color: #10b981;
}

.quest-item-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

.quest-item-content {
  flex: 1;
  min-width: 0;
}

.quest-item-text {
  font-size: 0.78rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.quest-item-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--glass-border);
  overflow: hidden;
}

.quest-item-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.quest-item-progress {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.quest-panel-complete {
  margin-top: 0.75rem;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 8px;
}

[data-theme="light"] .quest-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

@media (prefers-reduced-motion: reduce) {
  .quest-panel {
    transition: none;
  }
}

@media (max-width: 480px) {
  .quest-toggle {
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }
  .quest-toggle.quest-toggle-nav {
    width: 28px;
    height: 28px;
  }
  .quest-panel {
    bottom: 68px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  .quest-panel.quest-panel-nav {
    top: 70px;
    bottom: auto;
    right: 12px;
    left: 12px;
  }
}

/* ==========================================================================
   signup prompt overlay (post-quiz for logged-out users)
   ========================================================================== */

.signup-prompt-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.signup-prompt-visible {
    opacity: 1;
}

.signup-prompt-exit {
    opacity: 0;
    pointer-events: none;
}

.signup-prompt-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    padding: 2rem 1.75rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.signup-prompt-visible .signup-prompt-card {
    transform: translateY(0) scale(1);
}

.signup-prompt-exit .signup-prompt-card {
    transform: translateY(10px) scale(0.98);
}

.signup-prompt-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0 0 0.5rem 0;
}

.signup-prompt-sub {
    font-size: 0.9rem;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 1.25rem 0;
}

.signup-prompt-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.signup-prompt-bullets li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-primary, #fafafa);
}

.signup-prompt-bullets li svg {
    flex-shrink: 0;
}

.signup-prompt-primary {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    background: var(--accent, #34d399);
    color: #000;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.75rem;
}

.signup-prompt-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.signup-prompt-primary:active {
    transform: translateY(0);
}

.signup-prompt-dismiss {
    display: block;
    width: 100%;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.signup-prompt-dismiss:hover {
    color: var(--text-primary, #fafafa);
}

[data-theme="light"] .signup-prompt-overlay {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .signup-prompt-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .signup-prompt-overlay {
        transition: none;
    }
    .signup-prompt-card {
        transition: none;
    }
}

@media (max-width: 480px) {
    .signup-prompt-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
    .signup-prompt-heading {
        font-size: 1.1rem;
    }
}

/* ===== inline signup CTA banners ===== */

.signup-cta-banner {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    max-width: 560px;
    margin: 2rem auto;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.signup-cta-visible {
    opacity: 1;
    transform: translateY(0);
}

.signup-cta-exit {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.signup-cta-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #fafafa);
    margin: 0 0 0.35rem 0;
}

.signup-cta-sub {
    font-size: 0.88rem;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 1rem 0;
}

.signup-cta-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.signup-cta-bullets li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-primary, #fafafa);
}

.signup-cta-bullets li svg {
    flex-shrink: 0;
}

.signup-cta-btn {
    display: inline-block;
    padding: 0.65rem 1.75rem;
    border: none;
    border-radius: 10px;
    background: var(--accent, #34d399);
    color: #000;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.5rem;
}

.signup-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.signup-cta-btn:active {
    transform: translateY(0);
}

.signup-cta-dismiss {
    display: block;
    width: 100%;
    padding: 0.35rem;
    border: none;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.signup-cta-dismiss:hover {
    color: var(--text-primary, #fafafa);
}

[data-theme="light"] .signup-cta-banner {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .signup-cta-banner {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 480px) {
    .signup-cta-banner {
        padding: 1.25rem 1rem;
        border-radius: 12px;
        margin: 1.5rem 1rem;
    }
    .signup-cta-heading {
        font-size: 1.05rem;
    }
}

/* ===== zigzag progress path ===== */
.progress-path {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.progress-path-track {
  display: flex;
  flex-direction: column;
}

.progress-path-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-path-row-left {
  align-items: flex-start;
  padding-left: 20%;
}

.progress-path-row-right {
  align-items: flex-end;
  padding-right: 20%;
}

.progress-path-connector {
  width: 2px;
  height: 32px;
  background: var(--glass-border);
  margin: 0 auto;
  position: relative;
  left: 24px;
}

.progress-path-row-right .progress-path-connector {
  left: -24px;
}

.progress-path-connector-done {
  background: #10b981;
}

.progress-path-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 320px;
  width: 100%;
}

.progress-path-node:hover {
  transform: translateY(-2px);
}

.progress-path-node-available {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.progress-path-node-available:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
}

.progress-path-node-complete {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  cursor: pointer;
}

.progress-path-node-complete:hover {
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.progress-path-node-locked {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.progress-path-node-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.progress-path-node-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-path-node-available .progress-path-node-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}

.progress-path-node-complete .progress-path-node-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.progress-path-node-locked .progress-path-node-icon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.progress-path-node-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.progress-path-node-num {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.progress-path-node-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-path-node-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.progress-path-node-score {
  font-size: 0.68rem;
  font-weight: 600;
  color: #10b981;
  margin-top: 0.1rem;
}

.progress-path-current-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.progress-path-lock {
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .progress-path-row-left,
  .progress-path-row-right {
    padding-left: 5%;
    padding-right: 5%;
    align-items: center;
  }
  .progress-path-connector {
    left: 0;
  }
  .progress-path-row-right .progress-path-connector {
    left: 0;
  }
  .progress-path-node {
    max-width: none;
  }
}

.progress-path-section {
  padding: 80px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.progress-path-header {
  text-align: center;
  margin-bottom: 40px;
}

[data-theme="light"] .progress-path-node-available {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .progress-path-node-locked {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .progress-path-node-complete {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .progress-path-connector {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .progress-path-node-title {
  color: #1a1a2e;
}

[data-theme="light"] .progress-path-node-num,
[data-theme="light"] .progress-path-node-subtitle {
  color: #64748b;
}

@media (max-width: 768px) {
  .progress-path-section {
    padding: 60px 20px;
  }
}

