:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --ink: #0b1833;
  --muted: #5f6f86;
  --brand: #0b3a78;
  --brand-2: #2563eb;
  --brand-3: #66a3ff;
  --line: #d7e1ef;
  --shadow: 0 18px 48px rgba(11, 42, 91, 0.10);
  --radius: 22px;
  --radius-sm: 14px;
  --max-narrow: 1120px;
  --max-wide: 1380px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(102, 163, 255, 0.14), transparent 28%),
    var(--bg);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.section-narrow { max-width: var(--max-narrow); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section-wide { max-width: var(--max-wide); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 88px; padding-bottom: 36px; }

.site-header { position: relative; overflow: hidden; }
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,248,251,0.74));
  pointer-events: none;
}
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(215, 225, 239, 0.8);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-weight: 650; font-size: 14px; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--brand-2);
  transition: transform 0.22s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 24px; color: var(--ink); }

.hero { position: relative; padding-top: 76px; padding-bottom: 64px; text-align: center; }
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.09);
  border: 1px solid rgba(37, 99, 235, 0.16);
  font-size: 14px;
  font-weight: 750;
}
.hero h1 {
  margin: 20px 0 10px;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  color: #071636;
}
.subtitle {
  margin: 0 auto;
  max-width: 920px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.25;
  color: #1b3154;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.authors { margin: 24px 0 2px; font-size: 18px; }
.affiliation { margin: 0 0 26px; color: var(--muted); }
.action-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px 0 34px; }
.btn {
  min-width: 102px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 42, 91, 0.12); }
.btn.primary { color: white; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.hero-card {
  padding: 12px;
  border-radius: 26px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(215, 225, 239, 0.9);
  box-shadow: var(--shadow);
}
.hero-card img { border-radius: 18px; width: 100%; }

.section-title { margin-bottom: 28px; }
.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 900;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.section-lead { max-width: 820px; margin: 14px 0 0; color: var(--muted); font-size: 18px; }

.highlight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.highlight-card, .method-card, .prose-card, .paper-figure, .code-card, .visual-card, .table-wrap {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(215, 225, 239, 0.92);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.highlight-card { padding: 22px; }
.icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
  font-size: 13px;
}
.highlight-card h3, .method-card h3 { margin: 16px 0 8px; line-height: 1.2; }
.highlight-card p, .method-card p, .prose-card p { color: var(--muted); margin: 0; }
.highlight-card p + p, .method-card p + p, .prose-card p + p { margin-top: 12px; }

.prose-card { padding: 30px; }
.prose-card p { font-size: 18px; }

.method-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.method-card { padding: 28px; }
.method-card h3 { font-size: 26px; margin-top: 0; }
.clean-list { margin: 18px 0 0; padding-left: 20px; color: #344763; }
.clean-list li { margin: 8px 0; }
.figure-stack { margin-top: 26px; display: grid; gap: 22px; }
.paper-figure { margin: 0; padding: 12px; overflow: hidden; }
.paper-figure img { width: 100%; border-radius: 16px; background: white; }
.paper-figure figcaption { padding: 12px 8px 4px; color: var(--muted); font-size: 15px; }

.visual-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.visual-card { overflow: hidden; display: flex; flex-direction: column; min-height: 360px; }
.visual-top { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.visual-top h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.visual-top p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.carousel-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #edf4ff, #ffffff);
  overflow: hidden;
}
.carousel-frame img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption {
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 31px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px 16px;
  margin-top: auto;
}
.carousel-buttons { display: flex; gap: 8px; }
.carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}
.carousel-btn:hover { background: var(--panel-soft); }
.dots { display: flex; align-items: center; gap: 5px; max-width: 142px; overflow: hidden; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #bdcbe0;
  transition: width 0.2s ease, background 0.2s ease;
}
.dot.active { width: 18px; background: var(--brand-2); }

.table-wrap { overflow-x: auto; padding: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; overflow: hidden; border-radius: 18px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #16375f; background: #edf4ff; font-size: 14px; }
td { color: #31445f; }
tbody tr:last-child td { border-bottom: 0; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.code-card { position: relative; padding: 18px; background: #071636; color: #d7e9ff; }
.code-card pre { margin: 0; overflow-x: auto; padding: 18px; }
.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: white;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 800;
}
.footer { margin-top: 70px; padding: 28px 0; border-top: 1px solid var(--line); background: rgba(255,255,255,0.72); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); }
.footer a { color: var(--brand); font-weight: 800; }

@media (max-width: 1180px) {
  .highlight-grid, .visual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .section { padding-top: 62px; }
  .navbar { align-items: flex-start; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 62px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .hero { padding-top: 54px; }
  .method-layout, .highlight-grid, .visual-grid { grid-template-columns: 1fr; }
  .prose-card { padding: 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* --- v3 fixes: no image filenames, aligned carousel cards, full SOTA table --- */
#visualization .section-lead { max-width: 920px; }
.visual-grid { align-items: stretch; }
.visual-card { min-height: 0; height: auto; }
.visual-top {
  min-height: 72px !important;
  height: 72px !important;
  padding: 18px 18px 12px !important;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.visual-top h3 { margin: 0; min-height: 0 !important; line-height: 1.2; font-size: 20px; }
.visual-top p { display: none !important; }
.carousel-frame { aspect-ratio: 1 / 1 !important; height: auto; background: #05070c; }
.carousel-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.carousel-caption { display: none !important; }
.carousel-controls { min-height: 58px; padding: 12px 14px 16px; }
.carousel-count { color: var(--muted); font-size: 13px; font-weight: 750; margin-left: auto; margin-right: 10px; white-space: nowrap; }
.sota-table-wrap { padding: 0; border-radius: 24px; overflow-x: auto; }
.sota-table { min-width: 1120px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.sota-table caption { caption-side: top; padding: 18px 20px; color: var(--muted); text-align: left; font-size: 15px; line-height: 1.55; background: #ffffff; border-bottom: 1px solid var(--line); }
.sota-table th, .sota-table td { text-align: center; padding: 12px 13px; white-space: nowrap; }
.sota-table th:first-child, .sota-table td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: inherit; box-shadow: 1px 0 0 var(--line); }
.sota-table thead th { background: #edf4ff; color: #14335c; font-weight: 850; vertical-align: middle; }
.sota-table tbody tr { background: #fff; }
.sota-table tbody tr:nth-child(even) { background: #f8fbff; }
.sota-table tbody tr:hover { background: #eef5ff; }
.sota-table .ours-row { background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(102, 163, 255, 0.06)); color: #08204a; }
.sota-table .ours-row td:first-child { font-weight: 850; }
.metric-note { color: var(--muted); font-weight: 700; }
.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.ours-tag { display: inline-flex; margin-left: 6px; padding: 2px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-size: 11px; font-weight: 900; vertical-align: middle; }
@media (max-width: 760px) { .visual-top { min-height: 60px !important; height: 60px !important; } }


/* --- v4 compact A_score-only results table --- */
.compact-sota-table {
  min-width: 760px;
}

.compact-sota-table th,
.compact-sota-table td {
  padding: 13px 16px;
}

.compact-sota-wrap {
  max-width: 100%;
}

