/**
 * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
 */

/* ============================================================
   Design tokens
   ============================================================ */
   :root {
    --brand: #0064E0;
    --brand-700: #0052b8;
    --brand-50: #e6f0fb;
    --accent: #6E5BFF;
    --accent-2: #2cd4d9;
    --ink: #0d1426;
    --ink-2: #1a2238;
    --muted: #5b6478;
    --muted-2: #8a93a6;
    --line: #e6e9f0;
    --line-2: #eef1f6;
    --bg: #ffffff;
    --bg-soft: #f7f8fc;
    --bg-soft-2: #f1f4fa;
    --gold: #f5b400;
    --silver: #b8b8c2;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 10px 30px rgba(0, 100, 224, 0.18);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1180px;
    padding-left: 24px;
    padding-right: 24px;
}

video {
    width: 100%;
    height: auto;
    background: #000;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    display: block;
}

.strong { font-weight: 700; }
.light  { font-weight: 300; }
.heavy  { font-weight: 900; }
.metablue { color: var(--brand); }

a:link, a:visited {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--brand-700); }

hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 64px 0;
}

/* ============================================================
   Top navigation
   ============================================================ */
.topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.topnav__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.topnav__brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--ink) !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.topnav__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    box-shadow: 0 0 0 3px rgba(0, 100, 224, 0.15);
    display: inline-block;
}
.topnav__links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.topnav__links a {
    color: var(--muted) !important;
    font-weight: 600;
    font-size: 14.5px;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}
.topnav__links a:hover {
    color: var(--ink) !important;
    background: var(--bg-soft);
}
@media (max-width: 720px) {
    .topnav__links { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 16px 72px;
    text-align: center;
    background:
        radial-gradient(1200px 500px at 50% -120px, rgba(110, 91, 255, 0.18) 0%, transparent 60%),
        radial-gradient(900px 420px at 80% 10%, rgba(44, 212, 217, 0.16) 0%, transparent 55%),
        radial-gradient(900px 420px at 15% 30%, rgba(0, 100, 224, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
    border-bottom: 1px solid var(--line);
}

/* Subtle animated waveform decoration */
.hero__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    pointer-events: none;
    opacity: 0.55;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'><path fill='none' stroke='%230064E0' stroke-width='1.2' stroke-opacity='0.45' d='M0 60 Q 60 10 120 60 T 240 60 T 360 60 T 480 60 T 600 60 T 720 60 T 840 60 T 960 60 T 1080 60 T 1200 60 T 1320 60 T 1440 60'/><path fill='none' stroke='%236E5BFF' stroke-width='1' stroke-opacity='0.35' d='M0 70 Q 80 30 160 70 T 320 70 T 480 70 T 640 70 T 800 70 T 960 70 T 1120 70 T 1280 70 T 1440 70'/><path fill='none' stroke='%232cd4d9' stroke-width='1' stroke-opacity='0.30' d='M0 80 Q 100 40 200 80 T 400 80 T 600 80 T 800 80 T 1000 80 T 1200 80 T 1400 80 T 1440 80'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.hero__inner {
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    background: rgba(0, 100, 224, 0.08);
    border: 1px solid rgba(0, 100, 224, 0.18);
    margin-bottom: 22px;
    letter-spacing: 0.02em;
}
.hero__pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 100, 224, 0.2);
}

.hero__title {
    font-size: clamp(34px, 5.4vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin: 0 auto;
    color: var(--ink);
    max-width: 1000px;
}
.hero__title .grad {
    background: linear-gradient(120deg, var(--brand) 0%, var(--accent) 60%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__tagline {
    margin-top: 18px;
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Authors */
.authors {
    margin: 38px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    max-width: 1000px;
}
.author {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
}
.author a {
    color: var(--ink-2) !important;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.author a:hover {
    color: var(--brand) !important;
    border-bottom-color: var(--brand);
}
.author sup {
    color: var(--brand);
    font-weight: 700;
}

.affiliations {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 28px;
}
.affiliation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    box-shadow: var(--shadow-sm);
}
.affiliation sup { color: var(--brand); }
.affiliation-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
}
.affiliation-logo--lg { height: 30px; }

.corresponding-author {
    margin: 26px 0 0;
    text-align: center;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--muted-2);
    opacity: 0.85;
}
.corresponding-author sup {
    color: var(--muted-2);
    font-weight: 500;
    margin-right: 2px;
}

/* CTA buttons */
.link-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 40px 0 8px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    text-decoration: none !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #fff !important;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    box-shadow: 0 14px 38px rgba(0, 100, 224, 0.28);
    color: #fff !important;
}
.btn-ghost {
    background: #fff;
    color: var(--ink) !important;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
    border-color: var(--ink);
    color: var(--ink) !important;
    box-shadow: var(--shadow-md);
}
.btn-dark {
    background: var(--ink);
    color: #fff !important;
    box-shadow: var(--shadow-md);
}
.btn-dark:hover {
    background: #000;
    color: #fff !important;
}
.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
   Sections
   ============================================================ */
section {
    padding: 80px 0;
}
section + section {
    padding-top: 0;
}

.section-eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-50);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.section-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--ink);
    line-height: 1.15;
}
.section-subtitle {
    font-size: 16.5px;
    color: var(--muted);
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.6;
}
.section-head { text-align: center; margin-bottom: 40px; }

/* Abstract / overview */
.abstract-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-md);
}
.abstract-card p {
    font-size: 18px;
    line-height: 1.75;
    color: var(--ink-2);
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
}
.abstract-card p b {
    color: var(--ink);
    font-weight: 700;
}
.abstract-card .metablue {
    font-weight: 800;
}

.overview-figure-wrap {
    margin-top: 32px;
    text-align: center;
}
.overview-figure {
    max-width: 100%;
    width: min(900px, 100%);
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    background: #fff;
}

/* Method figure */
.method-figure-wrap {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.method-figure-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Demos — modern tab pills + sliding panels
   ============================================================ */
.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 28px;
}
.tab-btn {
    padding: 10px 18px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.tab-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-50);
    transform: translateY(-1px);
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.slider-viewport {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%);
    border: 1px solid var(--line);
    padding: 28px 16px;
    box-shadow: var(--shadow-sm);
}

.slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.slider-panel {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0 32px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 720px) {
    .demo-grid { grid-template-columns: 1fr; }
}
.demo-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.demo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.demo-card .video-header {
    background: #fff;
    color: var(--ink);
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-2);
    letter-spacing: -0.005em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.demo-card .video-header::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
}
.demo-card video {
    border-radius: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.slider-arrow:hover {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-50%) scale(1.06);
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

/* ============================================================
   Benchmark grid (3xN cards)
   ============================================================ */
.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 720px) {
    .benchmark-grid { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 980px) {
    .benchmark-grid { grid-template-columns: repeat(2, 1fr); }
}

.benchmark-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.benchmark-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: box-shadow 0.22s ease;
}
.benchmark-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 100, 224, 0.3);
}
.benchmark-card:hover::after {
    box-shadow: inset 0 0 0 1px rgba(0, 100, 224, 0.25);
}

.card-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    position: relative;
}
.card-video-wrap::before {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 26px;
    background: rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}
.benchmark-card:hover .card-video-wrap::before { opacity: 1; }
.card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.card-label {
    padding: 14px 16px;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-label::after {
    content: "→";
    color: var(--brand);
    font-weight: 700;
    transition: transform 0.2s ease;
}
.benchmark-card:hover .card-label::after { transform: translateX(4px); }

/* ============================================================
   Modal (native <dialog>)
   ============================================================ */
.benchmark-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(13, 20, 38, 0.35);
    max-width: 1180px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 32px 32px 36px;
    background: #fff;
    color: var(--ink);
}
.benchmark-dialog::backdrop {
    background: rgba(13, 20, 38, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    margin: 0;
}
.modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.modal-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    text-align: left;
    letter-spacing: -0.01em;
}
.modal-eyebrow {
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.modal-divider {
    height: 1px;
    background: var(--line);
    margin: 18px 0 22px;
}
.modal-subhead {
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 720px) {
    .compare-grid { grid-template-columns: 1fr; }
}
.compare-cell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.compare-cell .video-header {
    background: #fff;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.compare-cell.is-ours .video-header {
    background: linear-gradient(135deg, rgba(0, 100, 224, 0.08), rgba(110, 91, 255, 0.06));
    color: var(--brand);
}
.compare-cell.is-ours .video-header::before {
    content: "★";
    color: var(--brand);
    font-size: 12px;
}
.compare-cell.is-ours {
    border-color: rgba(0, 100, 224, 0.35);
    box-shadow: 0 6px 20px rgba(0, 100, 224, 0.10);
}
.compare-cell video {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
}

/* ============================================================
   Quantitative results tables
   ============================================================ */
.results-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    box-shadow: var(--shadow-sm);
}
.results-card + .results-card { margin-top: 28px; }

.results-card-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.results-subtitle {
    color: var(--ink);
    font-weight: 800;
    font-size: 22px;
    margin: 0;
    letter-spacing: -0.01em;
}
.results-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-50);
    padding: 4px 10px;
    border-radius: 999px;
}
.results-caption {
    font-size: 14.5px;
    color: var(--muted);
    margin: 6px 0 18px 0;
    line-height: 1.6;
}

.results-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.results-table th,
.results-table td {
    padding: 12px 10px;
    text-align: center;
    border: none;
    border-bottom: 1px solid var(--line-2);
}
.results-table thead th {
    background: var(--bg-soft);
    color: var(--ink-2);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.results-table thead th sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
}
.results-table td.method {
    text-align: left;
    padding-left: 18px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--ink);
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: var(--bg-soft-2); }

.results-table tbody tr.ours-row {
    background: linear-gradient(90deg, rgba(0, 100, 224, 0.05), rgba(110, 91, 255, 0.04));
    position: relative;
}
.results-table tbody tr.ours-row td.method {
    box-shadow: inset 3px 0 0 var(--brand);
}
.results-table tbody tr.ours-row:hover {
    background: linear-gradient(90deg, rgba(0, 100, 224, 0.09), rgba(110, 91, 255, 0.06));
}

.results-table b {
    font-weight: 800;
    color: var(--ink);
    background: rgba(245, 180, 0, 0.18);
    padding: 1px 6px;
    border-radius: 6px;
}
.results-table u {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent-2);
    text-decoration-thickness: 2px;
}

.results-footnote {
    margin: 16px 4px 0 4px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
}

.legend {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-best {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    background: rgba(245, 180, 0, 0.18);
    font-weight: 800;
    color: var(--ink);
}
.legend-second {
    display: inline-block;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent-2);
    text-decoration-thickness: 2px;
    font-weight: 700;
    color: var(--ink);
}

/* ============================================================
   BibTeX
   ============================================================ */
.bibtex-card {
    position: relative;
    background: #0d1426;
    color: #d8def0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.bibtex-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #111a30;
    border-bottom: 1px solid #1f2a47;
    font-size: 13px;
    font-weight: 600;
    color: #99a3bd;
}
.bibtex-dots {
    display: inline-flex;
    gap: 6px;
}
.bibtex-dots span {
    width: 10px; height: 10px; border-radius: 50%;
    background: #2b3658;
}
.bibtex-dots span:nth-child(1) { background: #ff5f57; }
.bibtex-dots span:nth-child(2) { background: #febc2e; }
.bibtex-dots span:nth-child(3) { background: #28c840; }
.bibtex-copy {
    background: transparent;
    border: 1px solid #2b3658;
    color: #d8def0;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.bibtex-copy:hover {
    background: #1c2542;
    border-color: #3a4a78;
}
pre.bibtex {
    margin: 0;
    padding: 22px 24px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.65;
    color: #d8def0;
    background: transparent;
    overflow-x: auto;
    border: none;
    border-radius: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    padding: 40px 0 60px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    border-top: 1px solid var(--line);
}

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 720px) {
    section { padding: 56px 0; }
    .abstract-card { padding: 24px 22px; }
    .abstract-card p { font-size: 16px; }
    .results-card { padding: 22px 16px; }
    .compare-grid { gap: 12px; }
    .hero { padding: 64px 16px 48px; }
}
