@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-400.woff2) format('woff2'); font-weight: 400; unicode-range: U+0020-007E, U+00A0-024F, U+2010-2027, U+2190-21FF, U+2318, U+2325; font-display: swap; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-500.woff2) format('woff2'); font-weight: 500; unicode-range: U+0020-007E, U+00A0-024F, U+2010-2027, U+2190-21FF, U+2318, U+2325; font-display: swap; }
@font-face { font-family: 'Geist'; src: url(fonts/geist-600.woff2) format('woff2'); font-weight: 600; unicode-range: U+0020-007E, U+00A0-024F, U+2010-2027, U+2190-21FF, U+2318, U+2325; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(fonts/geist-mono.woff2) format('woff2'); font-weight: 100 900; unicode-range: U+0020-007E, U+00A0-024F, U+2010-2027, U+2190-21FF, U+2318, U+2325; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --bg-1: #0f0f0f;
  --bg-2: #141414;
  --line: rgba(236, 231, 221, .09);
  --line-2: rgba(236, 231, 221, .16);
  --text: #ece7dd;
  --dim: #8d887e;
  --faint: #5a564f;
  --sig: #ff5a1f;
  --sig-soft: rgba(255, 90, 31, .14);
  --peach: #ffc799;
  --sans: 'Geist', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, 'PingFang SC', monospace;
  --serif: 'Instrument Serif', 'Songti SC', 'Noto Serif SC', serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--sig); color: #0a0a0a; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .88em; color: var(--peach); }
b { font-weight: 600; }
em { font-style: normal; color: var(--sig); }

.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── top bar ── */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad);
  background: rgba(10, 10, 10, .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1 var(--mono); text-decoration: none; letter-spacing: -.01em; }
.mark-caret { width: 3px; height: 18px; background: var(--sig); animation: blink 1.1s steps(1) infinite; box-shadow: 0 0 14px rgba(255, 90, 31, .7); }
@keyframes blink { 50% { opacity: 0; } }
.top nav { display: flex; gap: clamp(12px, 2.2vw, 30px); font: 400 13px/1 var(--sans); }
.top nav a { text-decoration: none; color: var(--dim); transition: color .2s; display: inline-flex; gap: 6px; align-items: baseline; }
.top nav a i { font: 400 10px/1 var(--mono); font-style: normal; color: var(--faint); }
.top nav a:hover { color: var(--text); }
.top nav a.ext { color: var(--text); font-family: var(--mono); font-size: 12px; }

/* ── generic ── */
main > section { position: relative; padding: 0 var(--pad); }
main { overflow-x: clip; }
.sec { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding-top: clamp(72px, 9vw, 128px) !important; }
.sec-rule {
  display: flex; gap: 18px; align-items: center;
  font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: clamp(36px, 5vw, 64px);
}
.sec-rule span:first-child { color: var(--sig); }
.sec-rule-r { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--faint); text-align: right; }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-head.wide { max-width: 900px; }
.sec-head h2 { font: 600 clamp(30px, 4.4vw, 60px)/1.12 var(--sans); letter-spacing: -.035em; margin: 0 0 22px; text-wrap: balance; }
.sec-head p { color: var(--dim); margin: 0; font-size: clamp(15px, 1.25vw, 17px); max-width: 680px; }
.sec-head p code { color: var(--text); }
.fine { color: var(--faint); font-size: 13px; line-height: 1.7; }
.fine code { color: var(--dim); }

/* corner registration ticks on frames */
.frame { position: relative; border: 1px solid var(--line-2); background: var(--bg-1); }
.tick { position: absolute; width: 11px; height: 11px; pointer-events: none; z-index: 3; }
.tick::before, .tick::after { content: ''; position: absolute; background: var(--sig); }
.tick::before { width: 11px; height: 1px; top: 5px; }
.tick::after { width: 1px; height: 11px; left: 5px; }
.tick.tl { top: -6px; left: -6px; } .tick.tr { top: -6px; right: -6px; }
.tick.bl { bottom: -6px; left: -6px; } .tick.br { bottom: -6px; right: -6px; }

/* ── hero ── */
.hero {
  min-height: calc(100vh - 52px); min-height: calc(100svh - 52px);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vw, 48px);
  padding-top: clamp(40px, 7vw, 96px) !important; padding-bottom: clamp(40px, 6vw, 80px) !important;
  max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto;
  --mx: 50%; --my: 40%;
}
.hero-grid {
  position: absolute; inset: 0 calc(-1 * var(--pad)); z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(520px 420px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
          mask-image: radial-gradient(520px 420px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; z-index: -2; pointer-events: none;
  width: 900px; height: 600px; left: 50%; top: 18%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 90, 31, .10), transparent 70%);
}
.meta { display: flex; align-items: center; gap: 10px; margin: 0; font: 400 12px/1.4 var(--mono); color: var(--dim); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 0 0 rgba(255, 90, 31, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .55); } 70% { box-shadow: 0 0 0 10px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }

.hero-code { margin: 0; }
.hero-code .frame { background: rgba(15, 15, 15, .6); padding: clamp(10px, 1.6vw, 22px) clamp(8px, 1.4vw, 18px); }
.hero-ed { width: 100%; height: 160px; }
.hero-fallback { margin: 0; font: 400 clamp(15px, 4vw, 52px)/1.4 var(--mono); color: var(--text); }
.hero-code figcaption { display: flex; gap: 16px; margin-top: 12px; font: 400 12px/1.5 var(--mono); color: var(--faint); }
.hero-code figcaption span:first-child { color: var(--sig); }
/* hero 编辑器融进页面:透明底、朱红粗光标 */
.hero-ed .cm-editor, .hero-ed .gutter, .hero-ed .cm-sticky-scroll, .hero-ed .monaco-editor-background { background: transparent !important; }
.hero-ed .cm-cursor { background: var(--sig) !important; width: 3px !important; box-shadow: 0 0 18px rgba(255, 90, 31, .65); }

.hero-body { display: flex; flex-direction: column; gap: clamp(20px, 2.6vw, 32px); }
.hero-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.hero-side .lede { margin: 0; max-width: 640px; }
h1 { font: 600 clamp(40px, 6.2vw, 92px)/1.04 var(--sans); letter-spacing: -.045em; margin: 0; }
h1 em { position: relative; }
.lede { margin: 0 0 24px; color: var(--dim); font-size: clamp(15px, 1.3vw, 18px); }
.lede b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.lede code { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.install { display: flex; align-items: center; border: 1px solid var(--line-2); background: var(--bg-1); }
.install code { padding: 12px 16px; color: var(--text); font-size: 14px; white-space: nowrap; }
.install .prompt { color: var(--sig); margin-right: 8px; }
.install button, .cta {
  font: 500 13px/1 var(--sans); cursor: pointer; border: 0; padding: 0 16px; align-self: stretch;
  display: inline-flex; align-items: center; text-decoration: none;
}
.install button { background: var(--text); color: var(--bg); min-width: 64px; justify-content: center; transition: background .15s; }
.install button:hover { background: #fff; }
.cta { color: var(--text); border: 1px solid var(--line-2); padding: 12px 18px; transition: border-color .2s, background .2s; }
.cta:hover { border-color: var(--sig); background: var(--sig-soft); }

/* HUD readouts */
.hud { margin: 0; display: grid; border: 1px solid var(--line); }
.hud > div { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.hud dt { font: 400 11px/1.3 var(--mono); color: var(--faint); letter-spacing: .02em; }
.hud dd { margin: 6px 0 0; display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.hud dd b { font: 400 clamp(22px, 2.3vw, 30px)/1 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); transition: color .4s; }
.hud dd b.flash { color: var(--sig); transition: none; }
.hud dd small { font: 400 12px/1 var(--mono); color: var(--faint); }
.hud p { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--faint); }
.hud-hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hud-hero > div:last-child { border-right: 0; }

/* ── 01 live ── */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 0; border: 1px solid var(--line-2); border-bottom: 0; width: max-content; max-width: 100%; }
.tabs button {
  font: 500 13px/1 var(--sans); color: var(--dim); background: transparent; border: 0; border-right: 1px solid var(--line-2);
  padding: 13px 18px; cursor: pointer; transition: color .2s, background .2s; position: relative;
}
.tabs button:last-child { border-right: 0; }
.tabs button i { font: 400 11px/1 var(--mono); font-style: normal; color: var(--faint); margin-left: 6px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--bg-2); }
.tabs button[aria-selected="true"]::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--sig); }
.tabs button[aria-selected="true"] i { color: var(--sig); }

.bench { display: grid; grid-template-columns: minmax(0, 1fr) 260px; border: 1px solid var(--line-2); }
.bench-ed { border: 0; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-width: 0; }
.bench-ed .ed { height: min(560px, 68vh); }
.caption {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 16px;
  border-top: 1px solid var(--line); background: var(--bg); font-size: 13.5px; color: var(--text);
}
.caption .keys { display: inline-flex; gap: 4px; }
.caption .keys:empty { display: none; }
.caption kbd {
  font: 500 12px/1 var(--mono); padding: 5px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px;
  color: var(--peach); background: var(--bg-2); border-radius: 3px;
}
.caption.step .keys kbd { animation: keyin .35s ease-out both; }
@keyframes keyin { from { transform: translateY(4px); opacity: 0; } }
.hud-bench { border: 0; grid-template-columns: 1fr; align-content: start; background: var(--bg); }
.hud-bench > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; }
.hud-bench > div:last-child { border-bottom: 0; }
.bench-foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-top: 14px; }
.bench-foot p { margin: 0; color: var(--dim); font-size: 13.5px; max-width: 720px; }
.big-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.big-actions[hidden] { display: none; }
.big-actions button {
  font: 500 12.5px/1 var(--sans); color: var(--text); background: transparent; border: 1px solid var(--line-2);
  padding: 9px 12px; cursor: pointer; transition: border-color .2s;
}
.big-actions button:hover { border-color: var(--sig); }
.big-actions output { font: 400 12px/1.4 var(--mono); color: var(--peach); }

/* ── 02 size ── */
.size-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 6vw, 96px); align-items: end; margin-bottom: 56px; }
.size-top .sec-head { margin-bottom: 8px; }
.giant { display: flex; align-items: flex-start; gap: 14px; line-height: .8; }
.giant b {
  font: 400 clamp(120px, 19vw, 280px)/.8 var(--serif); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 10%, #b9b3a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.giant span { font: 500 clamp(18px, 2vw, 26px)/1 var(--mono); color: var(--sig); padding-top: .4em; display: flex; flex-direction: column; gap: 8px; }
.giant small { font: 400 12px/1.3 var(--mono); color: var(--faint); }

.ruler { --scale: 1200; margin-bottom: 64px; }
.ruler-scale { display: flex; justify-content: space-between; margin-left: 200px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 400 10.5px/1 var(--mono); color: var(--faint); }
.bar-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 0; padding: 18px 0; border-bottom: 1px solid var(--line); position: relative; }
.bar-label { font: 500 13px/1.3 var(--mono); color: var(--text); padding-right: 16px; }
.bar-track {
  display: flex; height: 44px; position: relative;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 25% 100%;
}
.seg { display: block; height: 100%; width: calc(var(--w) / var(--scale) * 100%); position: relative; transform-origin: left; transform: scaleX(0); transition: transform 1.3s cubic-bezier(.2, .8, .1, 1); }
.ruler.in .seg { transform: scaleX(1); }
.ruler.in .seg-mon2 { transition-delay: 1s; }
.seg em { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font: 500 12px/1 var(--mono); white-space: nowrap; }
.seg-lite { background: var(--sig); box-shadow: 0 0 40px rgba(255, 90, 31, .35); }
.seg-lite em { color: #0a0a0a; }
.seg-mon { background: #3a3732; }
.seg-mon em { color: var(--text); }
.seg-mon2 { background: repeating-linear-gradient(135deg, #3a3732 0 4px, #24221f 4px 8px); }
.bar-note { grid-column: 2; font: 400 11.5px/1 var(--mono); color: var(--faint); margin-top: 8px; }
.ruler-foot { margin: 16px 0 0 200px; color: var(--faint); font-size: 13px; max-width: 760px; }
.ruler-foot code { color: var(--dim); }

.spec { border-top: 1px solid var(--line-2); }
.spec-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.spec-row > span { padding: 15px 16px 15px 0; font-size: 14px; color: var(--dim); }
.spec-row > span:nth-child(2) { color: var(--text); }
.spec-row > span:first-child { font: 400 12px/1.6 var(--mono); color: var(--faint); padding-top: 17px; }
.spec-head > span { font: 400 11px/1 var(--mono) !important; color: var(--faint) !important; letter-spacing: .06em; text-transform: uppercase; padding: 14px 16px 14px 0; }
.spec-head > span:nth-child(2) { color: var(--sig) !important; }

/* ── 03 proof ── */
.matrix-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0 40px; }
.matrix-score { grid-row: span 2; display: flex; flex-direction: column; gap: 10px; }
.matrix-score b { font: 400 clamp(64px, 6.4vw, 96px)/.9 var(--serif); letter-spacing: -.03em; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.matrix-score b small { display: block; font: 400 15px/1 var(--mono); color: var(--faint); letter-spacing: 0; margin-top: 14px; }
.matrix-score > span { font: 400 12px/1.4 var(--mono); color: var(--sig); }
.matrix { position: relative; }
.matrix canvas { display: block; width: 100%; cursor: crosshair; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 380px;
  background: rgba(20, 20, 20, .96); border: 1px solid var(--line-2); padding: 10px 12px;
  font-size: 12.5px; line-height: 1.55; color: var(--dim); box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.tip b { display: block; font: 500 12px/1.4 var(--mono); color: var(--text); word-break: break-all; margin-bottom: 4px; }
.tip .ok { color: var(--sig); font-family: var(--mono); }
.legend { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 12px/1.4 var(--mono); color: var(--dim); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; display: inline-block; }
.legend b { color: var(--text); font-weight: 500; }

.proof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); margin-top: clamp(72px, 9vw, 120px); }
.proof-grid h3 { font: 600 clamp(22px, 2.2vw, 28px)/1.25 var(--sans); letter-spacing: -.025em; margin: 0 0 14px; }
.proof-grid h3 b { font: 400 1.5em/1 var(--serif); color: var(--sig); font-weight: 400; margin-right: 4px; }
.proof-grid p { color: var(--dim); font-size: 14.5px; margin: 0 0 18px; }
.proof-grid p b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.lang-wall { font: 400 12.5px/1.95 var(--mono) !important; color: var(--faint) !important; word-spacing: .35em; }
.lang-wall span { transition: color .25s; }
.lang-wall span.on { color: var(--peach); }
.eng { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.eng:first-of-type { border-top: 1px solid var(--line); }
.eng-name { font: 500 13px/1 var(--mono); }
.eng-bar { height: 8px; background: #2a2825; position: relative; overflow: hidden; }
.eng-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--a) / var(--t) * 100%); background: var(--sig); transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2, .8, .1, 1); }
.engines.in .eng-bar i { transform: scaleX(1); }
.engines.in .eng:nth-of-type(2) .eng-bar i { transition-delay: .15s; }
.engines.in .eng:nth-of-type(3) .eng-bar i { transition-delay: .3s; }
.eng-num { font: 400 12px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.eng-num b { color: var(--text); font-weight: 500; }
.engines .fine { margin-top: 16px; }

/* ── 04 migrate ── */
.diff-frame { margin-bottom: 28px; }
.diff-heads { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); font: 400 11.5px/1 var(--mono); color: var(--faint); }
.diff-heads span { padding: 12px 16px; }
.diff-heads span:last-child { color: var(--sig); border-left: 1px solid var(--line); }
#mig-diff { height: 336px; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.steps li { padding: 18px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--dim); }
.steps li:last-child { border-right: 0; }
.steps i { font: 400 11px/1 var(--mono); font-style: normal; color: var(--sig); }
.steps b { color: var(--text); font-size: 15px; }

/* ── 05 known ── */
.issues { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.issues li { display: grid; grid-template-columns: 120px 220px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.issues code { color: var(--sig); font-size: 12px; }
.issues b { font-size: 16px; }
.issues p { margin: 0; color: var(--dim); font-size: 14.5px; }
.issues p em { color: var(--peach); }

/* ── footer ── */
.foot {
  max-width: calc(var(--max) + 2 * var(--pad)); margin: clamp(96px, 12vw, 160px) auto 0; padding: 32px var(--pad) 48px;
  display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: start;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint);
}
.foot p { margin: 0; max-width: 720px; line-height: 1.7; }
.foot-mark { display: inline-flex; align-items: center; gap: 10px; font: 500 14px/1 var(--mono); color: var(--text); }
.foot a { font-family: var(--mono); text-decoration: none; color: var(--dim); }
.foot a:hover { color: var(--text); }
.foot-links { display: flex; gap: 20px; }

/* ── motion ── */
.rise { animation: rise .9s cubic-bezier(.2, .8, .1, 1) both; animation-delay: calc(var(--d) * 110ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.reveal { transition: opacity .9s cubic-bezier(.2, .8, .1, 1), transform .9s cubic-bezier(.2, .8, .1, 1); }
html:not(.no-js) .reveal:not(.in) { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) {
  .rise, .reveal, .seg, .eng-bar i { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .mark-caret, .live-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── responsive ── */
@media (max-width: 980px) {
  .hero-side { grid-template-columns: 1fr; }
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench-ed { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .hud-bench { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hud-bench > div { border-right: 1px solid var(--line); }
  .hud-bench > div:nth-child(3n) { border-right: 0; }
  .hud-bench > div:nth-child(n+4) { border-bottom: 0; }
  .size-top { grid-template-columns: 1fr; }
  .matrix-wrap { grid-template-columns: 1fr; }
  .matrix-score { grid-row: auto; flex-direction: row; align-items: baseline; gap: 16px; margin-bottom: 20px; }
  .proof-grid { grid-template-columns: 1fr; }
  .issues li { grid-template-columns: 100px minmax(0, 1fr); }
  .issues li p { grid-column: 2; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top nav a:not(.ext) { display: none; }
  .hud-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-hero > div:nth-child(2) { border-right: 0; }
  .hud-hero > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hud-bench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-bench > div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; }
  .hud-bench > div:nth-child(2n) { border-right: 0 !important; }
  .hud-bench > div:nth-child(n+5) { border-bottom: 0 !important; }
  .hud p { display: none; }
  .bench-ed .ed { height: 420px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 auto; padding: 12px 10px; }
  .tabs button i { display: none; }
  .ruler-scale, .ruler-foot { margin-left: 0; }
  .bar-row { grid-template-columns: 1fr; gap: 10px; }
  .bar-note { grid-column: 1; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .spec-row > span:first-child { grid-column: 1 / -1; padding-bottom: 0; }
  .spec-head > span:first-child { display: none; }
  .eng { grid-template-columns: 90px minmax(0, 1fr); }
  .eng-num { grid-column: 2; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .diff-heads { display: none; }
  .issues li { grid-template-columns: 1fr; gap: 6px; }
  .issues li p { grid-column: 1; }
  .sec-rule-r { display: none; }
  .hero-code figcaption { flex-direction: column; gap: 4px; }
}

/* 自动演示时编辑器没有焦点(不抢焦点、不滚页面),Monaco 失焦会藏光标;演示期间把光标层亮出来 */
.bench.autoplay .cm-cursorLayer { visibility: visible !important; opacity: 1 !important; }
.bench.autoplay .cm-cursor { visibility: visible !important; background: var(--sig) !important; box-shadow: 0 0 10px rgba(255, 90, 31, .7); }
/* hero 同理:脚本打字时光标可见 */
.hero-ed .cm-cursorLayer { visibility: visible !important; }
.hero-ed .cm-cursor { visibility: visible !important; }
