:root {
  /* SANA palette — muted amethyst, deliberately NOT the #8b5cf6 AI-default violet */
  --accent: #5e4b8b;
  --accent-deep: #3f2d63;
  --accent-soft: #ece8f4;   /* tint for highlighted rows / active chips */
  --ink: #1a1a1f;
  --muted: #6b6b76;
  /* keep the rest of LakeQA's tokens (background, borders, radius, etc.) */
  --bg: #ffffff;
  --text: #172033;
  --primary: #5e4b8b;
  --light: #f5f8fb;
  --border: #dbe4ee;
  --display: "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Every heading + subheading uses the serif title font for one consistent voice */
h1, h2, h3, h4, h5, h6 { font-family: var(--display); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container,
.site-header .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-header .brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.012em;
}
.site-nav a {
  color: var(--text);
  margin-left: 24px;
  font-size: 15px;
}
.site-nav a:hover { color: var(--primary); text-decoration: none; }
.site-nav a.active { color: var(--primary); font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%,
      rgba(94, 75, 139, 0.10), transparent 70%),
    var(--light);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 64px;
  text-align: center;
}
.hero h1 {
  font-family: var(--display);
  font-size: 64px;
  margin: 0 0 14px;
  letter-spacing: -0.025em;
  color: var(--primary);
  font-weight: 700;
}
.hero .tagline {
  font-family: var(--display);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.4;
  font-weight: 400;
  max-width: 44em;          /* one line on desktop, wraps gracefully when narrow */
  margin: 0 auto 8px;       /* auto margins truly center the block, not just its text */
  color: var(--text);
  letter-spacing: 0.004em;
}
.hero .subtagline {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 32px;
  font-style: italic;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--primary);
  transition: background 0.12s ease;
}
.btn:hover {
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
}
.btn.btn-secondary {
  background: #fff;
  color: var(--primary);
}
.btn.btn-secondary:hover {
  background: var(--light);
  color: var(--primary);
}

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }
section h2 {
  font-family: var(--display);
  font-size: 30px;
  margin: 0 0 20px;
  color: var(--primary);
  letter-spacing: -0.012em;
  font-weight: 600;
}

/* Cap reading width inside the wide container on long-form pages
   (Details, Get started). Header / hero / leaderboard grid stay full-width. */
section > .container-wide > p,
section > .container-wide > ol,
section > .container-wide > ul,
section > .container-wide > h2,
section > .container-wide > h3,
section > .container-wide > .table-wrap,
section > .container-wide > .json-viewer,
section > .container-wide > .json-caption,
section > .container-wide > pre,
section > .container-wide > .banner,
section > .container-wide > .metric-groups,
section > .container-wide > .challenge-grid {
  max-width: 920px;
}
.page-title-strip > .container-wide > h1,
.page-title-strip > .container-wide > p {
  max-width: 920px;
}
section h3 {
  font-size: 19px;
  margin: 24px 0 8px;
  color: var(--text);
}
section p { margin: 0 0 16px; }

/* ---------- Challenge cards ---------- */

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.challenge {
  background: var(--light);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px;
  border-radius: 4px;
}
.challenge .num {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.challenge h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
}
.challenge p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Pipeline ---------- */

.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 8px;
  padding: 24px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.pipeline .node {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}
.pipeline .arrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}

/* When the pipeline lives in the narrow Home left column, stack vertically
   with downward arrows regardless of viewport size. */
.left-col .pipeline { flex-direction: column; }
.left-col .pipeline .arrow { transform: rotate(90deg); }

/* ---------- Stat cards ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  text-align: center;
}
.stat .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 4px;
}
.stat .label {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  background: var(--light);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--light); }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
th.num { text-align: right; }
td.rank {
  font-weight: 700;
  color: var(--muted);
  width: 40px;
}
td.model { font-weight: 500; }

/* Sortable column headers */
th.sortable {
  cursor: pointer;
  user-select: none;
}
th.sortable:hover { color: var(--primary); }
th.sortable .sort-arrow {
  display: inline-block;
  width: 10px;
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
}
th.sortable.sort-asc .sort-arrow::after  { content: "▲"; color: var(--primary); }
th.sortable.sort-desc .sort-arrow::after { content: "▼"; color: var(--primary); }

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab:hover { color: var(--primary); }

/* ---------- Banner / callout ---------- */

.banner {
  background: var(--light);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
}
.banner strong { color: var(--text); }

.placeholder {
  display: inline-block;
  background: #fff4cc;
  color: #8a6d00;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Citation ---------- */

.bibtex {
  background: #0e1822;
  color: #e6edf3;
  padding: 18px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ---------- Metric groups (evaluation page) ---------- */

.metric-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.metric-group {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px;
}
.metric-group h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--primary);
}
.metric-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.metric-group li {
  font-size: 14px;
  color: var(--text);
  padding: 4px 0;
}
.metric-group li code {
  background: #fff;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
}

/* ---------- Domain bars ---------- */

.domain-bars {
  margin-top: 16px;
}
.domain-row {
  display: grid;
  grid-template-columns: 220px 1fr 60px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}
.domain-row .name { color: var(--text); }
.domain-row .bar {
  height: 14px;
  background: var(--light);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.domain-row .bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.domain-row .pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.site-footer a { color: var(--muted); }

/* ---------- Two-column home grid ---------- */

.home-section { padding: 40px 0 64px; border-bottom: none; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 28px 24px;
  box-shadow:
    0 1px 0 rgba(94, 75, 139, 0.04),
    0 4px 12px -8px rgba(94, 75, 139, 0.10);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow:
    0 1px 0 rgba(94, 75, 139, 0.04),
    0 6px 20px -8px rgba(94, 75, 139, 0.16);
}
.card h3:first-child { margin-top: 0; }
.card h3 {
  font-family: var(--display);
  font-size: 24px;
  color: var(--primary);
  margin: 28px 0 12px;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.card-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.right-col {
  position: sticky;
  top: 24px;
}

.lb-footnote {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.lb-footnote code {
  background: var(--light);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
}

/* Inline links inside the "What is SANA?" card */
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 4px;
  font-size: 14px;
}
.inline-links a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.inline-links a:hover { color: var(--accent); }

/* ---------- JSON viewer (Details > Example task) ---------- */

.json-viewer {
  background: #0e1822;
  color: #e6edf3;
  padding: 22px 24px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  margin: 16px 0;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  tab-size: 2;
}
.json-viewer code {
  font-family: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.json-viewer .key      { color: #79c0ff; }
.json-viewer .str      { color: #a5d6ff; }
.json-viewer .num      { color: #ffa657; }
.json-viewer .bool,
.json-viewer .null     { color: #ff7b72; }
.json-viewer .punct    { color: #768390; }
.json-viewer .comment  { color: #8b949e; font-style: italic; }
.json-viewer .py-kw    { color: #ff7b72; }
.json-viewer .py-fn    { color: #d2a8ff; }
.json-viewer .py-str   { color: #a5d6ff; }
.json-viewer .py-com   { color: #8b949e; font-style: italic; }
.json-viewer .py-builtin { color: #ffa657; }

.json-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}
/* Task→profile mirror figure */
.profile-figure { margin: 18px 0 4px; text-align: center; }
.profile-figure img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 28px -18px rgba(94, 75, 139, 0.4);
}
.profile-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.json-caption code {
  font-style: normal;
  background: var(--light);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
}

/* ---------- Page-load fade ---------- */

@keyframes sana-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hero h1            { animation: sana-rise 0.55s ease-out both; }
.hero .tagline      { animation: sana-rise 0.55s 0.10s ease-out both; }
.hero .subtagline   { animation: sana-rise 0.55s 0.20s ease-out both; }
.home-grid > .card  { animation: sana-rise 0.55s 0.30s ease-out both; }
.home-grid > .right-col { animation-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero .tagline, .hero .subtagline,
  .home-grid > .card { animation: none; }
}

/* Secondary-page header band — same dark sakura treatment as the home hero,
   with the nav merged on top, but left-aligned content. */
.page-title-strip {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--accent-deep);
  padding: 116px 0 62px;
  background: #241636;
}
.page-title-strip h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 48px;
  color: #fff;
  letter-spacing: -0.018em;
  font-weight: 700;
  text-shadow: 0 2px 26px rgba(16, 9, 30, 0.5);
}
.page-title-strip p {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.45;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 26px rgba(16, 9, 30, 0.5);
}

/* ---------- Mobile ---------- */

@media (max-width: 980px) {
  .home-grid { grid-template-columns: 1fr; }
  .right-col { position: static; }
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 38px; }
  .hero .tagline { font-size: 18px; }
  .hero .subtagline { font-size: 15px; }
  section { padding: 36px 0; }
  section h2 { font-size: 22px; }

  .challenge-grid,
  .metric-groups { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* keep the brand left / nav top-right on a single row at every width */
  .site-header .container,
  .site-header .container-wide { gap: 12px; }
  .site-nav a { margin-left: 16px; }

  .pipeline { flex-direction: column; }
  .pipeline .arrow { transform: rotate(90deg); }

  .card { padding: 20px 18px; }

  .json-viewer {
    font-size: 12px;
    padding: 16px 18px;
  }

  .page-title-strip { padding: 92px 0 36px; }
  .page-title-strip h1 { font-size: 32px; }
  .page-title-strip p { font-size: 15px; }
}

/* --- Framework diagram (Home hero) --- */
.framework { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 4px; }
.fw-col { border: 1px solid var(--border, #e4e4ea); border-radius: 12px; padding: 14px 14px 10px; background: #fff; }
.fw-col > h4 { margin: 0 0 10px; font-size: 15px; letter-spacing: .02em; }
.fw-modes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fw-mode { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.fw-mode .dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); flex: none; }
.fw-mode.is-active { color: var(--ink); }
.fw-mode.is-active .dot { background: var(--accent); }
.fw-mode:hover, .fw-mode.is-hot { background: var(--accent-soft); color: var(--accent-deep); }

/* --- Mode chips (Method end-to-end / trajectory tables) --- */
.mode-chip { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #f3f3f6; color: var(--ink); }
.mode-chip.ideal { background: var(--accent-soft); color: var(--accent-deep); }

/* --- Key findings strip --- */
.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.finding { border-left: 3px solid var(--accent); padding: 6px 0 6px 14px; }
.finding h4 { margin: 0 0 4px; font-size: 15px; }
.finding p { margin: 0; font-size: 14px; color: var(--muted); }

/* --- Delta bar charts (Method) --- */
/* Paper-style grouped delta bars: length ∝ SM, color = delta sign. */
.delta-group { margin: 12px 0 20px; }
.delta-row { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 12px; margin: 6px 0; font-size: 13px; }
.delta-mode { color: var(--text); text-align: right; }
.delta-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.delta-bar { height: 18px; border-radius: 3px; min-width: 3px; flex: none; }
.delta-bar.base { background: #cdced6; }                 /* baseline (+0.0) */
.delta-bar.up   { background: #8fc7a0; }                 /* improvement */
.delta-bar.down { background: #e2a6ab; }                 /* regression */
.delta-val { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta-val .d-pos { color: #2f8a55; font-weight: 600; }
.delta-val .d-neg { color: #c0464f; font-weight: 600; }

/* --- Header logo --- */
.site-header .brand-row { display: flex; align-items: center; gap: 14px; }
.lab-logo { height: 26px; width: auto; opacity: .9; }
@media (max-width: 760px) {
  .framework, .findings { grid-template-columns: 1fr; }
}

.delta-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 0 0 18px; }
.d-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.d-select select {
  font: inherit; font-size: 13px; color: var(--ink);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 28px 5px 10px; background: #fff; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%235e4b8b' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 10px;
  transition: border-color .18s ease;
}
.d-select select:hover { border-color: var(--accent); }
.d-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.delta-group .label { font-size:13px; font-weight:600; margin-bottom:4px; }

/* --- Runtime-stage list: the three ablatable axes as a connected pipeline --- */
.axes {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  counter-reset: axis;
}
.axis {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 14px 0 16px;
}
/* connector rail threading the numbered nodes into one runtime loop */
.axis::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: -2px;
  width: 2px;
  background: linear-gradient(var(--accent) 0%, rgba(94, 75, 139, 0.18) 100%);
}
.axis:last-child::before { display: none; }

.axis-num {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-deep);
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px #fff;
}
.axis-body { min-width: 0; padding-top: 1px; }
.axis-body > h4 {
  margin: 3px 0 5px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent-deep);
  font-weight: 700;
}
.axis-does {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.axis-ideal {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.axis-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 6px;
  vertical-align: 1px;
}

/* --- Right column: stack findings as a takeaway list --- */
.right-col .findings { grid-template-columns: 1fr; gap: 12px; margin-top: 6px; }

/* --- Home left card: framework description + per-axis ideal captions + invite --- */
.fw-desc { margin: 0 0 4px; font-size: 15px; line-height: 1.55; color: var(--text); }
.fw-invite {
  margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 8px; padding: 11px 14px;
}
.fw-invite a { font-weight: 600; }

/* --- Boxed link buttons with icons --- */
.link-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 0; padding: 9px 15px;
  background: #fff; color: var(--primary); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: background .18s ease, border-color .18s ease;
}
.link-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.link-btn svg { width: 17px; height: 17px; flex: none; }
/* brand-tinted icons: arXiv red, GitHub dark purple */
#paper-link svg { color: #b31b1b; }
.link-btn[href*="github"] svg { color: var(--accent-deep); }

/* --- Pipeline page: stage strip + numbered stage headings --- */
.stage-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 4px; }
.stage-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px;
  font-size: 14px; font-weight: 500; color: var(--primary); text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}
.stage-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.stage-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.stage-arrow { color: var(--muted); }
.stage-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-right: 10px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  vertical-align: middle;
}
@media (max-width: 560px) {
  .stage-strip { flex-direction: column; align-items: flex-start; }
  .stage-arrow { transform: rotate(90deg); }
}

/* --- Easter egg overlay (Sana from TWICE) --- */
.egg-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 9, 30, 0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: egg-fade .18s ease-out both;
}
/* TWICE-style photocard: deep amethyst mat, portrait proportion, square corners */
.egg-card {
  position: relative;
  background: linear-gradient(157deg, #3f2d63 0%, #29183f 55%, #1b1030 100%);
  border: 1px solid rgba(207, 188, 245, 0.32);
  border-radius: 0;
  padding: 20px 20px 0;        /* even top/side mat; bottom mat comes from the caption */
  max-width: min(82vw, 332px);
  box-shadow:
    0 30px 80px -24px rgba(8, 4, 18, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: egg-pop .22s cubic-bezier(.2,.8,.25,1.2) both;
}
.egg-card img {
  display: block; width: 100%; height: auto; border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}
.egg-cap {
  margin: 0; padding: 26px 6px 34px;   /* generous bottom mat for a portrait card */
  text-align: center;
  font-family: var(--display);
  font-size: 16px; line-height: 1.4; letter-spacing: .01em;
  color: #f1e9ff;
}
.egg-close {
  position: absolute; top: 6px; right: 10px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; color: #fff; cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
@keyframes egg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes egg-pop { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .egg-overlay, .egg-card { animation: none; }
}

/* --- Hero: benchmark stat strip + lab logos (LakeQA-style) --- */
.hero-stats { margin: 4px auto 30px; max-width: 660px; }
.hero-stats-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.stat-strip {
  display: flex; justify-content: center;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 34px; text-decoration: none; text-align: center;
  transition: background .18s ease;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat:hover { background: rgba(94, 75, 139, 0.05); }
.stat-value {
  font-family: var(--display); font-size: 24px; font-weight: 600;
  color: var(--primary); letter-spacing: -0.01em;
}
.stat-value .ext { font-size: 15px; color: var(--accent); vertical-align: middle; }
.stat-label { font-size: 12px; color: var(--muted); }

.hero-logos { display: flex; justify-content: center; align-items: center; gap: 28px; }
.lab-logo-lg { height: 46px; width: auto; }

@media (max-width: 560px) {
  .stat-strip { flex-direction: column; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
}

/* --- Home hero: sakura background image with the nav merged on top (HotpotQA-style) --- */
.site-header--hero {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  background: transparent; border-bottom: 0;
}
/* On the dark sakura hero, nav + brand flip to light for contrast */
.site-header--hero .brand { color: #fff; }
.site-header--hero .site-nav a { color: rgba(255, 255, 255, 0.82); }
.site-header--hero .site-nav a:hover,
.site-header--hero .site-nav a.active { color: #fff; }

.hero--image {
  position: relative;
  overflow: hidden;
  padding: 116px 0 62px;
  border-bottom: 1px solid var(--accent-deep);
  background: #241636; /* deep amethyst fallback under the image */
}
/* darkened, richer sakuras */
.hero--image::before,
.page-title-strip::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: url("../sakuras.jpg") center 38% / cover no-repeat;
  filter: brightness(0.46) saturate(1.25) contrast(1.04);
}
/* amethyst tint + center vignette so the text reads cleanly */
.hero--image::after,
.page-title-strip::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 78% 66% at 50% 44%, rgba(40, 25, 62, 0.10), rgba(20, 12, 36, 0.58) 100%),
    linear-gradient(180deg, rgba(34, 21, 54, 0.55) 0%, rgba(34, 21, 54, 0.12) 46%, rgba(20, 12, 36, 0.62) 100%);
}
.hero--image > .container-wide,
.page-title-strip > .container-wide { position: relative; z-index: 1; }

.hero--image h1 { color: #fff; }
.hero--image .tagline { color: rgba(255, 255, 255, 0.92); }
.hero--image .hero-stats-label { color: rgba(255, 255, 255, 0.78); }
.hero--image h1,
.hero--image .tagline,
.hero--image .hero-stats-label { text-shadow: 0 2px 26px rgba(16, 9, 30, 0.5); }

/* benchmark strip: translucent frosted glass, bracketed by a vertical rule
   at the two outer ends of the row only (no full border, no inner divider) */
.hero--image .stat-strip {
  display: inline-flex;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: rgba(22, 13, 36, 0.42);
  box-shadow: none;
}
/* cells are transparent so the translucent strip shows through
   (overrides the leftover white .stat leaderboard-card rule) */
.hero--image .stat {
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: background .15s ease, box-shadow .15s ease;
}
.hero--image .stat + .stat { border-left: 0; }
.hero--image .stat:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(207, 188, 245, 0.95); /* purple outline on hover */
}
/* light text so it reads through the translucent panel */
.hero--image .stat-value { color: #fff; }
.hero--image .stat-value .ext { color: #d9c9f2; }
.hero--image .stat-label { color: rgba(255, 255, 255, 0.72); }

@media (max-width: 560px) {
  .hero--image { padding-top: 96px; }
}
