/* =================================================================
   Prediction Market Efficiency — HKU Capstone 2025–2026
   Stylesheet (dark-first "quant research lab" aesthetic)
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Dark theme (default) */
    --bg: #0B0F1A;
    --bg-alt: #111725;
    --surface: #161D2E;
    --surface-2: #1D2638;
    --border: #26304A;
    --text: #E6EAF2;
    --text-muted: #9AA6BF;
    --accent: #5B8CFF;
    --accent-2: #22D3A7;
    --good: #31C48D;
    --bad: #F26D6D;
    --warn: #F5B454;

    --poly: #5B8CFF;
    --kalshi: #22D3A7;

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;

    --shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.18);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --maxw: 1120px;
    --nav-h: 68px;
}

html[data-theme="light"] {
    --bg: #F7F9FC;
    --bg-alt: #EEF2F8;
    --surface: #FFFFFF;
    --surface-2: #F1F5FB;
    --border: #DCE3EF;
    --text: #12192B;
    --text-muted: #5A6782;
    --accent: #3F6FE0;
    --accent-2: #12B48C;
    --good: #1E9E6A;
    --bad: #DB4A4A;
    --warn: #C98A1E;
    --shadow: 0 8px 30px rgba(20, 30, 60, 0.10);
    --shadow-soft: 0 4px 16px rgba(20, 30, 60, 0.07);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--text-muted); }
.muted-inline { color: var(--text-muted); font-weight: 400; font-size: 0.8em; }
.good-text { color: var(--good); font-weight: 600; }
.bad-text { color: var(--bad); font-weight: 600; }
.poly-text { color: var(--poly); font-weight: 600; }
.kalshi-text { color: var(--kalshi); font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Headings ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.h4 { font-size: 1.08rem; margin-bottom: 0.4rem; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h);
    display: flex; align-items: center;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-soft); }

.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.brand-text { font-size: 1.02rem; letter-spacing: -0.02em; }
.footer-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    position: relative; padding: 8px 12px; border-radius: var(--radius-md);
    font-size: 0.92rem; font-weight: 500; color: var(--text-muted);
    background: none; border: none; cursor: pointer; font-family: var(--font-body);
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--text); background: var(--surface); }
.nav-link .chev { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }

.nav-dropdown { position: relative; }
.nav-dropdown.open .chev { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { padding: 9px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: border-color 0.2s, background 0.2s; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle i { width: 18px; height: 18px; }
.icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-md); cursor: pointer; align-items: center; justify-content: center; }
.hamburger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 90;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column; padding: 24px;
    transform: translateX(100%); transition: transform 0.3s var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { padding: 14px 8px; font-family: var(--font-display); font-size: 1.2rem; border-bottom: 1px solid var(--border); color: var(--text); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.btn i { width: 17px; height: 17px; transition: transform 0.2s var(--ease); }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-primary:hover i { transform: translateX(3px); }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 116px) 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-eyebrow { display: inline-block; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 12px; padding-bottom: 4px; border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--accent), transparent) 1; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-lede { margin-top: 14px; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; padding-top: var(--nav-h); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-mesh { position: absolute; inset: -2px; background-image: linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%); animation: meshDrift 40s linear infinite; }
@keyframes meshDrift { to { background-position: 46px 46px; } }
.prob-curve { position: absolute; bottom: 0; left: 0; width: 100%; height: 55%; }
.curve-line { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.35; stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: drawCurve 3s var(--ease) forwards; }
.curve-line-2 { stroke: var(--accent-2); opacity: 0.22; animation-delay: 0.4s; }
@keyframes drawCurve { to { stroke-dashoffset: 0; } }

.hero-content { position: relative; z-index: 1; max-width: 880px; }
.hero-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent); padding: 6px 14px; border-radius: 100px; margin-bottom: 24px; }
.hero-title { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; margin-bottom: 22px; }
.grad-text { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.12rem; color: var(--text-muted); max-width: 680px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-chevron { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1; color: var(--text-muted); animation: bob 2s ease-in-out infinite; }
.scroll-chevron i { width: 26px; height: 26px; }
@keyframes bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- Overview ---------- */
.overview-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.overview-narrative p { margin-bottom: 18px; color: var(--text); }
.callout-quote { border-left: 3px solid var(--accent); background: var(--surface); padding: 18px 22px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; margin: 22px 0; color: var(--text); }

.glance-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-soft); }
.glance-title { font-size: 1.1rem; margin-bottom: 16px; color: var(--accent); }
.glance-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--border); }
.glance-list li:last-child { border-bottom: none; }
.glance-list span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 3px; }
.glance-list strong { font-family: var(--font-display); font-weight: 600; }

.scope-box { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.scope-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.scope-col h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 1.05rem; }
.scope-col h4 i { width: 18px; height: 18px; }
.scope-in h4 { color: var(--good); }
.scope-out h4 { color: var(--bad); }
.scope-col ul { display: flex; flex-direction: column; gap: 9px; }
.scope-col li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.95rem; }
.scope-col li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Research questions ---------- */
.rq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rq-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s; }
.rq-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.rq-num { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; color: color-mix(in srgb, var(--accent) 22%, transparent); position: absolute; top: 10px; right: 16px; }
.rq-card p { position: relative; z-index: 1; color: var(--text); }
.rq-card-note { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); display: flex; flex-direction: column; justify-content: center; }
.mono-label { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 0.82rem; padding: 6px 12px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 52px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 20px; text-align: center; }
.stat-num { display: block; font-family: var(--font-mono); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { display: block; margin-top: 10px; font-size: 0.86rem; color: var(--text-muted); }

/* ---------- Data section ---------- */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 52px; }
.data-text .h3 { margin-top: 18px; }
.data-text .h3:first-child { margin-top: 0; }

.figure-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.figure-card img { padding: 20px; background: #fff; }
html[data-theme="light"] .figure-card img { background: #fff; }
.figure-card figcaption { padding: 14px 18px; font-size: 0.86rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.figure-card figcaption a { color: var(--accent); font-weight: 500; }

/* Data dictionary tabs */
.data-dict { margin-top: 20px; }
.tabs { margin-top: 18px; }
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab-bar.segmented { border: 1px solid var(--border); background: var(--surface); padding: 5px; border-radius: 100px; gap: 4px; margin-bottom: 32px; flex-wrap: wrap; }
.tab-btn { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; padding: 10px 16px; background: none; border: none; color: var(--text-muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s, background 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-bar.segmented .tab-btn { border-radius: 100px; border-bottom: none; }
.tab-bar.segmented .tab-btn.active { background: var(--accent); color: #fff; }
.tab-panel { display: none; animation: fadeUp 0.4s var(--ease); }
.tab-panel.active { display: block; }
.panel-lede { color: var(--text-muted); margin-bottom: 14px; font-size: 0.95rem; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table thead th { text-align: left; font-family: var(--font-body); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table td.num, .data-table th.num { font-family: var(--font-mono); text-align: right; }

/* ---------- Methodology ---------- */
.method-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 56px; }
.method-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.method-icon { width: 46px; height: 46px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.method-icon i { width: 22px; height: 22px; }
.method-block p { color: var(--text-muted); font-size: 0.95rem; }
.formula { font-family: var(--font-mono); font-size: 0.85rem; background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px; color: var(--text); overflow-x: auto; }

.horizon-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.horizon-chip { font-family: var(--font-mono); font-size: 0.78rem; padding: 6px 11px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* Pipeline */
.pipeline-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.pipeline-wrap > .muted { margin-bottom: 22px; }
.pipeline { display: flex; align-items: stretch; gap: 8px; }
.pipe-node { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; position: relative; }
.pipe-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); font-weight: 700; }
.pipe-node h4 { font-size: 0.98rem; margin: 6px 0; }
.pipe-node p { font-size: 0.84rem; color: var(--text-muted); }
.pipe-arrow { display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; }
.pipe-arrow i { width: 20px; height: 20px; }

.pill-latest { display: inline-block; font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 100px; vertical-align: middle; }

/* ---------- Findings ---------- */
.finding-head { margin-bottom: 20px; }
.finding-head .muted { max-width: 720px; }
.chip-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.metric-chip { font-family: var(--font-mono); font-size: 0.82rem; padding: 7px 13px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.metric-chip.good { border-color: color-mix(in srgb, var(--good) 45%, transparent); color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.metric-chip.inline { padding: 2px 8px; font-size: 0.8rem; }

.finding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-bottom: 24px; }
.finding-text .h4 { margin-top: 16px; }
.finding-text .h4:first-child { margin-top: 0; }
.finding-text p { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 10px; }
.finding-text .data-table { margin-top: 6px; }
.fine-print { font-size: 0.85rem; margin-top: 10px; }

/* Chart embeds */
.chart-embed .chart-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 380px; background: #fff; }
.chart-embed.wide .chart-frame { aspect-ratio: 21 / 9; }
.chart-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chart-embed.wide { grid-column: 1 / -1; }

/* Cross-market banner */
.crossmarket-banner { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface))); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 28px; }
.badge-latest { display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; color: #fff; background: var(--accent); padding: 5px 12px; border-radius: 100px; margin-bottom: 14px; }
.platform-legend { display: flex; gap: 20px; margin-top: 16px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-poly { background: var(--poly); }
.dot-kalshi { background: var(--kalshi); }

.key-findings-box { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-md); padding: 22px 24px; margin-top: 8px; }
.key-findings-box h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.key-findings-box h4 i { width: 18px; height: 18px; color: var(--accent); }
.key-findings-box ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-muted); }
.key-findings-box.compact { margin-top: 16px; }
.key-findings-box.compact p { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); font-size: 0.95rem; }
.key-findings-box.compact p i { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }

/* Signals */
.signals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.signal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.signal-card h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.signal-card h4 i { width: 18px; height: 18px; color: var(--accent); }
.signal-card ul { display: flex; flex-direction: column; gap: 10px; }
.signal-card li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.94rem; }
.signal-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.arb-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.arb-box h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.arb-box h4 i { width: 18px; height: 18px; color: var(--accent); }
.arb-box > p { color: var(--text-muted); margin-bottom: 6px; }

/* ---------- Takeaways ---------- */
.takeaway-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.takeaway-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.takeaway-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.takeaway-card p { color: var(--text-muted); font-size: 0.94rem; margin-top: 4px; }

/* ---------- Future work ---------- */
.callout-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.callout-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.callout-card h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.callout-card h4 i { width: 18px; height: 18px; color: var(--accent); }
.callout-card ul { display: flex; flex-direction: column; gap: 10px; }
.callout-card li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.95rem; }
.callout-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.callout-warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.callout-warn h4 i { color: var(--warn); }
.callout-warn li::before { background: var(--warn); }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 30px; text-align: center; overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s; }
.team-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.team-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.team-card .h4 { font-size: 1.15rem; }
.student-id { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }

.team-affil { text-align: center; margin-top: 30px; }

/* ---------- Documents ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.doc-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.doc-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.doc-icon { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.doc-card h4 { font-size: 0.98rem; }
.doc-meta { font-size: 0.82rem; color: var(--text-muted); }
.doc-card > div { flex: 1; }
.doc-dl { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 40px 0 30px; }
.footer-inner { display: flex; flex-direction: column; gap: 24px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; max-width: 720px; }
.footer-meta { color: var(--text-muted); font-size: 0.86rem; margin-top: 4px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border); }
.back-top { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.9rem; }
.back-top:hover { color: var(--accent); }
.back-top i { width: 15px; height: 15px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .rq-grid { grid-template-columns: repeat(2, 1fr); }
    .method-blocks { grid-template-columns: 1fr; }
    .takeaway-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .pipeline { flex-direction: column; }
    .pipe-arrow { transform: rotate(90deg); }
}

@media (max-width: 767px) {
    .overview-grid, .data-grid, .scope-box, .finding-grid, .signals-grid, .callout-cols { grid-template-columns: 1fr; }
    .rq-grid, .team-grid { grid-template-columns: 1fr; }
    .takeaway-grid { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
    .chart-embed .chart-frame, .chart-embed.wide .chart-frame { aspect-ratio: auto; min-height: 340px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .curve-line { stroke-dashoffset: 0; }
}
