/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

/* ══════════════════════════════════════════════════════════════════════
   IFClite landing — "PLANKOPF"
   The page is a Swiss engineering plan sheet. Two neutrals + one red.
   Type: Archivo (Swiss grotesque) + Fragment Mono. Themes via <html data-theme>:
   paper (light) / dusk (dark). Variable names are kept from the previous
   design so the React widgets re-skin through tokens; accents are now red.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  /* surfaces */
  --bg: #fcfcfa;
  --bg-2: #f2f1ec;
  --bg-card: #f8f7f2;
  /* ink */
  --ink: #111110;
  --ink-2: #45443f;
  --ink-3: #6b6b64;      /* annotation gray */
  /* hairlines */
  --line: #dcdbd4;
  --line-2: #c3c2b8;
  /* signature red — remapped over every legacy accent token */
  --red: #e30613;
  --red-hover: #c00510;
  --red-tint: #fae0e1;
  --indigo: #e30613;
  --indigo-hover: #c00510;
  --indigo-tint: #fae0e1;
  --accent: #e30613;
  /* muted status inks (kept restrained, plan-sheet not candy) */
  --warn: #a86b0d;
  --ok: #1f7a4d;
  --rust: #a8552a;
  /* always-dark surfaces (CTA card, core layer) */
  --invert-surface: #111110;
  --invert-ink: #fcfcfa;
  /* type */
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Archivo", ui-sans-serif, system-ui, sans-serif; /* no serif in PLANKOPF */
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wide: "wght" 800, "wdth" 118;   /* plan-lettering variation */
  /* geometry */
  --radius: 1px;
  --radius-lg: 2px;
  --maxw: 1300px;
  --gutter: clamp(20px, 4vw, 56px);
  --plankopf-h: 42px;
}

html[data-theme="dusk"] {
  --bg: #0e0e0c;
  --bg-2: #161613;
  --bg-card: #141310;
  --ink: #ededea;
  --ink-2: #b4b3ab;
  --ink-3: #83837a;
  --line: #26251f;
  --line-2: #38372f;
  --red: #ff2d1a;
  --red-hover: #ff5240;
  --red-tint: #2a120f;
  --indigo: #ff2d1a;
  --indigo-hover: #ff5240;
  --indigo-tint: #2a120f;
  --accent: #ff2d1a;
  --warn: #d79a3a;
  --ok: #4fb07e;
  --rust: #d98a52;
  --invert-surface: #060605;
  --invert-ink: #ededea;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: var(--plankopf-h);
  /* faint engineering paper grid: fine 8px minor + 64px major */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-position: -1px -1px;
  background-attachment: fixed;
}
html[data-theme="paper"] body { background-blend-mode: normal; }
/* keep the grid whisper-quiet */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg);
  opacity: 0.86;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
em { font-style: normal; }

/* ─────────────────────────── reusable ─────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--red);
}
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.hairline-top { border-top: 1px solid var(--line); }
.hairline-bot { border-bottom: 1px solid var(--line); }

/* ── Swiss dimension line: [slash tick]──[value]──[slash tick] ── */
.dim {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-3); font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.06em;
}
.dim-tick {
  flex: 0 0 auto; width: 1px; height: 11px; background: currentcolor;
  transform: rotate(45deg);
}
.dim-arm {
  flex: 1 1 auto; height: 1px; background: currentcolor; min-width: 14px;
  transform: scaleX(0); transform-origin: left;
  animation: dim-draw 0.55s cubic-bezier(.2,.7,.2,1) forwards;
}
.dim-arm.to-right { transform-origin: right; }
.dim-val {
  flex: 0 0 auto; color: var(--ink); white-space: nowrap;
  opacity: 0; animation: dim-fade 0.4s ease forwards 0.45s;
}
.dim-val .u { color: var(--ink-3); }
@keyframes dim-draw { to { transform: scaleX(1); } }
@keyframes dim-fade { to { opacity: 1; } }

/* ─────────────────────────── buttons ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px;
  padding: 0 18px; border-radius: var(--radius);
  border: 1px solid transparent; font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.02em; text-transform: uppercase;
  font-family: var(--mono);
  transition: background 120ms, color 120ms, border-color 120ms, transform 80ms;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-link { color: var(--ink); padding: 0; height: auto; background: transparent; }
.btn-link:hover { color: var(--red); }
.btn .arrow { display: inline-block; transition: transform 160ms; }
.btn:hover .arrow { transform: translateX(3px); }

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px; flex-shrink: 0; display: inline-grid;
  place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: transparent; color: var(--ink-2);
  transition: background 120ms, color 120ms, border-color 120ms, transform 80ms;
}
.theme-toggle:hover { border-color: var(--red); color: var(--red); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dusk"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dusk"] .theme-toggle .icon-sun { display: block; }

/* ─────────────────────────── nav (sheet header) ─────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
}
.brand {
  display: flex; align-items: center; gap: 11px; font-weight: 800;
  letter-spacing: 0.04em; font-size: 15px; text-transform: uppercase;
  font-variation-settings: var(--wide);
}
.brand-mark {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--red); position: relative; flex-shrink: 0;
}
.brand-mark img { width: 74%; height: 74%; object-fit: contain; }
/* registration ticks on the brand square corners */
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; width: 4px; height: 4px;
  border: 1px solid var(--red);
}
.brand-mark::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.brand-mark::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
  transition: color 120ms, background 120ms;
}
.nav-links a:hover { background: var(--bg-2); color: var(--red); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
/* keep the header clean on small screens: drop the in-page anchors and the
   GitHub button; brand + theme toggle + primary CTA remain reachable. */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ─────────────────────────── hero ─────────────────────────── */
.hero {
  padding: clamp(52px, 7vw, 104px) 0 clamp(44px, 5vw, 72px);
  position: relative; overflow: hidden;
}
/* the hero is a keyed plan detail: coarse grid + registration frame */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 0%, #000 40%, transparent 82%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 0%, #000 40%, transparent 82%);
  opacity: 0.5;
}
html[data-theme="dusk"] .hero-grid { opacity: 0.35; }
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px);
  align-items: start; position: relative;
}
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 {
  font-family: var(--sans); font-variation-settings: var(--wide);
  font-size: clamp(34px, 5.2vw, 72px); line-height: 1.0;
  letter-spacing: -0.01em; font-weight: 800; text-transform: uppercase;
  margin: 18px 0 26px; text-wrap: balance;
}
.hero h1 em { color: var(--red); }
.hero .lede {
  font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2);
  max-width: 540px; line-height: 1.55;
}
/* headline dimension line ("measures" the hero) */
.hero-dim { max-width: 540px; margin: 0 0 8px; }
.hero-meta { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta-item { display: flex; flex-direction: column; gap: 3px; }
.hero-meta-item .k {
  font-size: 10px; color: var(--ink-3); font-family: var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-meta-item .v { font-size: 13.5px; color: var(--ink); font-family: var(--mono); }
.hero-cta { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }

/* hero code panel = keyed detail drawing */
.hero-code {
  background: var(--bg-card); border: 1px solid var(--ink);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 6px 6px 0 -1px var(--line); margin-top: 50px;
}
@media (max-width: 960px) { .hero-code { margin-top: 8px; } }
.hero-code-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--ink);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); background: var(--bg-2); gap: 12px;
}
.hero-code-bar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hero-code-dots { display: flex; gap: 5px; }
.hero-code-dots span { width: 7px; height: 7px; background: var(--line-2); }
.hero-code-dots span:first-child { background: var(--red); }
.hero-code-body {
  padding: 18px 20px; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.75; color: var(--ink-2);
}
.hero-code-body .cmd { color: var(--ink); }
.hero-code-body .cmt { color: var(--ink-3); }
.hero-code-body .out { color: var(--ink-3); }
.hero-code-body .ok { color: var(--ok); }
.hero-code-body .kw { color: var(--red); }
.hero-code-body .str { color: var(--rust); }
.hero-code-body .num { color: var(--ink); font-weight: 500; }
.hero-code-body .prompt { color: var(--red); }

/* ─────────────────────────── stats strip ─────────────────────────── */
.stats {
  padding: clamp(24px, 4vw, 40px) 0; position: relative;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
@media (max-width: 880px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > *:nth-child(odd) { border-right: 1px solid var(--line); }
}
.stat {
  padding: 20px 22px 20px 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; min-height: 122px;
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat .v {
  font-family: var(--sans); font-variation-settings: var(--wide);
  font-size: clamp(30px, 3.2vw, 44px); font-weight: 800;
  letter-spacing: -0.01em; line-height: 1; color: var(--ink);
}
.stat .v .u {
  font-family: var(--mono); font-size: 0.34em; color: var(--ink-3);
  margin-left: 6px; letter-spacing: 0.04em; font-weight: 400;
  text-transform: uppercase; font-variation-settings: normal;
}
.stat .k {
  font-size: 11.5px; color: var(--ink-3); margin-top: auto; max-width: 23ch;
  line-height: 1.4; font-family: var(--mono); letter-spacing: 0.01em;
}

/* ─────────────────────────── section + detail callout ─────────────────────────── */
.section { padding: clamp(60px, 8vw, 104px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--ink); }
.section-head {
  display: grid; grid-template-columns: 1fr 1.9fr; gap: 48px;
  margin-bottom: clamp(32px, 4vw, 56px); align-items: end;
  padding-top: 26px; border-top: 1px solid var(--line); position: relative;
}
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; gap: 18px; align-items: start; } }
.section-head .label { display: flex; flex-direction: column; gap: 16px; }
.section-head h2 {
  font-family: var(--sans); font-variation-settings: var(--wide);
  font-size: clamp(26px, 3.4vw, 46px); letter-spacing: -0.01em;
  line-height: 1.02; font-weight: 800; margin: 0; text-transform: uppercase;
  text-wrap: balance;
}
.section-head h2 em { color: var(--red); }
.section-head p {
  font-size: 15.5px; color: var(--ink-2); margin: 0; max-width: 620px;
  line-height: 1.6; text-wrap: pretty;
}

/* ─────────────────────────── capability cards ─────────────────────────── */
.caps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--ink);
}
.caps > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 961px) {
  .caps > *:nth-child(3n) { border-right: 0; }
  .caps > *:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 960px) { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .caps { grid-template-columns: 1fr; } }
.cap {
  background: var(--bg-card); padding: 26px 24px 22px;
  display: flex; flex-direction: column; gap: 14px; min-height: 220px;
  position: relative; transition: background 200ms;
}
.cap:hover { background: var(--bg-2); }
.cap-num { font-family: var(--mono); font-size: 10.5px; color: var(--red); letter-spacing: 0.1em; text-transform: uppercase; }
.cap-glyph { width: 44px; height: 44px; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--bg); }
.cap-glyph svg { width: 22px; height: 22px; stroke: var(--ink); }
.cap h3 { font-size: 18px; font-weight: 700; letter-spacing: 0.01em; margin: 0; }
.cap p { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.55; }
.cap-meta {
  margin-top: auto; padding-top: 14px; display: flex; align-items: center;
  justify-content: space-between; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase;
}
.cap-meta .pill { padding: 3px 8px; border: 1px solid var(--line-2); }

/* ─────────────────────────── code tabs ─────────────────────────── */
.codeblock { background: var(--bg-card); border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.codeblock-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); overflow-x: auto; scrollbar-width: none; background: var(--bg-2); }
.codeblock-tabs::-webkit-scrollbar { display: none; }
.codeblock-tab {
  padding: 12px 18px; font-size: 11.5px; font-family: var(--mono);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3);
  border-right: 1px solid var(--line); background: transparent; border-top: 0;
  border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.codeblock-tab[aria-selected="true"] { color: var(--ink); background: var(--bg-card); border-bottom-color: var(--red); }
.codeblock-tab:hover:not([aria-selected="true"]) { color: var(--ink); }
.codeblock-body { display: grid; grid-template-columns: 320px 1fr; min-height: 420px; }
@media (max-width: 880px) { .codeblock-body { grid-template-columns: 1fr; } }
.codeblock-desc { padding: 24px; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 880px) { .codeblock-desc { border-right: 0; border-bottom: 1px solid var(--line); } }
.codeblock-desc h4 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
.codeblock-desc p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.codeblock-desc .imports { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.codeblock-desc .imports .imp { padding: 3px 7px; background: var(--bg-card); border: 1px solid var(--line); font-size: 11px; color: var(--ink-2); }
.codeblock-pre { padding: 22px 26px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; overflow: auto; margin: 0; color: var(--ink-2); white-space: pre; }
.codeblock-pre .kw { color: var(--red); }
.codeblock-pre .str { color: var(--rust); }
.codeblock-pre .num { color: var(--ink); font-weight: 500; }
.codeblock-pre .cmt { color: var(--ink-3); font-style: italic; }
.codeblock-pre .fn { color: var(--ink); }
.codeblock-pre .var { color: var(--ink); }
.codeblock-pre .ty { color: var(--ink); font-weight: 600; }
.codeblock-pre .punct { color: var(--ink-3); }

/* ─────────────────────────── setups ─────────────────────────── */
.setups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--ink); }
.setups > * { border-right: 1px solid var(--line); }
.setups > *:last-child { border-right: 0; }
@media (max-width: 960px) {
  .setups { grid-template-columns: repeat(2, 1fr); }
  .setups > * { border-bottom: 1px solid var(--line); }
  .setups > *:nth-child(2n) { border-right: 0; }
  .setups > *:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 600px) { .setups { grid-template-columns: 1fr; } .setups > * { border-right: 0; } }
.setup { background: var(--bg-card); padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 320px; position: relative; }
.setup-tag { font-family: var(--mono); font-size: 10px; color: var(--red); letter-spacing: 0.08em; text-transform: uppercase; }
.setup h3 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: 0.01em; }
.setup .summary { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.55; }
.setup ul { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding-top: 14px; border-top: 1px solid var(--line); }
.setup ul li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.setup ul li::before { content: ""; width: 6px; height: 6px; margin-top: 6px; background: var(--red); flex-shrink: 0; }
.setup .link { font-family: var(--mono); font-size: 11px; color: var(--red); margin-top: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.setup .link:hover { text-decoration: underline; }

/* ─────────────────────────── package picker ─────────────────────────── */
.picker { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .picker { grid-template-columns: 1fr; } }
.picker-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.picker-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-preset { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 12px; border: 1px solid var(--line-2); background: var(--bg-card); color: var(--ink-2); border-radius: var(--radius); }
.picker-preset[data-on="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.picker-counter { display: flex; align-items: baseline; gap: 8px; padding: 4px 0 6px; border-bottom: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.picker-counter .mono { color: var(--ink); font-size: 12.5px; }
.picker-list { max-height: 460px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.picker-list::-webkit-scrollbar { width: 6px; }
.picker-list::-webkit-scrollbar-thumb { background: var(--line-2); }
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 600px) { .picker-grid { grid-template-columns: 1fr; } }
.pkg { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg-card); transition: border-color 120ms, background 120ms; }
.pkg:hover { border-color: var(--line-2); }
.pkg[data-on="true"] { border-color: var(--red); background: var(--red-tint); }
.pkg-check { width: 18px; height: 18px; border: 1.5px solid var(--line-2); background: var(--bg); display: grid; place-items: center; flex-shrink: 0; transition: all 120ms; }
.pkg[data-on="true"] .pkg-check { background: var(--red); border-color: var(--red); }
.pkg-check svg { opacity: 0; transition: opacity 120ms; }
.pkg[data-on="true"] .pkg-check svg { opacity: 1; }
.pkg-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pkg-name-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pkg-name { font-family: var(--mono); font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pkg-ver { font-size: 10.5px; color: var(--ink-3); flex-shrink: 0; font-family: var(--mono); }
.pkg-desc { font-size: 11.5px; color: var(--ink-3); }
.pkg-npm { font-family: var(--mono); font-size: 10px; color: var(--ink-3); padding: 3px 7px; border: 1px solid var(--line); text-decoration: none; flex-shrink: 0; white-space: nowrap; transition: color 120ms, border-color 120ms; text-transform: uppercase; }
.pkg-npm:hover { color: var(--red); border-color: var(--red); }
.pkg[data-required="true"] .pkg-check { background: var(--ink-3); border-color: var(--ink-3); }
.pkg[data-required="true"] .pkg-check svg { opacity: 1; }

.picker-out { border: 1px solid var(--ink); background: var(--bg-card); padding: 0; overflow: hidden; display: flex; flex-direction: column; position: sticky; top: 78px; align-self: start; }
@media (max-width: 960px) { .picker-out { position: static; } }
.picker-out-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.picker-out-head .label { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.picker-out-head .count { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.picker-out-cmd { padding: 18px 16px; font-family: var(--mono); font-size: 12.5px; color: var(--ink); line-height: 1.7; word-break: break-all; }
.picker-out-cmd .prompt { color: var(--red); margin-right: 10px; }
.picker-out-size { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2); font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.picker-out-size strong { color: var(--ink); font-weight: 600; }
.copy-btn { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); background: transparent; border: 1px solid var(--line-2); padding: 5px 10px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: 0.04em; }
.copy-btn:hover { color: var(--red); border-color: var(--red); }

.pkg-bundle { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--bg-card); }
.pkg-bundle-head { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.pkg-bundle-head .mono { color: var(--ink-2); text-transform: none; letter-spacing: 0.02em; }
.pkg-bundle-empty { opacity: 0.6; }
.pkg-bundle-bar { display: flex; height: 8px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.pkg-bundle-bar-empty { background: repeating-linear-gradient(90deg, var(--bg-2), var(--bg-2) 6px, transparent 6px, transparent 12px); }
.pkg-bundle-seg { background: var(--red); transition: width 200ms ease-out; border-right: 1px solid var(--bg-card); }
.pkg-bundle-seg:last-child { border-right: 0; }
.pkg-bundle-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pkg-bundle-legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.pkg-bundle-dot { width: 8px; height: 8px; background: var(--red); }
.pkg-bundle-dot-faint { background: var(--line-2); }
.pkg-bundle-name { color: var(--ink); }
.pkg-bundle-size { color: var(--ink-2); font-family: var(--mono); }
.pkg-bundle-unit { color: var(--ink-3); }
.pkg-bundle-more .pkg-bundle-name { color: var(--ink-3); }

/* ─────────────────────────── schema + browsers ─────────────────────────── */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ink); }
.support-grid > * { border-right: 1px solid var(--line); }
.support-grid > *:last-child { border-right: 0; }
@media (max-width: 760px) { .support-grid { grid-template-columns: 1fr; } .support-grid > * { border-right: 0; border-bottom: 1px solid var(--line); } .support-grid > *:last-child { border-bottom: 0; } }
.support-block { background: var(--bg-card); padding: 28px 24px; }
.support-block h4 { margin: 0 0 16px; font-size: 11px; font-weight: 500; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.schema-rows { display: flex; flex-direction: column; gap: 10px; }
.schema-row { display: grid; grid-template-columns: 120px 1fr 90px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.schema-row:last-child { border-bottom: 0; }
.schema-row .ver { font-family: var(--mono); font-size: 13px; color: var(--ink); font-weight: 500; }
.schema-row .bar { height: 7px; background: var(--bg-2); overflow: hidden; position: relative; border: 1px solid var(--line); }
.schema-row .bar > span { display: block; height: 100%; background: var(--red); }
.schema-row .pct { font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-align: right; }
.browsers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.browser { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); }
.browser .nm { font-size: 13px; font-weight: 600; }
.browser .ver { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* ─────────────────────────── benchmark chart ─────────────────────────── */
.bench { background: var(--bg-card); border: 1px solid var(--ink); padding: 28px; }
.bench-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.bench-head h4 { margin: 0; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); color: var(--ink-3); }
.bench-head .sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.bench-row { display: grid; grid-template-columns: 160px 1fr 100px; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.bench-row:last-child { border-bottom: 0; }
.bench-row .name { font-size: 13px; }
.bench-row .name .sub { display: block; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.bench-row .track { height: 22px; background: var(--bg-2); border: 1px solid var(--line); display: flex; align-items: center; overflow: hidden; }
.bench-row .track .fill { height: 100%; flex-shrink: 0; transition: width 800ms cubic-bezier(.2,.7,.2,1); }
.bench-row .track .value { padding-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink); white-space: nowrap; line-height: 1; }
.bench-row.us .track .value { font-weight: 500; }
.bench-row.us .track .fill { background: var(--red); }
.bench-row.them .track .fill { background: var(--ink-3); }
.bench-row .speed { text-align: right; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.bench-model { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink); }
.bench-model:first-of-type { margin-top: 4px; }
.bench-model span { color: var(--ink-3); font-size: 11px; }
.bench-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.55; color: var(--ink-3); }

/* ─────────────────────────── CTA (dark plan detail) ─────────────────────────── */
.cta { padding: clamp(60px, 8vw, 104px) 0; }
.cta-card {
  background: var(--invert-surface); color: var(--invert-ink);
  border: 1px solid var(--ink); border-radius: var(--radius);
  padding: clamp(40px, 6vw, 76px); position: relative; overflow: hidden;
}
.cta-grid {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000 0%, #000 35%, transparent 82%);
  mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000 0%, #000 35%, transparent 82%);
}
.cta-content { position: relative; z-index: 1; }
.cta-card h2 {
  font-family: var(--sans); font-variation-settings: var(--wide);
  font-size: clamp(28px, 4vw, 54px); letter-spacing: -0.01em; font-weight: 800;
  margin: 0; line-height: 1.02; max-width: 18ch; text-transform: uppercase; text-wrap: balance;
}
.cta-card h2 em { color: var(--red); }
.cta-card p { color: color-mix(in srgb, var(--invert-ink) 74%, transparent); max-width: 52ch; margin: 20px 0 30px; line-height: 1.6; }
.cta-card .btn-primary { background: var(--invert-ink); color: var(--invert-surface); }
.cta-card .btn-primary:hover { background: var(--red); color: #fff; }
.cta-card .btn-ghost { color: var(--invert-ink); border-color: color-mix(in srgb, var(--invert-ink) 36%, transparent); }
.cta-card .btn-ghost:hover { border-color: var(--red); color: var(--red); }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─────────────────────────── footer ─────────────────────────── */
.foot { padding: 48px 0 32px; border-top: 1px solid var(--ink); font-size: 13px; color: var(--ink-3); }
.foot-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 880px) { .foot-inner { grid-template-columns: 1fr 1fr; } }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col h5 { margin: 0 0 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); font-family: var(--mono); font-weight: 500; }
.foot-col a { color: var(--ink-2); font-size: 13px; }
.foot-col a:hover { color: var(--red); }
.foot-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.foot-meta a:hover { color: var(--red); }

/* quiet accents */
.tag-rust { color: var(--rust); }
.tag-ts { color: var(--red); }
.tag-wasm { color: var(--ok); }

/* two-up */
.twoup { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.twoup-wide { grid-template-columns: 1.5fr 1fr; align-items: stretch; }
@media (max-width: 960px) { .twoup, .twoup-wide { grid-template-columns: 1fr; } }

/* ─────────────────────────── bench explorer ─────────────────────────── */
.be { background: var(--bg-card); border: 1px solid var(--ink); display: flex; flex-direction: column; }
.be-controls { padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.be-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.be-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); font-family: var(--mono); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.be-chip-dot { width: 9px; height: 9px; background: var(--ink-3); display: inline-block; }
.be-chip.us .be-chip-dot { background: var(--red); }
.be-chip.us.shade-light .be-chip-dot { background: color-mix(in srgb, var(--red) 55%, var(--bg-card)); }
.be-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.be-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: var(--bg-card); border: 1px solid var(--line-2); color: var(--ink); font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; transition: background 120ms, border-color 120ms; white-space: nowrap; flex-shrink: 0; }
.be-btn > span { white-space: nowrap; }
.be-btn:hover { border-color: var(--red); color: var(--red); }
.be-btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.be-btn-primary:hover { background: var(--red); border-color: var(--red); color: #fff; }
.be-menu { position: relative; }
.be-menu-pop { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--bg-card); border: 1px solid var(--ink); box-shadow: 4px 4px 0 -1px var(--line); padding: 4px; z-index: 20; }
.be-menu-item { display: block; width: 100%; text-align: left; padding: 7px 10px; font-size: 12.5px; background: transparent; border: 0; color: var(--ink-2); }
.be-menu-item:hover { background: var(--bg-2); color: var(--ink); }
.be-menu-item.on { background: var(--red-tint); color: var(--ink); font-weight: 500; }
.be-rows { display: flex; flex-direction: column; }
.be-row { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.be-row:last-child { border-bottom: 0; }
.be-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.be-row-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.be-row-name { font-size: 13px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.be-row-meta { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.be-row-meta .dot { opacity: 0.45; margin: 0 3px; }
.be-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.be-icon { width: 26px; height: 26px; display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--ink-3); transition: all 120ms; }
.be-icon:hover { background: var(--bg-2); color: var(--red); border-color: var(--line); }
.be-bars { display: flex; flex-direction: column; gap: 6px; }
.be-bar { display: grid; grid-template-columns: 140px 1fr 78px; align-items: center; gap: 12px; }
@media (max-width: 600px) { .be-bar { grid-template-columns: 90px 1fr 64px; gap: 8px; } }
.be-bar-label { display: flex; flex-direction: column; gap: 1px; }
.be-bar-name { font-size: 12.5px; color: var(--ink); }
.be-bar.us .be-bar-name { font-weight: 600; }
.be-bar-sub { font-size: 10px; color: var(--ink-3); letter-spacing: 0.02em; font-family: var(--mono); }
.be-bar-track { position: relative; height: 22px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; }
.be-bar-fill { height: 100%; background: var(--ink-3); flex-shrink: 0; transition: width 700ms cubic-bezier(.2,.7,.2,1), background 200ms; }
.be-bar.us .be-bar-fill { background: var(--red); }
.be-bar.us.shade-deep .be-bar-fill { background: var(--red); }
.be-bar.us.shade-light .be-bar-fill { background: color-mix(in srgb, var(--red) 55%, var(--bg-card)); }
.be-bar.fastest:not(.us) .be-bar-fill { background: var(--ink-2); }
.be-bar-value { font-family: var(--mono); font-size: 11.5px; color: var(--ink); white-space: nowrap; letter-spacing: -0.01em; text-align: right; }
.be-bar.us .be-bar-value { font-weight: 600; }
.be-bar.failed .be-bar-value { color: var(--red); font-weight: 500; font-size: 10.5px; }
.be-bar-unit { color: var(--ink-3); margin-left: 2px; font-weight: 400; }
.be-add { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; transition: all 120ms; }
.be-add:hover { background: var(--bg-card); color: var(--red); border-color: var(--red); }
.be-add span { font-size: 16px; line-height: 1; }
.be-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; background: var(--bg-2); border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.be-foot strong { color: var(--ink); font-weight: 600; }
.be-foot a { color: var(--red); font-size: 11px; }
.be-foot a:hover { text-decoration: underline; }

@supports (view-transition-name: x) {
  ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 280ms; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
}

/* ─────────────────────────── stack builder ─────────────────────────── */
.sb { background: var(--bg-card); border: 1px solid var(--ink); display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.sb-controls { padding: 16px 18px; background: var(--bg-2); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.sb-ctrl { display: flex; flex-direction: column; gap: 6px; }
.sb-ctrl-label { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.sb-seg { display: flex; background: var(--bg-card); border: 1px solid var(--line-2); padding: 2px; gap: 2px; }
.sb-seg-opt { flex: 1; padding: 6px 8px; font-size: 11px; font-family: var(--mono); background: transparent; border: 0; color: var(--ink-3); transition: all 120ms; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: 0.03em; }
.sb-seg-opt:hover:not(.on) { color: var(--ink); }
.sb-seg-opt.on { background: var(--ink); color: var(--bg); font-weight: 500; }
.sb-feats { display: flex; flex-wrap: wrap; gap: 5px; }
.sb-feat { padding: 5px 10px; border: 1px solid var(--line-2); background: var(--bg-card); color: var(--ink-3); font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.03em; transition: all 120ms; }
.sb-feat:hover { color: var(--ink); border-color: var(--ink-3); }
.sb-feat.on { background: var(--red-tint); border-color: var(--red); color: var(--red); font-weight: 500; }
.sb-stack { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 0; justify-content: center; min-height: 280px; }
.sb-layer { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); background: var(--bg); transition: opacity 160ms, border-color 160ms; }
.sb-layer.dim { opacity: 0.45; }
.sb-layer.core { background: var(--invert-surface); color: var(--invert-ink); border-color: var(--invert-surface); }
.sb-layer.core .sb-layer-meta { color: rgba(255,255,255,0.55); }
.sb-layer.runtime { background: var(--bg-2); border-color: var(--line-2); }
.sb-tag { display: inline-grid; place-items: center; min-width: 46px; height: 22px; padding: 0 7px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; flex-shrink: 0; font-weight: 500; text-transform: uppercase; }
.sb-tag-app  { background: var(--bg-2); color: var(--ink-3); border: 1px solid var(--line); }
.sb-tag-ts   { background: var(--red-tint); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.sb-tag-wgpu { background: rgba(31,122,77,0.08); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.sb-tag-wgl  { background: rgba(31,122,77,0.08); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.sb-tag-wasm { background: rgba(168,107,13,0.08); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.sb-tag-rust { background: rgba(168,85,42,0.10); color: var(--rust); border: 1px solid color-mix(in srgb, var(--rust) 35%, transparent); }
.sb-tag-tauri{ background: rgba(168,107,13,0.10); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.sb-layer.core .sb-tag-rust { background: rgba(255,45,26,0.18); color: color-mix(in srgb, var(--red) 80%, white); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.sb-layer-body { display: flex; flex-direction: column; gap: 0; min-width: 0; flex: 1; }
.sb-layer-name { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.sb-layer-meta { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.sb-arrow { display: flex; justify-content: center; color: var(--line-2); padding: 2px 0; }
.sb-foot { padding: 14px 18px; background: var(--bg-2); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sb-foot-top { border-top: 0; border-bottom: 1px solid var(--line); }
.sb-foot-head { display: flex; align-items: center; justify-content: space-between; }
.sb-foot-label { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.sb-foot-cmd { font-family: var(--mono); font-size: 12px; color: var(--ink); word-break: break-all; line-height: 1.5; }
.sb-foot-prompt { color: var(--red); margin-right: 6px; }
.sb-copy { padding: 0 10px; height: 24px; font-size: 10px; }

/* ─────────────────────────── conveyor pipeline ─────────────────────────── */
.conveyor { display: flex; flex-direction: column; gap: 24px; outline: none; }
.conveyor:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.conveyor-rail { display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.conveyor-rail::-webkit-scrollbar { height: 4px; }
.conveyor-rail::-webkit-scrollbar-thumb { background: var(--line-2); }
.conveyor-link { flex: 0 0 auto; align-self: center; width: 18px; height: 1px; background: var(--line-2); position: relative; }
.conveyor-link[data-on="true"] { background: var(--red); }
.conveyor-link::after { content: ""; position: absolute; right: -3px; top: -2px; border-left: 4px solid var(--line-2); border-top: 2.5px solid transparent; border-bottom: 2.5px solid transparent; }
.conveyor-link[data-on="true"]::after { border-left-color: var(--red); }
.conveyor-stage {
  flex: 1 1 0; min-width: 140px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line);
  text-align: left; cursor: pointer;
  transition: background 140ms, border-color 140ms, transform 100ms;
}
.conveyor-stage:hover { border-color: var(--line-2); background: var(--bg-2); }
.conveyor-stage[data-active="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.conveyor-stage[data-active="true"] .conveyor-num,
.conveyor-stage[data-active="true"] .conveyor-blurb { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.conveyor-stage[data-passed="true"] { border-color: var(--red); }
.conveyor-stage[data-passed="true"] .conveyor-num { color: var(--red); }
.conveyor-num { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); font-family: var(--mono); }
.conveyor-title { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.conveyor-blurb { font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; font-family: var(--mono); }
@media (max-width: 760px) {
  .conveyor-rail { flex-wrap: nowrap; }
  .conveyor-stage { min-width: 130px; padding: 10px 12px; }
  .conveyor-title { font-size: 13px; }
  .conveyor-link { width: 10px; }
}
.conveyor-panel { border: 1px solid var(--ink); background: var(--bg-card); overflow: hidden; }

/* shared demo chrome */
.demo { display: flex; flex-direction: column; }
.demo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.demo-head > div:first-child { max-width: 540px; }
.demo-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--red); text-transform: uppercase; display: inline-block; margin-bottom: 8px; }
.demo-head h3 { font-size: 21px; font-weight: 700; letter-spacing: 0.005em; margin: 0 0 6px; text-transform: uppercase; }
.demo-head p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.demo-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.demo-actions-row { flex-wrap: wrap; justify-content: flex-end; }
.demo-run { height: 36px; padding: 0 18px; font-size: 11px; }
.demo-pillbar { display: inline-flex; border: 1px solid var(--line-2); overflow: hidden; }
.demo-pillbar button { font-family: var(--mono); font-size: 11px; padding: 6px 12px; background: transparent; color: var(--ink-3); border: 0; border-right: 1px solid var(--line); cursor: pointer; transition: background 120ms, color 120ms; text-transform: uppercase; }
.demo-pillbar button:last-child { border-right: 0; }
.demo-pillbar button:hover { color: var(--ink); background: var(--bg-2); }
.demo-pillbar button[data-on="true"] { background: var(--ink); color: var(--bg); }
.demo-empty { padding: 18px; color: var(--ink-3); font-size: 13px; font-style: italic; text-align: center; }
.demo-empty-cta { font-style: normal; font-family: var(--mono); font-size: 12px; }
.demo-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 320px; }
@media (max-width: 760px) { .demo-split { grid-template-columns: 1fr; } }
.demo-pane { display: flex; flex-direction: column; min-height: 0; }
.demo-pane + .demo-pane { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .demo-pane + .demo-pane { border-left: 0; border-top: 1px solid var(--line); } }
.demo-pane-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; background: var(--bg-card); }
.demo-pane-meta { color: var(--ink-2); text-transform: none; letter-spacing: 0.02em; }
.demo-pane-code { background: var(--bg-card); }
.demo-step { margin: 0; padding: 14px 16px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); line-height: 1.55; white-space: pre; overflow: auto; max-height: 340px; min-height: 280px; }
.demo-pane-stream { background: var(--bg); }
.demo-stream { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 340px; min-height: 280px; }
.demo-chip { display: inline-grid; grid-template-columns: 38px auto 1fr; gap: 10px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line); background: var(--bg-card); animation: chip-in 200ms ease-out; }
.demo-chip-id { color: var(--ink-3); font-size: 11px; font-family: var(--mono); }
.demo-chip-type { color: var(--ink); font-size: 12.5px; font-weight: 500; }
.demo-chip-name { color: var(--ink-2); font-size: 11.5px; }
@keyframes chip-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.demo-stream-done { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-card); color: var(--red); font-size: 12px; font-family: var(--mono); }
.demo-stream-time { color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .demo-chip { animation: none; } }
.demo-iframe-wrap { position: relative; width: 100%; height: 560px; background: var(--bg-2); overflow: hidden; }
.demo-iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg-2); }
.demo-iframe-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); color: var(--ink-3); }
@media (max-width: 760px) { .demo-iframe-wrap { height: 460px; } }
.demo-pane-side { background: var(--bg-card); }
.demo-props { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.demo-props > div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.demo-props > div:last-child { border-bottom: 0; }
.demo-prop-k { color: var(--ink-3); font-family: var(--mono); }
.demo-prop-v { color: var(--ink); }
.demo-query-builder { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 13px; }
.demo-clause-kw, .demo-clause-and { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); }
.demo-clause-k { color: var(--ink); font-family: var(--mono); font-size: 12.5px; padding: 3px 8px; border: 1px solid var(--line); background: var(--bg-card); }
.demo-clause-op { color: var(--ink-3); }
.demo-select { font-family: var(--mono); font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line-2); background: var(--bg-card); color: var(--ink); cursor: pointer; }
.demo-select:hover { border-color: var(--red); }
.demo-sql { margin: 0; padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--bg); font-family: var(--mono); font-size: 12.5px; color: var(--ink); line-height: 1.6; overflow-x: auto; }
.demo-results { padding: 0; }
.demo-table-wrap { overflow-x: auto; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.demo-table th, .demo-table td { padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.demo-table th { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg); }
.demo-table tbody tr:hover { background: var(--bg-2); }
.demo-table tr:last-child td { border-bottom: 0; }
.demo-split-edit { grid-template-columns: 1.3fr 1fr; }
.demo-edit-form { padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.demo-edit-rows { display: flex; flex-direction: column; gap: 12px; }
.demo-edit-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; }
.demo-edit-row label { font-size: 12px; color: var(--ink-2); }
.demo-edit-row label span { color: var(--ink-3); margin-left: 4px; }
.demo-edit-row input, .demo-edit-row select { font-family: var(--mono); font-size: 13px; padding: 6px 10px; border: 1px solid var(--line-2); background: var(--bg-card); color: var(--ink); }
.demo-edit-row input:focus, .demo-edit-row select:focus { outline: 1px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.demo-edit-proxy { position: relative; min-height: 130px; display: flex; align-items: flex-end; justify-content: center; padding: 16px 0; }
.demo-edit-wall { background: color-mix(in srgb, var(--red) 16%, var(--bg-card)); border: 1.5px solid var(--red); display: flex; align-items: center; justify-content: center; transition: width 180ms ease-out, height 180ms ease-out; color: var(--red); font-size: 10px; letter-spacing: 0.06em; font-family: var(--mono); }
.demo-edit-floor { position: absolute; bottom: 12px; left: 10%; right: 10%; height: 3px; background: var(--ink-3); opacity: 0.4; }
.demo-diff-list { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.demo-diff { display: grid; grid-template-columns: 90px 1fr 14px 1fr; gap: 8px; align-items: baseline; font-size: 12px; padding: 6px 8px; background: var(--bg-card); border: 1px solid var(--line); animation: chip-in 180ms ease-out; font-family: var(--mono); }
.demo-diff-field { color: var(--ink); }
.demo-diff-from { color: var(--ink-3); text-decoration: line-through; }
.demo-diff-to { color: var(--red); }
.demo-diff-arrow { color: var(--ink-3); text-align: center; }
.copy-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.copy-btn[disabled]:hover { color: var(--ink-3); border-color: var(--line-2); }
.demo-validate-rules { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px 0; }
.demo-chip-rule { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--line); cursor: pointer; transition: border-color 120ms, background 120ms; }
.demo-chip-rule:hover { border-color: var(--line-2); }
.demo-chip-rule[data-on="true"] { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--bg-card)); }
.demo-chip-rule-id { font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; font-family: var(--mono); }
.demo-chip-rule-label { font-size: 12.5px; color: var(--ink); }
.demo-validate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 18px 22px; }
.demo-validate-cell { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg-card); font-size: 12.5px; transition: border-color 200ms, background 200ms; }
.demo-validate-cell[data-state="pending"] { opacity: 0.45; }
.demo-validate-cell[data-state="pass"] { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--bg-card)); }
.demo-validate-cell[data-state="fail"] { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: color-mix(in srgb, var(--red) 8%, var(--bg-card)); }
.demo-validate-mark { font-family: var(--mono); font-size: 14px; width: 16px; text-align: center; }
.demo-validate-cell[data-state="pass"] .demo-validate-mark { color: var(--ok); }
.demo-validate-cell[data-state="fail"] .demo-validate-mark { color: var(--red); }
.demo-validate-summary { padding: 16px 22px 22px; border-top: 1px solid var(--line); background: var(--bg-2); }
.demo-validate-counts { display: flex; gap: 14px; align-items: baseline; font-size: 14px; margin-bottom: 10px; }
.demo-summary-pass { color: var(--ok); }
.demo-summary-fail { color: var(--red); }
.demo-validate-runtime { color: var(--ink-3); font-size: 12px; font-family: var(--mono); }
.demo-bcf { display: flex; flex-direction: column; gap: 4px; }
.demo-bcf-head { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.demo-bcf-item { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.demo-bcf-item:last-child { border-bottom: 0; }
.demo-bcf-id { color: var(--ink-3); font-family: var(--mono); }
.demo-bcf-name { color: var(--ink); }
.demo-bcf-reason { color: var(--red); font-family: var(--mono); font-size: 11.5px; }
.demo-export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 22px; }
.demo-export-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line); text-align: left; cursor: pointer; transition: border-color 120ms, transform 100ms; }
.demo-export-card:hover { border-color: var(--line-2); }
.demo-export-card[data-on="true"] { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--bg-card)); }
.demo-export-top { display: flex; justify-content: space-between; align-items: baseline; }
.demo-export-label { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.demo-export-bytes { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.demo-export-card[data-on="true"] .demo-export-bytes { color: var(--red); }
.demo-export-bar { height: 6px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.demo-export-fill { height: 100%; background: var(--ink-3); transition: width 220ms ease-out; }
.demo-export-card[data-on="true"] .demo-export-fill { background: var(--red); }
.demo-export-desc { font-size: 11px; color: var(--ink-3); }
.demo-cli { padding: 18px 22px; }
.demo-cli-tabs, .demo-sdk-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.demo-cli-tabs .copy-btn[data-on="true"], .demo-sdk-tabs .copy-btn[data-on="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.demo-cli-out { margin: 0; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.65; white-space: pre-wrap; overflow-x: auto; }
.demo-cli-prompt { color: var(--red); margin-right: 8px; }
.demo-cli-cmd { color: var(--ink); }
.demo-sdk { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.demo-sdk-code { margin: 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--ink); line-height: 1.6; overflow-x: auto; }
.demo-sdk-result { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); }
.demo-sdk-arrow { color: var(--red); font-size: 12px; }
.demo-sdk-result-val { margin: 0; font-size: 12.5px; color: var(--ink); white-space: pre-wrap; font-family: var(--mono); }
.demo-mcp { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; }
.demo-mcp-turn { display: flex; flex-direction: column; gap: 4px; }
.demo-mcp-who { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.demo-mcp-bubble { padding: 10px 14px; border: 1px solid var(--line); background: var(--bg-card); font-size: 13px; color: var(--ink); line-height: 1.5; max-width: 580px; }
.demo-mcp-user .demo-mcp-bubble { border-color: var(--line-2); }
.demo-mcp-assistant .demo-mcp-bubble { background: color-mix(in srgb, var(--red) 6%, var(--bg-card)); border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.demo-mcp-tool { padding-left: 12px; border-left: 2px solid var(--red); }
.demo-mcp-tool-grid { display: flex; flex-direction: column; gap: 4px; max-width: 580px; }
.demo-mcp-args, .demo-mcp-result { margin: 0; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); overflow-x: auto; white-space: pre-wrap; font-family: var(--mono); }
.demo-mcp-result { color: var(--red); }

/* ─────────────────────────── browser test ─────────────────────────── */
.br-test { display: flex; flex-direction: column; gap: 14px; }
.br-test-btn { align-self: flex-start; height: 36px; padding: 0 16px; font-size: 11px; }
.br-test-done { gap: 10px; }
.br-test-head { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.br-test-source { font-size: 12.5px; color: var(--ink); }
.br-test-counts { font-size: 12px; color: var(--ink-2); font-family: var(--mono); }
.br-test-reset { font-size: 10px; padding: 3px 8px; }
.br-test-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.br-test-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); background: var(--bg-card); transition: background 200ms ease-out; }
.br-test-row[data-state="pass"] { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, var(--bg-card)); }
.br-test-row[data-state="warn"] { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, var(--bg-card)); }
.br-test-row[data-state="fail"] { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: color-mix(in srgb, var(--red) 7%, var(--bg-card)); }
.br-test-mark { font-family: var(--mono); font-size: 14px; text-align: center; line-height: 1; }
.br-test-row[data-state="pass"] .br-test-mark { color: var(--ok); }
.br-test-row[data-state="warn"] .br-test-mark { color: var(--warn); }
.br-test-row[data-state="fail"] .br-test-mark { color: var(--red); }
.br-test-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.br-test-label { font-size: 12.5px; color: var(--ink); }
.br-test-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; overflow-wrap: anywhere; font-family: var(--mono); }

/* ─────────────────────────── PLANKOPF title block (fixed bottom) ─────────────────────────── */
.plankopf {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--plankopf-h);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
}
.pk-cell {
  border-right: 1px solid var(--line); padding: 0 clamp(10px, 2vw, 18px);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  min-width: 0; overflow: hidden;
}
.pk-cell:last-child { border-right: 0; }
.pk-k { font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.pk-v { font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02em; }
.pk-v a:hover { color: var(--red); }
.pk-blatt { border-left: 3px solid var(--red); }
.pk-blatt .pk-v { color: var(--red); font-weight: 700; }
.pk-blatt .pk-v .tot { color: var(--ink-3); font-weight: 400; }
@media (max-width: 720px) {
  .plankopf { grid-template-columns: 1fr auto; }
  .pk-cell.pk-hide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dim-arm { animation: none; transform: scaleX(1); }
  .dim-val { animation: none; opacity: 1; }
}
