/* ==========================================================
   VibeTraining-Bench project page
   Palette follows the paper's figures: D = blue, T = orange, H = purple
   ========================================================== */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f3f1ec;
  --card: #ffffff;
  --ink: #15171c;
  --ink-2: #2d3139;
  --muted: #646b78;
  --line: #e5e1d8;
  --line-2: #d6d1c5;
  --d: #2b7bba;
  --t: #d9881a;
  --h: #8c5bb5;
  --d-soft: #e4effa;
  --t-soft: #fbefdc;
  --h-soft: #f0e7f8;
  --good: #15803d;
  --bad: #c2410c;
  --accent: #5b4bd6;
  --hero: #0b0d13;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px -12px rgba(20, 20, 30, .12);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Songti SC", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: .86em; background: rgba(0, 0, 0, .05); padding: .1em .35em; border-radius: 4px; }
sub, sup { font-size: .72em; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* ---------- progress + nav ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60;
  background: linear-gradient(90deg, var(--d), var(--t), var(--h)); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .25s, box-shadow .25s, color .25s; color: #e9ebf2; }
.nav.scrolled:not(.solid) { background: rgba(13, 16, 25, .78); backdrop-filter: saturate(1.35) blur(14px); -webkit-backdrop-filter: saturate(1.35) blur(14px); box-shadow: 0 1px 0 rgba(255, 255, 255, .1), 0 8px 28px rgba(0, 0, 0, .16); }
.nav.solid { background: rgba(251, 250, 247, .9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; grid-template-columns: repeat(3, 6px); gap: 3px; align-items: end; height: 18px; }
.brand-mark i { display: block; border-radius: 2px; }
.brand-mark .d { background: var(--d); height: 10px; }
.brand-mark .t { background: var(--t); height: 18px; }
.brand-mark .h { background: var(--h); height: 14px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: inherit; opacity: .78; font-size: .9rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { opacity: 1; text-decoration: none; background: rgba(127, 127, 127, .14); }
.nav-links a.lang-link { opacity: 1; margin-left: 6px; border: 1px solid currentColor; border-color: rgba(127, 127, 127, .45); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; color: inherit; }
.nav .nav-toggle span { background: currentColor; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--hero); color: #eef0f6; overflow: hidden; padding: 120px 0 0; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.g1 { width: 520px; height: 520px; background: #1f5fa3; left: -140px; top: -120px; }
.g2 { width: 460px; height: 460px; background: #8a5a12; right: 8%; top: 30%; opacity: .35; }
.g3 { width: 520px; height: 520px; background: #5a2f8c; right: -160px; top: -160px; opacity: .45; }
.grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #b9c0d4; border: 1px solid rgba(255, 255, 255, .16); padding: 5px 12px; border-radius: 999px; margin: 0 0 22px; background: rgba(255, 255, 255, .04); }
.hero h1 { display: inline-block; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.28; margin: 0; padding: 0 0 .14em; letter-spacing: -.035em; font-weight: 800; white-space: nowrap;
  background: linear-gradient(100deg, #ffffff 10%, #cfe3fb 40%, #ffd9a3 65%, #e0c9f7 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-family: var(--serif); font-size: clamp(1.25rem, 2.3vw, 1.7rem); line-height: 1.35; margin: 18px 0 18px; color: #dfe3ee; }
.authors { color: #9aa3b8; font-size: .95rem; margin: 0 0 28px; max-width: 760px; }
.authors p { margin: 0; }
.authors .author-list { color: #cbd1df; line-height: 1.65; }
.authors .affiliations { margin-top: 5px; font-size: .78rem; line-height: 1.6; }
.authors .author-notes { margin-top: 3px; font-size: .75rem; color: #858fa7; }
.authors sup { margin-left: 1px; font-size: .68em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: #e9ecf4;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn em { font-style: normal; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); color: #c8cede; }
.btn[aria-disabled="true"] { opacity: .65; cursor: default; }
.btn-primary { background: #fff; color: #111; border-color: #fff; }
.btn-primary:hover { background: #f2f2f2; color: #111; }
.btn-lang { border-color: rgba(167, 123, 214, .55); background: rgba(140, 91, 181, .16); }
.btn-lang:hover { background: rgba(140, 91, 181, .28); border-color: rgba(167, 123, 214, .8); }

.hero-visual { position: relative; }
.loop-svg { width: 100%; max-width: 460px; margin: 0 auto; display: block; overflow: visible; }
.orbit { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 1.2; }
.orbit-flow { fill: none; stroke-width: 2.2; stroke-dasharray: 6 12; opacity: .9; animation: flow 18s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -540; } }
.orbit-dot { transform-origin: 220px 190px; animation: spin 7s linear infinite; }
.orbit-dot circle { fill: #fff; filter: drop-shadow(0 0 6px #fff); }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-label { fill: #8d96ac; font-size: 11px; text-anchor: middle; letter-spacing: .04em; font-family: var(--sans); }
.tri { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 1.2; stroke-dasharray: 4 5; animation: flow 30s linear infinite reverse; }
.core { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .35); stroke-width: 1.2; }
.core-t { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; font-family: var(--sans); }
.core-s { fill: #b7bfd2; font-size: 11.5px; text-anchor: middle; font-family: var(--serif); font-style: italic; }
.node circle { stroke-width: 1.6; transition: transform .3s; }
.node { animation: pulse 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nt { animation-delay: 1.5s; } .nh { animation-delay: 3s; }
@keyframes pulse { 0%, 100% { filter: none; } 15% { filter: drop-shadow(0 0 14px var(--c)); } 35% { filter: none; } }
.nd { --c: #4c9be8; } .nd circle { fill: rgba(43, 123, 186, .28); stroke: #4c9be8; }
.nt { --c: #f0a33a; } .nt circle { fill: rgba(217, 136, 26, .26); stroke: #f0a33a; }
.nh { --c: #a77bd6; } .nh circle { fill: rgba(140, 91, 181, .3); stroke: #a77bd6; }
.nl { fill: #fff; font-size: 20px; font-weight: 800; text-anchor: middle; font-family: var(--sans); }
.ns { fill: #d4d9e6; font-size: 10px; text-anchor: middle; font-family: var(--sans); }
.grader rect { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .22); }
.grader text { fill: #cfd5e3; font-size: 12px; font-weight: 600; text-anchor: middle; font-family: var(--sans); }
.grader .lock { fill: none; stroke: #9fe3b5; stroke-width: 1.6; }

.hero-stats { position: relative; max-width: 1180px; margin: 64px auto 0; padding: 0 28px; display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .1); }
.stat { padding: 22px 18px 26px; border-right: 1px solid rgba(255, 255, 255, .08); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.stat span { font-size: .84rem; color: #98a1b6; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.sec-num { font-family: var(--mono); font-size: .8rem; color: var(--muted); letter-spacing: .06em; margin: 0 0 10px; text-transform: uppercase; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.18; letter-spacing: -.025em; margin: 0 0 22px; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 0 0 8px; letter-spacing: -.01em; }
h4 { margin: 0 0 6px; font-size: 1.02rem; }
.section p { color: var(--ink-2); }
.wrap.narrow > p, .lede { font-family: var(--serif); font-size: 1.16rem; line-height: 1.7; }
.sub-h { font-size: 1.4rem; text-align: center; margin: 72px 0 10px; letter-spacing: -.02em; }
.sub-h.left { text-align: left; margin-top: 0; }
.sub-p { text-align: center; max-width: 760px; margin: 0 auto 32px; color: var(--muted); }
.sub-p.wide { text-align: left; margin: 0 0 24px; max-width: 900px; }
.note { max-width: 900px; margin: 28px auto 0; font-size: .92rem; color: var(--muted); text-align: center; }

/* chips */
.chip { display: inline-block; font-family: var(--sans); font-size: .82em; font-weight: 600; padding: .08em .55em; border-radius: 6px; white-space: nowrap; }
.chip.d { background: var(--d-soft); color: #1d5f94; }
.chip.t { background: var(--t-soft); color: #9a5c08; }
.chip.h { background: var(--h-soft); color: #6c3f96; }
.chip.sm { font-size: .72rem; padding: 1px 6px; margin-right: 3px; font-family: var(--mono); }

/* TL;DR */
.tldr { padding-top: 84px; }
.lede { margin: 0 0 36px; }
.takeaways { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.takeaways li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tk-n { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: .9rem; padding-top: 2px; }
.takeaways b { color: var(--ink); }

/* headline */
.headline { padding: 0 0 24px; }
.headline-stack { display: grid; gap: 18px; }
.headline-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; padding: 36px 40px; border-radius: 20px;
  background: linear-gradient(135deg, #12151d, #1b1f2b); color: #eef0f6; box-shadow: 0 30px 60px -30px rgba(10, 12, 20, .5); }
.headline-card p { color: #c7cddb; }
.headline-card.terminal { background: linear-gradient(135deg, #151925, #202435); }
.kicker { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #8f99b0 !important; margin: 0 0 6px; }
.hl-big { font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; color: #fff !important; display: flex; align-items: baseline; gap: 12px; }
.hl-big .from { color: #7d869b; font-size: .6em; font-weight: 600; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(255, 255, 255, .25); }
.hl-big .arrow { color: #6c7590; font-size: .55em; }
.hl-big .to { background: linear-gradient(90deg, #8fc2f3, #f3c27f, #cfa9f2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-big .pct { font-size: .6em; color: #cfd5e3; margin-left: -8px; }
.hl-desc { margin: 0; font-size: .98rem; }
.hl-bars { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hbar { display: grid; grid-template-columns: 190px 1fr 44px; align-items: center; gap: 12px; font-size: .88rem; }
.hb-l { color: #b9c0d1; }
.hb-track { height: 12px; background: rgba(255, 255, 255, .07); border-radius: 999px; overflow: hidden; }
.hb-fill { height: 100%; width: 0; border-radius: 999px; transition: width 1.3s cubic-bezier(.2, .8, .2, 1); }
.in .hb-fill { width: var(--w); }
.hb-fill.base { background: #59627a; }
.hb-fill.h { background: var(--h); }
.hb-fill.dt { background: linear-gradient(90deg, var(--d), var(--t)); }
.hb-fill.ours { background: linear-gradient(90deg, var(--d), var(--t), var(--h)); }
.hb-fill.ref { background: repeating-linear-gradient(45deg, #9aa3b8 0 6px, #7c859b 6px 12px); }
.hb-v { font-family: var(--mono); color: #fff; text-align: right; }

/* pull quote */
.pull { margin: 34px 0; padding: 4px 0 4px 22px; border-left: 3px solid; border-image: linear-gradient(var(--d), var(--t), var(--h)) 1;
  font-family: var(--serif); font-style: italic; font-size: 1.32rem; line-height: 1.5; color: var(--ink); }

/* ladder */
.ladder { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1.1fr; align-items: stretch; margin: 40px 0 36px; }
.rung { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow); }
.rung p { margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.rung-lv { font-family: var(--mono); font-size: .74rem !important; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px !important; }
.rung ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.rung.ours { border: 1.5px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--d), var(--t), var(--h)) border-box; }
.rung-arrow { display: flex; align-items: center; justify-content: center; color: var(--line-2); font-size: 1.4rem; }

/* tables */
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.table-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.legend { margin: 0; font-size: .82rem; color: var(--muted); }
.legend .g { margin: 0 3px 0 10px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.caption { font-size: .86rem; color: var(--muted); margin: 14px 0 0; }

.protocol th, .protocol td { text-align: center; white-space: nowrap; }
.protocol th:first-child, .protocol td:first-child { text-align: left; }
.protocol .grp th { border-bottom: 0; padding-bottom: 2px; color: var(--ink-2); font-size: .74rem; }
.protocol .grp th span { display: block; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.protocol tr.ours td { background: linear-gradient(90deg, rgba(43, 123, 186, .07), rgba(217, 136, 26, .07), rgba(140, 91, 181, .08)); font-weight: 700; }
.protocol tr.ours td:first-child { border-left: 3px solid var(--accent); }
.g { font-weight: 700; font-size: 1.02rem; }
.g.y { color: #16a34a; } .g.p { color: #ea8a0c; } .g.n { color: #dc2626; } .g.na { color: #9ca3af; }

/* method */
.figure { margin: 36px 0 0; }
.figure img { width: 100%; border-radius: 12px; background: #fff; border: 1px solid var(--line); cursor: zoom-in; }
.figure.flat img { border: 0; }
.figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; line-height: 1.55; }
.steps { position: relative; list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.steps li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.steps li:nth-child(2), .steps li:nth-child(3) { border-color: rgba(91, 75, 214, .34); box-shadow: inset 0 3px 0 rgba(91, 75, 214, .14); }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 32px; width: 8px; height: 8px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg); }
.st-i { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; font-size: .85rem; color: #fff; margin-bottom: 10px; background: var(--ink); }
.steps li:nth-child(2) .st-i { background: linear-gradient(135deg, var(--d), var(--t), var(--h)); }
.steps li:nth-child(5) .st-i { background: var(--good); }
.steps p { margin: 0; font-size: .87rem; color: var(--muted); line-height: 1.55; }
.step-loop-arrow { width: calc(40% - 6px); margin: 8px 0 0 calc(20% + 3px); color: var(--line-2); text-align: center; }
.step-loop-arrow svg { display: block; width: 100%; height: 42px; overflow: visible; }
.step-loop-arrow path { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; }
.step-loop-arrow .arrow-head { stroke-linecap: round; stroke-linejoin: round; }
.step-loop-arrow span { display: inline-block; position: relative; margin-top: -14px; padding: 2px 10px; background: var(--bg); color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .01em; }
.loop-note-mobile { display: none; }
.equation { margin: 24px auto 0; max-width: 680px; padding: 16px 24px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line-2);
  font-family: var(--serif); font-size: 1.15rem; display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 6px; position: relative; }
.eq-gap { width: 28px; }
.eq-n { position: absolute; right: 18px; color: var(--muted); font-size: .95rem; }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { font-size: .93rem; margin: 0; color: var(--muted); }
.g-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #eef7f0; color: var(--good); margin-bottom: 14px; }
.g-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* tasks */
.tasks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.task { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.task:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(20, 20, 40, .3); }
.task .t-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; }
.task .t-ic svg { width: 21px; height: 21px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task .cap { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 0; }
.task h4 { font-size: 1.04rem; margin: 0; }
.task .edit { display: flex; gap: 4px; }
.task .edit .off { background: #f1f1f1; color: #b5b5b5; text-decoration: line-through; }
.task dl { margin: 0; font-size: .82rem; display: grid; grid-template-columns: 1fr; gap: 2px; }
.task dt { color: var(--muted); white-space: nowrap; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .045em; }
.task dt:not(:first-of-type) { margin-top: 8px; }
.task dd { margin: 0; color: var(--ink-2); line-height: 1.45; }
.task .budget { position: absolute; top: 16px; right: 14px; font-family: var(--mono); font-size: .76rem; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.task details { font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }
.task summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; }
.task summary::-webkit-details-marker { display: none; }
.task summary::before { content: "+ "; color: var(--muted); }
.task details[open] summary::before { content: "– "; }
.task details p { margin: 6px 0 0; font-size: .8rem; }

/* leaderboard */
.lb-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.hint { margin: 0; font-size: .82rem; color: var(--muted) !important; }
.seg { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: 500 .85rem var(--sans); color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg button:hover:not(.on) { color: var(--ink); }
.lb-card { padding: 8px 8px; }
.lb th, .lb td { text-align: right; white-space: nowrap; }
.lb th:first-child, .lb td:first-child { text-align: left; }
.lb thead th { cursor: pointer; user-select: none; position: relative; }
.lb thead th:hover { color: var(--ink); }
.lb thead th.sorted { color: var(--accent); }
.lb thead th.sorted::after { content: attr(data-dir); margin-left: 4px; }
.lb tbody tr { transition: background .15s; }
.lb tbody tr:hover { background: #faf8f3; }
.lb tr.ref td { color: var(--muted); font-style: italic; background: #fbfaf6; }
.lb tr.ref-last td { border-bottom: 2px solid var(--line-2); }
.lb .agent { display: flex; align-items: center; gap: 10px; font-style: normal; }
.lb .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lb .agent b { font-weight: 600; color: var(--ink); }
.lb .agent small { display: block; color: var(--muted); font-size: .74rem; }
.lb .rank { font-family: var(--mono); color: var(--muted); width: 18px; font-size: .8rem; }
.lb td.cell { font-family: var(--mono); font-size: .9rem; position: relative; }
.lb td.cell .v { position: relative; z-index: 1; }
.lb td.cell .heat { position: absolute; inset: 5px 4px; border-radius: 6px; z-index: 0; }
.lb td.best .v { font-weight: 700; color: var(--ink); }
.lb td.best .v::after { content: "▲"; font-size: .6em; color: var(--accent); margin-left: 4px; vertical-align: 2px; }
.lb td.avg { font-weight: 700; }
.lb .pos { color: var(--good); } .lb .neg { color: var(--bad); } .lb .zero { color: var(--muted); }

.task-chart { margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tc-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.tc-head h3 { margin: 0; }
.bars { position: relative; padding: 8px 0 26px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; height: 34px; }
.bar-row .bl { font-size: .88rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.bar-row .bt { position: relative; height: 20px; }
.bar-row .bf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 6px 6px 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); display: flex; align-items: center; justify-content: flex-end; }
.bar-row .bf span { font-family: var(--mono); font-size: .78rem; color: #fff; padding-right: 6px; font-weight: 600; }
.bar-row .bf.short span { position: absolute; left: 100%; color: var(--ink-2); padding-left: 6px; }
.bars .refline { position: absolute; top: 0; bottom: 18px; border-left: 2px dashed; z-index: 2; transition: left .8s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.bars .refline span { position: absolute; bottom: -20px; transform: translateX(-50%); font-size: .72rem; white-space: nowrap; font-weight: 600; background: var(--card); padding: 0 4px; }
.bars .refline.init { border-color: #9aa3b8; color: #6b7487; }
.bars .refline.inst { border-color: #2a2f3a; color: #2a2f3a; }
.bars-overlay { position: absolute; top: 0; bottom: 0; left: 162px; right: 0; pointer-events: none; }

/* findings */
.obs td:first-child { font-weight: 600; color: var(--ink); width: 30%; }
.obs td:nth-child(2) { color: var(--muted); width: 24%; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center; margin-top: 80px; }
.split.rev { grid-template-columns: .9fr 1.1fr; }
.split-fig { margin: 0; }
.split-fig.small img { max-width: 460px; margin: 0 auto; }
.split-text p { font-size: 1rem; }
.vt { margin-top: 18px; display: grid; gap: 8px; }
.vt-row { display: grid; grid-template-columns: 130px 1fr 18px 1fr; align-items: center; gap: 8px; font-size: .84rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.vt-row .tk { font-weight: 600; }
.vt-row .lab { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; }
.vt-row .ic { font-weight: 700; text-align: center; }
.vt-row.ok .ic { color: var(--good); } .vt-row.no .ic { color: var(--bad); }
.vt-head { display: grid; grid-template-columns: 130px 1fr 18px 1fr; gap: 8px; padding: 0 12px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.mini-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mini-stats b { display: block; font-size: 1.35rem; letter-spacing: -.02em; }
.mini-stats span { font-size: .8rem; color: var(--muted); line-height: 1.35; display: block; }
.ablation { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.ab-group { margin-bottom: 18px; }
.ab-group:last-child { margin-bottom: 0; }
.ab-group h5 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ab-row { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; height: 30px; font-size: .86rem; }
.ab-track { height: 14px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.ab-fill { height: 100%; border-radius: 999px; width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.ab-v { font-family: var(--mono); font-size: .82rem; text-align: right; }
.ab-tags { display: flex; gap: 2px; }

/* behavior */
.design-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: .86rem; margin: 30px 0 18px; }
.design-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.d { background: var(--d); } .sw.t { background: var(--t); } .sw.h { background: var(--h); }
.designs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.dpanel { grid-column: span 2; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px 8px; }
.dpanel:nth-child(4) { grid-column: 2 / span 2; }
.dpanel h5 { margin: 0 0 4px; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; }
.dpanel h5 em { font-style: normal; font-weight: 500; font-size: .72rem; color: var(--muted); }
.dpanel svg { width: 100%; height: auto; display: block; }
.dpanel .bar { transition: opacity .15s; cursor: default; }
.dpanel svg:hover .bar { opacity: .35; }
.dpanel svg .bar:hover { opacity: 1; }
.findings-cards { margin-top: 48px; }
.fcard h4 { margin: 12px 0 6px; font-size: 1.05rem; }
.fcard .f-main { color: var(--ink-2) !important; font-family: var(--serif); font-size: 1.02rem !important; line-height: 1.5; margin-bottom: 12px !important; }
.fcard ul { margin: 0; padding-left: 18px; font-size: .86rem; color: var(--muted); display: grid; gap: 6px; }

/* trajectory explorer */
.tx { display: grid; grid-template-columns: 290px 1fr; gap: 22px; margin-top: 18px; align-items: start; }
.tx-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.tx-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 10px 4px 2px; font-weight: 600; }
.tx-group:first-child { margin-top: 0; }
.tx-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; font: 500 .9rem var(--sans); color: var(--ink-2); transition: background .15s, border-color .15s; }
.tx-item:hover { background: rgba(255, 255, 255, .7); }
.tx-item.on { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); color: var(--ink); }
.tx-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.tx-item .sc { margin-left: auto; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.tx-main { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px; box-shadow: var(--shadow); min-height: 520px; }
.tx-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.tx-top h3 { font-size: 1.35rem; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.tx-top .meta { font-size: .84rem; color: var(--muted); margin: 0; }
.tx-score { text-align: right; }
.tx-score b { display: block; font-size: 2rem; letter-spacing: -.03em; line-height: 1; }
.tx-score span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tx-summary { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-2); margin: 0 0 20px; line-height: 1.6; }
.spark { margin: 0 0 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 6px; }
.spark h6 { margin: 0 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.spark svg { width: 100%; height: auto; display: block; overflow: visible; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 0 0 18px 46px; animation: fadeUp .4s both; }
.tl li .pin { position: absolute; left: 4px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: var(--muted); font-family: var(--mono); }
.tl li.sel .pin { border-color: #e2a500; background: #fff6d6; color: #8a6400; }
.tl li.gap { padding-bottom: 12px; color: var(--muted); font-size: .9rem; letter-spacing: .3em; }
.tl li.gap .pin { border-style: dashed; background: var(--bg); }
.tl .step-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--card); transition: border-color .2s; }
.tl li.sel .step-card { border-color: #f0cf6b; background: linear-gradient(180deg, #fffdf4, #fff); }
.tl .sh { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.tl .sh h5 { margin: 0; font-size: .98rem; }
.tl .sh h5 .chip { margin-right: 4px; vertical-align: 1px; }
.tl .res { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.tl .res i { font-style: normal; font-size: .7rem; color: var(--muted); margin-left: 4px; font-family: var(--sans); }
.tl .res .star { color: #e2a500; margin-left: 4px; }
.tl p { margin: 6px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.55; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* citation */
.bib { position: relative; background: #12141b; border-radius: var(--radius); padding: 22px 24px; }
.bib pre { margin: 0; overflow-x: auto; }
.bib code { background: none; color: #d8dcea; font-size: .86rem; padding: 0; line-height: 1.6; }
.copy { position: absolute; top: 14px; right: 14px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #e6e9f2; border-radius: 8px; padding: 5px 12px; font: 600 .8rem var(--sans); cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .14); }

.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: .88rem; }
.footer p { margin: 4px 0; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10, 12, 18, .85); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s; padding: 4vw; cursor: zoom-out; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Chinese page typography ---------- */
html[lang|="zh"] {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Source Serif 4", "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
}
html[lang|="zh"] body { line-height: 1.8; }
html[lang|="zh"] h2, html[lang|="zh"] .sub-h { letter-spacing: -.01em; }
html[lang|="zh"] .wrap.narrow > p, html[lang|="zh"] .lede { font-size: 1.1rem; line-height: 1.9; }
html[lang|="zh"] .eyebrow, html[lang|="zh"] .kicker { letter-spacing: .08em; }
html[lang|="zh"] .hero h1 { line-height: 1.28; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tasks { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step-loop-arrow { width: calc(66.667% - 5px); margin-left: calc(33.333% + 5px); }
  .steps li::after { display: none; }
  .designs { grid-template-columns: repeat(2, 1fr); }
  .dpanel, .dpanel:nth-child(4) { grid-column: auto; }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; top: 60px; left: 0; right: 0; flex-direction: column; background: rgba(251, 250, 247, .98); color: var(--ink); padding: 10px 16px 16px; box-shadow: 0 10px 20px rgba(0, 0, 0, .08); display: none; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; color: inherit; }
  .nav-links a.lang-link { margin: 6px 0 0; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .headline-card { grid-template-columns: 1fr; padding: 28px 24px; }
  .ladder { grid-template-columns: 1fr; gap: 10px; }
  .rung-arrow { transform: rotate(90deg); height: 24px; }
  .cards3 { grid-template-columns: 1fr; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 24px; }
  .tx { grid-template-columns: 1fr; }
  .tx-list { position: static; flex-direction: row; overflow-x: auto; max-height: none; }
  .tx-group { display: none; }
  .tx-item { white-space: nowrap; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(1.55rem, 8.3vw, 2.6rem); }
  .wrap { padding: 0 18px; }
  .section { padding: 68px 0; }
  .tasks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-loop-arrow { display: none; }
  .loop-note-mobile { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: .74rem; font-weight: 600; }
  .designs { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 1fr 44px; }
  .hb-l { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: 100px 1fr; }
  .bars-overlay { left: 112px; }
  .mini-stats { grid-template-columns: 1fr; }
  .vt-row, .vt-head { grid-template-columns: 90px 1fr 14px 1fr; }
  .tx-main { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hb-fill { width: var(--w); }
}
