/* =========================================================
   FAIRE · ICML 2026 project page
   ========================================================= */

:root {
  --ink:        #0f1729;
  --ink-soft:   #2c3a55;
  --muted:      #6b7896;
  --line:       #e5e8f0;
  --line-soft:  #eef0f6;
  --bg:         #ffffff;
  --bg-alt:     #f8f9fc;
  --bg-aha:     #fff8f0;
  --primary:    #1d3b6e;
  --primary-2:  #2a5298;
  --accent:     #e94560;
  --accent-2:   #f47e3e;
  --good:       #137a45;
  --bad:        #c92a3a;
  --gold:       #b88615;
  --shadow-sm:  0 1px 2px rgba(15, 23, 41, 0.04), 0 2px 8px rgba(15, 23, 41, 0.04);
  --shadow-md:  0 4px 12px rgba(15, 23, 41, 0.06), 0 12px 32px rgba(15, 23, 41, 0.08);
  --shadow-lg:  0 24px 60px rgba(15, 23, 41, 0.12);
  --radius:     14px;
  --radius-sm:  8px;

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 800px; }

/* Content sections share one tighter width so lede text and figures align */
.section .container { max-width: 1000px; }
.section .container.narrow { max-width: 800px; }

/* =========================================================
   TOP NAV
   ========================================================= */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-spark {
  color: var(--accent);
  margin-right: 4px;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--accent); }

@media (max-width: 720px) { .nav-links { display: none; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 56px 0 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(233, 69, 96, 0.10), transparent 60%),
    radial-gradient(700px 400px at 5% 20%, rgba(42, 82, 152, 0.10), transparent 60%),
    radial-gradient(500px 380px at 50% 110%, rgba(244, 126, 62, 0.10), transparent 60%);
}

.venue-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft); letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.venue-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.18);
}
.venue-badge-logo {
  padding: 7px 16px 7px 12px;
  gap: 10px;
}
.venue-logo {
  height: 22px; width: auto; display: block;
}
.venue-year {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.venue-sep { color: var(--line); font-weight: 400; }
.venue-tag {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ORG STRIP — institution logos */
.org-strip {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px;
  margin: -8px 0 30px;
}
.org-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  height: 56px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  flex-shrink: 0;
}
.org-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-2); }
.org-chip img {
  display: block;
  max-height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
/* Per-logo width tweaks so visually-balanced widths */
.org-chip:nth-child(1) img { max-height: 22px; max-width: 130px; }   /* bytedance wordmark */
.org-chip:nth-child(3) img { max-height: 28px; max-width: 180px; }   /* UCAS horizontal wordmark */
.org-chip:nth-child(4) img { max-height: 24px; max-width: 200px; }   /* Westlake very wide wordmark */

/* Logo + text variant (mirrors the ICML venue-badge style) */
.org-chip-text {
  gap: 10px;
  padding: 10px 20px;
}
.org-chip-text .chip-mark {
  max-height: 34px;
  max-width: 38px;
  width: auto;
  flex: 0 0 auto;
}
.org-chip-text .chip-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.015em;
  white-space: nowrap;
  line-height: 1;
}

@media (max-width: 720px) {
  .org-strip { justify-content: center; }
  .org-chip { padding: 8px 12px; height: 48px; }
  .org-chip-text { padding: 8px 14px; }
  .org-chip-text .chip-mark { max-height: 28px; max-width: 32px; }
  .org-chip-text .chip-label { font-size: 12.5px; }
}

/* ACCOLADE BANNER — ICML Spotlight */
.accolade-section {
  padding: 0 0 14px;
}
.accolade-banner {
  position: relative;
  display: flex; align-items: center; gap: 22px;
  background:
    radial-gradient(800px 200px at 0% 50%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(135deg, #8a5a13 0%, #b88615 35%, #d4a017 75%, #e2b035 100%);
  color: white;
  padding: 22px 32px;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(184, 134, 21, 0.20),
    0 12px 36px rgba(184, 134, 21, 0.30);
  overflow: hidden;
  isolation: isolate;
}
.accolade-banner::before {
  content: '';
  position: absolute; right: -80px; top: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 60%);
  z-index: -1;
}
.accolade-banner::after {
  content: '';
  position: absolute; left: -60px; bottom: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(15, 23, 41, 0.18), transparent 60%);
  z-index: -1;
}
.accolade-trophy {
  width: 56px; height: 56px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.accolade-text { flex: 1; min-width: 0; }
.accolade-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 4px;
}
.accolade-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: white;
  letter-spacing: -0.01em;
}
.accolade-title em {
  font-style: italic;
  color: #fff7e0;
  position: relative;
}
.accolade-title em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 3px;
  height: 5px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 5px;
  z-index: -1;
}
.accolade-meta {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 4px;
  font-weight: 400;
}
.accolade-meta b {
  font-weight: 700;
  color: white;
  font-variant-numeric: tabular-nums;
}
.accolade-stat {
  flex-shrink: 0;
  text-align: right;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.accolade-pct {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: white;
}
.accolade-pct span {
  font-size: 0.55em;
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.8);
}
.accolade-pct-label {
  font-size: 11.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  margin-top: 3px;
}

@media (max-width: 720px) {
  .accolade-banner { flex-wrap: wrap; padding: 20px 22px; gap: 14px; }
  .accolade-stat { padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 12px; text-align: left; width: 100%; display: flex; align-items: baseline; gap: 14px; }
  .accolade-pct-label { margin-top: 0; }
}

.title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--ink);
  max-width: 980px;
}
.title-accent {
  background: linear-gradient(135deg, var(--primary-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-emph {
  position: relative;
  font-style: italic;
  color: var(--accent);
}
.title-emph::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 6px;
  background: rgba(244, 126, 62, 0.25);
  border-radius: 6px;
  z-index: -1;
}

.subtitle {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 0 30px;
  font-weight: 400;
}

.authors {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin-bottom: 14px;
  font-size: 16.5px;
  color: var(--ink-soft);
}
.author { font-weight: 500; }
.author a { color: inherit; }
.author sup { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 1px; }

.affiliations {
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 30px;
  font-style: italic;
}
.affiliations sup { font-style: normal; margin-right: 2px; }
.affiliations .muted { font-style: normal; }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 50px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  font-family: var(--font-sans);
}
.btn:focus-visible { outline: 3px solid rgba(42, 82, 152, 0.25); outline-offset: 2px; }

.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* TEASER */
.teaser {
  margin: 24px 0 0;
  padding: 26px 26px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.teaser img { display: block; width: 100%; height: auto; }
.teaser figcaption {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.hl-bad  { background: rgba(201, 42, 58, 0.10); color: var(--bad); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.hl-good { background: rgba(19, 122, 69, 0.10); color: var(--good); padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* =========================================================
   TL;DR STRIP
   ========================================================= */
.tldr {
  padding: 36px 0;
  background:
    linear-gradient(180deg, var(--bg-alt) 0%, white 100%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.tldr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tldr-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.tldr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tldr-num {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 38px;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.tldr-label {
  font-size: 13px; font-weight: 700;
  color: var(--ink); text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
}
.tldr-note { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

@media (max-width: 880px) { .tldr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .tldr-grid { grid-template-columns: 1fr; } }

/* =========================================================
   SECTION
   ========================================================= */
.section { padding: 80px 0; border-bottom: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
  line-height: 1.15;
}
.section-title .aside {
  font-size: 0.55em;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  display: inline-block;
  margin-left: 6px;
}
.sub-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 14px;
  color: var(--ink);
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 22px;
  /* No max-width: lede fills the (already narrowed) section container so it
     aligns with figures and grids below it. */
}

.section p { color: var(--ink-soft); }
.section .container.narrow p { font-size: 17px; line-height: 1.75; }
.section strong { color: var(--ink); font-weight: 600; }

.mono { font-family: var(--font-mono); font-size: 0.9em; color: var(--ink); background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-soft); }
.muted { color: var(--muted); }

/* Key Claims */
.key-claims { margin-top: 36px; }
.claims-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.claims-list li {
  display: flex; gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
}
.claim-badge {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  padding-top: 2px;
}

/* =========================================================
   PARADOX SECTION
   ========================================================= */
.paradox-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px; margin-top: 18px; margin-bottom: 36px;
}
.paradox-col {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.paradox-tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.tag-bad { background: rgba(201, 42, 58, 0.10); color: var(--bad); }
.tag-good { background: rgba(19, 122, 69, 0.10); color: var(--good); }
.paradox-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 12px;
}
.paradox-list li {
  font-size: 15.5px; line-height: 1.6;
  color: var(--ink-soft);
}
.paradox-list b { color: var(--ink); }
.arrow { font-family: var(--font-mono); color: var(--primary-2); font-size: 0.85em; }

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

/* =========================================================
   FIGURES
   ========================================================= */
.figure {
  margin: 28px 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 14px;
  box-shadow: var(--shadow-sm);
}
.figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.figure figcaption {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  text-align: left;
}
.figure.wide img { width: 100%; }
.figure.narrow-fig { max-width: 780px; margin: 28px auto; }

/* =========================================================
   FRAMEWORK - 3 cards + reward
   ========================================================= */
.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon { font-size: 28px; line-height: 1; margin-bottom: 12px; }
.card h3 {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}
.card p { font-size: 15px; line-height: 1.6; margin: 0 0 14px; color: var(--ink-soft); }
.card code {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  word-break: break-word;
  margin-top: auto;
}
.card-eq {
  margin-top: auto;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px 10px;
  overflow-x: auto;
  font-size: 14px;
}
.card-eq .katex { font-size: 0.95em; color: var(--ink); }
.card-eq .katex-display { margin: 0; }
.card h3 .katex { font-size: 0.94em; }

@media (max-width: 880px) { .three-up { grid-template-columns: 1fr; } }

.reward-callout {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 30px 24px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
}
.reward-eq-label {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(233, 69, 96, 0.08);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 8px;
}
.reward-eq-label.grpo {
  color: var(--primary-2);
  background: rgba(42, 82, 152, 0.08);
}
.reward-eq, .reward-grpo {
  font-size: 16px;
  line-height: 1.55;
  padding: 14px 18px;
  margin: 0 0 18px;
  background: var(--bg-alt);
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  overflow-x: auto;
}
.reward-eq .katex, .reward-grpo .katex { color: var(--ink); font-size: 1.05em; }
.reward-eq .katex-display, .reward-grpo .katex-display { margin: 0; }
.reward-grpo .katex { color: var(--ink); }

/* KaTeX inline tweaks — slightly bolder/tinted variables to read better against body text */
.katex { font-size: 1.02em; }
.lede .katex, p .katex, li .katex, figcaption .katex { color: var(--ink); }
.reward-note {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 4px 0 0;
  line-height: 1.65;
}
.reward-note strong { color: var(--ink); }

/* =========================================================
   DATASET
   ========================================================= */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
  margin-top: 12px;
}
.data-stat, .data-fig {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.data-stat h3 {
  font-family: var(--font-serif);
  font-size: 20px; margin: 0 0 12px; color: var(--ink);
}
.data-fig { display: flex; flex-direction: column; }
.data-fig img { width: 100%; height: auto; margin: auto 0; }
.data-fig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.mini-table th, .mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
}
.mini-table th:first-child, .mini-table td:first-child { text-align: left; }
.mini-table thead th { border-bottom: 2px solid var(--ink); color: var(--ink); font-weight: 600; }
.mini-table tbody tr.ours { background: rgba(244, 126, 62, 0.08); font-weight: 600; color: var(--ink); }
.mini-table .muted-row td { color: var(--muted); }

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

/* =========================================================
   RESULTS TABLE
   ========================================================= */
.results-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.results-table th, .results-table td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line-soft);
}
.results-table th:first-child, .results-table td:first-child { text-align: left; }
.results-table thead th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.results-table .hl { background: rgba(233, 69, 96, 0.06); color: var(--accent); font-weight: 700; }
.results-table tr.sft-init td { background: rgba(42, 82, 152, 0.04); }
.results-table tr.sep td { padding: 4px; border-bottom: 1px dashed var(--line); }
.results-table tr.ours td {
  background: linear-gradient(90deg, rgba(244, 126, 62, 0.10), rgba(233, 69, 96, 0.10));
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}
.results-table tr.ours td.hl { background: rgba(233, 69, 96, 0.18); color: var(--accent); }
.table-caption {
  font-size: 13.5px; color: var(--muted);
  margin: 14px 0 0; line-height: 1.55;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.result-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px;
  box-shadow: var(--shadow-sm);
}
.result-card h3 {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600;
  margin: 0 0 10px; color: var(--ink);
}
.result-card p { font-size: 15px; line-height: 1.6; margin: 0; color: var(--ink-soft); }

@media (max-width: 880px) { .result-cards { grid-template-columns: 1fr; } }

/* =========================================================
   AHA MOMENT
   ========================================================= */
.section-aha {
  background:
    radial-gradient(800px 600px at 100% 0%, rgba(244, 126, 62, 0.10), transparent 60%),
    radial-gradient(600px 500px at 0% 100%, rgba(233, 69, 96, 0.06), transparent 60%),
    #fffaf3;
  border-bottom: 1px solid var(--line-soft);
}
.aha-flame {
  display: inline-block;
  color: var(--accent);
  font-size: 0.9em;
  margin-right: 4px;
  text-shadow: 0 0 24px rgba(233, 69, 96, 0.4);
}

.ablation {
  margin-top: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   DEMOS
   ========================================================= */
.demo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.demo-tile {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}
.demo-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.demo-tile img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .35s ease;
}
.demo-tile:hover img { transform: scale(1.04); }
.demo-num {
  position: absolute; top: 10px; left: 10px;
  background: rgba(15, 23, 41, 0.85);
  color: white;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600;
  padding: 4px 8px; border-radius: 999px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

@media (max-width: 980px) { .demo-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .demo-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .demo-gallery { grid-template-columns: 1fr; } }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 23, 41, 0.92);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; flex-direction: column; gap: 14px; }
.lightbox-img {
  max-width: 90vw; max-height: 80vh;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  background: white;
}
.lightbox-caption {
  color: white;
  font-size: 14px; max-width: 800px;
  text-align: center; line-height: 1.5;
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none;
  color: white;
  font-size: 36px;
  cursor: pointer; line-height: 1;
  opacity: .8;
  transition: opacity .15s, transform .15s;
}
.lightbox-close:hover { opacity: 1; transform: scale(1.1); }

/* =========================================================
   BIBTEX
   ========================================================= */
.bib-wrap { position: relative; margin-top: 18px; }
.bib-wrap pre {
  background: var(--ink);
  color: #c8d4ec;
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid var(--ink-soft);
  box-shadow: var(--shadow-md);
  margin: 0;
}
.bib-wrap code { background: transparent; padding: 0; color: inherit; }
.bib-copy {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.bib-copy:hover { background: var(--accent); border-color: var(--accent); }
.bib-copy.copied { background: var(--good); border-color: var(--good); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--ink);
  color: #c8d4ec;
  padding: 56px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
.footer h4 {
  font-family: var(--font-serif);
  color: white;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
}
.footer p { font-size: 14.5px; line-height: 1.7; color: #98a8c8; margin: 0; }
.footer a { color: #c8d4ec; }
.footer a:hover { color: var(--accent-2); }

.contact-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 14px;
}
.contact-list li {
  line-height: 1.4;
}
.contact-name {
  color: white;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.005em;
  margin-bottom: 2px;
}
.contact-email {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #98a8c8;
  word-break: break-all;
}
.contact-email:hover { color: var(--accent-2); }
.footer hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 36px 0 18px;
}
.footer-fine {
  font-size: 13px;
  color: #6f7f9f;
  margin: 0;
}
.footer-fine .muted { color: #4f5d77; }

@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translate(-50%, 200%);
  background: var(--good);
  color: white;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform .25s ease, opacity .2s ease, visibility 0s linear .2s;
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .25s ease, opacity .2s ease, visibility 0s linear 0s;
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .topnav, .hero-actions, .bib-copy, .lightbox, .toast { display: none !important; }
  body { font-size: 12px; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}
