/* cdnd landing · the cdnd CLI's warm dark terminal language (apps/core/internal/tui/theme/palette.go, DarkPalette;
   docs/terminal-ui-spec.md §3, §5.8, §6). The page is the CLI's export page (#1a1412) with its card surface (#221a17);
   hierarchy comes from text tone (text → muted → faint), not boxes. One warm accent, terracotta (xterm 173 #d7875f), for
   marks, headings that matter, links and the buy button (solid accent, dark text); the CLI's status colours only for
   state: success (114) saving / online / done, warning (179) waiting / ask, error (167) ban / loss / offline.
   Thin faint rules (xterm 240) stand in for the CLI's `─` runs; monospace for numbers, labels, tags, commands and nav,
   a sans for long copy and headlines. Glyphs from the TUI: `› cdnd_` logo with a 530 ms accent cursor, accent `›`
   prompts, `●` status dots, ` · ` separators, lower-case tags. No radii, shadows, glows or gradients; motion is short. */
:root {
  --wrap: 1240px; --g: clamp(16px, 4vw, 40px); color-scheme: dark;
  /* surfaces: the CLI export page and card colours, plus one lighter step for hover / inputs */
  --bg: #1a1412; --bg2: #221a17; --bg3: #2e2420;
  /* text tones: terminal default fg (warm off-white), body copy, muted (xterm 245), faint (xterm 240: rules, decoration only) */
  --fg: #ece4da; --copy: #c9c0b6; --mut: #8a8a8a; --dim: #8a8a8a; --faint: #585858;
  --rule: #585858; --grid: rgba(236, 228, 218, .022);
  --acc: #d7875f; --on-acc: #1a1412; /* xterm 173, and the text that sits on it */
  --ok: #87d787; --warn: #d7af5f; --err: #d75f5f; --remote: #5f87af; /* xterm 114 / 179 / 167 / 67 */
  --save: var(--ok); /* money saved: the 04 card's saving and its part of the Top bar */
  --ok-bg: rgba(135, 215, 135, .09); --veil: rgba(26, 20, 18, .86); --tick: rgba(26, 20, 18, .45);
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "PingFang SC", "Microsoft YaHei", monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease2: cubic-bezier(.2, .7, 0, 1); /* the motion pass: crisp, short, no overshoot */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: inherit; }
code { font-size: .92em; font-family: var(--mono); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-family: var(--sans); font-weight: 700; }
.wrap { width: min(100% - 2 * var(--g), var(--wrap) - 2 * var(--g)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
::selection { background: var(--acc); color: var(--on-acc); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--fg); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* the grid: 12 columns on the page measure (4 on phones), column edges barely there (a terminal's cell grid, felt not seen) */
body::before {
  content: ""; position: fixed; top: 0; bottom: 0; left: 50%; z-index: 0; pointer-events: none;
  width: calc(min(100%, var(--wrap)) - 2 * var(--g)); transform: translateX(-50%); border-right: 1px solid var(--grid);
  background: repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px calc(100% / 12));
}
@media (max-width: 700px) {
  body::before { background: repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px calc(100% / 4)); }
}
main, .foot { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: 700 16px/1.2 var(--mono); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; border: 1px solid transparent;
  transition: background-color .15s linear, color .15s linear, border-color .15s linear;
}
.btn-buy { background: var(--acc); color: var(--on-acc); }
.btn-buy:hover { background: var(--fg); }
/* the buy button's hover: an off-white fill wipes in from the left (html.mo only; otherwise the plain colour swap above) */
html.mo .btn-buy { position: relative; isolation: isolate; overflow: hidden; }
html.mo .btn-buy:hover { background: var(--acc); }
html.mo .btn-buy::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease2); }
html.mo .btn-buy:hover::before, html.mo .btn-buy:focus-visible::before { transform: none; transform-origin: left; }
.btn-soft { background: transparent; color: var(--fg); border-color: var(--rule); }
.btn-soft:hover { background: var(--bg3); border-color: var(--acc); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 18px; }
.btn-block { display: flex; width: 100%; white-space: normal; text-align: center; }
.link { color: var(--acc); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule); padding: 2px 0; transition: color .15s linear, border-color .15s linear; }
.link:hover { border-color: var(--acc); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 18px; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 700 18px/1 var(--mono); letter-spacing: -.02em; color: var(--acc); }
/* the CLI's banner logo: `› cdnd_`, bold accent; in the header the `_` is the editor cursor, blinking every 530 ms */
.logo span::before { content: "›\00a0"; }
.logo span::after { content: "_"; }
@media (prefers-reduced-motion: no-preference) {
  .top .logo span::after { animation: cursor 1.06s steps(1) infinite; }
  @keyframes cursor { 50% { opacity: 0; } }
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--mut); font: 500 13.5px/1.2 var(--mono); padding: 6px 10px; transition: color .15s linear; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--fg); }
.lang {
  cursor: pointer; white-space: nowrap; height: 34px; min-width: 48px; padding: 0 10px; margin-left: 4px; background: transparent; color: var(--fg);
  border: 1px solid var(--rule); font: 700 13px var(--mono); transition: background-color .15s linear, color .15s linear, border-color .15s linear;
}
.lang:hover { background: var(--bg3); border-color: var(--acc); }

/* ---------- screen 1 · hero: copy on the left, the quota gauge on the right ---------- */
.hero { padding: clamp(20px, 3.6vh, 56px) 0 clamp(36px, 6vh, 72px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
/* the headline is sized in cqw of its column so the first line fills it (≈ 7.45em zh, ≈ 8.2em EN) */
.hero-head { container-type: inline-size; }
.motto { display: inline-block; padding-top: 10px; border-top: 1px solid var(--rule); font: 500 clamp(13px, 1.1vw, 15px)/1.4 var(--mono); color: var(--mut); }
/* the CLI busy line's shimmer (chrome/shimmer.go): a soft light band crosses the motto in the first 65% of 2.25 s, then it rests */
@media (prefers-reduced-motion: no-preference) {
  .motto {
    background: linear-gradient(90deg, var(--mut) 0 41.67%, var(--fg) 50%, var(--mut) 58.33% 100%) 100% 0 / 300% 100% no-repeat;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 2.25s ease-in-out 1.2s infinite;
  }
  @keyframes shimmer { 0% { background-position: 100% 0; } 65%, 100% { background-position: 0 0; } }
}
h1 { margin-top: 12px; font-size: min(100cqw / 7.45, 72px); line-height: 1.06; letter-spacing: -.05em; }
html[lang^="zh"] h1 { letter-spacing: -.035em; }
html[lang="en"] h1 { font-size: min(100cqw / 8.2, 60px); }
h1 .nw { display: inline-block; }
html[lang="en"] h1 .hot { white-space: normal; }
.sec-h em { font-style: normal; color: var(--acc); }
.prod { font-size: clamp(17px, 1.9vw, 24px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.reasons-mini { list-style: none; margin: clamp(22px, 4vh, 40px) 0 clamp(26px, 4.6vh, 44px); padding: 0; border-bottom: 1px solid var(--rule); counter-reset: rm; }
.reasons-mini li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding: 10px 0 10px 32px; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.4; }
.reasons-mini li::before { content: "0" counter(rm); counter-increment: rm; position: absolute; left: 0; top: 13px; font: 700 12px/1 var(--mono); color: var(--acc); }
.reasons-mini li.on { box-shadow: inset 2px 0 0 var(--acc); }
.reasons-mini strong { flex: 0 0 3.9em; font-size: 1.12em; white-space: nowrap; }
.reasons-mini span { color: var(--copy); }

html[lang="en"] .reasons-mini li { column-gap: 0; }
html[lang="en"] .reasons-mini strong { flex-basis: 8.6em; }
html[lang="en"] .reasons-mini span::before { content: "\00a0\2014\00a0"; color: var(--dim); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
/* hero buy button: spans the reasons column, one more row of that grid */
.hero .btn-hero { width: 100%; justify-content: space-between; gap: 16px; min-height: clamp(60px, 5vw, 76px); padding: 0 clamp(20px, 1.8vw, 28px); font-size: clamp(20px, 1.6vw, 24px); }
.hero .btn-hero .arr { display: inline-block; transition: transform .3s var(--ease2); }
.hero .btn-hero:hover .arr, .hero .btn-hero:focus-visible .arr { transform: translateX(6px); }
@media (max-width: 900px) { .hero .btn-hero { min-height: 60px; font-size: 20px; } }
/* the gauge: ticks, a 270° track with three 5-hour arcs, the accent 7-day ring and the needle, all at the full $5,000+ */
.hero-gauge { width: 100%; max-width: 460px; margin: 0 auto; }
.gauge { position: relative; width: 100%; aspect-ratio: 1; margin: 0 auto; container-type: inline-size; }
.gauge svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gauge path { fill: none; }
.gauge .track { stroke: var(--faint); stroke-width: 1; }
.gauge .seg { stroke: var(--mut); stroke-width: 12; transition: opacity .15s linear; }
.gauge .seg.dim { opacity: .18; }
.gauge .fill7 { stroke: var(--acc); stroke-width: 3; }
.gauge .ticks line { stroke: var(--faint); stroke-width: 1; }
.gauge .ticks line.maj { stroke: var(--mut); stroke-width: 2; }
.gauge .tls text { font: 500 11px/1 var(--mono); fill: var(--mut); }
.gauge .needle { transform-origin: 240px 240px; transform: rotate(135deg); }
.gauge .needle path { fill: var(--acc); }
.gauge .needle line { stroke: var(--acc); stroke-width: 2; }
.readout { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; text-align: center; pointer-events: none; }
.ro-label { align-self: end; font: 600 clamp(11px, 2.5cqw, 14px)/1.2 var(--mono); letter-spacing: .04em; color: var(--mut); }
.ro-big { display: flex; align-items: flex-end; margin: 1.6cqw 0 3.4cqw; padding-top: .04em; font-size: 20.8cqw; font-weight: 700; line-height: .78; letter-spacing: -.06em; white-space: nowrap; }
.ro-cur { display: flex; flex-direction: column; align-items: center; margin-right: .02em; font-size: .66em; line-height: .86; }
.ro-aff { font-size: .3em; line-height: 1; letter-spacing: 0; }
.ro-cur .ro-aff { margin-bottom: .02em; font-size: .45em; }
.ro-big > .ro-aff { align-self: flex-start; margin: .06em 0 0 -.22em; }
.ro-sub { align-self: start; font-family: var(--mono); font-size: clamp(11px, 3cqw, 17px); font-weight: 500; white-space: nowrap; color: var(--copy); }
.gauge-note { margin-top: -6%; text-align: center; font-size: 12px; line-height: 1.4; color: var(--mut); }
@media (min-width: 901px) {
  .hero { display: flex; align-items: center; min-height: calc(100vh - 56px); }
  /* the left edge stays on the page grid; the gauge may run up to 140px into the right margin */
  .hero-in { flex: 1; width: auto; margin-left: max(var(--g), calc((100% - var(--wrap)) / 2 + var(--g))); margin-right: max(var(--g), calc((100% - var(--wrap)) / 2 + var(--g) - 140px));
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); grid-template-rows: auto auto; column-gap: clamp(24px, 4vw, 64px); row-gap: clamp(8px, 2vh, 28px); align-items: center; }
  .hero-head { grid-column: 1; grid-row: 1; align-self: end; }
  .hero-copy { grid-column: 1; grid-row: 2; align-self: start; }
  .hero-gauge { grid-column: 2; grid-row: 1 / -1; max-width: none; }
  .hero-gauge .gauge { max-width: calc(100vh - 150px); }
  h1 { font-size: min(100cqw / 7.45, 96px); line-height: 1.04; }
  html[lang="en"] h1 { font-size: max(min(100cqw / 10.35, 72px), min(100cqw / 8.2, 40px)); }
}
/* entrance (html.intro is set in <head> only when motion is allowed; app.js drives the gauge and removes it) */
@media (prefers-reduced-motion: no-preference) {
  .intro .motto { animation: type .55s steps(21) .06s both; }
  .intro h1 .nw { animation: rise .85s var(--ease) .12s both; }
  .intro h1 .nw.hot { animation-delay: .3s; }
  .intro .prod { animation: up .7s var(--ease) .62s both; }
  .intro .reasons-mini li { animation: up .6s var(--ease) .78s both; }
  .intro .reasons-mini li:nth-child(2) { animation-delay: .9s; }
  .intro .reasons-mini li:nth-child(3) { animation-delay: 1.02s; }
  .intro .ctas { animation: up .7s var(--ease) 1.15s both; }
  .intro .gauge-note { animation: fade .8s ease 1.5s both; }
  .intro #heroGauge .ticks line { animation: fade .35s ease both; animation-delay: calc(.08s + var(--i, 0) * 11ms); }
  .intro #heroGauge .ro-label { animation: fade .6s ease .5s both; }
  .intro #heroGauge .ro-sub { animation: fade .6s ease 1.4s both; }
  .intro #heroGauge .needle { transform: rotate(-135deg); }
  .intro #heroGauge .seg { stroke-dashoffset: 87.3; }
  .intro #heroGauge .fill7 { stroke-dashoffset: 270; }
  .intro #heroGauge:not(.counting) .ro-digits { opacity: 0; }
  @keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
  @keyframes rise { from { transform: translate3d(0, 100%, 0); clip-path: inset(-25% -30% 100% -30%); } to { transform: none; clip-path: inset(-25% -30% -25% -30%); } }
  @keyframes up { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
  @keyframes fade { from { opacity: 0; } }
}

/* ---------- screen 2 · before / after ---------- */
.hint { margin-top: 10px; text-align: center; font-size: 13px; color: var(--dim); }
.stage { position: relative; overflow: hidden; background: var(--bg); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.layer { display: grid; }
.col { padding: 26px 30px 30px; min-width: 0; }
.tag { display: inline-block; margin-bottom: 12px; padding: 4px 8px; font: 700 12px/1 var(--mono); letter-spacing: .02em; text-transform: lowercase; border: 1px solid currentColor; }
.tag-hot { color: var(--acc); }
.side-h { margin-bottom: 16px; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; letter-spacing: -.03em; }
html[lang^="zh"] .side-h { letter-spacing: -.01em; }
/* before: the raised card surface in muted tones, a little out of line; what breaks is in the CLI's error red */
.before { background: var(--bg2); color: var(--copy); }
.before .tag { color: var(--mut); }
.before .side-h { color: var(--copy); }
.mess { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: s; }
.mess li { counter-increment: s; padding: 5px 10px; font-size: 15px; font-weight: 500; background: var(--bg); border: 1px solid var(--faint); transform: rotate(-1.2deg); }
.mess li:nth-child(even) { transform: rotate(1deg) translateY(3px); }
.mess li:nth-child(3n) { transform: rotate(-.5deg) translateY(-2px); }
.mess li::before { content: counter(s); margin-right: 6px; font: 700 12px var(--mono); color: var(--mut); }
.ouch { margin-bottom: 12px; font-size: 18px; font-weight: 700; color: var(--fg); text-decoration: underline wavy var(--err) 1.5px; text-underline-offset: 5px; }
.or { max-width: 30em; padding-left: 12px; font-size: 15px; color: var(--mut); border-left: 1px solid var(--faint); }
.debris { position: relative; }
.remote {
  margin: 16px 0 0; padding: 12px 14px; font: 13px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--copy);
  background: var(--bg); border-top: 1px solid var(--faint); transform: rotate(-.6deg);
}
.remote i { font-style: normal; color: var(--mut); }
.toast { position: absolute; padding: 7px 11px; font: 500 13px/1.3 var(--mono); white-space: nowrap; color: var(--copy); background: var(--bg); border: 1px solid var(--faint); }
.toast::before { content: "✕ "; color: var(--err); }
.t1 { top: 8%; left: 12%; transform: rotate(-3deg); }
.t2 { top: 22%; right: 8%; transform: rotate(2deg); }
.t3 { top: 40%; left: 6%; transform: rotate(-1.5deg); }
.t4 { top: 57%; right: 14%; transform: rotate(3deg); }
.t5 { top: 72%; left: 18%; transform: rotate(-2deg); }
.t6 { top: 86%; right: 6%; transform: rotate(1.5deg); }
/* after: the page surface, calm */
.after { background: var(--bg); }
.calm { display: flex; align-items: center; justify-content: center; background: var(--bg); }
.calm p { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.02; font-weight: 700; letter-spacing: -.05em; }
html[lang^="zh"] .calm p { letter-spacing: -.02em; line-height: 1.1; }
/* terminals: the cdnd TUI on the card surface: accent `›` and `$`, success marks, the editor frame between faint rules, the footer */
.term { margin: 0 0 22px; background: var(--bg2); border-bottom: 1px solid var(--faint); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--faint); font: 500 12px/1 var(--mono); color: var(--mut); }
.term-bar i { display: none; }
.term-bar .ill { margin-left: auto; padding: 2px 6px; font-style: normal; border: 1px solid var(--faint); }
.term-body { margin: 0; padding: 12px 12px 12px; font: 13px/1.65 var(--mono); white-space: normal; color: var(--fg); }
.term-body b { color: var(--acc); }
.term-body em { font-style: normal; font-weight: 700; color: var(--ok); }
.term-body .dim { color: var(--mut); }
.term-body .l { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
/* the editor (§5.8): an empty prompt between full-width faint rules, drawn above the footer line (decoration only) */
.term-body .l:last-child::before { content: "\203a\00a0_"; display: block; margin: 8px -12px 4px; padding: 3px 12px 3px calc(12px + 1ch); color: var(--acc); border-block: 1px solid var(--faint); }
.offer { display: grid; gap: 6px; }
.offer-price { display: flex; align-items: baseline; gap: 12px; }
.plan { padding: 2px 6px; font: 700 14px/1 var(--mono); letter-spacing: .02em; color: var(--acc); border: 1px solid var(--acc); align-self: center; }
.price { font-size: clamp(46px, 4.6vw, 68px); line-height: .95; font-weight: 700; letter-spacing: -.055em; color: var(--acc); }
.price small { margin-left: 4px; font-size: .36em; font-weight: 500; letter-spacing: 0; color: var(--mut); }
.offer-q { font-size: 16px; }
.offer-q strong { font-size: 1.2em; letter-spacing: -.02em; }
.offer-q span { font-size: 14px; color: var(--dim); }
.offer-why { font-size: 15px; }
.offer-why strong { color: var(--acc); }
.offer-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 8px; }
/* split mode (wide screens): two layers overlaid, after clipped at the divider */
@property --x { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
.stage.split { display: grid; }
.stage.split .layer { grid-area: 1 / 1; grid-template-columns: 1fr 1fr; }
.stage.split .after { clip-path: inset(0 0 0 var(--x)); }
.divider { display: none; }
/* the divider is as wide as the stage and moved with translate (a percentage of its own width = the stage's), so dragging
   or the sweep never shifts layout; it ends 18px right of the line, and only its last 36px (::after) and the knob take the pointer */
.stage.split .divider { display: block; position: absolute; top: 0; bottom: 0; left: 18px; width: 100%; translate: calc(var(--x) - 100%) 0; cursor: ew-resize; touch-action: none; z-index: 3; pointer-events: none; }
.divider::before { content: ""; position: absolute; top: 0; bottom: 0; right: 17px; width: 2px; background: var(--mut); }
.divider::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 36px; pointer-events: auto; }
.knob {
  position: absolute; top: 50%; left: calc(100% - 18px); width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; pointer-events: auto;
  background: var(--fg); color: var(--on-acc); font: 700 20px/1 var(--sans); transition: background-color .15s linear;
}
.divider:hover .knob, .stage.dragging .knob { background: var(--acc); }
.slider { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: var(--x); top: 50%; }
.stage:has(.slider:focus-visible) .knob { outline: 2px solid var(--acc); outline-offset: 3px; }
.stage:not(.split) .slider { display: none; }
.compare .hint { display: none; }
.compare:has(.stage.split) .hint { display: block; }
/* stacked mode (narrow): before, then after */
.stage:not(.split) .debris, .stage:not(.split) .calm { display: none; }
.stage:not(.split) .before .col-l { padding-bottom: 34px; position: relative; }
.stage:not(.split) .before .col-l::after {
  content: "↓"; position: absolute; left: 50%; bottom: -20px; z-index: 1; width: 40px; height: 40px; margin-left: -20px; display: grid; place-items: center;
  background: var(--fg); color: var(--bg); font: 700 20px/1 var(--sans);
}
.stage:not(.split) .after { border-top: 1px solid var(--rule); }
.stage:not(.split) .after .col-r { padding-top: 30px; }

/* ---------- section heads: the number as structure ---------- */
section.compare, section.math, section.calc, section.rules, section.faq { padding: clamp(56px, 8vw, 104px) 0; }
.sec-h { margin-bottom: 36px; max-width: 20em; text-wrap: balance; font-size: clamp(30px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.045em; }
html[lang^="zh"] .sec-h { letter-spacing: -.02em; line-height: 1.12; }
.eyebrow { margin: 0 0 18px; font: 700 13px/1.3 var(--mono); }
/* the section number, terminal-style: an accent `›` prompt and the number in faint monospace (decoration; aria-hidden) */
.eyebrow b { display: block; margin-bottom: 10px; font: 700 clamp(56px, 7.6vw, 116px)/.8 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--faint); }
.eyebrow b::before, #features .f-num::before { content: "\203a"; margin-right: .08em; color: var(--acc); }
/* a faint rule (the CLI's `─` run), then number on columns 1–4 and the title on 5–12 */

#compare > .compare-head, #math > .wrap, #rules > .wrap, #faq > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
#compare > .compare-head > *, #math > .wrap > *, #rules > .wrap > *, #faq > .wrap > * { grid-column: 1 / -1; min-width: 0; }
#compare > .compare-head::before, #math > .wrap::before, #rules > .wrap::before, #faq > .wrap::before { content: ""; grid-column: 1 / -1; border-top: 1px solid var(--rule); margin-bottom: clamp(14px, 1.6vw, 22px); }
#compare > .compare-head > .eyebrow, #math > .wrap > .eyebrow, #rules > .wrap > .eyebrow { grid-column: 1 / span 4; }
#compare > .compare-head > .sec-h, #math > .wrap > .sec-h, #rules > .wrap > .sec-h { grid-column: 5 / -1; }
#faq > .wrap > .sec-h { grid-column: 1 / span 4; }
.calc .ask { border-top: 1px solid var(--rule); padding-top: clamp(14px, 1.6vw, 22px); }
@media (max-width: 700px) {
  #compare > .compare-head > .eyebrow, #compare > .compare-head > .sec-h, #math > .wrap > .eyebrow, #rules > .wrap > .eyebrow, #math > .wrap > .sec-h, #rules > .wrap > .sec-h, #faq > .wrap > .sec-h { grid-column: 1 / -1; }
}

/* ---------- screen 3 · what the workaround costs ---------- */
.vs { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: stretch; margin-bottom: 30px; }
.vs-l { padding: 18px 22px 22px; background: var(--bg2); color: var(--copy); border-top: 1px solid var(--faint); }
.vs-r { padding: 18px 0 22px; min-width: 0; border-top: 1px solid var(--rule); }
.vs-mid { display: grid; place-items: center; font: 700 30px/1 var(--mono); color: var(--acc); }
.big { margin-bottom: 12px; font-size: clamp(64px, 7.6vw, 116px); line-height: .9; font-weight: 700; letter-spacing: -.06em; }
.big span { margin-left: .04em; font-size: .3em; letter-spacing: -.02em; }
.vs-l .big { color: var(--mut); }
.hot { color: var(--acc); }
.mid-h { margin-bottom: 8px; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; }
.mid-h span { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--dim); }
.vs-cap { font-size: 15px; }
.vs-cap strong { color: var(--acc); }
/* inline code: the CLI's mdCode, accent, in a faint frame */
.vs-cap code, .rule code { padding: 0 .3em; color: var(--acc); border: 1px solid var(--faint); }
.vs-l .vs-cap code { border-color: var(--faint); }
.bars { padding: 18px 0 0; border-top: 1px solid var(--rule); }
.pbar { display: grid; grid-template-columns: 210px 1fr 110px; align-items: center; gap: 14px; margin: 12px 0; }
.pbar-name { font: 700 14px/1.3 var(--mono); }
.pbar-track { height: 22px; }
.pbar-fill { display: block; height: 100%; transform-origin: left; }
.pbar-top .pbar-fill { transform: scaleX(.3631); }
.pbar-api .pbar-fill, .b-api .bar i { background: var(--mut); }
.pbar-top .pbar-fill, .b-top .bar i { background: var(--acc); }
.pbar-val { text-align: right; font-size: 26px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pbar-top .pbar-val { color: var(--acc); }
.pbar-track, .bar { position: relative; overflow: hidden; background: var(--bg); border: 1px solid var(--faint); }
.pbar-track::after, .bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), var(--tick) calc(5% - 1px) 5%);
}
.bridge { margin-top: 32px; }
.bridge a { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; font-weight: 700; letter-spacing: -.03em; color: var(--acc); text-decoration: none; border-bottom: 1px solid var(--rule); transition: color .15s linear, border-color .15s linear; }
.bridge a:hover { border-color: var(--acc); }

/* ---------- install: toggles + command ---------- */
.tabs { display: flex; width: fit-content; margin-bottom: 10px; border: 1px solid var(--rule); }
.tabs button { cursor: pointer; padding: 7px 12px; font: 700 13px/1 var(--mono); color: var(--mut); background: transparent; border: 0; transition: background-color .15s linear, color .15s linear; }
.tabs button + button { border-left: 1px solid var(--rule); }
.tabs button:hover { background: var(--bg3); color: var(--fg); }
.tabs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.cmd { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cmd code { flex: 1; min-width: 0; padding: 2px 0; overflow-x: auto; white-space: nowrap; font-size: 14px; color: var(--fg); }
.cmd code::before { content: "$ "; color: var(--acc); }
.copy { cursor: pointer; padding: 5px 10px; font: 700 12px/1 var(--mono); color: var(--fg); background: transparent; border: 1px solid var(--rule); transition: background-color .15s linear, color .15s linear, border-color .15s linear; }
.copy:hover { background: var(--bg3); border-color: var(--acc); }

/* ---------- screen 4 · your number ---------- */
.calc-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; }
.calc .sec-h { margin-bottom: 26px; font-size: clamp(28px, 3.4vw, 50px); }
/* one slider: usage a day. A faint-framed track, accent fill up to the thumb (--p set by app.js), square off-white thumb */
.daily { max-width: 560px; }
.d-read { display: flex; align-items: baseline; gap: 4px; margin: 0 0 18px; font-weight: 700; line-height: .85; letter-spacing: -.05em; }
.d-read span { font-size: clamp(28px, 2.6vw, 40px); }
.d-read b { font-size: clamp(64px, 6.4vw, 96px); }
.d-read small { margin-left: 6px; font: 500 16px var(--mono); letter-spacing: 0; color: var(--mut); }
.d-range {
  --p: .2414; display: block; width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.d-range::-webkit-slider-runnable-track { height: 8px; border: 1px solid var(--rule); background: linear-gradient(90deg, var(--acc) calc(var(--p) * 100%), var(--bg3) 0); }
.d-range::-moz-range-track { height: 8px; border: 1px solid var(--rule); background: linear-gradient(90deg, var(--acc) calc(var(--p) * 100%), var(--bg3) 0); }
.d-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -12px; background: var(--fg); border: 0; border-radius: 0; }
.d-range::-moz-range-thumb { width: 30px; height: 30px; background: var(--fg); border: 0; border-radius: 0; }
.d-range:hover::-webkit-slider-thumb { background: var(--acc); }
.d-range:hover::-moz-range-thumb { background: var(--acc); }
.d-range:focus { outline: none; }
.d-range:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
/* the scale: both ends, and the break-even mark at its place on the track (--at set by app.js) */
.d-scale { position: relative; display: flex; justify-content: space-between; min-height: 40px; margin-top: 4px; font: 13px/1.55 var(--mono); color: var(--mut); }
.d-mark {
  position: absolute; top: 0; left: calc(15px + var(--at, .18) * (100% - 30px)); padding-top: 14px; white-space: nowrap;
  color: var(--fg); font-weight: 600;
}
.d-mark::before { content: ""; position: absolute; left: 0; top: -10px; width: 2px; height: 20px; background: var(--fg); transform: translateX(-1px); }
.calc-note { margin-top: 14px; max-width: 36em; font-size: 13.5px; }
.calc-note { color: var(--mut); }
.verdict { border-top: 1px solid var(--rule); padding-top: clamp(14px, 1.6vw, 22px); }
@media (prefers-reduced-motion: no-preference) {
  .verdict.nudge .v-big, .verdict.flipped .v-big { animation: vnudge .4s var(--ease); }
  @keyframes vnudge { from { transform: translateY(6px); } }
}
.v-usage { padding-bottom: 6px; }
.v-k { font: 600 12.5px/1.4 var(--mono); letter-spacing: .02em; color: var(--mut); }
.v-big { margin: 10px 0 8px; font-size: clamp(64px, 7vw, 108px); line-height: .85; font-weight: 700; letter-spacing: -.06em; }
.v-big span:first-child { margin-right: 2px; font-size: .5em; vertical-align: .55em; }
.v-f { font: 13px var(--mono); color: var(--mut); }
.rolling { display: inline-block; animation: roll .45s var(--ease); }
@keyframes roll { from { transform: translateY(-.1em); opacity: .6; } }
.v-bars { margin: 18px 0; display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.bar-k { font: 500 13.5px/1.4 var(--mono); color: var(--copy); }
.bar-v { font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.b-top .bar-v { color: var(--acc); }
/* the saving: the CLI's success green from the end of the Top fill to where the API bar ends (--from, --w set by app.js) */
.bar i.save { position: absolute; top: 0; left: calc(var(--from, 0) * 100%); background: var(--save); }
/* past the quota: one plain line under the Top bar, Top + the overflow at API balance = the total */
.bar-legend { grid-column: 1 / -1; margin: 2px 0 0; font-size: 13px; color: var(--mut); }
.bar { grid-column: 1 / -1; height: 20px; }
.bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--w)); transition: transform .45s var(--ease); }
.flip { perspective: 1400px; }
.flip-in { display: grid; transform-style: preserve-3d; transition: transform .6s var(--ease); }
.flip.is-api .flip-in { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; padding: 18px 20px 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--faint); }
.face-top { background: var(--bg2); border-top: 2px solid var(--acc); }
.face-api { transform: rotateY(180deg); background: var(--bg2); border-top: 2px solid var(--mut); }
.v-say { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; }
.v-say b { font-size: 1.8em; line-height: 1; letter-spacing: -.05em; color: var(--save); }
.v-sub { margin: 6px 0 16px; font-size: 15px; color: var(--copy); }


/* ---------- 05 · rules ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rule { position: relative; display: grid; gap: 8px; align-content: start; padding: 18px 0 0; border-top: 1px solid var(--rule); }
.rule-n { position: absolute; top: 14px; right: 0; font: 700 56px/.8 var(--mono); letter-spacing: -.04em; color: var(--faint); }
.rule h3 { padding-right: 56px; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -.03em; }
html[lang^="zh"] .rule h3 { letter-spacing: -.01em; }
.rule-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--acc); }
.note { font-size: 13px; color: var(--dim); }
.rule p:not(.rule-n, .rule-big, .note) { color: var(--copy); }
.say { margin: 4px 0 0; padding: 6px 0 6px 14px; font: 13px/1.5 var(--mono); white-space: pre-wrap; color: var(--warn); border-left: 1px solid var(--faint); }

/* ---------- 06 · features: the thread's feature sequence (the launch page's #features, scoped) ---------- */
#features {
  /* the TUI's tokens (spec §3.2): muted, faint, body copy, success marks, accent, warning, error */
  --th-paper: var(--fg); --th-mute: var(--mut); --th-dim: var(--faint); --th-copy: var(--copy);
  --th-rule: var(--faint); --th-acc: var(--ok); --th-acc-hi: var(--acc); --th-warn: var(--warn); --th-err: var(--err);
  --th-pad: clamp(16px, 4vw, 56px); --th-ease: cubic-bezier(.2, .7, .1, 1);
  position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(28px, 4vw, 48px);
}
#features .tz { position: relative; max-width: calc(var(--wrap) + 2 * var(--th-pad) - 2 * var(--g)); margin: 0 auto; } /* content edges line up with .wrap */
#features h4 { margin: 0; }
#features .f-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start;
  border-top: 1px solid var(--rule); padding-top: clamp(14px, 1.6vw, 22px);
}
#features .f-head > * { grid-column: 5 / -1; }
#features .f-head > .f-num { grid-column: 1 / span 4; grid-row: 1 / span 3; }
#features .f-num { margin: 0; font: 700 clamp(56px, 7.6vw, 116px)/.8 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--faint); }
#features .f-head h2 { font-size: clamp(32px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
html[lang^="zh"] #features .f-head h2 { letter-spacing: -.02em; line-height: 1.1; }
#features .f-sub { margin-top: 14px; font-size: clamp(16px, 1.4vw, 20px); color: var(--copy); }
@media (max-width: 700px) {
  #features .f-head { display: block; }
  #features .f-num { margin-bottom: 14px; }
}
#features .tz-head { padding: 0 var(--th-pad); margin-bottom: 0; position: relative; z-index: 1; }
#features code, #features .tbody, #features .k-quote, #features .k-index, #features .tc-n, #features .more-cmd, #features .rw-more, #features .rw-msgs, #features .cut-alt, #features .hub-label { font-family: var(--mono); }
#features .mute { color: var(--th-mute); }
#features .on { color: var(--th-acc); }
#features .err { color: var(--th-err); }
#features .acc2 { color: var(--th-acc-hi); }
#features .warn { color: var(--th-warn); }
#features p code, #features li code { font-size: .86em; padding: .02em .32em; white-space: nowrap; background: none; border: 1px solid var(--faint); color: var(--acc); }

/* the thread */
#features .thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
#features .thread path { fill: none; stroke-linecap: butt; stroke-linejoin: round; }
#features .t-core { stroke: var(--faint); stroke-width: 1.5; transition: stroke .6s; }
#features.t-wait .t-core { stroke: var(--warn); }
#features .t-head { fill: var(--acc); }
#features .tz > section, #features .tz-end { position: relative; z-index: 1; }
#features .t-start { position: absolute; left: calc(100% - var(--th-pad) / 2); top: 6px; width: 0; height: 0; }
#features .t-start-m { position: absolute; left: 0; top: 0; width: 0; height: 0; }

/* kinetic letters */
#features .kl { display: inline-block; will-change: transform; }

/* knot sections */
#features .k-index { position: relative; z-index: 2; display: flex; gap: 14px; align-items: center; font: 600 13px/1.2 var(--mono); color: var(--th-mute); letter-spacing: .02em; }
#features .k-index > span:first-child { padding: 4px 8px; font-weight: 700; color: var(--bg); background: var(--fg); }
#features .k-cmd {
  margin: 18px 0 0; padding: 0 0 .06em .03em; font: 700 clamp(3.4rem, 13.4vw, 13.5rem)/.82 var(--mono); letter-spacing: -.06em;
  white-space: nowrap; color: var(--th-paper); user-select: none; overflow-x: clip; overflow-y: visible;
}
#features .k-cmd .kl { transform-origin: 50% 80%; }
#features .k-title { margin-bottom: 18px; font: 700 clamp(2rem, 3.5vw, 3.6rem)/1.06 var(--sans); letter-spacing: -.035em; text-wrap: balance; }
html[lang^="zh"] #features .k-title { line-height: 1.14; letter-spacing: -.02em; }
#features .k-quote { padding: 6px 0 6px 14px; margin-bottom: 20px; font-size: clamp(13px, 1.05vw, 15px); color: var(--fg); border-left: 1px solid var(--rule); overflow-wrap: anywhere; }
#features .k-quote .q { color: var(--th-dim); }
#features .k-copy p:not(.k-quote) { color: var(--th-copy); max-width: 34em; }

#features .knot-sec, #features .cut-sec, #features .rewind-sec, #features .trust, #features .more-sec { padding: 14vh var(--th-pad) 8vh; }
#features .knot-sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
#features .knot-sec > .k-index, #features .knot-sec > .k-cmd { grid-column: 1 / -1; }
#features .knot-sec .k-copy { grid-row: 3; align-self: start; margin-top: 4vw; }
#features .knot-sec .device-wrap { grid-row: 3; margin-top: clamp(56px, 4.4vw, 84px); }
#features .knot-sec--r .k-copy { grid-column: 1 / span 5; }
#features .knot-sec--r .device-wrap { grid-column: 6 / -1; }
#features .knot-sec--l .k-cmd { text-align: right; margin-right: -.03em; }
#features .knot-sec--l .k-copy { grid-column: 8 / -1; }
#features .knot-sec--l .device-wrap { grid-column: 1 / span 7; grid-row: 3; }

#features .device-wrap { position: relative; }
#features .t-pass { position: absolute; left: var(--kx, 50%); top: 52%; width: 0; height: 0; }
#features .g-l, #features .g-r { top: 6vh; }
#features .g-l { left: calc(var(--th-pad) / 2); }
#features .g-r { left: calc(100% - var(--th-pad) / 2); }
#features .kx-90 { --kx: 97%; }
#features .t-exit { top: calc(100% + 48px); }
#features .knot {
  position: absolute; left: var(--kx, 50%); top: -46px; z-index: 3; width: 56px; height: 56px; margin-left: -28px; padding: 0;
  display: grid; place-items: center; border: 0; background: transparent; color: var(--fg); cursor: pointer;
}
#features .knot::before { content: ""; position: absolute; inset: 14px; border-radius: 2px; background: var(--bg); border: 1px solid var(--mut); transition: transform .25s var(--ease), background-color .15s linear, border-color .15s linear; }
#features .knot::after { content: "↺"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 18px/1 var(--sans); color: var(--bg); opacity: 0; transition: opacity .2s; }
#features .knot-n { position: relative; font: 700 9px/1 var(--mono); color: var(--copy); transition: opacity .2s; }
#features .knot:hover::before, #features .knot:focus-visible::before { transform: scale(1.6); background: var(--acc); border-color: var(--acc); }
#features .knot:hover::after, #features .knot:focus-visible::after { opacity: 1; }
#features .knot:hover .knot-n, #features .knot:focus-visible .knot-n { opacity: 0; }
#features .knot.spin::after { animation: thSpin .6s var(--th-ease); }
@keyframes thSpin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }

/* devices: the TUI on opaque card-coloured blocks between faint rules */
#features .device, #features .cut-log, #features .rw-status { position: relative; margin: 0; overflow: hidden; background: var(--bg2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
#features.t-wait .device { border-top-color: var(--warn); }
#features .chrome {
  display: none; align-items: center; gap: 8px; height: 36px; padding: 0 14px; position: relative; background: var(--bg2); color: var(--mut);
  border-bottom: 1px solid var(--faint); font: 500 12px/1 var(--mono);
}
#features .chrome--mac i, #features .chrome--linux b, #features .wt-plus, #features .wt-ctl { display: none; }
#features .chrome--mac span, #features .chrome--linux span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#features .chrome--win { align-items: center; }
#features .wt-tab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#features .skin-mac .chrome--mac, #features .skin-win .chrome--win, #features .skin-linux .chrome--linux, #features .zed .chrome--mac { display: flex; }
#features .pr { color: var(--acc); margin-right: .6ch; }
#features .pr-mac, #features .pr-win, #features .pr-linux { display: none; }
#features .skin-mac .pr-mac, #features .skin-win .pr-win, #features .skin-linux .pr-linux { display: inline; }
#features .skin-win .tbody { font-family: "Cascadia Mono", Consolas, var(--mono); }
#features .tbody { padding: 14px; font-size: 13px; line-height: 1.62; color: var(--fg); overflow-wrap: anywhere; }
#features .tbody p { min-height: 1.62em; }
#features .ln.user { color: var(--fg); font-weight: 600; margin-top: 6px; }
#features .panel { border: 1px solid var(--faint); padding: 10px 14px; margin: 8px 0 2px; }
#features .panel-title { color: var(--acc); font-weight: 700; margin-bottom: 4px; }
#features .kv span { display: inline-block; width: 11ch; color: var(--th-mute); }
#features .sel { color: var(--acc); background: var(--bg3); }
#features .pick { border: 1px solid var(--faint); padding: 8px 12px; margin: 6px 0; }
#features .pick-title { color: var(--th-acc-hi); font-weight: 700; }
/* the footer's remote tag: bold, in the REMOTE colour (xterm 67) */
#features .f-tag { font-size: .82em; font-weight: 700; color: var(--remote); padding: 0 6px; }
#features .blink { animation: thBlink 1.06s steps(1) infinite; color: var(--acc); }
@keyframes thBlink { 50% { opacity: 0; } }
#features.js [data-term] .ln { opacity: 0; }
#features.js [data-term].tplay .ln { animation: thLnIn .45s var(--th-ease) both; animation-delay: calc(var(--i) * 210ms + 60ms); }
@keyframes thLnIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 06.5 surfaces: two skins stacked in one cell, one shown (on an opaque cell, so the thread never shows through the cross-fade) */
#features .surface-stage { display: grid; background: var(--bg2); }
#features .surface-stage > .device { grid-area: 1 / 1; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .35s var(--th-ease), visibility 0s .35s; }
#features .surface-stage > .device.is-on { opacity: 1; visibility: visible; transition: opacity .35s var(--th-ease); }
#features .surface-stage > .device > :last-child { flex: 1; }
#features .surface-acp { margin-top: 18px; }
#features .surface-acp .acp-line { display: block; margin-top: 12px; padding: 6px 0 6px 14px; font-size: clamp(12px, 1vw, 14px); color: var(--fg); border: 0; border-left: 1px solid var(--faint); background: none; white-space: normal; overflow-wrap: anywhere; }
#features .zed { background: var(--bg2); color: var(--copy); }
#features .zed-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); font: 12.5px/1.7 var(--mono); min-height: 300px; }
#features .zed-code { padding: 16px 10px 16px 0; border-right: 1px solid var(--faint); overflow: hidden; }
#features .zed-code p { white-space: nowrap; }
#features .zed-code i { display: inline-block; width: 3ch; color: var(--faint); font-style: normal; text-align: right; margin-right: 1.4ch; }
#features .zed-code .add { background: var(--ok-bg); box-shadow: inset 2px 0 0 var(--ok); }
/* syntax as the TUI paints it: keywords accent, everything else the text colour */
#features .zed .k { color: var(--acc); }
#features .zed .t, #features .zed .f, #features .zed .nm { color: var(--fg); }
#features .zed-agent { padding: 14px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
#features .zed-agent-h { font-weight: 700; color: var(--fg); }
#features .zed .bubble { align-self: flex-end; max-width: 86%; padding: 6px 10px; background: var(--bg3); color: var(--fg); font-family: var(--sans); }
#features .ask { border: 1px solid var(--faint); padding: 6px 10px; }


/* os / surface pickers */
#features .os-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
#features .os-picker-label { font-size: 14px; color: var(--th-mute); margin-right: 4px; }
#features .os-picker button {
  min-height: 42px; padding: 11px 16px; font: 600 14px/1 var(--mono); color: var(--mut); background: transparent; border: 1px solid var(--rule); cursor: pointer;
  transition: background-color .15s linear, color .15s linear;
}
#features .os-picker button:hover { background: var(--bg3); color: var(--fg); }
#features .os-picker button[aria-checked="true"] { background: var(--fg); color: var(--bg); }

/* 06.4 cut the cable */
#features .cut-sec .k-cmd { font-size: clamp(3.4rem, 8.6vw, 9rem); }
#features .cut-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: 2vw; align-items: center; }
#features .cut-grid .k-copy { grid-column: 1 / span 5; grid-row: 1 / span 2; }
#features .cut-stage { grid-column: 6 / -1; position: relative; aspect-ratio: 5 / 2; }
#features .cut-log { grid-column: 6 / -1; }
#features .cut-log .chrome--win { display: flex; }
#features .cut-log .tbody { min-height: 132px; max-height: 210px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
#features .cut-log .tbody p { animation: thLnIn .4s var(--th-ease) both; }
#features .cables { position: absolute; inset: 0; width: 100%; height: 100%; }
#features .cable { fill: none; stroke: var(--faint); stroke-width: .9; stroke-dasharray: 2 1.4; }
#features .cable-cut .cable { stroke: var(--mut); stroke-width: 1.1; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--th-ease), stroke .3s; }
#features .cut-stage[data-state="offline"] .cable-cut .cable { stroke-dashoffset: 42; stroke: var(--err); }
#features .hub, #features .node { position: absolute; transform: translate(-50%, -50%); }
#features .hub { left: 50%; top: 50%; width: 96px; height: 96px; display: grid; place-items: center; }
#features .hub-ring { position: absolute; inset: 0; border-radius: 2px; background: var(--bg2); border: 1px solid var(--mut); }
#features .cut-stage[data-state="offline"] .hub-ring { border-color: var(--warn); animation: thWait 1s ease-in-out infinite; }
@keyframes thWait { 50% { transform: scale(1.12); } }
#features .hub-label { position: relative; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; }
#features .node {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 10px 14px; font-size: 14px; white-space: nowrap;
  font-family: var(--mono); background: var(--bg2); border: 1px solid var(--faint); transition: opacity .4s, border-color .4s;
}
#features .node small { grid-column: 2; color: var(--th-mute); font-size: 12px; }
/* the footer's bridge dot (`●`): success online, error offline */
#features .node-dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
#features .node--ws { left: 84%; top: 20%; }
#features .node--you { left: 16%; top: 80%; }
#features .node--bb { left: 84%; top: 80%; }
#features .cut-stage[data-state="offline"] .node--ws { opacity: .55; border-style: dashed; }
#features .cut-stage[data-state="offline"] .node--ws .node-dot { background: transparent; border: 2px solid var(--err); }
#features .cut-stage[data-at="bb"] .node--bb, #features .cut-stage[data-at="you"] .node--you { border-color: var(--acc); box-shadow: inset 0 -2px 0 var(--acc); }
#features .cut-btn {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 14px; cursor: pointer; min-height: 56px; padding: 14px 24px 14px 14px; text-align: left;
  font: 700 clamp(17px, 1.5vw, 21px)/1.2 var(--mono); color: var(--bg); background: var(--fg); border: 0; transition: background-color .15s linear;
}
#features .cut-btn:hover { background: var(--acc); }
#features .cut-btn[aria-pressed="true"] { background: var(--acc); }
#features .cut-btn[aria-pressed="true"]:hover { background: var(--fg); }
#features .cut-ico { width: 34px; height: 34px; background: var(--bg); color: var(--fg); display: grid; place-items: center; font-size: 17px; flex: none; }
#features .cut-hint { margin-top: 12px; font-size: 14px; color: var(--th-mute) !important; }
#features .cut-more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#features .cut-alt {
  min-height: 44px; padding: 10px 18px; font-size: 15px; font-weight: 700; color: var(--acc); background: transparent; border: 1px solid var(--rule);
  cursor: pointer; transition: background-color .15s linear, color .15s linear, border-color .15s linear;
}
#features .cut-alt:hover { background: var(--bg3); border-color: var(--acc); }
#features .cut-cta { margin-top: 10px; font-weight: 700; }
#features .cut-cta a { color: var(--acc); text-decoration: none; border-bottom: 1px solid var(--rule); }
#features .cut-cta a:hover { border-color: var(--acc); }
#features .cut-cta.in { animation: thLnIn .6s var(--th-ease) both; }

/* 06.6 rewind */
#features .rw-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: 3vw; }
#features .rw-head .k-title { grid-column: 1 / span 6; }
#features .rw-head p { grid-column: 7 / -1; color: var(--th-copy); }
#features .rw-track { position: relative; height: 120px; margin: 5vw 30px 2vw; touch-action: none; cursor: ew-resize; user-select: none; }
#features .rw-a { left: 0; top: 50%; }
#features .rw-g0 { left: calc(-30px - var(--th-pad) / 2); top: 50%; }
#features .rw-g1 { left: calc(100% + 30px + var(--th-pad) / 2); top: 50%; }
#features .rw-b { left: 100%; top: 50%; }
#features .rw-line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--mut); }
#features .rw-dim { position: absolute; top: 30%; bottom: 30%; right: -30px; left: calc(var(--k, 5) * 20%); z-index: 1; pointer-events: none; background: var(--veil); }
#features .rw-dim::after { content: ""; position: absolute; inset: 50% 0 auto 0; border-top: 2px dashed var(--faint); }
#features .rw-bead {
  position: absolute; top: 50%; left: calc(10% + var(--bx) * 20%); transform: translate(-50%, -50%); z-index: 2; padding: 7px 9px;
  font: 700 12px/1 var(--mono); color: var(--bg); background: var(--fg); transition: background-color .25s, color .25s, transform .3s var(--th-ease);
}
#features .rw-bead.gone { background: var(--bg3); color: var(--mut); transform: translate(-50%, -50%) scale(.85); }
#features .rw-handle {
  position: absolute; top: 50%; left: calc(var(--k, 5) * 20%); z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border: 0; background: var(--fg); color: var(--bg); font-size: 22px; cursor: grab; display: grid; place-items: center;
}
#features .rw-handle:hover, #features .rw-track.dragging .rw-handle { background: var(--acc); }
#features .rw-track.dragging .rw-handle { cursor: grabbing; transform: scale(1.1); }
#features .rw-track:not(.dragging) .rw-handle, #features .rw-track:not(.dragging) .rw-dim { transition: left .35s var(--th-ease), background-color .15s linear; }
#features .rw-more { margin: 0 30px 4vw; font-size: 14px; color: var(--th-mute); letter-spacing: .02em; }
#features .rw-out { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
#features .rw-msgs { grid-column: 1 / span 6; list-style: none; padding: 0; margin: 0; font-size: 14px; }
#features .rw-msgs li { padding: 10px 0; border-top: 1px solid var(--rule); display: flex; gap: 12px; flex-wrap: wrap; transition: opacity .3s, color .3s; }
#features .rw-msgs li .mute { margin-left: auto; }
#features .rw-msgs li.gone { opacity: .38; text-decoration: line-through; text-decoration-color: var(--th-dim); }
#features .rw-n { color: var(--fg); font-weight: 700; }
#features .rw-status { grid-column: 7 / -1; align-self: start; }
#features .rw-status .tbody { min-height: 200px; }
#features .rw-pick { font: inherit; color: var(--fg); background: none; border: 0; padding: 0 4px; margin-left: -4px; cursor: pointer; }
#features .rw-pick:hover { background: var(--bg3); }

/* 06.7 approvals */
#features .trust-title { margin: 22px 0 5vh; max-width: 14em; font: 700 clamp(2.2rem, 5.6vw, 6rem)/1 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
html[lang^="zh"] #features .trust-title { line-height: 1.12; letter-spacing: -.02em; }
#features .trust-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
#features .trust-cards li { padding: 28px 28px 8px 0; }
#features .trust-cards li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
#features .tc-n { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--acc); overflow-wrap: anywhere; }
#features .trust-cards h4, #features .more-card h4 { margin: 0 0 14px; font: 700 clamp(1.3rem, 1.9vw, 1.8rem)/1.2 var(--sans); letter-spacing: -.02em; }
#features .trust-cards p { color: var(--th-copy); font-size: 16px; }

/* 06.8 /search + background tasks */
#features .more-sec .k-title { margin-top: 22px; }
#features .more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 3vh; }
#features .more-card { min-width: 0; padding: 18px 0 0; display: flex; flex-direction: column; background: var(--bg); border-top: 1px solid var(--rule); }
#features .more-cmd { margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--acc); letter-spacing: .02em; }
#features .more-card > p:not(.more-cmd) { color: var(--th-copy); font-size: 15px; }
#features .mini { flex: 1; margin-top: 18px; padding: 14px; font-size: 12.5px; background: var(--bg2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* the end of the thread: a bridge line; the thread ends on a node, "all included in Top" and the closing buy block */
#features .tz-end { padding: 10vh var(--th-pad) 0; text-align: center; }
#features .end-g { left: calc(100% - var(--th-pad) / 2); top: -4vh; }
#features .t-end { position: relative; display: block; width: 16px; height: 16px; margin: 0 auto 30px; background: var(--bg); border: 1px solid var(--mut); transition: background-color .4s, border-color .4s; }
#features .t-end::after { content: ""; position: absolute; left: 50%; top: calc(100% + 7px); margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top: 8px solid var(--mut); opacity: .5; transition: opacity .4s; }
#features.t-done .t-end { background: var(--acc); border-color: var(--acc); }
#features.t-done .t-end::after { opacity: 1; }
#features .tz-end-h { margin: 0 auto; max-width: 20em; font: 700 clamp(1.8rem, 3.4vw, 3rem)/1.12 var(--sans); letter-spacing: -.03em; text-wrap: balance; }
#features .end-buy { margin: clamp(32px, 5vw, 56px) auto 0; padding: 0 0 clamp(64px, 9vw, 120px); }
#features .end-buy-h { margin: 0 auto clamp(24px, 3vw, 36px); max-width: 14em; font: 700 clamp(2.4rem, 5.2vw, 4.75rem)/1.05 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
html[lang^="en"] #features .end-buy-h { line-height: .98; letter-spacing: -.05em; }
#features .end-buy .last-cta { display: flex; align-items: center; flex-direction: column; gap: 18px; }
#features .end-note { margin: 0; text-wrap: balance; font-size: 13px; color: var(--th-copy); }
#features .end-note code { padding: 0; border: 0; background: none; font-family: var(--mono); font-size: 12.5px; color: var(--acc); }


/* scroll-driven kinetics (progressive): letters slide in along the line; devices slide along the grid (transform only, never see-through) */
@supports (animation-timeline: view()) {
  #features.js .k-cmd .kl { animation: thKcmd linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
  @keyframes thKcmd { from { transform: translate3d(var(--ox, 0), 0, 0); opacity: 0; } to { transform: none; opacity: 1; } }
  #features.js .device { animation: swSlide linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  @keyframes swSlide { from { transform: translateX(var(--sw-x, 48px)); } to { transform: none; } }
  #features.js .knot-sec--l .device { --sw-x: -48px; }
}

@media (max-width: 899px) {
  #features .tz-head, #features .knot-sec, #features .cut-sec, #features .rewind-sec, #features .trust, #features .more-sec, #features .tz-end { padding-left: 46px; padding-right: 16px; }
  #features .knot-sec, #features .cut-sec, #features .rewind-sec, #features .trust, #features .more-sec { padding-top: 10vh; padding-bottom: 4vh; }
  #features .t-start-m { top: 4px; }
  #features .knot-sec, #features .cut-grid, #features .rw-head, #features .rw-out { display: block; }
  #features .k-cmd { margin-top: 14px; font-size: 17vw; }
  #features .knot-sec--l .k-cmd { text-align: left; }
  #features .knot-sec .k-copy { margin-top: 18px; }
  #features .knot-sec .device-wrap { margin-top: 30px; }
  #features .device-wrap { --kx: -26px !important; }
  #features .knot { top: -6px; width: 40px; height: 40px; margin-left: -20px; } /* inside the viewport, centred on the 20px rail */
  #features .knot::before { inset: 10px; }
  #features .knot-n { font-size: 8px; }
  #features .tbody { font-size: 11.5px; }
  #features.js .device { animation: none; transform: none; }
  #features .zed-body { grid-template-columns: minmax(0, 1fr); }
  #features .zed-code { font-size: 11px; border-right: 0; border-bottom: 1px solid var(--rule); }
  #features .zed-code p { white-space: pre-wrap; padding-left: 4.4ch; text-indent: -4.4ch; }
  #features.js [data-term].tplay .ln { animation-delay: calc(var(--i) * 120ms + 60ms); }
  #features .cut-grid { display: flex; flex-direction: column; gap: 0; }
  #features .cut-grid .k-copy { display: contents; }
  #features .cut-grid .k-title { order: 1; align-self: flex-start; }
  #features .cut-grid .k-copy > p:not(.cut-hint, .cut-cta) { order: 2; }
  #features .cut-stage { order: 3; margin: 30px 0 20px; width: 100%; aspect-ratio: 4 / 3; flex: none; }
  #features .cut-log { order: 4; }
  #features .cut-hint { order: 5; }
  #features .cut-cta { order: 6; }
  #features .cut-bar {
    order: 7; position: sticky; bottom: 12px; z-index: 8; margin: 16px -8px 0; padding: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--rule);
  }
  #features .cut-bar .cut-btn { margin-top: 0; font-size: 16px; padding: 10px 18px 10px 10px; min-height: 48px; gap: 10px; }
  #features .cut-bar .cut-ico { width: 30px; height: 30px; }
  #features .cut-bar .cut-more { margin-top: 0; }
  #features .cut-bar .cut-alt { padding: 8px 14px; }
  #features .node { padding: 7px 9px; font-size: 12px; }
  #features .node small { font-size: 10.5px; }
  #features .node--ws { left: 70%; top: 16%; }
  #features .node--you { left: 30%; top: 84%; }
  #features .node--bb { left: 70%; top: 84%; }
  #features .hub { width: 74px; height: 74px; }
  #features .rw-head p { margin-top: 12px; }
  #features .rw-track { margin: 40px 28px 20px 26px; }
  #features .rw-bead { font-size: 10px; padding: 5px 6px; }
  #features .rw-handle { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  #features .rw-more { margin: 0 0 24px; }
  #features .rw-status { margin-top: 18px; }
  #features .trust-cards { display: block; }
  #features .trust-cards li { padding-right: 0; }
  #features .trust-cards li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  #features .more-grid { grid-template-columns: minmax(0, 1fr); }
  #features .mini { font-size: 11px; }
  #features .tz-end { padding-top: 6vh; text-align: left; }
  #features .t-end { margin: 0 0 24px -34px; } /* centred on the 20px rail (content starts at 46px) */
  #features .tz-end-h { margin: 0; }
  #features .end-buy-h { margin-left: 0; }
  #features .end-buy .last-cta { align-items: stretch; }
  #features .end-buy .btn-lg { width: 100%; }
  #features .os-picker-label { flex-basis: 100%; margin: 0 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #features [data-term] .ln, #features.js [data-term] .ln { opacity: 1; }
  #features .kl { transform: none !important; }
}

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  position: relative; cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font: 700 clamp(16px, 1.4vw, 19px)/1.4 var(--mono);
  letter-spacing: -.01em; transition: color .15s linear;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 2px; margin-top: -1px; background: currentColor; transition: transform .35s var(--ease2);
}
.faq summary::after { transform: rotate(90deg); }
.faq summary:hover { color: var(--acc); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] summary::before, .faq details[open] summary::after { color: var(--acc); }
.faq details p { max-width: 46em; padding: 0 0 20px; color: var(--copy); }
.faq details p code { padding: 0 .3em; color: var(--acc); border: 1px solid var(--faint); }
@media (min-width: 701px) {
  #faq > .wrap > details { grid-column: 5 / -1; }
  #faq > .wrap > .sec-h { grid-row: 2 / span 8; }
}

/* ---------- footer ---------- */
.foot { padding: 0 0 40px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-top: 20px; border-top: 1px solid var(--rule); font: 13px/1.5 var(--mono); color: var(--mut); }
.foot .logo { font-size: 18px; }
.slogan { font: 500 13px/1 var(--mono); color: var(--mut); }

.foot-in p:last-child { margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .calc-in { gap: 36px; }
}
@media (max-width: 1099px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 899px) {
  .vs { grid-template-columns: minmax(0, 1fr); }
  .vs-mid { height: 44px; font-size: 0; }
  .vs-mid::after { content: "↓"; font: 700 26px/1 var(--sans); }
  .pbar { grid-template-columns: minmax(0, 1fr) 100px; }
  .pbar-name { grid-column: 1 / -1; margin-bottom: -8px; }
  .calc-in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .top-in { gap: 10px; height: 52px; }
  .reasons-mini li { font-size: 15px; column-gap: 10px; }
  html[lang="en"] .reasons-mini strong, html[lang="en"] .reasons-mini span { flex-basis: 100%; }
  html[lang="en"] .reasons-mini span::before { content: none; }
  .col { padding: 18px 16px 22px; }
  .after .col-r { padding-inline: 0; }
  .mess { gap: 7px; }
  .mess li { font-size: 14px; padding: 4px 9px; }
  .ouch { font-size: 16px; }
  .or { font-size: 14px; }
  .remote { display: none; }
  .term-body { font-size: 12px; }
  .offer-cta .btn { width: 100%; }
  .rules-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  section.compare, section.math, section.calc, section.rules, section.faq { padding: 48px 0; }
  .sec-h { margin-bottom: 24px; }
  .d-range::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: -14px; }
  .d-range::-moz-range-thumb { width: 34px; height: 34px; }
  .face { padding: 14px 14px 16px; }
  .vs-l { padding: 16px 16px 18px; }
  .cmd code { font-size: 12.5px; white-space: pre-wrap; word-break: break-all; overflow-x: visible; }
  .foot-in p:last-child { margin-left: 0; }
}
@media (max-width: 380px) {
  .top-in { gap: 8px; }
  .lang { min-width: 40px; padding: 0 6px; }
  .btn-sm { padding: 0 8px; font-size: 13px; }
}
/* ---------- motion pass · sections 01–05, FAQ, closing ----------
   Every hidden start state lives under html.mo, which <head> sets only when motion is allowed and IntersectionObserver
   exists, and drops again after 3 s unless app.js marks it ready. No JS / reduced motion = the plain final layout.
   app.js adds .in when an element enters (one shared observer). Only transform / translate / opacity / clip-path move. */
.prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease2); }
.nav a[aria-current="true"]::after { transform: none; }
html.mo .rv { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease2), translate .7s var(--ease2); }
html.mo .rv.in { opacity: 1; translate: none; }
/* section titles: a clip mask opens downwards, the lines rise into it */
html.mo .rv-h { clip-path: inset(0 0 100% 0); translate: 0 .3em; transition: clip-path .8s var(--ease2), translate .8s var(--ease2); }
html.mo .rv-h.in { clip-path: inset(-20% -5% -25% -5%); translate: none; }
/* big numbers slide up from behind their baseline (the clip moves with the box, so the mask line stays put) */
html.mo .rv-n { clip-path: inset(0 -10% 100% -10%); translate: 0 100%; transition: clip-path .75s var(--ease2), translate .75s var(--ease2); }
html.mo .rv-n.in { clip-path: inset(-10% -10% -10% -10%); translate: none; }
/* the faint rules draw left to right: the head rules are ::before already; border-top rules get a ::before stand-in */
html.mo .rv-line::before { transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease2); }
html.mo .rv-line.in::before { transform: none; }
html.mo .rv-bt { position: relative; border-top-color: transparent; }
html.mo .rv-bt::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease2); }
html.mo .rv-bt.in::before { transform: none; }
/* 02 · the steps drop in, the ban line is struck through with its wavy underline, the terminal types */
html.mo .mess li { opacity: 0; translate: 0 -22px; transition: opacity .4s var(--ease2), translate .55s var(--ease2); }
html.mo .stage.in .mess li { opacity: 1; translate: none; }
html.mo .ouch { clip-path: inset(-20% 100% -60% 0); transition: clip-path .7s var(--ease2) .62s; }
html.mo .stage.in .ouch { clip-path: inset(-20% -2% -60% 0); }
html.mo .term-body .l { clip-path: inset(0 100% 0 0); transition: clip-path .45s steps(18, end); }
html.mo .term.in .term-body .l { clip-path: inset(0 -2% 0 0); }
html.mo .stage.split.sweep:not(.touched) { animation: sweep 1.3s var(--ease2) both; }
@keyframes sweep { from { --x: 94%; } to { --x: 50%; } }
/* 03 · arrows draw, price bars fill tick by tick, "64% less" gets its accent rule */
html.mo .vs-mid { clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease2) .25s; }
html.mo .vs-mid.in { clip-path: inset(0 -5% 0 0); }
html.mo .pbar-fill { transition: transform 1s steps(20, end) .15s; }
html.mo .pbar-top .pbar-fill { transition: transform .5s steps(7, end) .55s; }
html.mo .bars:not(.in) .pbar-fill { transform: scaleX(0); }
.bars .vs-cap strong { position: relative; }
html.mo .bars .vs-cap strong::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease2) 1.2s; }
html.mo .bars.in .vs-cap strong::after { transform: none; }
/* install tabs: one off-white (reverse-video) block slides between the two systems */
html.mo .tabs.ind { position: relative; isolation: isolate; }
html.mo .tabs.ind::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100px; z-index: -1; background: var(--fg); transform-origin: left; transform: translateX(var(--ix, 0)) scaleX(var(--iw, 1)); transition: transform .45s var(--ease2); }
html.mo .tabs.ind button { background: transparent; transition: color .3s var(--ease2); }
html.mo .tabs.ind button:hover:not([aria-pressed="true"]) { background: var(--bg2); }
.copy.ok { color: var(--ok); border-color: var(--ok); }
html.mo .copy.ok { animation: ok .45s var(--ease2); }
@keyframes ok { from { clip-path: inset(0 100% 0 0); } }
/* 04 · the bars step */
html.mo .bar i { transition: transform .6s steps(12, end); }
html.mo .verdict:not(.in) .bar i { transform: scaleX(0); }
/* 05 · the two rolling windows (built by app.js, aria-hidden: the copy above states the facts) */
.win { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); }
.win-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 24px; align-items: start; margin-bottom: 14px; }
.win-t { min-width: 7.5em; font: 700 clamp(22px, 2vw, 28px)/1.15 var(--sans); letter-spacing: -.03em; }
.win-caps { display: grid; }
.win-caps span { grid-area: 1 / 1; font-size: 15px; line-height: 1.45; color: var(--mut); opacity: 0; transition: opacity .2s linear; }
.win-caps span.on { opacity: 1; transition: opacity .6s linear .2s; }
.win-row { display: grid; grid-template-columns: 8em minmax(0, 1fr) 7.5em; gap: 14px; align-items: center; margin: 8px 0; }
.win-k { font: 700 13.5px/1.4 var(--mono); }
.win-v { text-align: right; font: 700 14px/1.4 var(--mono); white-space: nowrap; }
.win-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; height: 22px; }
.win-track i { position: relative; border: 1px solid var(--faint); }
.win-track i::before, .win-track i::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .6s linear; transition-delay: var(--sd, 0s); }
.win-track i::before { background: var(--mut); }

.win-track i::after { background: var(--acc); }
.win-track i.f::before { opacity: 1; }
.win-row.full .win-track i.f::after { opacity: 1; }
.win-row.full .win-v { color: var(--acc); }
@media (max-width: 640px) {
  .win-head { grid-template-columns: minmax(0, 1fr); }
  .win-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .win-track { grid-column: 1 / -1; grid-row: 2; }
}
/* FAQ: the answer opens with a clip from the top; closing plays it backwards (app.js), +/− turns */
html.mo .faq details > p { transition: clip-path .4s var(--ease2), opacity .3s linear; }
html.mo .faq details[open] > p { animation: faq-open .45s var(--ease2); }
html.mo .faq details.closing summary::after { transform: rotate(90deg); }
html.mo .faq details.closing > p { clip-path: inset(0 0 100% 0); opacity: 0; }
@keyframes faq-open { from { clip-path: inset(0 0 100% 0); opacity: 0; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
