/* OR-License site styles. One stylesheet for every page; tokens first, then components. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", monospace;
  --font-math: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;

  --bg: #ffffff;
  --bg-band: #f7f9f8;
  --bg-muted: #f0f3f1;
  --bg-hover: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #fafbfa;
  --fg: #0b1510;
  --fg-2: #2f3e37;
  --muted: #5d6c64;
  --subtle: #87958d;
  --border: #e3e8e5;
  --border-2: #d0d9d4;
  --brand: #12704a;
  --brand-2: #0b5a3a;
  --brand-soft: #e9f5ee;
  --brand-ink: #ffffff;
  --lime: #d5f17a;
  --lime-ink: #13241d;
  --warn: #b45309;
  --focus: #2563eb;
  --ref: #0b1510;
  --paper: #fffdf8;
  --schematic: #f3f6f4;

  --shadow-sm: 0 1px 2px rgba(15, 30, 22, .06);
  --shadow: 0 1px 2px rgba(15, 30, 22, .05), 0 10px 30px -14px rgba(15, 30, 22, .18);
  --shadow-lg: 0 2px 4px rgba(15, 30, 22, .04), 0 30px 70px -30px rgba(15, 30, 22, .32);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --container: 1152px;
  --narrow: 920px;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Creator colours as on Artificial Analysis; models from the same creator share one,
     so the line chart separates look-alike series with dash patterns. */
  --m-claude-opus-5: #cc785c;
  --m-deepseek-v4-1-flash: #2243e6;
  --m-doubao-seed-2-1-pro: #3c8bff;
  --m-gemini-3-8-flash: #34a853;
  --m-glm-5-3-flash: #1c7ff8;
  --m-gpt-5-6-sol: #1f1f1f;
  --m-grok-4-6: #736cd3;
  --m-hy3: #5cb9ff;
  --m-hy4-preview: #5cb9ff;
  --m-muse-spark-1-3: #0089f4;
  --m-qwen3-8-max: #ff7018;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08100c;
  --bg-band: #0c1511;
  --bg-muted: #121c17;
  --bg-hover: #13201a;
  --surface: #0e1713;
  --surface-2: #111b16;
  --fg: #e8f0eb;
  --fg-2: #c6d2cb;
  --muted: #98a89f;
  --subtle: #6d7d74;
  --border: #1d2a24;
  --border-2: #2b3b33;
  --brand: #4fca8e;
  --brand-2: #7fdcae;
  --brand-soft: #0f2a1d;
  --brand-ink: #04110a;
  --warn: #f59e0b;
  --focus: #93c5fd;
  --ref: #e8f0eb;
  --paper: #f4f1e9;
  --schematic: #eef2ef;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 36px 80px -30px rgba(0, 0, 0, .8);
  scrollbar-color: #33463c var(--bg);
  /* Near-black and deep blue would vanish on the dark background. */
  --m-gpt-5-6-sol: #e6e6e6;
  --m-deepseek-v4-1-flash: #5571f7;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
code, kbd, pre, samp { font-family: var(--font-mono); }
::selection { background: rgba(213, 241, 122, .75); color: #0b1510; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--fg); color: var(--bg); font-weight: 600; font-size: 14px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + 48px); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: calc(var(--narrow) + 48px); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { display: inline-flex; width: 28px; height: 28px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  padding: 6px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.site-nav a:hover { color: var(--fg); background: var(--bg-hover); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--bg-muted); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-controls { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted);
  transition: color .15s, background-color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--fg); background: var(--bg-hover); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
.theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.language-toggle {
  height: 32px; min-width: 44px; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--surface); color: var(--fg);
  font: 600 12.5px/1 var(--font-sans); letter-spacing: .02em;
  transition: border-color .15s, background-color .15s;
}
.language-toggle:hover { border-color: var(--brand); background: var(--bg-hover); }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-top: 34px; padding-bottom: 18px; }
.footer-brand p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--fg); }
.footer-links svg { width: 12px; height: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-bottom: 30px; font-size: 12.5px; color: var(--subtle); }
.footer-credit { flex-basis: 100%; margin-bottom: 4px; }
.footer-credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--fg); }

/* ---------- Shared building blocks ---------- */
.section { padding-block: 88px; }
.section.tight { padding-block: 64px; }
.section.ruled { border-top: 1px solid var(--border); }
.band { background: var(--bg-band); border-block: 1px solid var(--border); }
.section-header { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.section-header.left { margin-left: 0; text-align: left; }
.section-header h2 {
  margin: 14px 0 12px;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.028em;
  text-wrap: balance;
}
.section-header p { margin: 0 auto; max-width: 700px; color: var(--muted); font-size: 16px; text-wrap: pretty; }
.section-header.left p { margin-left: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font: 600 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.kicker { display: block; color: var(--brand); font: 600 11.5px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; font-size: 14px; color: var(--fg); border-bottom: 1px solid transparent; transition: border-color .15s, color .15s; }
.link-arrow:hover { color: var(--brand); border-color: currentColor; }
.link-arrow span[aria-hidden] { transition: transform .2s var(--ease); }
.link-arrow:hover span[aria-hidden] { transform: translateX(3px); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border: 1px solid var(--border-2); border-radius: 999px;
  background: var(--surface); color: var(--fg-2);
  font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.chip.soft { border-color: transparent; background: var(--bg-muted); }
.chip.code { font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; }
.tag-effort {
  display: inline-flex; align-items: center; padding: 1px 5px; border-radius: 4px;
  background: var(--bg-muted); color: var(--muted);
  font: 600 9.5px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border: 1px solid var(--border-2); border-radius: 9px;
  background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 550;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--bg-hover); border-color: var(--subtle); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { background: var(--fg-2); border-color: var(--fg-2); }
.btn.brand { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.brand:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; }
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-band);
}
.segmented button {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; line-height: 1.3; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.segmented button:hover { color: var(--fg); }
.segmented button[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: var(--shadow-sm); }
.segmented button:has(> svg:only-child) { display: inline-grid; place-items: center; padding: 5px 9px; }
.segmented svg { display: block; width: 15px; height: 15px; }
.toggle-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle-check input { appearance: none; width: 30px; height: 18px; margin: 0; border-radius: 999px; background: var(--border-2); position: relative; cursor: pointer; transition: background-color .2s; }
.toggle-check input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.toggle-check input:checked { background: var(--brand); }
.toggle-check input:checked::after { transform: translateX(12px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 24px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto; height: 760px; z-index: -1;
  background:
    radial-gradient(40% 50% at 50% 30%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%),
    radial-gradient(30% 40% at 78% 20%, rgba(213, 241, 122, .18), transparent 70%);
  pointer-events: none;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 6px 5px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: 13px; color: var(--muted); transition: border-color .15s, color .15s;
}
.hero-pill:hover { border-color: var(--border-2); color: var(--fg); }
.hero-pill b { color: var(--fg); font-weight: 600; }
.hero-pill .arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-muted); font-size: 12px; }
.hero-title {
  max-width: 1000px; margin: 22px auto 18px;
  font-size: clamp(32px, 4.7vw, 54px); line-height: 1.07; letter-spacing: -.038em; font-weight: 650;
  text-wrap: balance;
}
.hero-title .hero-name { color: var(--brand); }
.hero-question { max-width: 720px; margin: 0 auto; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted); text-wrap: balance; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 15px; border-radius: 8px;
  color: #fff; font: 650 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
  transition: transform .15s var(--ease), box-shadow .15s, filter .15s;
}
.badge:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.06); }
.badge svg { width: 18px; height: 18px; flex: none; }
.badge-github { background: #18181b; }
.badge-hf { background: #ffd21e; color: #2a2200; }
.badge-arxiv { background: #b31b1b; }
.badge-cite { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border-2); }
html[data-theme="dark"] .badge-github { background: #232326; box-shadow: inset 0 0 0 1px #3a3a40; }
.hero-art {
  position: relative; max-width: 1120px; margin: 44px auto 0;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  overflow: hidden; background: var(--desk, #f3f4ef); box-shadow: var(--shadow-lg);
  aspect-ratio: 1200 / 640;
}
.hero-art svg { display: block; width: 100%; height: 100%; }
.hero-lead { max-width: 780px; margin: 38px auto 0; color: var(--fg-2); font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 900px; margin: 34px auto 0; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm);
  text-align: left;
}
.hero-stats div { padding: 18px 22px; }
.hero-stats div + div { border-left: 1px solid var(--border); }
.hero-stats dt { font-size: 13px; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font-size: 28px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Hero illustration: authored as inline SVG so it follows theme and motion settings. */
.hero-art { --desk: #f2f3ee; }
html[data-theme="dark"] .hero-art { --desk: #0d1511; }
.art-desk-dots { fill: #d9ded6; }
html[data-theme="dark"] .art-desk-dots { fill: #1d2b24; }
.art-paper { fill: var(--paper); stroke: #e4dfd2; stroke-width: 1; }
html[data-theme="dark"] .art-paper { stroke: #cfc9bb; }
.art-shadow { fill: rgba(28, 40, 33, .16); }
html[data-theme="dark"] .art-shadow { fill: rgba(0, 0, 0, .55); }
.art-ink { fill: #24322b; }
.art-ink-2 { fill: #5d6a63; }
.art-stroke { stroke: #24322b; fill: none; }
.art-math { font-family: var(--font-math); font-style: italic; }
.art-label { font-family: var(--font-mono); font-weight: 600; letter-spacing: .12em; }
.art-bubble { fill: #ffffff; stroke: #d9dfda; }
html[data-theme="dark"] .art-bubble { fill: #16221c; stroke: #2e3f36; }
.art-bubble-text { fill: #24322b; }
html[data-theme="dark"] .art-bubble-text { fill: #dce7e0; }
.art-bubble.client { fill: #e8f5ee; stroke: #bfe0cd; }
html[data-theme="dark"] .art-bubble.client { fill: #133022; stroke: #24543c; }
.art-desk { fill: var(--desk); }
.art-hand { font-family: "Bradley Hand", "Segoe Print", "Chalkboard SE", "Comic Sans MS", cursive; }
.art-zh { display: none; }
html[lang="zh-CN"] .art-zh { display: inline; }
html[lang="zh-CN"] .art-en { display: none; }
html[lang="zh-CN"] .art-hand { font-family: "Kaiti SC", STKaiti, KaiTi, "Bradley Hand", cursive; }
.art-title-text { font-family: var(--font-sans); font-weight: 750; letter-spacing: -.045em; }
.art-title-rim { stroke: #f2fff7; }
html[data-theme="dark"] .art-title-rim { stroke: #163626; }
.art-layer { transform: translate(calc(var(--px, 0) * var(--depth, 0) * 1px), calc(var(--py, 0) * var(--depth, 0) * 1px)); transition: transform .9s var(--ease); }
.art-card { transform-box: fill-box; transform-origin: center; }
.js .art-card { opacity: 0; animation: art-in .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.hero-art.is-offscreen .art-flow, .hero-art.is-offscreen .art-float, .hero-art.is-offscreen .art-pulse { animation-play-state: paused; }
.art-grow { transform-box: fill-box; transform-origin: left center; animation: art-grow 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 700ms); }
.art-flow { stroke-dasharray: 6 6; animation: art-flow 1.6s linear infinite; }
.art-float { transform-box: fill-box; transform-origin: center; animation: art-float 6s ease-in-out infinite; }
.art-float.alt { animation-duration: 7.5s; animation-delay: -2s; }
.art-pulse { transform-box: fill-box; transform-origin: center; animation: art-pulse 2.4s ease-in-out infinite; }
@keyframes art-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes art-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes art-flow { to { stroke-dashoffset: -24; } }
@keyframes art-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes art-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .75; } }

/* ---------- Marquees ---------- */
.marquee-stack { display: grid; gap: 14px; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; padding: 6px 0 10px; animation: marquee var(--duration, 70s) linear infinite; }
.marquee[data-direction="reverse"] .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquees-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
.marquee-controls { display: flex; justify-content: center; margin-top: 14px; }
.marquee-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; }
.marquee-toggle:hover { color: var(--fg); border-color: var(--border-2); }
.marquee-toggle svg { width: 12px; height: 12px; }
.marquee-toggle .icon-play { display: none; }
.marquees-paused .marquee-toggle .icon-play { display: block; }
.marquees-paused .marquee-toggle .icon-pause { display: none; }

.method-card {
  --tint: #12704a;
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start;
  width: 312px; padding: 13px 15px 13px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.method-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tint); }
.method-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; color: var(--tint); background: color-mix(in srgb, var(--tint) 11%, var(--surface)); }
.method-icon svg { width: 30px; height: 30px; }
.method-head { display: flex; align-items: baseline; gap: 7px; }
.method-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.method-year { font: 500 11px var(--font-mono); color: var(--subtle); }
.method-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.method-link { display: inline-flex; gap: 4px; margin-top: 7px; font: 550 11px/1.3 var(--font-mono); color: var(--brand); }
.method-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.thumb-card {
  display: block; width: 252px; flex: none;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--schematic); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.thumb-card img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.thumb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.marquee-caption { max-width: 760px; margin: 28px auto 0; text-align: center; font-size: 14px; color: var(--muted); text-wrap: balance; }

/* ---------- Motivation figure ---------- */
.gaps { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto 1fr; column-gap: 20px; }
.gaps > .gap-col { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
.gap-card { display: flex; flex-direction: column; }
.gap-card .gap-note { margin-top: auto; }
.gap-card, .fix-card { position: relative; padding: 22px; border-radius: var(--radius-lg); }
.gap-card { border: 1px dashed var(--border-2); background: var(--bg-band); color: var(--muted); }
.gap-card h3, .fix-card h3 { margin: 10px 0 8px; font-size: 18px; line-height: 1.3; color: var(--fg); letter-spacing: -.015em; }
.gap-card p { margin: 0; font-size: 14px; }
.panel-number { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.gap-x { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; line-height: 1; }
.gap-diagram { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 14px; min-height: 52px; }
.gap-token { padding: 6px 10px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--surface); font-size: 12px; line-height: 1.3; color: var(--fg-2); text-align: center; }
.gap-unknown { font: 600 22px/1 var(--font-mono); color: var(--warn); }
.gap-note { margin: 0; font-size: 13px; font-weight: 600; color: var(--warn); }
.gap-link { display: grid; place-items: center; height: 38px; color: var(--brand); }
.gap-link svg { width: 20px; height: 20px; }
.fix-card { flex: 1; display: flex; flex-direction: column; gap: 12px; border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--border)); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); box-shadow: var(--shadow-sm); }
.fix-card .panel-number { color: var(--brand); }
.fix-card h3 { margin: 0; }
.fix-card p { margin: 0; font-size: 14px; color: var(--muted); }
.fix-strip { padding: 9px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; text-align: center; }
.fix-strip.dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.fix-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.fix-bottom { margin-top: auto !important; font-size: 13px !important; font-weight: 600; color: var(--brand) !important; }
.dialogue { display: grid; gap: 8px; }
.dialogue p { position: relative; margin: 0; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; max-width: 88%; }
.dialogue .ask { justify-self: start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--fg-2); }
.dialogue .reply { justify-self: end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.flow-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.flow-node { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.flow-node svg { width: 30px; height: 30px; color: var(--brand); }
.flow-arrow { color: var(--subtle); }
.figure-caption { margin: 22px auto 0; max-width: 820px; text-align: center; font-size: 13.5px; color: var(--muted); }
.figure-caption strong { color: var(--fg-2); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.principle { padding-top: 18px; border-top: 2px solid var(--brand); }
.principle .idx { font: 500 12px var(--font-mono); color: var(--brand); }
.principle h3 { margin: 10px 0 6px; font-size: 17px; }
.principle p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Leaderboard chart (HTML bars, progressively enhanced) ---------- */
.chart-card { padding: 20px 22px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 8px; }
.chart-toolbar .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart-sub { font-size: 12.5px; color: var(--muted); }
.lb { --max: 110; --n: 11; position: relative; }
.lb-plot { position: relative; }
.lb-bars { list-style: none; margin: 0; padding: 0; }
.lb-item { position: relative; }
.lb-name { font-weight: 550; }
.lb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.model-logo { display: block; flex: none; width: 18px; height: 18px; }
html[data-theme="dark"] .model-logo.is-mono { filter: invert(1); }
.lb-bar-wrap { position: relative; }
.lb-bar { position: absolute; background: var(--c); transition: height .7s var(--ease), width .7s var(--ease); }
.lb-value { position: absolute; font: 600 12px/1 var(--font-mono); color: var(--fg); white-space: nowrap; transition: bottom .7s var(--ease), left .7s var(--ease); font-variant-numeric: tabular-nums; }
.lb-err { position: absolute; pointer-events: none; opacity: .55; transition: all .7s var(--ease); }
.lb-err::before, .lb-err::after { content: ""; position: absolute; background: currentColor; }
.lb:not(.show-err) .lb-err { opacity: 0; }
.lb-ref-label { position: absolute; font: 500 11px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }

.lb[data-layout="columns"] { padding-bottom: 100px; }
.lb[data-layout="columns"] .lb-plot { height: 300px; margin-top: 26px; border-bottom: 1px solid var(--border-2);
  background-image: linear-gradient(var(--border) 1px, transparent 1px);
  background-size: 100% calc(25 / var(--max) * 300px * 1);
  background-position: 0 100%;
}
.lb[data-layout="columns"] .lb-plot::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100 / var(--max) * 100%);
  border-top: 1.5px dashed var(--ref); opacity: .55; z-index: 1;
}
.lb[data-layout="columns"] .lb-ref-label { right: 0; bottom: calc(100 / var(--max) * 100% + 6px); }
.lb[data-layout="columns"] .lb-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(4px, 1.2vw, 14px); }
.lb[data-layout="columns"] .lb-item { height: 100%; }
.lb[data-layout="columns"] .lb-bar-wrap { position: absolute; inset: 0; }
.lb[data-layout="columns"] .lb-bar { left: 9%; right: 9%; bottom: 0; height: calc(var(--v) / var(--max) * 100%); border-radius: 7px 7px 2px 2px; }
.lb[data-layout="columns"] .lb-value { left: 0; right: 0; text-align: center; bottom: calc(var(--v) / var(--max) * 100% + 7px); }
.lb.show-err[data-layout="columns"] .lb-value { bottom: calc((var(--v) + var(--e)) / var(--max) * 100% + 7px); }
.lb[data-layout="columns"] .lb-err { left: 50%; width: 1.5px; margin-left: -.75px; background: var(--fg); color: var(--fg); bottom: calc((var(--v) - var(--e)) / var(--max) * 100%); height: calc(2 * var(--e) / var(--max) * 100%); }
.lb[data-layout="columns"] .lb-err::before, .lb[data-layout="columns"] .lb-err::after { left: -4px; width: 9.5px; height: 1.5px; }
.lb[data-layout="columns"] .lb-err::before { top: 0; }
.lb[data-layout="columns"] .lb-err::after { bottom: 0; }
.lb[data-layout="columns"] .lb-label { position: absolute; top: calc(100% + 10px); left: -6px; right: -6px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 11.5px; line-height: 1.25; }
.lb[data-layout="columns"] .lb-label .model-logo { width: 22px; height: 22px; margin-bottom: 2px; }
.lb[data-layout="columns"] .lb-name { overflow-wrap: break-word; }

.lb[data-layout="rows"] .lb-plot { margin-top: 18px; }
.lb[data-layout="rows"] .lb-ref-label { position: static; display: block; text-align: right; margin-bottom: 6px; }
.lb[data-layout="rows"] .lb-bars { display: flex; flex-direction: column; gap: 9px; }
.lb[data-layout="rows"] .lb-item { display: grid; grid-template-columns: minmax(140px, 230px) minmax(0, 1fr); align-items: center; gap: 14px; }
.lb[data-layout="rows"] .lb-label { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.lb[data-layout="rows"] .lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb[data-layout="rows"] .lb-bar-wrap { height: 22px; margin-right: 54px; }
.lb[data-layout="rows"] .lb-bar-wrap::after { content: ""; position: absolute; top: -6px; bottom: -6px; left: calc(100 / var(--max) * 100%); border-left: 1.5px dashed var(--ref); opacity: .5; }
.lb[data-layout="rows"] .lb-bar { left: 0; top: 0; bottom: 0; width: calc(var(--v) / var(--max) * 100%); border-radius: 2px 6px 6px 2px; }
.lb[data-layout="rows"] .lb-value { top: 50%; transform: translateY(-50%); left: calc(var(--v) / var(--max) * 100% + 8px); }
.lb.show-err[data-layout="rows"] .lb-value { left: calc((var(--v) + var(--e)) / var(--max) * 100% + 8px); }
.lb[data-layout="rows"] .lb-err { top: 50%; height: 1.5px; margin-top: -.75px; background: var(--fg); color: var(--fg); left: calc((var(--v) - var(--e)) / var(--max) * 100%); width: calc(2 * var(--e) / var(--max) * 100%); }
.lb[data-layout="rows"] .lb-err::before, .lb[data-layout="rows"] .lb-err::after { top: -4px; height: 9.5px; width: 1.5px; }
.lb[data-layout="rows"] .lb-err::before { left: 0; }
.lb[data-layout="rows"] .lb-err::after { right: 0; }
.lb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.alpha-control { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-band); }
.alpha-control label { font-size: 13px; font-weight: 550; }
.alpha-control output { min-width: 64px; font: 600 13px var(--font-mono); color: var(--brand); }
.alpha-control input[type="range"] { flex: 1; min-width: 180px; accent-color: var(--brand); }
.alpha-control .hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.data-table { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child, .data-table .left { text-align: left; }
.data-table thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table .rank { width: 44px; color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.data-table .model-cell { display: flex; align-items: center; gap: 10px; }
.data-table .sd { margin-left: 6px; font-size: 12px; color: var(--subtle); }
.data-table .num { font-weight: 600; }
.data-table tr.is-best td { background: color-mix(in srgb, var(--lime) 22%, transparent); }
.data-table .inline-bar { display: inline-block; vertical-align: middle; width: 90px; height: 6px; margin-right: 10px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.data-table .inline-bar i { display: block; height: 100%; background: var(--c, var(--brand)); border-radius: 3px; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort-btn::after { content: "↕"; opacity: .35; font-size: 11px; }
th[aria-sort="descending"] .sort-btn::after { content: "↓"; opacity: 1; color: var(--brand); }
th[aria-sort="ascending"] .sort-btn::after { content: "↑"; opacity: 1; color: var(--brand); }
.table-note { margin: 12px 2px 0; font-size: 13px; color: var(--muted); }

/* ---------- Findings ---------- */
.findings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.finding { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.finding:hover { border-color: var(--border-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.finding-number { margin: 12px 0 2px; font-size: 38px; font-weight: 650; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.finding-number small { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.finding h3 { margin: 6px 0 8px; font-size: 16.5px; line-height: 1.35; }
.finding p { margin: 0; font-size: 14px; color: var(--muted); }
.finding-viz { margin: 18px 0 16px; display: grid; gap: 7px; }
.finding .link-arrow { margin-top: auto; font-size: 13px; }
.mini-row { display: grid; grid-template-columns: 112px 1fr 44px; align-items: center; gap: 8px; font-size: 12px; }
.mini-row .lbl { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); }
.mini-row .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .model-logo { width: 14px; height: 14px; }
.mini-row .val { text-align: right; font: 600 11.5px var(--font-mono); }
.mini-track { position: relative; height: 8px; border-radius: 4px; background: var(--bg-muted); }
.mini-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--brand)); }
.mini-track.ref::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: calc(var(--ref, 100) * 1%); border-left: 1.5px dashed var(--ref-color, var(--fg)); opacity: .6; }
.dot-strip { position: relative; height: 34px; margin: 6px 4px 0; }
.dot-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 4px; background: var(--bg-muted); }
.dot-strip .range { position: absolute; top: 13px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 30%, transparent); }
.dot-strip .pt { position: absolute; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-2); }
.dot-axis { display: flex; justify-content: space-between; font: 500 10.5px var(--font-mono); color: var(--subtle); }

/* ---------- Industry grid ---------- */
.industry-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin: 44px 0 16px; }
.industry-head h3 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.industry-head p { margin: 0; font-size: 13.5px; color: var(--muted); }
.industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.industry-card {
  --tint: #12704a;
  display: flex; flex-direction: column; gap: 6px; min-height: 92px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--border)); border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 9%, var(--surface));
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.industry-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tint) 45%, var(--border)); }
.industry-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.industry-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.industry-count { white-space: nowrap; font: 600 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--tint) 70%, var(--fg)); }
.industry-ids { font: 500 11px var(--font-mono); color: var(--muted); }
html[data-theme="dark"] .industry-card { background: color-mix(in srgb, var(--tint) 13%, var(--surface)); }
html[data-theme="dark"] .industry-count { color: color-mix(in srgb, var(--tint) 55%, #fff); }

/* ---------- ORSim teaser & chat ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.028em; line-height: 1.15; margin: 14px 0 14px; text-wrap: balance; }
.split .lead { color: var(--muted); font-size: 16px; }
.check-list { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 15px; }
.check-list li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.6' fill='none' stroke='%2312704a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
html[data-theme="dark"] .check-list li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.6' fill='none' stroke='%234fca8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.chat-card { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.chat-head b { color: var(--fg); font-weight: 600; }
.chat-stamp { font: 600 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--bg-muted); color: var(--muted); }
.chat { display: grid; gap: 10px; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.msg .avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-muted); font: 700 11px var(--font-mono); color: var(--fg-2); }
.msg.orsim .avatar { background: var(--fg); color: var(--lime); }
.msg .who { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.msg .bubble { padding: 10px 13px; border-radius: 4px 14px 14px 14px; background: var(--bg-band); border: 1px solid var(--border); font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.msg.orsim .bubble { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, var(--border)); }
.msg.boundary .bubble { border-style: dashed; }

/* ---------- CTA + citation ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding: 30px 32px; border-radius: var(--radius-xl);
  background: radial-gradient(120% 140% at 100% 0%, rgba(213, 241, 122, .35), transparent 50%), var(--fg);
  color: var(--bg);
}
.cta h2 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.025em; margin: 0 0 6px; }
.cta p { margin: 0; color: color-mix(in srgb, var(--bg) 72%, transparent); max-width: 620px; }
.cta .btn { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.cta .btn:hover { filter: brightness(1.05); background: var(--lime); }
html[data-theme="dark"] .cta { background: radial-gradient(120% 140% at 100% 0%, rgba(213, 241, 122, .18), transparent 50%), var(--surface-2); color: var(--fg); border: 1px solid var(--border); }
html[data-theme="dark"] .cta p { color: var(--muted); }
.cite-block { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); overflow: hidden; }
.cite-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cite-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; color: var(--fg-2); white-space: pre; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--surface); color: var(--fg); font: 550 12.5px var(--font-sans); letter-spacing: 0; text-transform: none; }
.copy-btn:hover { background: var(--bg-hover); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn .icon-check { display: none; color: var(--brand); }
.copy-btn.copied .icon-check { display: block; }
.copy-btn.copied .icon-copy { display: none; }
.authors { margin: 0 0 18px; font-size: 14.5px; line-height: 1.75; color: var(--fg-2); text-wrap: pretty; }

/* ---------- Page headers (inner pages) ---------- */
.page-head { padding: 56px 0 28px; }
.page-head h1 { margin: 12px 0 12px; font-size: clamp(32px, 4vw, 44px); letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.page-head .lead { max-width: 760px; margin: 0; font-size: 17px; color: var(--muted); text-wrap: pretty; }
.page-head .crumbs { font: 500 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }

/* ---------- Leaderboard page ---------- */
.lb-summary { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 0; margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.lb-summary > div { padding: 18px 20px; }
.lb-summary > div + div { border-left: 1px solid var(--border); }
.lb-summary .top { background: var(--fg); color: var(--bg); }
.lb-summary .top .lbl { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.lb-summary .top b { font-size: 22px; }
.lb-summary .lbl { display: block; font-size: 12.5px; color: var(--muted); }
.lb-summary b { display: block; margin-top: 4px; font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lb-summary small { display: block; margin-top: 2px; font-size: 12px; color: var(--subtle); }
.lb-summary .top small { color: color-mix(in srgb, var(--bg) 60%, transparent); }
html[data-theme="dark"] .lb-summary .top { background: var(--brand-soft); color: var(--fg); }
html[data-theme="dark"] .lb-summary .top .lbl, html[data-theme="dark"] .lb-summary .top small { color: var(--muted); }
.defs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.def { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.def > b { display: block; font-size: 14.5px; margin-bottom: 6px; }
.def p { margin: 0; font-size: 14px; color: var(--muted); }
.formula { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg-band); font: italic 16px/1.4 var(--font-math); color: var(--fg); overflow-x: auto; white-space: nowrap; }
.formula-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.callout { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 10px; background: var(--bg-band); font-size: 14px; color: var(--fg-2); }
.callout b { color: var(--fg); }
.callout p { margin: 0; }
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--brand); }

/* ---------- Tasks page ---------- */
.tasks-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 80px; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 22px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.filter-group h2 { margin: 0 0 8px; padding: 0 10px; font: 600 11px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.filter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.filter-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13.5px; text-align: left; transition: background-color .15s, color .15s; }
.filter-btn:hover { background: var(--bg-hover); color: var(--fg); }
.filter-btn[aria-pressed="true"] { background: var(--bg-muted); color: var(--fg); font-weight: 600; }
.filter-btn .count { font: 500 11.5px var(--font-mono); color: var(--subtle); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.k-chip { padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface); color: var(--muted); font: 550 12px/1.35 var(--font-sans); text-align: left; transition: all .15s; }
.k-chip:hover { color: var(--fg); border-color: var(--subtle); }
.k-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filter-help { margin: 8px 10px 0; font-size: 12px; line-height: 1.5; color: var(--subtle); }
.tasks-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--subtle); pointer-events: none; }
.search-box input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--fg); font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
.search-box input::placeholder { color: var(--subtle); }
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.tasks-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.clear-btn { padding: 0; border: 0; background: none; color: var(--brand); font-size: 13px; font-weight: 550; }
.clear-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.task-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.task-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.task-card:target { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.task-inner { display: grid; grid-template-columns: 196px minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding: 16px; }
.task-thumb { display: block; align-self: start; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--schematic); }
.task-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; transition: transform .35s var(--ease); }
.task-card:hover .task-thumb img { transform: scale(1.03); }
.task-id { font: 600 11px var(--font-mono); letter-spacing: .12em; color: var(--brand); }
.task-title { margin: 4px 0 8px; font-size: 17px; line-height: 1.3; letter-spacing: -.015em; }
.task-title a { color: inherit; text-decoration: none; }
.task-title a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.task-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; position: relative; z-index: 1; pointer-events: none; }
.task-summary { margin: 0; font-size: 14px; color: var(--muted); }
.task-side { display: grid; gap: 12px; align-content: start; font-size: 13px; }
.task-side h3, .dlg-section h3 { margin: 0 0 6px; font: 600 10.5px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.task-side .checks { display: flex; flex-wrap: wrap; gap: 5px; }
.task-side .checks span { padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-band); font-size: 12px; color: var(--fg-2); }
.task-side p { margin: 0; color: var(--fg-2); }
.tasks-view-cards .task-list { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.tasks-view-cards .task-inner { grid-template-columns: 1fr; gap: 12px; padding: 12px 12px 16px; }
.tasks-view-cards .task-side { display: none; }
.tasks-view-cards .task-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tasks-view-cards .task-body { padding: 0 4px; }
.empty-state { padding: 48px 20px; text-align: center; border: 1px dashed var(--border-2); border-radius: var(--radius-lg); color: var(--muted); }
.k-key { margin-top: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.k-key summary { padding: 14px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.k-key .k-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px; padding: 0 18px 16px; font-size: 13.5px; color: var(--muted); }
.k-key .k-grid b { display: block; margin-bottom: 2px; color: var(--fg); }
.k-key .note { padding: 0 18px 16px; margin: 0; font-size: 12.5px; color: var(--subtle); }
.contribute-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin: 0 0 28px; padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 12px; background: var(--bg-band); }
.contribute-callout h2 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.015em; }
.contribute-callout p { margin: 0; font-size: 14px; color: var(--muted); }

/* Task dialog */
.task-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg); overflow: hidden; }
.task-dialog::backdrop { background: rgba(6, 14, 10, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.task-dialog[open] { animation: dlg-in .28s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.dlg-shell { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--border); }
.dlg-head .task-id { font-size: 12px; }
.dlg-body { overflow-y: auto; padding: 22px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 26px; }
.dlg-figure { margin: 0; }
.dlg-figure a { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--schematic); }
.dlg-figure img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.dlg-figure figcaption { margin-top: 8px; font-size: 12px; color: var(--subtle); }
.dlg-title { margin: 0 0 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.dlg-summary { margin: 0 0 18px; color: var(--fg-2); font-size: 15px; }
.dlg-section { margin-top: 18px; }
.dlg-section ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--fg-2); }
.dlg-section li + li { margin-top: 3px; }
.dlg-section p { margin: 0; font-size: 14px; color: var(--fg-2); }
.dlg-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.dlg-meta dt { color: var(--subtle); }
.dlg-meta dd { margin: 0; color: var(--fg-2); }
.dlg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.dlg-foot .nav-btns { display: flex; gap: 8px; }

/* ---------- ORSim page ---------- */
.demo-brief { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.demo-brief-copy { padding: 24px 26px; background: var(--fg); color: var(--bg); }
.demo-brief-copy h3 { margin: 8px 0 10px; font-size: 22px; letter-spacing: -.02em; }
.demo-brief-copy p { margin: 0; color: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 15px; }
.demo-brief-copy .kicker { color: var(--lime); }
html[data-theme="dark"] .demo-brief-copy { background: var(--brand-soft); color: var(--fg); }
html[data-theme="dark"] .demo-brief-copy p { color: var(--fg-2); }
.demo-brief-meta { padding: 22px 24px; font-size: 13.5px; color: var(--muted); }
.demo-brief-meta p { margin: 0 0 10px; }
.demo-brief-meta b { display: block; color: var(--fg); margin-bottom: 2px; }
.demo-brief-meta a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.demo-counter { margin: 0; font-size: 14px; font-weight: 600; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; }
.stepper button { width: 100%; display: grid; gap: 2px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; color: var(--muted); transition: all .2s; }
.stepper button strong { font: 600 12px var(--font-mono); color: var(--fg); }
.stepper button span { font-size: 11.5px; }
.stepper button:hover { border-color: var(--border-2); }
.stepper button[aria-current="step"] { border-color: var(--brand); background: var(--brand-soft); color: var(--fg); box-shadow: inset 0 -2px 0 var(--brand); }
.stepper button.is-past { color: var(--fg-2); }
.stepper button.is-past strong { color: var(--brand); }
.demo-turn { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.demo-player.enhanced .demo-turn { box-shadow: var(--shadow); }
.demo-player:not(.enhanced) .demo-turn + .demo-turn, .demo-player.show-all .demo-turn + .demo-turn { margin-top: 14px; }
.demo-turn-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.demo-turn-num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg-muted); font: 650 13px var(--font-mono); }
.demo-phase { margin: 0; font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.demo-turn-head h3 { margin: 2px 0 0; font-size: 18px; }
.demo-turn-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.demo-conversation { padding: 20px; display: grid; gap: 12px; align-content: start; }
.demo-lesson { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-band); font-size: 13.5px; color: var(--fg-2); }
.demo-lesson::before { content: "→ "; color: var(--brand); font-weight: 700; }
.demo-inspector { padding: 20px; border-left: 1px solid var(--border); background: var(--surface-2); }
.demo-inspector h4 { margin: 0; font-size: 14px; }
.demo-reader-note { margin: 3px 0 14px; font-size: 11.5px; color: var(--subtle); }
.demo-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.demo-trace li { position: relative; padding: 0 0 14px 18px; border-left: 1px solid var(--border-2); margin-left: 4px; }
.demo-trace li:last-child { border-left-color: transparent; padding-bottom: 0; }
.demo-trace li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.demo-trace-label { display: block; font: 600 10.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.demo-trace strong { display: block; margin-top: 3px; font-size: 13.5px; }
.demo-trace p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.demo-ids { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 5px; background: var(--fg); color: var(--lime); font: 600 11.5px var(--font-mono); }
html[data-theme="dark"] .demo-ids { background: #000; }
.demo-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.outcome { margin-top: 28px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-sm); }
.outcome-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 30px; margin-bottom: 18px; }
.outcome-top h3 { margin: 6px 0 6px; font-size: 22px; letter-spacing: -.02em; }
.outcome-top p { margin: 0; color: var(--muted); max-width: 640px; font-size: 14.5px; }
.outcome-stat { text-align: right; }
.outcome-stat b { display: block; font-size: 36px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.outcome-stat span { font-size: 12.5px; color: var(--muted); }
.gantt { --label: 84px; position: relative; display: grid; gap: 10px; margin: 6px 0 14px; padding-top: 28px; }
.gantt-row { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); align-items: center; }
.gantt-lane-label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.gantt-lane { position: relative; height: 44px; border-radius: 10px; background: var(--bg-band); border: 1px solid var(--border); }
.gantt-op { position: absolute; top: 5px; bottom: 5px; left: calc(var(--s) * 1% + 2px); width: calc(var(--d) * 1% - 4px); display: flex; flex-direction: column; justify-content: center; padding: 0 8px; border-radius: 7px; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.15; overflow: hidden; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.gantt-op small { font: 500 10px var(--font-mono); opacity: .85; }
.gantt-op.clean { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--warn) 22%, var(--surface)) 0 6px, color-mix(in srgb, var(--warn) 10%, var(--surface)) 6px 12px); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.gantt-overlay { position: absolute; top: 0; bottom: 32px; left: var(--label); right: 0; pointer-events: none; }
.gantt-due { position: absolute; top: 0; bottom: 0; left: calc(var(--s) * 1%); width: 0; border-left: 1.5px dashed color-mix(in srgb, var(--fg) 55%, transparent); }
.gantt-due-label { position: absolute; top: 0; right: 4px; padding: 2px 7px; border-radius: 5px; background: var(--fg); color: var(--bg); font: 600 10.5px/1.4 var(--font-mono); white-space: nowrap; }
.gantt-axis { position: relative; height: 22px; margin-left: var(--label); font: 500 11px var(--font-mono); color: var(--subtle); }
.gantt-axis span { position: absolute; top: 4px; transform: translateX(-50%); }
.gantt-axis span:first-child { transform: none; }
.gantt-axis span:last-child { transform: translateX(-100%); }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.gantt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.gantt-legend i.clean-swatch { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--warn) 45%, var(--surface)) 0 3px, color-mix(in srgb, var(--warn) 14%, var(--surface)) 3px 6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 50%, transparent); }
.demo-cleaning { margin: 0 0 8px; font-size: 14px; color: var(--fg-2); }
.demo-eval-note { margin: 0; font-size: 12.5px; color: var(--subtle); }
.workflow { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: stretch; }
.steps { display: grid; gap: 8px; align-content: start; }
.step { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; color: var(--muted); transition: all .2s; }
.step span { font: 600 12px var(--font-mono); color: var(--subtle); }
.step b { font-size: 16px; font-weight: 600; color: var(--fg-2); }
.step:hover { border-color: var(--border-2); }
.step[aria-selected="true"] { border-color: var(--brand); background: var(--brand-soft); }
.step[aria-selected="true"] span { color: var(--brand); }
.step[aria-selected="true"] b { color: var(--fg); }
.stage-detail { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.stage-detail .kicker { margin-bottom: 14px; }
.stage-detail h3 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 12px; }
.stage-detail p { color: var(--fg-2); font-size: 15.5px; }
.stage-boundary { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--bg-band); font-size: 14px; color: var(--muted); }

/* ---------- Analysis page ---------- */
.analysis-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 80px; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); }
.toc h2 { margin: 0 0 10px; padding-left: 12px; font: 600 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border-left: 1px solid var(--border); }
.toc a { display: block; margin-left: -1px; padding: 6px 12px; border-left: 2px solid transparent; font-size: 13.5px; color: var(--muted); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--fg); }
.toc a[aria-current="true"] { color: var(--fg); font-weight: 600; border-left-color: var(--brand); }
.analysis-section { padding-top: 8px; }
.analysis-section + .analysis-section { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--border); }
.analysis-section > header { margin-bottom: 22px; }
.analysis-section > header h2 { margin: 8px 0 8px; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.028em; }
.analysis-section > header p { margin: 0; max-width: 760px; color: var(--muted); }
.figure-card { margin: 0 0 22px; padding: 22px 22px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.figure-card > figcaption { margin-bottom: 16px; }
.figure-card h3 { margin: 6px 0 6px; font-size: 19px; letter-spacing: -.02em; }
.figure-card .summary { margin: 0; max-width: 780px; font-size: 14px; color: var(--muted); }
.figure-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.figure-note + .figure-note { margin-top: 6px; }
.figure-card details { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.figure-card summary { width: fit-content; font-size: 13px; font-weight: 600; color: var(--brand); cursor: pointer; }
.figure-card details .table-wrap { margin-top: 12px; }
.figure-card details .data-table { font-size: 12.5px; }
.figure-card details .data-table th, .figure-card details .data-table td { padding: 8px 12px; }
.figure-card details caption { caption-side: top; padding: 10px 12px; text-align: left; font-size: 12px; color: var(--muted); }
.chart { position: relative; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-sans); fill: var(--muted); font-size: 12px; }
.chart .axis-title { fill: var(--fg-2); font-size: 12px; font-weight: 550; }
.chart .grid line { stroke: var(--border); }
.chart .axis-line { stroke: var(--border-2); }
.chart .ref-line { stroke: var(--ref); stroke-dasharray: 5 5; opacity: .6; }
.chart .ref-text { fill: var(--fg-2); font-size: 11.5px; font-weight: 550; }
.chart .series path { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; transition: opacity .2s, stroke-width .2s; }
.chart .series.dash path { stroke-dasharray: 7 5; }
.chart .series.dot path { stroke-dasharray: .5 5; }
.chart.has-focus .series:not(.is-focus) path { opacity: .14; }
.chart.has-focus .series.is-focus path { stroke-width: 3.2; }
.chart .series .end-label { font-size: 11.5px; font-weight: 600; transition: opacity .2s; }
.chart.has-focus .series:not(.is-focus) .end-label { opacity: .2; }
.chart .crosshair { stroke: var(--fg-2); stroke-width: 1; opacity: .35; }
.chart .hover-dot { stroke: var(--surface); stroke-width: 2; }
.chart .pt circle { stroke: var(--surface); stroke-width: 2; transition: r .2s; }
.chart .pt text { fill: var(--fg-2); font-size: 11.5px; font-weight: 550; }
.chart .pt:hover circle, .chart .pt:focus circle { r: 9; }
.chart .pt:focus { outline: none; }
.chart .pt:focus-visible circle { stroke: var(--focus); stroke-width: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.legend button, .legend span.item { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg-2); font-size: 12px; transition: all .15s; }
.legend button:hover, .legend button[aria-pressed="true"] { border-color: var(--border-2); background: var(--bg-hover); }
.legend button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--fg-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend i.line { width: 16px; height: 3px; border-radius: 2px; }
.legend i.line.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.legend i.line.dot { background: radial-gradient(circle, var(--c) 1.3px, transparent 1.6px) 0 50% / 4px 3px repeat-x; }
.stack-chart { display: grid; gap: 8px; }
.stack-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 52px; align-items: center; gap: 12px; }
.stack-label { font-size: 12.5px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.stack-bar { position: relative; display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--bg-band); }
.stack-bar.scaled { background: transparent; overflow: visible; }
.stack-bar.scaled .stack-fill { display: flex; height: 100%; border-radius: 6px; overflow: hidden; }
.seg { position: relative; height: 100%; flex: none; border: 0; padding: 0; background: var(--c); color: var(--ink, #fff); font: 600 10.5px/26px var(--font-mono); text-align: center; white-space: nowrap; overflow: hidden; cursor: default; transition: filter .15s, opacity .15s; }
.seg + .seg { box-shadow: inset 1px 0 0 rgba(255,255,255,.55); }
html[data-theme="dark"] .seg + .seg { box-shadow: inset 1px 0 0 rgba(0,0,0,.45); }
.seg:hover, .seg:focus-visible { filter: brightness(1.08) saturate(1.1); outline: none; }
.seg:focus-visible { box-shadow: inset 0 0 0 2px var(--focus) !important; }
.stack-chart.cat-focus .seg:not(.is-cat) { opacity: .2; }
.stack-total { font: 600 12px var(--font-mono); text-align: left; color: var(--fg-2); }
.stack-axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 52px; gap: 12px; margin-top: 2px; }
.stack-axis .ticks { position: relative; height: 18px; font: 500 10.5px var(--font-mono); color: var(--subtle); }
.stack-axis .ticks span { position: absolute; transform: translateX(-50%); }
.stack-axis .ticks span:first-child { transform: none; }
.stack-axis .ticks span:last-child { transform: translateX(-100%); }
.stack-axis .axis-name { grid-column: 2; text-align: center; font-size: 12px; color: var(--muted); }
.bubble-chart { display: grid; grid-template-columns: 150px repeat(6, minmax(0, 1fr)); align-items: center; gap: 4px 6px; }
.bubble-chart .col-head { padding-bottom: 6px; text-align: center; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.bubble-chart .col-head b { display: block; font: 600 11px var(--font-mono); color: var(--fg); }
.bubble-chart .row-head { font-size: 12.5px; color: var(--fg-2); text-align: right; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-cell { position: relative; display: grid; place-items: center; height: 48px; border: 0; padding: 0; border-radius: 8px; background: var(--bg-band); color: inherit; }
.bubble-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.bubble-cell .b { display: block; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: transform .2s var(--ease); }
.bubble-cell:hover .b, .bubble-cell:focus-visible .b { transform: scale(1.12); }
.bubble-cell .na { font: 500 11px var(--font-mono); color: var(--subtle); }
.bubble-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.bubble-legend .sizes { display: flex; align-items: center; gap: 10px; }
.bubble-legend .sizes span { display: inline-flex; align-items: center; gap: 6px; }
.bubble-legend .sizes i { display: inline-block; border-radius: 50%; background: var(--subtle); opacity: .6; }
.ramp { display: inline-block; width: 120px; height: 10px; border-radius: 5px; vertical-align: middle; margin: 0 6px; }
.heatmap { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.heatmap th { font-weight: 500; color: var(--fg-2); }
.heatmap thead th { padding: 6px 4px 10px; vertical-align: bottom; font-size: 12px; line-height: 1.3; text-align: center; }
.heatmap thead th b { display: block; font: 600 11.5px var(--font-mono); color: var(--fg); margin-bottom: 2px; }
.heatmap tbody th { padding-right: 10px; text-align: right; white-space: nowrap; font-size: 12.5px; }
.heatmap td { height: 38px; text-align: center; border-radius: 6px; font-size: 12.5px; font-weight: 550; transition: box-shadow .15s; }
.heatmap td:hover { box-shadow: inset 0 0 0 2px var(--fg); }
.heatmap .model-col { width: 170px; }
.heatmap .gap-col { width: 16px; }
.heatmap tr.expert th, .heatmap tr.expert td { border-top: 0; }
.heatmap tr.expert th { font-weight: 700; color: var(--fg); }
.heatmap tr.expert td { font-weight: 750; box-shadow: inset 0 2px 0 var(--fg); }
.heatmap tr.expert-sep td, .heatmap tr.expert-sep th { height: 6px; padding: 0; }
.heatmap .panel-head th { padding-bottom: 2px; font-size: 13px; font-weight: 650; text-align: center; }
.heatmap .panel-head .o { color: #6b4fa0; }
.heatmap .panel-head .s { color: #2f6f62; }
html[data-theme="dark"] .heatmap .panel-head .o { color: #c4b2ec; }
html[data-theme="dark"] .heatmap .panel-head .s { color: #9fd2c4; }
.heat-scroll { overflow-x: auto; }
.heat-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.heat-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* Tooltip shared by all charts */
.chart-tip {
  position: fixed; z-index: 80; left: 0; top: 0; max-width: 280px; padding: 9px 11px;
  border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface);
  box-shadow: var(--shadow); color: var(--fg); font-size: 12.5px; line-height: 1.45;
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
  visibility: hidden;
}
.chart-tip.show { visibility: visible; }
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip b { display: block; margin-bottom: 3px; font-size: 12.5px; }
.chart-tip .row { display: flex; justify-content: space-between; gap: 16px; }
.chart-tip .row span:last-child { font-family: var(--font-mono); font-weight: 600; }
.chart-tip .sw { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--c); }
.chart-hint { margin: 0 0 12px; font-size: 12.5px; color: var(--subtle); }

/* ---------- Reveal on scroll (site.js opts in, so content never depends on it) ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.reveal-on .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.not-found { padding: 120px 0; text-align: center; }
.not-found .code { font: 650 96px/1 var(--font-mono); letter-spacing: -.05em; color: var(--brand); }
.not-found h1 { margin: 18px 0 10px; font-size: 30px; }
.not-found p { color: var(--muted); }
.not-found .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------- Chinese typography ---------- */
html[lang="zh-CN"] body { font-family: var(--font-sans); }
html[lang="zh-CN"] :is(h1, h2, h3, .hero-title) { letter-spacing: 0; line-height: 1.3; }
html[lang="zh-CN"] .hero-title { font-size: clamp(28px, 4vw, 46px); }
html[lang="zh-CN"] :is(.pill, .kicker, .panel-number, .task-id, .filter-group h2, .toc h2, .data-table thead th) { letter-spacing: .06em; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .findings-grid { grid-template-columns: repeat(2, 1fr); }
  .task-inner { grid-template-columns: 170px minmax(0, 1fr); }
  .task-side { grid-column: 2; }
  .lb-summary { grid-template-columns: repeat(2, 1fr); }
  .lb-summary > div + div { border-left: 0; }
  .lb-summary > div:nth-child(even) { border-left: 1px solid var(--border); }
  .lb-summary > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .analysis-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: sticky; top: var(--header-h); z-index: 20; margin: 0 -24px; padding: 8px 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .toc h2 { display: none; }
  .toc ol { display: flex; gap: 4px; overflow-x: auto; border: 0; scrollbar-width: none; }
  .toc a { margin: 0; padding: 6px 10px; border: 0; border-radius: 8px; white-space: nowrap; }
  .toc a[aria-current="true"] { background: var(--bg-muted); }
}
@media (max-width: 860px) {
  :root { --header-h: 104px; }
  .header-inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; row-gap: 8px; }
  .header-actions { margin-left: auto; }
  .site-nav { order: 3; width: calc(100% + 48px); margin: 0 -24px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 11px; }
  .gaps, .principles, .split, .workflow, .defs { grid-template-columns: 1fr; }
  .gaps { grid-template-rows: none; row-gap: 28px; }
  .gaps > .gap-col { grid-row: auto; grid-template-rows: none; }
  .gap-link { height: 30px; }
  .tasks-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .filters { position: static; max-height: none; overflow: visible; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0; }
  .filter-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filter-btn { width: auto; white-space: nowrap; border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; }
  .filter-group h2 { padding: 0; }
  .filter-chips { padding: 0; }
  .filter-help { margin-left: 0; }
  .demo-brief, .demo-turn-body { grid-template-columns: 1fr; }
  .demo-inspector { border-left: 0; border-top: 1px solid var(--border); }
  .stepper { grid-template-columns: repeat(7, minmax(84px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .dlg-body { grid-template-columns: 1fr; }
  .k-key .k-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .site-nav { width: calc(100% + 36px); margin: 0 -18px; padding: 0 14px; }
  .site-nav a { padding: 6px 8px; }
  .toc { margin: 0 -18px; padding: 8px 18px; }
  .section { padding-block: 64px; }
  .section.tight { padding-block: 48px; }
  .hero { padding-top: 40px; }
  .hero-art { aspect-ratio: 4 / 3.1; border-radius: 16px; margin-top: 32px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats div:nth-child(3) { border-left: 0; }
  .hero-stats div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .hero-stats dd { font-size: 24px; }
  .dlg-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .dlg-foot .nav-btns { display: grid; grid-template-columns: 1fr 1fr; }
  .dlg-foot .btn { justify-content: center; white-space: nowrap; }
  .industry-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .industry-card { min-height: 84px; padding: 12px 14px; }
  .findings-grid { grid-template-columns: 1fr; }
  .method-card { width: 272px; }
  .thumb-card { width: 210px; }
  .task-inner { grid-template-columns: 1fr; }
  .task-side { grid-column: auto; }
  .task-thumb { max-width: 360px; }
  .lb-summary { grid-template-columns: 1fr; }
  .lb-summary > div:nth-child(even) { border-left: 0; }
  .lb-summary > div + div { border-top: 1px solid var(--border); }
  .lb[data-layout="rows"] .lb-item { grid-template-columns: 118px minmax(0, 1fr); gap: 10px; }
  .lb[data-layout="rows"] .lb-label { font-size: 12px; }
  .lb[data-layout="rows"] .lb-label .tag-effort { display: none; }
  .lb[data-layout="rows"] .lb-name { white-space: normal; overflow-wrap: break-word; line-height: 1.2; }
  /* The track is too short for labels that trail the bar; they would cross the reference line. */
  .lb[data-layout="rows"] .lb-value, .lb.show-err[data-layout="rows"] .lb-value { left: calc(100% + 6px); }
  .stack-row, .stack-axis { grid-template-columns: 96px minmax(0, 1fr) 44px; gap: 8px; }
  .stack-label { font-size: 11px; }
  .bubble-chart { grid-template-columns: 82px repeat(6, minmax(0, 1fr)); gap: 3px; }
  .bubble-chart .row-head { font-size: 10.5px; padding-right: 2px; }
  .bubble-chart .col-head { font-size: 0; }
  .bubble-chart .col-head b { font-size: 10.5px; }
  .bubble-cell { height: 38px; }
  .k-key .k-grid { grid-template-columns: 1fr; }
  .cta { padding: 24px 22px; }
  .outcome-stat { text-align: left; }
  .gantt { --label: 58px; }
  .gantt-op { padding: 0 4px; font-size: 10.5px; }
  .gantt-op small { display: none; }
  .gantt-op.clean { padding: 0; font-size: 0; }
  .gantt-due-label { padding: 1px 5px; font-size: 9px; }
  .gantt-axis span:nth-child(even) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .art-card { opacity: 1; }
  .reveal-on .reveal { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none !important; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .marquee-controls { display: none; }
}

@media print {
  .site-header, .site-footer, .marquee-controls, .header-actions, .filters, .tasks-toolbar, .toc, .demo-controls, .stepper { display: none !important; }
  .reveal-on .reveal { opacity: 1; transform: none; }
  .section { padding-block: 28px; }
  .hero-art { box-shadow: none; }
  .demo-player .demo-turn[hidden] { display: block !important; }
  body { font-size: 12px; }
}
