/* ============================================
   ChipMATE Website — Project Page Stylesheet
   ============================================ */

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

:root {
    /* Theme: deep teal + amber accent (chip / verification / signal) */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --accent: #d97706;
    --accent2: #0c4a6e;
    --green: #16a34a;
    --red: #dc2626;
    --ink: #0b1f1d;
    --text: #1a2e2c;
    --text-secondary: #3f4f4d;
    --text-muted: #7a8a87;
    --border: #e5ebea;
    --border-strong: #c8d3d1;
    --bg: #ffffff;
    --bg-alt: #f3f7f6;
    --bg-tint: #f9fcfb;
    --shadow-sm: 0 1px 2px rgba(11,31,29,0.05);
    --shadow-md: 0 4px 18px rgba(11,31,29,0.07);
    --shadow-lg: 0 10px 40px rgba(11,31,29,0.11);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---- Icon base classes (replaces Font Awesome) ---- */
.logo-svg, .btn-icon, .agent-svg, .dim-svg, .finding-svg, .share-svg {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}
.btn-icon, .share-svg { width: 16px; height: 16px; }
.logo-svg { width: 38px; height: 38px; color: #fff; }
.agent-svg { width: 22px; height: 22px; color: #fff; }
.dim-svg { width: 26px; height: 26px; color: var(--primary); }
.finding-svg { width: 20px; height: 20px; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    padding-top: 52px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── Inline rich-text utilities ── */
em {
    font-style: italic;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.05em;
    color: #0c4a6e;
}

strong { font-weight: 600; }

code, kbd, samp { font-family: var(--mono); font-size: 0.9em; }

:not(pre) > code {
    background: var(--bg-alt);
    padding: 1px 7px;
    border-radius: 4px;
    color: var(--primary-dark);
    font-weight: 500;
    border: 1px solid var(--border);
    letter-spacing: -0.01em;
}

sub, sup {
    font-feature-settings: 'subs', 'sups';
    font-size: 0.78em;
}

/* ── Contextual <strong> color (matches reference's li/td/figcaption strong) ── */
.intro-content p strong,
.intro-content li strong,
.column-text strong,
.results-intro strong,
.abstract-text strong,
.figure-caption strong,
.table-caption strong,
.system-description > p strong { color: var(--primary-dark); }

/* Table strong is GOLD for highlighted values, GREEN for best-row */
.results-table td strong { color: #b8860b; font-weight: 700; }
.results-table .best-row td strong { color: var(--green); }

/* ── Rich-text highlight classes (1:1 with reference blog) ── */
.hl-blue   { color: var(--primary); font-weight: 600; }
.hl-gold   { color: #b8860b; font-weight: 600; }
.hl-green  { color: var(--green); font-weight: 600; }
.hl-red    { color: var(--red); font-weight: 600; }
.hl-purple { color: #d97706; font-weight: 600; }

/* Numbers — mono font + accent color (4.7×, 30.3×, 38% ...) */
.hl-num {
    color: var(--primary-dark);
    font-weight: 700;
    font-family: var(--mono);
    font-size: 0.95em;
    font-variant-numeric: tabular-nums;
}

/* Italic technical terms — convoy-style shuttling, three-level decomposition */
.hl-term {
    color: #d97706;
    font-style: italic;
}

/* Model / system names — Qubrio, PowerMove, Enola, Qwen-3.5 ... */
.hl-model {
    background: rgba(13,148,136,0.08);
    color: var(--primary-dark);
    padding: 0.1em 0.45em;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.93em;
}

/* Key result phrases — long callout in prose */
.hl-result {
    background: linear-gradient(135deg, rgba(22,163,74,0.12), rgba(22,163,74,0.06));
    color: #15803d;
    padding: 0.1em 0.5em;
    border-radius: 3px;
    font-weight: 700;
}

/* Warning / caution highlight */
.hl-warn {
    background: #fff3e0;
    color: #c2410c;
    padding: 0.1em 0.5em;
    border-radius: 3px;
    font-weight: 600;
}

/* ---- Skip link (keyboard accessibility) ---- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--text);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    left: 12px;
    top: 8px;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---- Layout ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-narrow {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 32px;
}

.main-container {
    width: 100%;
    counter-reset: section;
}

/* ============================================
   Navigation Bar
   ============================================ */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1001;
    height: 52px;
    display: flex;
    align-items: center;
}

.top-navbar .container {
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    flex-shrink: 0;
    letter-spacing: -0.005em;
}

.nav-pill:hover {
    background: var(--bg-alt);
    color: var(--ink);
    border-color: var(--border);
}

.nav-pill.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* ============================================
   Table of Contents Sidebar
   ============================================ */
.toc-sidebar {
    position: fixed;
    right: 16px;
    top: 80px;
    width: 144px;
    z-index: 100;
}

.toc-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px 14px;
    box-shadow: var(--shadow-sm);
}

.toc-content h3 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 10px 8px;
    color: var(--text-muted);
}

.toc-content nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.toc-content nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 450;
    line-height: 1.45;
    transition: all var(--transition);
    border-left: 2px solid transparent;
}

.toc-content nav a:hover {
    color: var(--primary);
    background: var(--bg-alt);
}

.toc-content nav a.active {
    color: var(--primary);
    background: rgba(13,148,136,0.08);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 80px 0 56px;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 980px;
    height: 380px;
    background: radial-gradient(ellipse at center top, rgba(13,148,136,0.10), transparent 65%);
    z-index: -1;
    pointer-events: none;
}

.hero-header {
    margin-bottom: 28px;
}

.logo-title-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 18px;
}

.logo-icon {
    width: 68px;
    height: 68px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.18), transparent 55%),
        linear-gradient(145deg, var(--primary) 0%, #2a1a8e 50%, var(--ink) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 12px 32px rgba(13,148,136,0.30),
        0 6px 18px rgba(15,15,30,0.16);
    transform: rotate(-4deg);
    transition: transform var(--transition);
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(13,148,136,0.4), transparent 60%);
    z-index: -1;
    filter: blur(12px);
    opacity: 0.7;
}

.logo-icon:hover { transform: rotate(0deg) scale(1.04); }

.logo-text {
    font-size: 60px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -2.5px;
    line-height: 1;
}

.subtitle {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.35;
    letter-spacing: -0.4px;
    max-width: 720px;
    margin: 0 auto;
}

.subtitle em { color: var(--ink); }

/* Authors */
.authors {
    margin: 24px 0 28px;
}

.author-names {
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.6;
}

.author-names sup {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.affiliations {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.affiliations sup {
    font-size: 11px;
    font-weight: 700;
    margin-right: 1px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 28px 0 40px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    letter-spacing: -0.005em;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,148,136,0.30);
}

.action-btn .btn-icon { opacity: 0.95; }

/* Abstract / Performance Chart */
.abstract-text {
    max-width: 740px;
    margin: 0 auto 44px;
    font-size: 17.5px;
    line-height: 1.75;
    color: var(--text);
    text-align: left;
    letter-spacing: -0.005em;
    padding-left: 20px;
    border-left: 3px solid var(--primary);
}

.abstract-text strong { color: var(--primary-dark); }
.abstract-text em { color: var(--ink); }

.hero-figure {
    margin: 10px auto 0;
    max-width: 100%;
}

.hero-figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
}

.hero-figure img:hover {
    transform: scale(1.012);
    box-shadow: 0 18px 48px rgba(15,15,30,0.18);
}

.hero-figure .figure-caption {
    margin-top: 18px;
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Content Sections
   ============================================ */
.content-section {
    padding: 80px 0;
    position: relative;
}

.bg-light {
    background: var(--bg-alt);
}

.bg-light + .content-section,
.content-section + .bg-light {
    border-top: 1px solid var(--border);
}

.content-section { counter-increment: section; }

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--ink);
    text-align: center;
    letter-spacing: -1px;
    line-height: 1.15;
    position: relative;
}

.section-title::before {
    content: counter(section, decimal-leading-zero);
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--primary);
    margin-bottom: 14px;
}

.section-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: var(--primary);
    margin: 14px auto 0;
    border-radius: 2px;
}

.subsection-title {
    font-size: 22px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--ink);
    letter-spacing: -0.4px;
    line-height: 1.25;
    position: relative;
    padding-left: 18px;
}

.subsection-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary), var(--accent2));
    border-radius: 2px;
}

/* When subsection-title is centered (results-intro context), drop the bar. */
.results-intro + .subsection-title,
.system-description > .subsection-title {
    text-align: center;
    padding-left: 0;
}

.results-intro + .subsection-title::before,
.system-description > .subsection-title::before {
    display: none;
}

/* ---- Introduction ---- */
.intro-content {
    max-width: 820px;
    margin: 0 auto;
}

.intro-content p {
    font-size: 16px;
    line-height: 1.78;
    margin-bottom: 18px;
    color: var(--text);
}

.intro-content > h3:first-child,
.intro-content > .subsection-title { margin-top: 0; }

.highlight-box {
    background: linear-gradient(180deg, var(--bg-tint), var(--bg-alt));
    color: var(--text);
    padding: 28px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    margin: 36px 0;
    position: relative;
}

.highlight-box::before {
    content: 'Key insight';
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.highlight-box p {
    font-size: 16px;
    line-height: 1.72;
    margin: 0;
}

.highlight-box strong { color: var(--ink); }

.key-points {
    list-style: none;
    padding-left: 0;
    margin: 22px 0;
}

.key-points li {
    padding: 12px 0 12px 36px;
    position: relative;
    font-size: 16px;
    line-height: 1.65;
    border-bottom: 1px solid var(--border);
}

.key-points li:last-child { border-bottom: none; }

.key-points li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 22px;
    width: 16px;
    height: 1.5px;
    background: var(--primary);
    border-radius: 2px;
}

/* ---- Figures ---- */
.figure-container {
    margin: 36px 0;
}

.figure-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: block;
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
    transform-origin: center center;
}

.figure-image:hover {
    transform: scale(1.015);
    box-shadow: 0 14px 36px rgba(15,15,30,0.16);
}

.figure-caption {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    text-align: left;
    max-width: 880px;
    font-style: italic;
}

.figure-caption strong {
    color: var(--ink);
    font-style: normal;
}

/* ---- Agent Cards ---- */
.agent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.agent-card {
    background: var(--bg);
    padding: 28px 24px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent2));
    opacity: 0;
    transition: opacity var(--transition);
}

.agent-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 6px 24px rgba(15,15,30,0.08);
    transform: translateY(-3px);
}

.agent-card:hover::before { opacity: 1; }

.agent-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #0b1f1d 0%, #1a2e2c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(15,15,30,0.10);
    position: relative;
}

.agent-icon::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 40%);
    pointer-events: none;
}

.agent-card:hover .agent-icon {
    background: linear-gradient(145deg, var(--primary) 0%, var(--accent2) 100%);
    transform: scale(1.04);
}

.agent-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--ink);
    letter-spacing: -0.2px;
}

.agent-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ---- Two Column Layout ---- */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
    margin-top: 32px;
}

.column-text h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ink);
    letter-spacing: -0.3px;
}

.column-text p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 14px;
    color: var(--text);
}

.column-text ul {
    margin: 16px 0;
    padding-left: 18px;
}

.column-text ul li {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
}

.info-box {
    background: var(--bg-tint);
    padding: 22px 26px;
    border-radius: var(--radius);
    margin-top: 28px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
}

.info-box h4 {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--mono);
    margin-bottom: 8px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.info-box p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
}

.info-box strong { color: var(--ink); }

/* ---- Benchmark Stats ---- */
.benchmark-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 36px 0 48px;
}

.stat-box {
    text-align: left;
    padding: 28px 26px 24px;
    background: var(--bg);
    color: var(--ink);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.stat-box .stat-label { order: 1; }
.stat-box .stat-number { order: 2; }
.stat-box p { order: 3; }

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 28px rgba(15,15,30,0.08);
}

.stat-box:hover::before { transform: scaleX(1); }

.stat-label {
    font-size: 10.5px;
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-family: var(--mono);
}

.stat-number {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -3px;
    line-height: 0.95;
    color: var(--ink);
    background: linear-gradient(135deg, var(--ink) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-box p {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

/* Dimensions Grid */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.dimension-box {
    background: var(--bg);
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: left;
    transition: all var(--transition);
}

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

.dim-icon {
    width: 48px;
    height: 48px;
    margin: 0 0 18px;
    background: rgba(13,148,136,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dimension-box h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.dimension-box p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   Results — Tables
   ============================================ */
.results-intro {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
    text-align: center;
    max-width: 780px;
    margin: 0 auto 32px;
}

/* system-description spans full container so card grids can use all the room.
   Only the text children (h3/p) get width constraints for readability. */
.system-description > h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 40px auto 14px;
    color: var(--ink);
    letter-spacing: -0.4px;
    text-align: center;
    max-width: 880px;
}

.system-description > h3:first-child { margin-top: 24px; }

.system-description > p {
    font-size: 15.5px;
    line-height: 1.75;
    margin: 0 auto 16px;
    color: var(--text);
    text-align: center;
    max-width: 720px;
}

.results-content {
    margin-bottom: 0;
}

.results-table-container {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    font-size: 14px;
}

.results-table thead {
    background: transparent;
}

.results-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.results-table td {
    padding: 14px 18px;
    font-size: 14.5px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
    transition: background var(--transition);
}

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

.results-table tbody tr:hover {
    background: var(--bg-tint);
}

/* ── Ranking medal cells (gold / silver / bronze) ── */
.results-table td.rank-1 {
    background: linear-gradient(180deg, rgba(255,217,102,0.45), rgba(255,217,102,0.20)) !important;
}
.results-table td.rank-2 {
    background: rgba(217,217,217,0.55) !important;
}
.results-table td.rank-3 {
    background: rgba(232,185,138,0.45) !important;
}

/* ── Our rows: subtle teal tint ── */
.results-table tr.our-row td {
    background: rgba(13,148,136,0.06);
}
.results-table tr.our-row:hover td {
    background: rgba(13,148,136,0.10);
}
.results-table tr.our-row.best-row td {
    background: rgba(13,148,136,0.13);
    font-weight: 600;
}
.results-table tr.our-row.best-row:hover td {
    background: rgba(13,148,136,0.18);
}

/* Rank cells inside our-row get blended treatment so highlight wins */
.results-table tr.our-row td.rank-1,
.results-table tr.our-row td.rank-2,
.results-table tr.our-row td.rank-3 {
    box-shadow: inset 3px 0 0 rgba(13,148,136,0.45);
}

/* ── Vertical category column ── */
.results-table td.rowtype {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    background: var(--bg-alt) !important;
    border-right: 1px solid var(--border);
    vertical-align: middle;
}

.results-table td.rowtype.rowtype-ours {
    color: var(--primary-dark);
    background: rgba(13,148,136,0.10) !important;
    font-weight: 700;
    line-height: 1.3;
}

.results-table td strong {
    color: var(--primary);
    font-weight: 700;
}

.highlight-row {
    background: rgba(13,148,136,0.04) !important;
}

.best-row {
    background: rgba(22,163,74,0.05) !important;
}

.best-row td { font-weight: 600; }
.best-row td strong { color: var(--green); }

.table-caption {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: left;
    padding: 0 4px;
}

/* ---- Findings Grid: numbered 2×2 cards ---- */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
    counter-reset: finding;
}

.finding-box {
    background: var(--bg);
    padding: 28px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
    counter-increment: finding;
    position: relative;
}

.finding-box::before {
    content: counter(finding, decimal-leading-zero);
    display: block;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    color: var(--text-muted);
}

.finding-box.success::before { color: var(--green); }
.finding-box.info::before { color: var(--primary); }

.finding-box::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 30px;
    width: 26px;
    height: 1.5px;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition);
}

.finding-box.success::after { color: var(--green); }
.finding-box.info::after { color: var(--primary); }

.finding-box:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15,15,30,0.08);
}

.finding-box:hover::after { opacity: 1; }

.finding-box h4 {
    font-size: 17.5px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--ink);
    letter-spacing: -0.4px;
    line-height: 1.3;
}

.finding-box p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

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

/* ============================================
   Demo Video
   ============================================ */
.demo-video-container {
    max-width: 780px;
    margin: 0 auto;
    overflow: hidden;
}

.demo-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: #000;
    display: block;
}

.demo-video:focus { outline: none; }

/* ============================================
   Share Section
   ============================================ */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition);
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--ink);
}

.share-btn:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.share-btn.twitter:hover { background: #000; border-color: #000; }
.share-btn.linkedin:hover { background: #0077b5; border-color: #0077b5; }

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg);
    padding: 56px 0 36px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Footer institution logos are intentionally omitted during double-blind review. */

.footer-note {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

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

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1199px) {
    .toc-sidebar { display: none; }
}

/* When TOC is visible (>= 1200), shrink container so it doesn't overlap. */
@media (min-width: 1200px) and (max-width: 1499px) {
    .container { max-width: 1000px; }
    .top-navbar .container { max-width: 1200px; }
}

/* Side-by-side figure rows (paper-style minipage 0.46/0.50 split). */
.figure-row {
    display: grid;
    grid-template-columns: 0.46fr 0.50fr;
    gap: 28px;
    align-items: start;
    margin: 36px 0;
}

.figure-row .figure-container { margin: 0; }
.figure-row .figure-image { border-radius: var(--radius-sm); }

@media (max-width: 760px) {
    .figure-row { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 968px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .agent-cards,
    .dimensions-grid,
    .findings-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .benchmark-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body { padding-top: 48px; }

    .top-navbar { height: 48px; }

    .container { padding: 0 18px; }

    .logo-title-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .logo-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .logo-svg { width: 30px; height: 30px; }
    .logo-text { font-size: 42px; letter-spacing: -1.5px; }
    .subtitle { font-size: 20px; }
    .section-title { font-size: 28px; }
    .subsection-title { font-size: 19px; }

    .action-buttons { gap: 8px; }

    .action-btn {
        padding: 7px 14px;
        font-size: 12.5px;
    }

    .results-table-container {
        max-width: 100%;
    }

    .results-table {
        min-width: 580px;
    }

    .demo-video-container {
        max-width: 100%;
    }
    .demo-video {
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 480px) {
    .hero-section { padding: 56px 0 44px; }
    .content-section { padding: 56px 0; }
    .stat-number { font-size: 32px; }
    .logo-text { font-size: 34px; }
    .subtitle { font-size: 18px; }
    .author-names { font-size: 15px; }
    .finding-box { flex-direction: column; gap: 12px; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}
