/* ============================================================
   YOUPOL — Design System v3
   Dark Retro-Modern: glassmorphism, top navbar, Space Grotesk
   ============================================================ */

/* ==========================================================
   0. DESIGN TOKENS
   ========================================================== */
:root {
    /* ---- Backgrounds ---- */
    --bg:              #0d1117;
    --bg-deep:         #080b12;
    --bg-card:         rgba(22,27,37,0.65);
    --bg-card-solid:   #161b25;
    --bg-card-alt:     rgba(24,29,40,0.7);
    --bg-surface:      #1c2230;
    --bg-elevated:     #232a3a;
    --bg-overlay:      rgba(13, 17, 23, 0.92);

    /* ---- Glass ---- */
    --glass-blur:      16px;
    --glass-bg:        rgba(13,17,23,0.75);
    --border-glass-top: rgba(255,255,255,0.15);

    /* ---- Borders ---- */
    --border:          rgba(255,255,255,0.08);
    --border-light:    rgba(255,255,255,0.12);
    --border-hover:    rgba(255,255,255,0.18);

    /* ---- Text ---- */
    --text:            #cbd5e1;
    --text-muted:      #8892a4;
    --text-dim:        #5c6578;
    --text-faint:      #3d4556;
    --heading:         #eef2f7;

    /* ---- YouTube Red accent (jewel tone) ---- */
    --red:             #dc2626;
    --red-dark:        #b91c1c;
    --red-darker:      #991b1b;
    --red-light:       #ef4444;
    --red-glow:        rgba(220, 38, 38, 0.2);
    --red-soft:        rgba(220, 38, 38, 0.07);
    --red-subtle:      rgba(220, 38, 38, 0.03);

    /* ---- Accent ---- */
    --accent:          var(--red);
    --accent-dark:     var(--red-dark);
    --accent-glow:     var(--red-glow);
    --accent-soft:     var(--red-soft);

    /* ---- Blue ---- */
    --blue:            #3b82f6;
    --blue-dark:       #2563eb;
    --blue-light:      #60a5fa;
    --blue-glow:       rgba(59, 130, 246, 0.2);
    --blue-soft:       rgba(59, 130, 246, 0.07);

    /* ---- Purple ---- */
    --purple:          #8b5cf6;
    --purple-dark:     #7c3aed;
    --purple-light:    #a78bfa;
    --purple-glow:     rgba(139, 92, 246, 0.2);
    --purple-soft:     rgba(139, 92, 246, 0.07);

    /* ---- Semantic ---- */
    --green:           #22c55e;
    --green-soft:      rgba(34, 197, 94, 0.1);
    --orange:          #f59e0b;
    --orange-soft:     rgba(245, 158, 11, 0.1);
    --cyan:            #06b6d4;
    --cyan-soft:       rgba(6, 182, 212, 0.1);
    --rose:            #f43f5e;
    --rose-soft:       rgba(244, 63, 94, 0.1);

    /* ---- Typography ---- */
    --font-heading:    'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body:       'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', monospace;

    --fs-xs:           0.75rem;
    --fs-sm:           0.8125rem;
    --fs-base:         0.9375rem;
    --fs-md:           1rem;
    --fs-lg:           1.125rem;
    --fs-xl:           1.25rem;
    --fs-2xl:          1.5rem;
    --fs-3xl:          2rem;
    --fs-4xl:          2.5rem;
    --fs-5xl:          3.25rem;
    --fs-hero:         clamp(2rem, 4.5vw, 3.5rem);

    --lh-tight:        1.2;
    --lh-snug:         1.35;
    --lh-normal:       1.6;
    --lh-relaxed:      1.8;

    --fw-normal:       400;
    --fw-medium:       500;
    --fw-semibold:     600;
    --fw-bold:         700;
    --fw-black:        800;

    --ls-tight:        -0.02em;
    --ls-normal:       0;
    --ls-wide:         0.04em;
    --ls-wider:        0.08em;
    --ls-widest:       0.12em;

    /* ---- Spacing ---- */
    --space-2xs:       0.125rem;
    --space-xs:        0.25rem;
    --space-sm:        0.5rem;
    --space-md:        1rem;
    --space-lg:        1.5rem;
    --space-xl:        2rem;
    --space-2xl:       3rem;
    --space-3xl:       4rem;
    --space-4xl:       6rem;
    --space-5xl:       8rem;

    /* ---- Radius ---- */
    --radius-xs:       3px;
    --radius-sm:       6px;
    --radius-md:       10px;
    --radius-lg:       16px;
    --radius-xl:       24px;
    --radius-full:     9999px;

    /* ---- Shadows ---- */
    --shadow-sm:       0 2px 8px rgba(0,0,0,0.25);
    --shadow:          0 4px 20px rgba(0,0,0,0.35);
    --shadow-lg:       0 8px 40px rgba(0,0,0,0.45);
    --shadow-xl:       0 16px 60px rgba(0,0,0,0.5);
    --shadow-red:      0 4px 20px var(--red-glow);
    --shadow-lift:     0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(220,38,38,0.08);

    /* ---- Transitions ---- */
    --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);
    --transition:      0.25s var(--ease-in-out);
    --transition-fast: 0.15s var(--ease-in-out);
    --transition-slow: 0.4s var(--ease-out);

    /* ---- Layout ---- */
    --navbar-height:   72px;
    --container-max:   1200px;
    --container-wide:  1400px;
    --container-narrow: 780px;

    /* ---- Z-index ---- */
    --z-base:          1;
    --z-dropdown:      100;
    --z-sticky:        200;
    --z-nav:           1000;
    --z-overlay:       2000;
    --z-modal:         3000;
    --z-grain:         9999;
}


/* ==========================================================
   1. RESET & BASE
   ========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    background: var(--bg);
    color: var(--text);
    line-height: var(--lh-normal);
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: rgba(220, 38, 38, 0.25);
    color: var(--heading);
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-light); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading);
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { margin-bottom: var(--space-md); line-height: var(--lh-relaxed); }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--heading); font-weight: var(--fw-semibold); }
em, i { font-style: italic; }
small { font-size: var(--fs-sm); }

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-surface);
    color: var(--red-light);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
}

pre code { background: none; border: none; padding: 0; color: var(--text); }

ul, ol { padding-left: var(--space-xl); }
li { margin-bottom: var(--space-xs); }
img { max-width: 100%; height: auto; display: block; }
hr { border: none; height: 1px; background: var(--border); margin: var(--space-2xl) 0; }


/* ==========================================================
   2. LAYOUT
   ========================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.main {
    min-height: 100vh;
    padding-top: var(--navbar-height);
    position: relative;
}

/* Global subtle red ambient glow */
.main::before {
    content: '';
    position: fixed;
    top: -120px;
    left: -80px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(220,38,38,0.07), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: ambientGlow 14s ease-in-out infinite;
}
.main::after {
    content: '';
    position: fixed;
    bottom: -100px;
    right: -60px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220,38,38,0.04), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: ambientGlow 18s ease-in-out infinite reverse;
}

@keyframes ambientGlow {
    0%, 100% { opacity: 0.6; transform: translate(0, 0); }
    50%      { opacity: 1; transform: translate(20px, 15px); }
}

/* Don't double up glow on homepage (already has orbs) */
.page-home .main::before,
.page-home .main::after {
    display: none;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }
.uppercase { text-transform: uppercase; letter-spacing: var(--ls-wider); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mt-4 { margin-top: var(--space-3xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.mb-4 { margin-bottom: var(--space-3xl); }
.pt-0 { padding-top: 0; }
.pt-2 { padding-top: var(--space-xl); }
.pt-3 { padding-top: var(--space-2xl); }
.pb-0 { padding-bottom: 0; }
.pb-2 { padding-bottom: var(--space-xl); }
.pb-3 { padding-bottom: var(--space-2xl); }

.highlight { color: var(--accent); }
.text-blue { color: var(--blue); }
.text-purple { color: var(--purple); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

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


/* ==========================================================
   3. ANIMATIONS
   ========================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(30px, -20px) scale(1.05); }
    50%  { transform: translate(-10px, 20px) scale(0.95); }
    75%  { transform: translate(-30px, -10px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes grain {
    0%, 100% { background-position: 0 0; }
    10%  { background-position: -20px -30px; }
    20%  { background-position: -40px 15px; }
    30%  { background-position: 15px -50px; }
    40%  { background-position: -15px 50px; }
    50%  { background-position: -40px 25px; }
    60%  { background-position: 35px 0; }
    70%  { background-position: 0 35px; }
    80%  { background-position: 10px 60px; }
    90%  { background-position: -25px 20px; }
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.03; }
    50%      { opacity: 0.055; }
}

@keyframes ghostDrift1 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    33%  { transform: translate(40px, -30px) rotate(5deg); }
    66%  { transform: translate(-20px, 20px) rotate(-3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes ghostDrift2 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    33%  { transform: translate(-50px, 20px) rotate(-8deg); }
    66%  { transform: translate(30px, -40px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes ghostDrift3 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    33%  { transform: translate(25px, 35px) rotate(6deg); }
    66%  { transform: translate(-40px, -15px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes counterPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.page-enter {
    animation: fadeInUp 0.5s var(--ease-out);
}


/* ==========================================================
   4. SCROLL REVEAL — fadeInUp with stagger
   ========================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.active > *:nth-child(1)  { transition-delay: 0ms; }
.reveal-stagger.active > *:nth-child(2)  { transition-delay: 100ms; }
.reveal-stagger.active > *:nth-child(3)  { transition-delay: 200ms; }
.reveal-stagger.active > *:nth-child(4)  { transition-delay: 300ms; }
.reveal-stagger.active > *:nth-child(5)  { transition-delay: 400ms; }
.reveal-stagger.active > *:nth-child(6)  { transition-delay: 500ms; }
.reveal-stagger.active > *:nth-child(7)  { transition-delay: 600ms; }
.reveal-stagger.active > *:nth-child(8)  { transition-delay: 700ms; }
.reveal-stagger.active > *:nth-child(9)  { transition-delay: 800ms; }
.reveal-stagger.active > *:nth-child(10) { transition-delay: 900ms; }

.reveal-stagger.active > * {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================
   5. NAVBAR — Top glassmorphic (replaces sidebar)
   ========================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    z-index: var(--z-nav);
    transition: transform 0.35s var(--ease-out),
                background 0.35s var(--ease-in-out),
                box-shadow 0.35s var(--ease-in-out);
    animation: slideDown 0.4s var(--ease-out);
}

.navbar--hidden {
    transform: translateY(-100%);
}

.navbar--scrolled {
    background: rgba(13,17,23,0.92);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--heading);
    flex-shrink: 0;
}

.navbar__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.navbar__title {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.navbar__title span {
    color: var(--accent);
}

.navbar__nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0;
}

.navbar__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition),
                background var(--transition);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    font-size: var(--fs-xs);
}

.navbar__link:hover {
    color: var(--heading);
    background: var(--red-soft);
}

.navbar__link--active {
    color: var(--accent);
    background: var(--red-soft);
}

/* Mobile hamburger */
.navbar__toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.navbar__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.navbar__toggle--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle--active span:nth-child(2) { opacity: 0; }
.navbar__toggle--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Language toggle button ---- */
.navbar__lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--border-hover);
    border-radius: var(--radius-sm);
    color: var(--heading);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

.navbar__lang:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 12px var(--red-glow);
}

/* Keep .sidebar classes hidden — they no longer exist */
.sidebar { display: none; }
.mobile-toggle { display: none; }
.sidebar-overlay { display: none; }


/* ==========================================================
   6. FILM GRAIN OVERLAY
   ========================================================== */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-grain);
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    animation: grain 8s steps(10) infinite;
}


/* ==========================================================
   6b. LOGO BACKGROUND WATERMARK
   ========================================================== */
.logo-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.logo-bg__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 1;
    mask-image: radial-gradient(circle, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
}

/* Main centered logo */
.logo-bg__main {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    margin-top: -250px;
    margin-left: -250px;
    opacity: 0.08;
    animation: logoPulse 8s ease-in-out infinite;
    will-change: transform;
}

/* Ghost logos — smaller, scattered, different opacities */
.logo-bg__ghost {
    position: absolute;
    will-change: transform;
}

.logo-bg__ghost--1 {
    width: 200px;
    height: 200px;
    top: 8%;
    right: 8%;
    opacity: 0.028;
    animation: ghostDrift1 20s ease-in-out infinite;
}

.logo-bg__ghost--2 {
    width: 280px;
    height: 280px;
    bottom: 12%;
    left: 5%;
    opacity: 0.032;
    animation: ghostDrift2 25s ease-in-out infinite;
}

.logo-bg__ghost--3 {
    width: 160px;
    height: 160px;
    top: 60%;
    right: 20%;
    opacity: 0.024;
    animation: ghostDrift3 18s ease-in-out infinite;
}

@media (max-width: 768px) {
    .logo-bg__main {
        width: 300px;
        height: 300px;
        margin-top: -150px;
        margin-left: -150px;
    }
    .logo-bg__ghost--1 { width: 120px; height: 120px; }
    .logo-bg__ghost--2 { width: 160px; height: 160px; }
    .logo-bg__ghost--3 { display: none; }
}


/* ==========================================================
   7. HERO
   ========================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl) var(--space-lg);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 40%, rgba(220, 38, 38, 0.06), transparent 60%),
        radial-gradient(ellipse 50% 40% at 75% 60%, rgba(59, 130, 246, 0.04), transparent 50%);
}

.hero__bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to top, var(--bg), transparent);
    z-index: 1;
}

/* Scan lines on hero */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
}

.hero__bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 60% 50% at 40% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 40% 40%, black, transparent);
}

/* Hero orbs */
.hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    mask-image: radial-gradient(circle, black 40%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 70%);
}

.hero__orb--red {
    width: 600px;
    height: 600px;
    top: 5%;
    left: 10%;
    background: radial-gradient(circle, rgba(220,38,38,0.12) 0%, rgba(220,38,38,0.04) 30%, transparent 50%);
    animation: orbFloat 10s ease-in-out infinite;
}

.hero__orb--blue {
    width: 550px;
    height: 550px;
    top: 35%;
    right: 5%;
    background: radial-gradient(circle, rgba(59,130,246,0.09) 0%, rgba(59,130,246,0.03) 30%, transparent 50%);
    animation: orbFloat 12s ease-in-out infinite reverse;
}

.hero__orb--purple {
    width: 500px;
    height: 500px;
    bottom: 5%;
    left: 35%;
    background: radial-gradient(circle, rgba(139,92,246,0.07) 0%, rgba(139,92,246,0.02) 30%, transparent 50%);
    animation: orbFloat 8s ease-in-out infinite;
    animation-delay: -3s;
}

/* Split hero: text left, viz right */
.hero__split {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    max-width: var(--container-wide);
    margin: 0 auto;
    width: 100%;
}

.hero__text {
    max-width: 560px;
}

.hero__kicker {
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) 0.2s forwards;
}

.hero__kicker-text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: var(--radius-full);
    background: var(--red-soft);
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: var(--fw-black);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) 0.35s forwards;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero__title-line { display: block; }

.hero__title-accent {
    color: var(--accent);
}

.hero__subtitle {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) 0.5s forwards;
    line-height: var(--lh-snug);
}

.hero__description {
    font-size: var(--fs-base);
    color: var(--text-dim);
    margin-bottom: var(--space-2xl);
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) 0.6s forwards;
    line-height: var(--lh-relaxed);
}

/* Hero data panel (replaces watermark logo) */
.hero__viz {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.7s var(--ease-out) 0.7s forwards;
}

.hero__data-panel {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.hero__data-panel-title {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: var(--ls-widest);
    color: var(--accent);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.hero__data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.hero__data-item {
    text-align: center;
    padding: var(--space-md);
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.04);
    transition: border-color var(--transition), transform var(--transition);
}

.hero__data-item:hover {
    border-color: rgba(220,38,38,0.2);
    transform: translateY(-2px);
}

.hero__data-number {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xl);
    color: var(--heading);
    line-height: 1;
    margin-bottom: var(--space-2xs);
}

.hero__data-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

/* Legacy: hide old watermark */
.hero__logo-watermark {
    display: none;
}

/* ---- Short hero for inner pages ---- */
.hero--short {
    min-height: auto;
    padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
}

.hero--short .hero__content {
    text-align: left;
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* Translucent hero — lets watermark logos bleed through */
.hero--translucent .hero__bg::after {
    background: linear-gradient(to top, var(--bg), transparent);
    opacity: 0.5;
}
.hero--translucent::after {
    opacity: 0.3;
}


/* ==========================================================
   8. STATS — Glass cards
   ========================================================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.8s forwards;
}

.stats-bar__item {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.stats-bar__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
}

.stats-bar__number {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xl);
    color: var(--heading);
    line-height: 1;
    margin-bottom: var(--space-2xs);
}

.stats-bar__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

/* Legacy stat cards (database page) */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.stats-grid > .stat-card {
    flex: 0 0 calc((100% - 3 * var(--space-md)) / 4);
}

@media (max-width: 900px) {
    .stats-grid > .stat-card {
        flex: 0 0 calc((100% - 2 * var(--space-md)) / 3);
    }
}

@media (max-width: 600px) {
    .stats-grid > .stat-card {
        flex: 0 0 calc((100% - var(--space-md)) / 2);
    }
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
}

.stat-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.stat-card__number {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: clamp(0.95rem, 1.8vw, 1.4rem);
    color: var(--heading);
    margin-bottom: var(--space-2xs);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card__label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
}

.glow-border {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--red-glow);
}


/* ==========================================================
   9. BUTTONS — Scale + glow on hover
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--red-glow);
}
.btn--primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px var(--red-glow);
}

.btn--secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-light);
}
.btn--secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--red-soft);
    transform: translateY(-2px) scale(1.02);
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
    padding: 10px 20px;
}
.btn--ghost:hover {
    color: var(--accent);
    background: var(--red-soft);
    transform: translateY(-2px) scale(1.02);
}

.btn--sm { padding: 8px 16px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 40px; font-size: var(--fs-md); border-radius: var(--radius-md); }

.cta-container { margin-top: var(--space-xl); }
.cta-primary { margin-bottom: var(--space-lg); }
.cta-secondary { display: flex; gap: var(--space-md); flex-wrap: wrap; }


/* ==========================================================
   10. SECTIONS
   ========================================================== */
.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section--alt {
    background: rgba(22,27,37,0.4);
}

.section--dark {
    background: var(--bg-deep);
}

.section__header {
    text-align: left;
    max-width: 640px;
    margin-bottom: var(--space-2xl);
    padding-left: var(--space-lg);
    border-left: 3px solid var(--accent);
}

.section__overline {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.section__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: var(--space-sm);
    line-height: var(--lh-tight);
}

.section__subtitle,
.section__description {
    font-size: var(--fs-base);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
    max-width: 600px;
}

/* -----------------------------------------------------------
   10b. PAGE-SPECIFIC SECTION HEADERS
   Each interior page gets a unique centered header style.
   ----------------------------------------------------------- */

/* Shared: center all non-home page headers */
.page-database .section__header,
.page-about .section__header,
.page-analysis .section__header,
.page-contact .section__header {
    text-align: center;
    border-left: none;
    padding-left: 0;
    max-width: none;
    position: relative;
}

.page-database .section__description,
.page-about .section__description,
.page-analysis .section__description,
.page-contact .section__description {
    margin-left: auto;
    margin-right: auto;
}

/* Database — thin red underline below header block */
.page-database .section__header::after {
    content: '';
    display: block;
    width: 56px;
    height: 2px;
    background: var(--accent);
    margin: var(--space-md) auto 0;
    border-radius: 1px;
}

/* About / Pipeline — small rotated diamond accent above overline */
.page-about .section__header::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
    margin: 0 auto var(--space-sm);
    opacity: 0.8;
}

/* Analysis — gradient fade underline (wider, thinner) */
.page-analysis .section__header::after {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: var(--space-md) auto 0;
}

/* Contact — short thick accent bar above */
.page-contact .section__header::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    margin: 0 auto var(--space-md);
}

/* -----------------------------------------------------------
   10c. SCROLL INDICATOR — Subtle mouse icon (all pages)
   ----------------------------------------------------------- */
/* Scroll-down cue */
.scroll-cue {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.scroll-cue--visible {
    opacity: 1;
}
.scroll-cue--dim {
    opacity: 0.15 !important;
    transition: opacity 0.2s ease;
}

.scroll-cue__track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    color: var(--text-dim);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.08));
}

.scroll-cue__chevron {
    opacity: 0.45;
    animation: scrollCueBounce 2s ease-in-out infinite;
}
.scroll-cue__chevron--2 {
    margin-top: -10px;
    opacity: 0.22;
    animation-delay: 0.18s;
}

@keyframes scrollCueBounce {
    0%, 100% { transform: translateY(0); opacity: 0.45; }
    50%      { transform: translateY(6px); opacity: 0.7; }
}
.scroll-cue__chevron--2 {
    animation-name: scrollCueBounce2;
}
@keyframes scrollCueBounce2 {
    0%, 100% { transform: translateY(0); opacity: 0.22; }
    50%      { transform: translateY(6px); opacity: 0.4; }
}


/* ==========================================================
   11. FEATURE CARDS — Glassmorphism + hover lift
   ========================================================== */
.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-card {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition),
                background var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
    background: var(--bg-card-alt);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red-soft);
    border-radius: var(--radius-sm);
    color: var(--accent);
    flex-shrink: 0;
}
.feature-card__icon svg { width: 22px; height: 22px; }

.feature-card__body { flex: 1; min-width: 0; }

.feature-card__title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-xs);
}

.feature-card__text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.features-grid--2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}


/* ==========================================================
   12. SPECTRUM — Horizontal bars
   ========================================================== */
.spectrum-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 700px;
}

.spectrum-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.spectrum-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.2);
}

.spectrum-item__label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text);
    min-width: 140px;
    flex-shrink: 0;
}

.spectrum-item__bar-wrap {
    flex: 1;
    height: 24px;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.spectrum-item__bar {
    height: 100%;
    border-radius: var(--radius-xs);
    width: var(--pct);
    transition: width 0.6s var(--ease-out);
}

.spectrum-item__count {
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    color: var(--heading);
    min-width: 60px;
    text-align: right;
}

/* Colors */
.spectrum-item--far-right .spectrum-item__bar { background: #ef4444; }
.spectrum-item--far-right-qc .spectrum-item__bar { background: #f87171; }
.spectrum-item--left .spectrum-item__bar { background: #3b82f6; }
.spectrum-item--masc .spectrum-item__bar { background: #a855f7; }
.spectrum-item--comp .spectrum-item__bar { background: #f59e0b; }

/* Spectrum cards */
.spectrum-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 700px;
}

.spectrum-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.spectrum-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.2);
}

.spectrum-card__count {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-lg);
    color: var(--heading);
    min-width: 80px;
}

.spectrum-card__label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    flex: 1;
}

.spectrum-card__bar {
    width: 200px;
    height: 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    overflow: hidden;
    position: relative;
}

.spectrum-card__bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--pct);
    border-radius: var(--radius-xs);
    transition: width 0.6s var(--ease-out);
}

.spectrum-card--far-right .spectrum-card__bar::after { background: #ef4444; }
.spectrum-card--far-right-qc .spectrum-card__bar::after { background: #f87171; }
.spectrum-card--left .spectrum-card__bar::after { background: #3b82f6; }
.spectrum-card--masc .spectrum-card__bar::after { background: #a855f7; }
.spectrum-card--comp .spectrum-card__bar::after { background: #f59e0b; }


/* ==========================================================
   12b. HOME — About section (narrative + stats)
   ========================================================== */
.home-about {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
    margin-bottom: var(--space-4xl);
}

.home-about__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.home-about__lead {
    font-size: var(--fs-lg);
    color: var(--text);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-md);
}

.home-about__body {
    font-size: var(--fs-base);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
}

.home-about__numbers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-self: center;
}

.home-about__stat {
    padding: var(--space-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.home-about__stat:hover {
    transform: translateY(-4px);
    border-color: rgba(220,38,38,0.25);
    box-shadow: var(--shadow-lift);
}

.home-about__stat-num {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--accent);
    line-height: 1;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
}

.home-about__stat-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-dim);
    font-weight: var(--fw-medium);
}

/* ---- Home Pillars (3 columns: Collect, Annotate, Analyze) ---- */
.home-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.home-pillar {
    position: relative;
    padding: var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    transition: transform 0.4s var(--ease-out),
                box-shadow 0.4s var(--ease-out),
                border-color 0.4s var(--ease-out);
}

.home-pillar:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 30px rgba(220,38,38,0.06);
    border-color: rgba(220,38,38,0.3);
}

.home-pillar__step {
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: rgba(220,38,38,0.18);
    line-height: 1;
    margin-bottom: var(--space-sm);
    user-select: none;
    transition: color 0.4s var(--ease-out);
}

.home-pillar:hover .home-pillar__step {
    color: rgba(220,38,38,0.35);
}

.home-pillar__title {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.home-pillar__desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-md);
}

.home-pillar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.home-pillar__tags span {
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: var(--fw-medium);
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(220,38,38,0.12);
    border-radius: 4px;
    letter-spacing: 0.3px;
}


/* ==========================================================
   12c. HOME — Spectrum section (side-by-side)
   ========================================================== */
.home-spectrum {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-3xl);
    align-items: start;
}

.home-spectrum__title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-md);
    color: var(--heading);
    letter-spacing: -0.02em;
}

.home-spectrum__desc {
    font-size: var(--fs-base);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
}

.home-spectrum__bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Responsive: home sections */
@media (max-width: 1024px) {
    .home-about { grid-template-columns: 1fr; gap: var(--space-xl); }
    .home-pillars { grid-template-columns: 1fr; }
    .home-spectrum { grid-template-columns: 1fr; gap: var(--space-xl); }
}

@media (max-width: 640px) {
    .home-about__numbers { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
    .home-about__stat { padding: var(--space-md); }
}


/* ==========================================================
   12c. SPECTRUM BARS — Animated horizontal bars (home)
   ========================================================== */
.spectrum-bars {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.spectrum-bar {
    position: relative;
}

.spectrum-bar__head {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.spectrum-bar__count {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xl);
    color: var(--heading);
    min-width: 90px;
    letter-spacing: -0.02em;
}

.spectrum-bar__label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
    flex: 1;
}

.spectrum-bar__pct {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-dim);
    letter-spacing: var(--ls-wide);
}

.spectrum-bar__track {
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.spectrum-bar__fill {
    height: 100%;
    width: 0;
    border-radius: var(--radius-full);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Animate when visible */
.spectrum-bars--animate .spectrum-bar__fill {
    width: var(--target);
}

/* Stagger delays */
.spectrum-bars--animate .spectrum-bar:nth-child(1) .spectrum-bar__fill { transition-delay: 0ms; }
.spectrum-bars--animate .spectrum-bar:nth-child(2) .spectrum-bar__fill { transition-delay: 150ms; }
.spectrum-bars--animate .spectrum-bar:nth-child(3) .spectrum-bar__fill { transition-delay: 300ms; }
.spectrum-bars--animate .spectrum-bar:nth-child(4) .spectrum-bar__fill { transition-delay: 450ms; }
.spectrum-bars--animate .spectrum-bar:nth-child(5) .spectrum-bar__fill { transition-delay: 600ms; }

/* Colors with gradient */
.spectrum-bar__fill--red { background: linear-gradient(90deg, #dc2626, #ef4444); box-shadow: 0 0 12px rgba(239,68,68,0.3); }
.spectrum-bar__fill--rose { background: linear-gradient(90deg, #e11d48, #fb7185); box-shadow: 0 0 12px rgba(251,113,133,0.3); }
.spectrum-bar__fill--blue { background: linear-gradient(90deg, #2563eb, #60a5fa); box-shadow: 0 0 12px rgba(96,165,250,0.3); }
.spectrum-bar__fill--purple { background: linear-gradient(90deg, #7c3aed, #a78bfa); box-shadow: 0 0 12px rgba(167,139,250,0.3); }
.spectrum-bar__fill--orange { background: linear-gradient(90deg, #d97706, #fbbf24); box-shadow: 0 0 12px rgba(251,191,36,0.3); }


/* ==========================================================
   13. CHART CONTAINERS — Glassmorphism
   ========================================================== */
.chart-section { margin-bottom: var(--space-2xl); }

.chart-container {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    min-height: 440px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.chart-container:hover {
    border-color: rgba(220,38,38,0.2);
}

.chart-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
    color: var(--heading);
}

.chart-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: var(--space-lg);
}


/* ==========================================================
   14. TAB NAVIGATION
   ========================================================== */
.vtabs {
    display: flex;
    gap: var(--space-xl);
}

.vtabs__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 180px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding-right: var(--space-md);
}

.vtabs__btn {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    background: none;
    border: none;
    border-right: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
    transition: color var(--transition), background var(--transition), border-color var(--transition);
    white-space: nowrap;
    margin-right: -1px;
}

.vtabs__btn:hover {
    color: var(--heading);
    background: var(--red-soft);
}

.vtabs__btn--active {
    color: var(--accent);
    background: var(--red-soft);
    border-right-color: var(--accent);
}

.vtabs__content {
    flex: 1;
    min-width: 0;
}

/* Horizontal tabs (analysis) */
.tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--heading); background: var(--red-soft); }
.tab--active { color: var(--accent); border-bottom-color: var(--accent); }

/* Tab-nav from database */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-sm);
    overflow-x: auto;
}

.tab-nav__btn {
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}

.tab-nav__btn:hover {
    color: var(--heading);
    background: var(--accent-soft);
}

.tab-nav__btn--active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.tab-panel { display: none; }
.tab-panel--active { display: block; animation: fadeInUp 0.4s var(--ease-out); }


/* ==========================================================
   15. TEAM CARDS — Glassmorphism + hover lift
   ========================================================== */
.team-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
}

.team-card {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition),
                background var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
    background: var(--bg-card-alt);
}

.team-card__photo-wrap {
    flex-shrink: 0;
}

.team-card__photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    transition: border-color var(--transition);
}

.team-card:hover .team-card__photo {
    border-color: var(--accent);
}

.team-card__info { flex: 1; min-width: 0; }

.team-card__name {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--heading);
    margin-bottom: var(--space-xs);
}

.team-card__role {
    font-size: var(--fs-sm);
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.team-card__affiliation {
    font-size: var(--fs-sm);
    color: var(--text-dim);
    margin-bottom: var(--space-sm);
}

.team-card__description {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.team-card__links {
    display: flex;
    gap: var(--space-md);
}

.team-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    transition: color var(--transition);
}

.team-card__link:hover { color: var(--accent); }
.team-card__link svg { width: 16px; height: 16px; }

/* Legacy team-grid */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
}

/* Team duo — side-by-side principal investigators */
.team-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    max-width: 900px;
    margin: 0 auto;
}
.team-duo__card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 400px;
    justify-self: center;
}

.team-duo__card {
    text-align: center;
    background: rgba(22,27,37,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-top: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3xl) var(--space-xl);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition),
                background var(--transition);
}

.team-duo__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 24px rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.35);
    background: rgba(28,33,45,0.92);
}

.team-duo__photo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.team-duo__photo {
    display: block;
    width: 130px;
    height: 130px;
    max-width: 130px;
    max-height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 0 6px rgba(220,38,38,0.12), 0 4px 16px rgba(0,0,0,0.3);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.team-duo__card:hover .team-duo__photo {
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(220,38,38,0.25), 0 4px 20px rgba(0,0,0,0.4);
    transform: scale(1.05);
}

.team-duo__name {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--heading);
    margin-bottom: var(--space-xs);
}

.team-duo__badge {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.15em 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-xs);
}

.team-duo__role {
    font-size: var(--fs-sm);
    color: var(--accent);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.team-duo__affiliation {
    font-size: var(--fs-sm);
    color: var(--text-dim);
    margin-bottom: var(--space-md);
}

.team-duo__description {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.team-duo__links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.team-duo__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    transition: color var(--transition);
}

.team-duo__link:hover { color: var(--accent); }
.team-duo__link svg { width: 16px; height: 16px; }


/* ==========================================================
   16. CONTACT FORM
   ========================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-info__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-lg);
}

.contact-info__text {
    font-size: var(--fs-lg);
    color: var(--text);
    margin-bottom: var(--space-xl);
    line-height: var(--lh-relaxed);
}

.contact-info__cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-info__card {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    padding: var(--space-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.contact-info__card:hover {
    transform: translateY(-3px);
    border-color: rgba(220,38,38,0.25);
    box-shadow: var(--shadow-lift);
}

.contact-info__card svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.contact-info__card a {
    color: var(--text-muted);
    transition: color var(--transition);
}
.contact-info__card a:hover { color: var(--accent); }

/* Legacy item selectors kept for compatibility */
.contact-info__item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.contact-info__item svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}
.contact-info__item a {
    color: var(--text-muted);
}
.contact-info__item a:hover { color: var(--accent); }

.contact-form__group {
    margin-bottom: var(--space-lg);
}

.contact-form__label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.contact-form__input,
.contact-form__textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
    color: var(--text-faint);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--red-soft);
}

.contact-form__textarea {
    min-height: 150px;
    resize: vertical;
    line-height: var(--lh-relaxed);
}

.contact-form__submit {
    width: 100%;
}

.contact-form__status {
    text-align: center;
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
}

.contact-form__status--success {
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.contact-form__status--error {
    color: var(--accent);
    background: var(--red-soft);
    border: 1px solid rgba(220, 38, 38, 0.2);
}


/* ==========================================================
   17. FOOTER — Glassmorphism
   ========================================================== */
.footer {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--heading);
    margin-bottom: var(--space-md);
}

.footer__logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.footer__text {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
    color: var(--text-muted);
}

.footer__desc {
    font-size: var(--fs-sm);
    color: var(--text-dim);
    line-height: var(--lh-relaxed);
    max-width: 280px;
}

.footer__col-title {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--heading);
    margin-bottom: var(--space-md);
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 0;
}

.footer__link {
    font-size: var(--fs-sm);
    color: var(--text-dim);
    transition: color var(--transition);
}

.footer__link:hover { color: var(--accent); }

.footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--space-lg);
}

.footer__copyright {
    font-size: var(--fs-xs);
    color: var(--text-faint);
    text-align: center;
}


/* ==========================================================
   18. BADGES
   ========================================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.badge--far_right { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge--left      { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge--masc      { background: rgba(168,85,247,0.15); color: #a855f7; }
.badge--comp      { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge--fr        { background: rgba(59,130,246,0.1);  color: #60a5fa; }
.badge--qc        { background: rgba(239,68,68,0.1);   color: #f87171; }


/* ==========================================================
   19. DATA TABLES
   ========================================================== */
.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th {
    background: var(--bg-surface);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: var(--red-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }


/* ==========================================================
   20. CHANNEL CARDS — Glassmorphism
   ========================================================== */
.channel-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.channel-filters__btn {
    padding: 6px 16px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
}

.channel-filters__btn:hover,
.channel-filters__btn--active {
    color: var(--heading);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.channel-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition),
                background var(--transition);
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
    background: var(--bg-card-alt);
}

.channel-card__name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.channel-card__badges {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.channel-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

.channel-card__stat {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.channel-card__stat strong {
    color: var(--heading);
    font-weight: 600;
}


/* ==========================================================
   21. SCHEMA TABLES
   ========================================================== */
.schema-section { margin-bottom: var(--space-xl); }

.schema-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.schema-section__title span {
    font-family: var(--font-mono);
    color: var(--accent);
}

.schema-section__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-bottom: var(--space-md);
}

.schema-table th,
.schema-table td {
    padding: 8px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.schema-table th {
    background: var(--bg-surface);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.schema-table td { color: var(--text); }

.schema-table td:first-child {
    font-family: var(--font-mono);
    color: var(--heading);
    font-size: 0.8rem;
}

.schema-table td:nth-child(2) {
    font-family: var(--font-mono);
    color: var(--text-dim);
    font-size: 0.78rem;
}

.schema-table .table-mono {
    font-family: var(--font-mono);
    color: var(--accent);
}

.schema-table tbody tr { transition: background var(--transition); }
.schema-table tbody tr:hover { background: var(--accent-soft); }

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}


/* ==========================================================
   22. PIPELINE TIMELINE
   ========================================================== */
.pipeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.pipeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent) 5%, var(--accent) 95%, transparent);
    opacity: 0.2;
    transform: translateX(-50%);
}

.pipeline__step {
    position: relative;
    display: flex;
    margin-bottom: var(--space-2xl);
}

.pipeline__step:last-child { margin-bottom: 0; }

.pipeline__step:nth-child(odd) {
    justify-content: flex-start;
    padding-right: calc(50% + 40px);
}

.pipeline__step:nth-child(even) {
    justify-content: flex-end;
    padding-left: calc(50% + 40px);
}

.pipeline__step-number {
    position: absolute;
    left: 50%;
    top: 0;
    width: 40px;
    height: 40px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: background var(--transition), box-shadow var(--transition);
}

.pipeline__step:hover .pipeline__step-number {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 24px var(--accent-glow);
}

.pipeline__step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.pipeline__step-content {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.pipeline__step-content:hover {
    border-color: rgba(220,38,38,0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

.pipeline__step-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}
.pipeline__step-content p:last-child { margin-bottom: 0; }

.pipeline__tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.pipeline__tool-tag {
    display: inline-block;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(220,38,38,0.15);
    border-radius: 4px;
}


/* ==========================================================
   23. INFRASTRUCTURE CARDS — Glassmorphism
   ========================================================== */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.infra-card {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition),
                background var(--transition);
}

.infra-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
    background: var(--bg-card-alt);
}

.infra-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    color: var(--accent);
    flex-shrink: 0;
}
.infra-card__icon svg { width: 22px; height: 22px; }

.infra-card__body { flex: 1; min-width: 0; }

.infra-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.infra-card__text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}


/* ==========================================================
   24. ANNOTATION GROUPS — Glassmorphism
   ========================================================== */
.annotation-group {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.annotation-group:hover {
    border-color: rgba(220,38,38,0.2);
}

.annotation-group__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.annotation-group__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border-radius: 4px;
}

.annotation-group__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
}

.annotation-group__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.annotation-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.annotation-sub {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
}

.annotation-sub__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.annotation-sub__list { list-style: none; }

.annotation-sub__item {
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.annotation-sub__item:last-child { border-bottom: none; }

.annotation-flat-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-sm);
}

.annotation-flat-list li {
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
}


/* ==========================================================
   25. ABOUT / PROSE
   ========================================================== */
.about-prose {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: var(--fs-base);
    color: var(--text);
    line-height: var(--lh-relaxed);
}

.about-prose p { margin-bottom: var(--space-lg); }
.about-prose p:last-child { margin-bottom: 0; }

.about-prose a { text-decoration: underline; }


/* ==========================================================
   26. CITATION BLOCK — Glassmorphism
   ========================================================== */
.citation-block {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.citation-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.3);
}

.citation-block__text {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
    font-style: italic;
}

.citation-block__copy { flex-shrink: 0; }


/* ==========================================================
   27. MODEL GRID — Glassmorphism
   ========================================================== */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.model-category {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.model-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(220,38,38,0.2);
}

.model-category__title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.model-category__list {
    list-style: none;
    padding: 0;
}

.model-category__item {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-dim);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.model-category__item:last-child { border-bottom: none; }


/* ==========================================================
   27b. ANNOTATIONS TAB
   ========================================================== */

/* ---- Hero ---- */
.anno-hero {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
}

.anno-hero__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--step);
    background: var(--step-bg);
    border: 2px solid var(--step);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px var(--step-glow);
    overflow: hidden;
}
.anno-hero__icon svg { width: 38px !important; height: 38px !important; flex-shrink: 0; }

.anno-hero__badge {
    display: inline-block;
    padding: 4px 16px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--step);
    background: var(--step-bg);
    border: 1px solid var(--step-glow);
    border-radius: 20px;
    margin-bottom: var(--space-md);
    animation: pulseGlow 3s ease-in-out infinite;
}

.anno-hero__title {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.anno-hero__subtitle {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: var(--lh-normal);
}
.anno-hero__subtitle a {
    color: var(--step);
    text-decoration: underline;
}

/* ---- Metrics ---- */
.anno-metrics {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin: var(--space-lg) 0 var(--space-2xl);
}

.anno-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) var(--space-2xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    min-width: 150px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.anno-metric:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.anno-metric::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--step), transparent);
}
.anno-metric__value {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--step);
    margin-bottom: 4px;
}
.anno-metric__label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-align: center;
}

/* ---- Alternating section backgrounds ---- */
.anno-section--alt {
    background: var(--bg-deep);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    margin-top: var(--space-2xl);
}

/* ---- Sentence demo pills ---- */
.anno-demo__pills {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-xl) 0;
    flex-wrap: wrap;
}

.anno-pill {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.anno-pill:hover {
    border-color: var(--step);
    color: var(--step);
    background: var(--step-bg);
}
.anno-pill--active {
    background: var(--step);
    border-color: var(--step);
    color: #fff;
}

/* ---- Sentence demo card ---- */
.anno-demo-card {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-2xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}
.anno-demo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--step), transparent);
}

.anno-demo-card__sentence {
    font-size: var(--fs-xl);
    font-style: italic;
    color: var(--heading);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-sm);
    transition: opacity 0.25s ease;
}

.anno-demo-card__source {
    font-size: var(--fs-xs);
    color: var(--text-dim);
    margin-bottom: 0;
    transition: opacity 0.25s ease;
}

.anno-demo-card__divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-lg) 0;
}

.anno-demo-card__label {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--step);
    margin-bottom: var(--space-md);
}

.anno-demo-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    min-height: 44px;
}

.anno-tag {
    display: inline-flex;
    flex-direction: column;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    border-left: 3px solid var(--tag-color, var(--step));
    background: var(--bg-card-alt);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.anno-tag--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.anno-tag strong {
    font-size: var(--fs-sm);
    color: var(--heading);
    font-weight: var(--fw-semibold);
}
.anno-tag small {
    font-size: var(--fs-xs);
    color: var(--text-dim);
    margin-top: 1px;
}

/* ---- Upcoming analyses cards ---- */
.anno-upcoming {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 740px;
    margin: 0 auto;
}

.anno-upcoming__card {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}
.anno-upcoming__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(255,255,255,0.12);
}

.anno-upcoming__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.anno-upcoming__title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--heading);
    margin-bottom: 4px;
}

.anno-upcoming__text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-relaxed);
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .anno-hero__title { font-size: var(--fs-2xl); }
    .anno-hero__icon { width: 60px; height: 60px; }
    .anno-hero__icon svg { width: 30px; height: 30px; }
    .anno-metrics { flex-direction: column; align-items: center; }
    .anno-metric { width: 100%; max-width: 280px; }
    .anno-section--alt { padding: var(--space-xl) var(--space-md); }
    .anno-demo-card { padding: var(--space-lg); }
    .anno-demo-card__sentence { font-size: var(--fs-lg); }
    .anno-upcoming__card { flex-direction: column; gap: var(--space-sm); }
}


/* ==========================================================
   28. PARTICLES (simplified)
   ========================================================== */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFade 10s linear infinite;
}

@keyframes particleFade {
    0%   { opacity: 0; }
    10%  { opacity: 0.4; }
    90%  { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-60vh); }
}

.particle:nth-child(odd) { background: var(--red-light); }
.particle:nth-child(even) { background: var(--blue-light); width: 3px; height: 3px; }


/* ==========================================================
   29. PIPELINE TREE — Clickable step cards
   ========================================================== */
.pipeline-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.pipeline-tree__connector {
    display: flex;
    justify-content: center;
    height: 32px;
    flex-shrink: 0;
}

.pipeline-tree__card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.pipeline-tree__card:hover {
    border-color: rgba(220,38,38,0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.pipeline-tree__number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading);
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.pipeline-tree__card:hover .pipeline-tree__number {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 24px var(--accent-glow);
}

.pipeline-tree__body {
    flex: 1;
    min-width: 0;
}

.pipeline-tree__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 2px;
}

.pipeline-tree__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.pipeline-tree__arrow {
    flex-shrink: 0;
    color: var(--text-dim);
    transition: transform var(--transition), color var(--transition);
}

.pipeline-tree__card:hover .pipeline-tree__arrow {
    color: var(--accent);
    transform: translateX(4px);
}


/* ==========================================================
   30. PIPELINE DETAIL PAGE
   ========================================================== */

/* ---- Hero ---- */
.pipe-hero {
    text-align: center;
}

.pipe-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: var(--space-lg);
    transition: color var(--transition);
}

.pipe-hero__back:hover { color: var(--accent); }

.pipe-hero__badge {
    display: inline-block;
    padding: 4px 14px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(220,38,38,0.15);
    border-radius: 20px;
    margin-bottom: var(--space-md);
}

.pipe-hero__title {
    font-family: var(--font-heading);
    font-size: var(--fs-4xl);
    font-weight: 700;
    color: var(--heading);
    margin-bottom: var(--space-sm);
}

.pipe-hero__subtitle {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: var(--lh-normal);
}

/* ---- Key Stats ---- */
.pipe-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.pipe-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    min-width: 140px;
}

.pipe-stat__value {
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.pipe-stat__label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ---- Flow Diagram ---- */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.flow-diagram__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    min-width: 160px;
    text-align: center;
}

.flow-diagram__node--input  { border-left: 3px solid var(--blue); }
.flow-diagram__node--process { border-left: 3px solid var(--accent); }
.flow-diagram__node--output  { border-left: 3px solid var(--green); }

.flow-diagram__label {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-diagram__node--input  .flow-diagram__label { color: var(--blue); }
.flow-diagram__node--process .flow-diagram__label { color: var(--accent); }
.flow-diagram__node--output  .flow-diagram__label { color: var(--green); }

.flow-diagram__text {
    font-size: var(--fs-sm);
    color: var(--text);
    line-height: 1.4;
}

.flow-diagram__arrow {
    flex-shrink: 0;
    padding: 0 var(--space-sm);
}

/* ---- How It Works (process steps) ---- */
.pipe-process {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.pipe-process__item {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
}

.pipe-process__marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(220,38,38,0.15);
    border-radius: 50%;
}

.pipe-process__body { flex: 1; min-width: 0; }

.pipe-process__label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 4px;
}

.pipe-process__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- Concrete Example ---- */
.pipe-example {
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-xl);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
}

.pipe-example p {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.8;
    margin: 0;
}

/* ---- Tools ---- */
.pipe-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

/* ---- Prev / Next Navigation ---- */
.pipe-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.pipe-nav__row {
    display: flex;
    width: 100%;
    gap: var(--space-md);
    justify-content: center;
}

.pipe-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    flex: 1;
    max-width: 340px;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
}

.pipe-nav__link:hover {
    border-color: rgba(220,38,38,0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

.pipe-nav__link--next { text-align: right; justify-content: flex-end; }
.pipe-nav__link--only { margin-left: auto; }

.pipe-nav__label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pipe-nav__title {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--heading);
}

.pipe-nav__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color var(--transition), border-color var(--transition);
}

.pipe-nav__back:hover {
    color: var(--accent);
    border-color: rgba(220,38,38,0.3);
}


/* ==========================================================
   31. RESPONSIVE
   ========================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .navbar__nav {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        border-bottom: 1px solid var(--border);
        padding: var(--space-md);
        gap: var(--space-xs);
    }

    .navbar__nav--open {
        display: flex;
    }

    .navbar__toggle {
        display: flex;
    }

    .navbar__lang {
        margin-left: auto;
        margin-right: var(--space-xs);
    }

    .navbar__link {
        padding: 12px 16px;
        width: 100%;
        font-size: var(--fs-sm);
    }

    .hero__split {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .hero__viz { margin-top: var(--space-lg); }
    .hero__data-panel { max-width: 100%; overflow: hidden; padding: var(--space-md); }
    .hero__data-panel-title { font-size: 0.6rem; margin-bottom: var(--space-md); white-space: normal; word-wrap: break-word; }
    .hero__data-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-xs); }
    .hero__data-item { padding: var(--space-sm); }
    .hero__data-number { font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; }
    .hero__data-label { font-size: 0.5rem; white-space: normal; line-height: 1.3; word-wrap: break-word; }

    .pipeline__step:nth-child(odd),
    .pipeline__step:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .pipeline::before {
        left: 22px;
        transform: none;
    }

    .pipeline__step-number {
        left: 2px;
        transform: none;
    }

    .charts-grid,
    .charts-row {
        grid-template-columns: 1fr;
    }

    .team-duo {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

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

    /* Pipeline detail — flow diagram vertical on tablet */
    .flow-diagram {
        flex-direction: column;
        gap: var(--space-md);
    }

    .flow-diagram__arrow {
        transform: rotate(90deg);
        padding: 0;
    }

    .flow-diagram__node {
        width: 100%;
        max-width: 300px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .hero { padding: var(--space-2xl) var(--space-md); }
    .hero--short { padding: var(--space-2xl) var(--space-md) var(--space-xl); }

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

    .section__header {
        padding-left: var(--space-md);
    }

    .team-card {
        flex-direction: column;
        text-align: center;
    }

    .team-card__links { justify-content: center; }

    .infra-card {
        flex-direction: column;
    }

    .feature-card {
        flex-direction: column;
    }

    .vtabs {
        flex-direction: column;
        gap: var(--space-md);
    }

    .vtabs__nav {
        flex-direction: row;
        overflow-x: auto;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: var(--space-sm);
    }

    .vtabs__btn {
        border-right: none;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        margin-right: 0;
        margin-bottom: -1px;
    }

    .vtabs__btn--active {
        border-bottom-color: var(--accent);
        border-right-color: transparent;
    }

    .citation-block {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .pipeline__step:nth-child(odd),
    .pipeline__step:nth-child(even) {
        padding-left: 50px;
    }

    .pipeline__step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .pipeline__step-title { font-size: 1.1rem; }

    .annotation-sub-grid { grid-template-columns: 1fr; }
    .model-grid { grid-template-columns: 1fr; }

    .navbar {
        padding: 0 var(--space-md);
    }

    /* Pipeline tree mobile */
    .pipeline-tree__card {
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-md);
    }

    .pipeline-tree__number {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .pipeline-tree__title { font-size: 1rem; }

    /* Pipeline detail mobile */
    .pipe-hero__title { font-size: var(--fs-2xl); }
    .pipe-hero__subtitle { font-size: var(--fs-base); }

    .pipe-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .pipe-stat { width: 100%; max-width: 280px; }

    .pipe-nav__row {
        flex-direction: column;
    }

    .pipe-nav__link {
        max-width: none;
        justify-content: center;
    }

    .pipe-nav__link--only { margin-left: 0; }
}


/* ============================================================
   EXPLORE TAB — Video search & discovery
   ============================================================ */

/* ---- Search row ---- */
.explore-search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.explore-search-wrap {
    flex: 1;
    position: relative;
    max-width: 720px;
}

.explore-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--text-dim);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

.explore-search-input {
    width: 100%;
    padding: 0.7rem 2.75rem 0.7rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--heading);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.explore-search-input:focus {
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.07);
}

.explore-search-input::placeholder { color: var(--text-dim); }

.explore-search-clear {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s;
}
.explore-search-clear:hover { background: rgba(255,255,255,0.16); }
.explore-search-clear svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.explore-scope-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.explore-scope-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    white-space: nowrap;
}
.explore-scope-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.explore-scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.explore-scope-pill:hover {
    background: rgba(255,255,255,0.05);
    color: var(--heading);
    border-color: var(--border-light);
}
.explore-scope-pill--active {
    background: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.3);
    color: #f87171;
}
.explore-scope-hint {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: italic;
    margin-left: 0.25rem;
}

.explore-sort-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.explore-sort-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-dim);
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}

.explore-sort-select {
    padding: 0.625rem 2rem 0.625rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: var(--font-body);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235c6578' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-color: var(--bg-card);
    transition: border-color 0.15s;
}
.explore-sort-select:focus { border-color: rgba(220,38,38,0.4); }
.explore-sort-select option { background: var(--bg-surface); }

/* ---- Filters panel ---- */
.explore-filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.explore-filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.explore-filter-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    white-space: nowrap;
    min-width: 5rem;
}

.explore-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.explore-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ---- Chips ---- */
.explore-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    font-family: var(--font-body);
    white-space: nowrap;
}
.explore-chip:hover {
    background: rgba(255,255,255,0.05);
    color: var(--heading);
    border-color: var(--border-light);
}

.explore-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Ideas active states */
.explore-chip--far-right.explore-chip--active {
    background: rgba(220,38,38,0.12);
    border-color: rgba(220,38,38,0.4);
    color: #f87171;
}
.explore-chip--left.explore-chip--active {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.4);
    color: #60a5fa;
}
.explore-chip--masc.explore-chip--active {
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.4);
    color: #a78bfa;
}
.explore-chip--comp.explore-chip--active {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.4);
    color: #fbbf24;
}
/* Country active */
.explore-chip--fr.explore-chip--active {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.4);
    color: #60a5fa;
}
.explore-chip--qc.explore-chip--active {
    background: rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.4);
    color: #f87171;
}
/* Gender active (generic) */
.explore-chip--gender-active {
    background: rgba(6,182,212,0.1);
    border-color: rgba(6,182,212,0.4);
    color: var(--cyan);
}

/* Mini selects */
.explore-mini-select {
    padding: 0.3rem 1.5rem 0.3rem 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-body);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%235c6578' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-color: rgba(255,255,255,0.04);
    transition: border-color 0.15s;
}
.explore-mini-select:focus { border-color: rgba(220,38,38,0.4); }
.explore-mini-select option { background: var(--bg-surface); }

.explore-year-wrap, .explore-pol-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.explore-year-sep {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.explore-filter-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.6rem;
    font-weight: 700;
    cursor: help;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* ---- Status bar ---- */
.explore-status {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    min-height: 28px;
}
.explore-status__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.explore-result-count {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Active filter chips */
.explore-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.3rem 0.18rem 0.55rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 500;
}
.active-filter-chip button {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.active-filter-chip button:hover {
    background: rgba(255,255,255,0.18);
    color: var(--heading);
}
.active-filter-chip--far-right { border-color: rgba(220,38,38,0.3); color: #f87171; }
.active-filter-chip--left       { border-color: rgba(59,130,246,0.3); color: #60a5fa; }
.active-filter-chip--masc       { border-color: rgba(139,92,246,0.3); color: #a78bfa; }
.active-filter-chip--comp       { border-color: rgba(245,158,11,0.3); color: #fbbf24; }

.active-filter-clear-all {
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    border: 1px dashed var(--border-light);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.72rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s;
}
.active-filter-clear-all:hover { color: var(--heading); border-color: var(--border-hover); }

/* ---- Breakdown bar ---- */
.explore-breakdown {
    min-width: 180px;
}
.breakdown-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    gap: 1px;
    margin-bottom: 0.5rem;
}
.breakdown-segment { transition: width 0.4s ease; border-radius: 1px; }
.breakdown-legend  { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breakdown-item    { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--text-dim); }
.breakdown-dot     { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* ---- Video card grid ---- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    outline: none;
}
.video-card:hover, .video-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--border-light);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.video-card__thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-surface);
    flex-shrink: 0;
}
.video-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}
.video-card:hover .video-card__thumb { transform: scale(1.04); }

.video-card__duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.video-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.video-card__body {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.video-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.video-card__title mark {
    background: rgba(245,158,11,0.2);
    color: #fbbf24;
    border-radius: 2px;
    padding: 0 1px;
}

.video-card__channel {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.video-card__channel-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge--gender {
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.22);
    color: var(--cyan);
    font-size: 0.62rem;
    padding: 0.05rem 0.35rem;
    border-radius: 20px;
    font-weight: 500;
}

.video-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.4rem;
}
.video-card__stat {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.video-card__stat svg {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}
.video-card__stat--date {
    margin-left: auto;
    color: var(--text-faint);
    font-family: var(--font-body);
    font-size: 0.68rem;
}
.video-card__stat--pol {
    color: #22c55e;
    font-size: 0.68rem;
    font-weight: 600;
}

/* ---- Grid states ---- */
.explore-loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 2rem;
}
.explore-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: exploreSpinAnim 0.7s linear infinite;
}
@keyframes exploreSpinAnim {
    to { transform: rotate(360deg); }
}

.explore-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}
.explore-empty__icon  { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.45; }
.explore-empty__title { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); margin: 0 0 0.4rem; }
.explore-empty__sub   { font-size: 0.875rem; margin: 0; }

.explore-error {
    grid-column: 1 / -1;
    padding: 1.25rem;
    background: rgba(220,38,38,0.07);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.875rem;
}

/* ---- Pagination ---- */
.explore-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.explore-page-info {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-right: 0.5rem;
}
.explore-page-btns {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.explore-page-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-mono);
    min-width: 32px;
    text-align: center;
}
.explore-page-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.06);
    color: var(--heading);
    border-color: var(--border-light);
}
.explore-page-btn:disabled { opacity: 0.3; cursor: default; }
.explore-page-btn--active {
    background: rgba(220,38,38,0.12);
    border-color: rgba(220,38,38,0.35);
    color: #f87171;
}
.explore-page-ellipsis { color: var(--text-dim); padding: 0 0.2rem; font-size: 0.75rem; }

/* ---- Video detail modal ---- */
.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    backdrop-filter: blur(4px);
}
.video-modal-overlay.open { display: block; }

.video-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(840px, 96vw);
    max-height: 92vh;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    z-index: 201;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
}
.video-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.video-modal__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.video-modal__title {
    flex: 1;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.35;
    margin: 0;
}
.video-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.video-modal__close:hover { background: rgba(255,255,255,0.06); color: var(--heading); }
.video-modal__close svg   { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.video-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.video-modal__embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.video-modal__embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-modal__footer {
    padding: 0.875rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Modal meta */
.vmodal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.875rem;
}
.vmodal-meta-item  { display: flex; flex-direction: column; gap: 0.2rem; }
.vmodal-meta-label { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.vmodal-meta-value { font-size: 0.875rem; color: var(--heading); font-weight: 500; }

.vmodal-desc-text {
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
    max-height: 140px;
    overflow-y: auto;
}
.vmodal-tags-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.vmodal-tag {
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-body);
}
.vmodal-tag:hover {
    background: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.3);
    color: #f87171;
}

/* ---- Explore responsive ---- */
@media (max-width: 768px) {
    .explore-search-row { flex-direction: column; align-items: stretch; }
    .explore-search-wrap { max-width: 100%; }
    .explore-scope-row { margin-bottom: 0.75rem; }
    .explore-filter-row  { flex-direction: column; gap: 0.75rem; }
    .video-grid          { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.875rem; }
    .explore-status      { flex-direction: column; }
    .explore-breakdown   { max-width: 100%; min-width: 0; }
    .vmodal-meta-grid    { grid-template-columns: repeat(2, 1fr); }
}
