:root {
  color-scheme: dark;
  --bg: #100e0b;
  --bg-2: #16130f;
  --panel: #1c1813;
  --panel-2: #241e16;
  --ink: #ece4d4;
  --muted: #a89a82;
  --faint: #7a6e5a;
  --line: #3a3226;
  --accent: #c47a1a;
  --accent-2: #f0b429;
  --link: #e8b84a;
  --warn: #e0a84a;
  --bad: #d45c4a;
  --good: #f0b429;
  --paper: #efe6c9;
  --ink-paper: #1c1710;
  --sans: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ui: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 2px;
  --line-soft: #2a241c;
  --radius-lg: 3px;
  --wrap: 1040px;
  --gutter: clamp(18px, 4vw, 36px);
  --panel-pad: clamp(8px, 2vw, 12px);
  --shadow-1: none;
  --shadow-2: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 1px var(--bg), 0 0 0 3px var(--accent-2);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --amber: rgba(240, 180, 41, 0.14);
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
}

* { box-sizing: border-box; }
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { margin: 0; height: 100%; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 15px; line-height: 1.5; }
body { -webkit-font-smoothing: antialiased; }
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.55  0 0 0 0 0.2  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
button, a, summary, .chip, .panel-go, .btn-lg { touch-action: manipulation; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
a { color: var(--link); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

/* ------------------------------------------------------------ base chrome */

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--accent-2); color: #1a1206; padding: 8px 12px; z-index: 50; border-radius: 2px; }

#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- chrome */

.top {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 10px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0;
  color: inherit; text-decoration: none;
}
.logo { width: auto; height: 20px; display: block; border-radius: 0; }
.word { font-family: var(--sans); font-weight: 600; font-size: 18px; letter-spacing: 0.08em; }
.led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--faint);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.led[data-state="live"] { background: var(--good); box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18); }
.led[data-state="wait"] { background: var(--warn); box-shadow: 0 0 0 3px rgba(224, 168, 74, 0.16); }
.led[data-state="err"] { background: var(--bad); box-shadow: 0 0 0 3px rgba(232, 107, 107, 0.16); }

.presets { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.presets,
.presets a,
.presets .tools-sum,
.top-actions,
.top-actions .ghost {
  font-family: var(--ui);
}
.presets a,
.presets .tools-sum {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 0;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.presets a[aria-current="page"],
.presets .tools-sum[aria-current="true"] {
  color: var(--accent-2);
  background: transparent;
  font-weight: 600;
  border-bottom-color: var(--accent-2);
}
.presets a:hover,
.presets .tools-sum:hover { color: var(--ink); background: transparent; }
.presets a[aria-current="page"]:hover,
.presets .tools-sum[aria-current="true"]:hover { color: var(--accent-2); background: transparent; }

.tools-menu { position: relative; }
.tools-sum {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tools-sum::-webkit-details-marker,
.tools-sum::marker { display: none; content: ""; }
.tools-sum::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}
.tools-menu[open] .tools-sum { color: var(--ink); background: transparent; }
.tools-menu[open] .tools-sum[aria-current="true"] { color: var(--accent-2); background: transparent; }
.tools-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 168px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-2);
  z-index: 20;
}
.tools-list a {
  border-radius: 0;
  padding: 8px 14px;
  white-space: nowrap;
}

.top-actions { display: flex; gap: 8px; align-items: center; }

.ghost, .primary, .danger, .chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.ghost:hover, .chip:hover { background: var(--panel); border-color: var(--accent); }
.primary {
  background: var(--accent-2);
  color: #1a1206;
  border-color: #c48a20;
  font-weight: 600;
}
.primary:hover { background: #ffc44a; }
.danger { color: var(--bad); border-color: var(--line); background: transparent; }
.chip.on { border-color: var(--accent); color: var(--accent-2); background: var(--amber); }

/* ------------------------------------------------------------ home bands */

.home { flex: 1; width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
html { scroll-padding-top: 84px; }

.band { padding: 56px 0; border-bottom: 1px solid var(--line-soft); }
.band:last-child { border-bottom: 0; }
.band-alt { background: var(--bg-2); }

.band-head { max-width: 62ch; margin-bottom: 24px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.eyebrow::before {
  content: "█";
  font-size: 8px;
  letter-spacing: 0;
  color: var(--accent-2);
}
.band-head h2 {
  font-family: var(--sans);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}
.band-sub { color: var(--muted); line-height: 1.55; margin: 10px 0 0; font-size: 15px; }

/* hero */

.band-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
  background: var(--bg);
}
.home .wrap,
.band-hero .wrap {
  position: relative;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.hero-stage,
.home-panel {
  position: relative;
  width: 100%;
  padding: var(--panel-pad);
}
.hero-stage {
  border: 0;
  border-left: 2px solid var(--accent-2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 4px 22px;
}
.hero-stage::before,
.hero-stage::after { content: none; }

.hero h1,
.band-hero h1 {
  font-size: clamp(26px, 5.6vw, 48px);
  line-height: 1.22;
  margin: 10px 0 0;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.hero-tty {
  font-family: "Courier New", Courier, "American Typewriter", ui-monospace, monospace;
  color: var(--accent-2);
  letter-spacing: 0.03em;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  text-shadow: 0 0 22px rgba(240, 180, 41, 0.22);
}
.hero-tty::after {
  content: "█";
  margin-left: 0.08em;
  font-size: 0.82em;
  animation: tty-blink 1.08s steps(1, end) infinite;
}
@keyframes tty-blink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}
.hero-break { display: block; }
.lede { color: var(--muted); max-width: 52ch; line-height: 1.6; font-size: 15px; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.hero-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.hero-tools a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.hero-tools a:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  background: var(--amber);
}

/* titled accordion: one row per tool helper */

.acc {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.acc-item {
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 88px;
  background: var(--panel);
}
.acc-item:first-child { border-top: 0; }
.acc-item[open] { background: #211b14; }

.acc-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px 18px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.acc-sum::-webkit-details-marker,
.acc-sum::marker { display: none; content: ""; }
.acc-sum:hover { background: var(--amber); }
.acc-sum:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--link);
}
.acc-item[open] .acc-sum { border-bottom: 1px solid var(--line-soft); }

.acc-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc-title {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.acc-blurb {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}

.acc-chev {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.2s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.acc-chev::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-1px, -2px);
}
.acc-item[open] .acc-chev {
  transform: rotate(180deg);
  border-color: var(--accent);
  background: var(--amber);
}
.acc-item[open] .acc-chev::before { border-color: var(--accent-2); }

.acc-body { padding: 4px 22px 24px; }
.acc-lede { color: var(--muted); line-height: 1.6; margin: 16px 0 18px; max-width: 72ch; }
.acc-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 22px 32px;
}

.how {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--ink);
  line-height: 1.55;
}
.how li { margin: 0 0 10px; }
.need p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.need-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

@media (max-width: 900px) {
  .acc-grid { grid-template-columns: 1fr; }
}

#term-body ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); line-height: 1.5; }
#plot-cv { display: block; border: 1px solid var(--line); border-radius: 2px; background: #0a0907; }

.btn-lg {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-lg::after { content: none; }
.btn-solid {
  background: var(--accent-2);
  color: #1a1206;
  border-color: #c48a20;
  box-shadow: none;
}
.btn-solid:hover { background: #ffc44a; }
.btn-line {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-line:hover { border-color: var(--accent-2); color: var(--accent-2); background: transparent; }

/* the glass: a terminal that actually replays bytes */

/* ANSI palette, matched to the xterm theme the bench uses */
  
  
 
.t-r1 { color: #ff8a8a; } .t-g1 { color: #63e6cd; } .t-y1 { color: #f0c26a; }
.t-b1 { color: #8fd0e6; } .t-m1 { color: #dcb4e6; } .t-c1 { color: #7fdcd4; }
.t-w1 { color: #eef4f8; } .t-k1 { color: #6b7c88; }

/* tool tabs */

.tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.tab {
  display: flex; flex-direction: column; gap: 3px;
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab b { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.tab:hover { border-color: var(--accent); background: var(--panel-2); }
.tab.on {
  border-color: var(--accent-2);
  background: var(--amber);
  box-shadow: none;
}
.tab.on b { color: var(--accent-2); }
.tab.on span { color: var(--muted); }

.panel-go {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 2px;
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.panel-go::after { content: none; }
.panel-go:hover { border-color: var(--accent-2); color: var(--accent-2); background: transparent; }

/* local by default */

.band-head-wide { max-width: 68ch; }

/* under the glass */

.under-h {
  margin: 0 0 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}

.under-hint { margin: 14px 0 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- /helper */

.band-setup { padding: 66px 0 60px; }
.setup-h1 {
  font-family: var(--sans);
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1.12; letter-spacing: 0; font-weight: 500;
  margin: 14px 0 0;
}
#helper .setup-h1 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
#helper .band-head h2 {
  font-size: clamp(18px, 2.2vw, 24px);
}
#helper .route h2 {
  font-size: 16px;
}
#helper .dl-copy h3,
#helper .steps h4 {
  font-size: 14px;
}
.setup-link,
.help-link { text-decoration: none; }
.setup-link[aria-current="page"],
.help-link[aria-current="page"] { border-color: var(--accent-2); color: var(--accent-2); }

.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-top: 34px; }
.route {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.route-lead { border-color: var(--accent); background: #211b14; }
.route h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.route p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; flex: 1; }
.route code { font-family: var(--mono); font-size: 0.9em; color: var(--accent-2); }
.route-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--warn);
  border: 1px solid rgba(224, 168, 74, 0.4);
  background: rgba(224, 168, 74, 0.1);
  border-radius: 2px; padding: 3px 9px;
}
.route-tag.ok {
  color: var(--accent-2);
  border-color: rgba(240, 180, 41, 0.4);
  background: var(--amber);
}
.route-state { font-size: 13px; color: var(--faint); line-height: 1.55; }
.route-state.ok { color: var(--accent-2); }
/* Keep the three call-to-actions on one baseline whatever the copy length. */
.route .panel-go, .route .route-state { margin-top: auto; }

.dl {
  display: flex; flex-wrap: wrap; gap: 20px 28px;
  align-items: center; justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  margin-bottom: 34px;
}
.dl-copy { flex: 1 1 280px; }
.dl-copy h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.dl-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-actions .btn-lg { padding: 10px 18px; font-size: 14px; }

#downloads { scroll-margin-top: 88px; }

.dl-free {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 20px;
}
.dl-free ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.dl-free a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.dl-free a:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  background: var(--amber);
}

.dl-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px 28px;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 0;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}
.dl-icon {
  position: relative;
  width: 52px;
  height: 64px;
  flex: none;
  border-radius: 2px;
  background: #0a0907;
  border: 1px solid var(--line);
  box-shadow: none;
  display: grid;
  place-items: end center;
  padding: 0 0 11px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.dl-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  border-style: solid;
  border-width: 0 12px 12px 0;
  border-color: transparent var(--line) transparent transparent;
}
.dl-card .dl-copy .route-tag { margin-bottom: 2px; }
.dl-card .dl-copy h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 8px 0 10px;
}
.dl-card .dl-copy p { font-size: 15px; max-width: 46ch; }
.dl-meta { margin-top: 14px !important; }
.dl-meta code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-2);
  background: #0a0907;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 10px;
}
.dl-card .dl-actions {
  flex-direction: column;
  align-items: stretch;
  min-width: 200px;
}
.dl-card .dl-actions .btn-lg { justify-content: center; }
.dl-source {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 0;
}
.dl-source:hover { color: var(--accent-2); }

@media (max-width: 860px) {
  .dl-card {
    grid-template-columns: auto 1fr;
    padding: 22px 20px;
  }
  .dl-card .dl-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
  }
  .dl-source { padding: 8px 4px; }
}

.os-h { margin-bottom: 12px; }
.os-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; }
.os-panel[hidden] { display: none; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 20px 22px 20px 62px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 20px; top: 20px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber);
  border: 1px solid var(--accent);
  color: var(--accent-2);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.steps h4 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.steps p { margin: 0 0 10px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.steps p:last-child { margin-bottom: 0; }
.steps code { font-family: var(--mono); font-size: 0.9em; color: var(--accent-2); }
.steps kbd {
  font-family: var(--mono); font-size: 11px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; background: var(--bg-2);
}

.cmd {
  margin: 0 0 10px;
  padding: 12px 14px;
  background: #0a0907;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.cmd code {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  color: #ece4d4; white-space: pre;
}
/* Comment lines inside a command block read as prose, not as something to run. */
.cmd code { display: block; }

.banner strong { display: block; margin-bottom: 4px; color: #efc76b; }
.banner-go {
  display: inline-block; margin-top: 8px;
  padding: 5px 12px; border-radius: 2px;
  border: 1px solid rgba(224, 168, 74, 0.5);
  color: #efc76b; text-decoration: none; font-weight: 600; font-size: 12px;
}
.banner-go:hover { background: rgba(224, 168, 74, 0.16); }
.banner-go::after { content: " →"; }

/* faq */

/* Two columns keeps the four answers as a tidy 2x2 instead of an orphan row. */
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.faq-item {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 0 18px;
}
.faq-item dt { font-weight: 600; font-size: 15px; margin: 0 0 8px; color: var(--ink); }
.faq-item dd { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }

/* ------------------------------------------------------------- the bench */

.bench {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr minmax(260px, 340px);
}
.pane {
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 16px;
}
.lens { border-right: 0; border-left: 1px solid var(--line); }
.pane h2 {
  margin: 0 0 12px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint);
}
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
/* A checkbox and its label belong on one line, not stacked. */
.field.check,
.field:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.field input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); flex: none; margin: 0; }
.field input, .field select, .field textarea, .row input {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 9px;
  transition: border-color 0.15s var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #5a4a32; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--link); outline-offset: -1px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.hint { color: var(--faint); font-size: 12px; line-height: 1.45; }
.banner {
  background: rgba(210, 153, 34, 0.12);
  color: #e3b341;
  border: 1px solid rgba(210, 153, 34, 0.4);
  border-left-width: 2px;
  padding: 9px 11px;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.center { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.glass-wrap { flex: 1; min-height: 0; padding: 10px 12px 0; }
.terminal, .xterm, .xterm-viewport { height: 100%; }
/* Give the empty glass an edge so it reads as a screen, not a hole. */
.glass-wrap .terminal {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #0a0907;
  padding: 8px 10px;
  overflow: hidden;
}

.paper-wrap { flex: 1; min-height: 0; background: #16130f; padding: 18px; }
.platen { height: 100%; overflow: auto; background: linear-gradient(#d7cdb0, var(--paper)); border-radius: var(--radius); }
.paper {
  font-family: "American Typewriter", "Courier New", monospace;
  color: var(--ink-paper);
  padding: 28px 32px 80px;
  font-size: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.rtt-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.rtt-col { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); padding: 12px; }
.rtt-col:first-child { border-left: 0; }
.rtt-col h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.rtt-log {
  flex: 1; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
  font-family: var(--mono); white-space: pre-wrap; line-height: 1.5;
}
.rtt-wrap.large .rtt-log, .rtt-wrap.large textarea { font-size: 24px; }
.rtt-wrap.xl .rtt-log, .rtt-wrap.xl textarea { font-size: 32px; }
.rtt-col textarea {
  margin-top: 8px; resize: vertical; min-height: 72px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
}

.status {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 7px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}
.status > span { display: flex; align-items: center; gap: 8px; }
#status-mid { color: var(--accent-2); }
.status .ghost { padding: 2px 8px; font-size: 12px; }
#bench.hidden ~ .status #btn-stop,
#bench.hidden ~ .status #btn-clear { display: none; }

/* ------------------------------------------------------- drawer */

.drawer {
  position: fixed; inset: 0; background: #05080bcc; z-index: 31;
  display: grid; place-items: center; padding: 20px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.drawer-card {
  width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 2px; padding: 26px;
  box-shadow: var(--shadow-2);
}
.drawer-card h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; margin-top: 0; }
.drawer-card p { color: var(--muted); line-height: 1.55; }
.about-license {
  margin: 18px 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.about-license .panel-go { margin-top: 4px; }
.fine { font-size: 13px; color: var(--faint); }

.findings { display: flex; flex-direction: column; gap: 8px; }
.finding {
  text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px;
}
.finding:hover { border-color: var(--link); }
.finding strong { display: block; margin-bottom: 4px; }
.finding span { color: var(--muted); font-size: 12px; line-height: 1.45; display: block; }

.wb-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}
.wb-stats span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 9px;
  background: var(--amber);
}
.sess-tx code { color: var(--warn); }
.sess-rx code { color: var(--accent-2); }
.sess-sys code { color: var(--faint); }
input[type="range"]#sess-scrub {
  width: 100%;
  accent-color: var(--accent);
}
.seq {
  font-family: var(--mono); font-size: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line-soft);
}
.seq code { color: #79c0ff; }
.hex {
  font-family: var(--mono); font-size: 11px; white-space: pre; overflow: auto;
  line-height: 1.45; color: #c9d1d9;
}
.hit { background: rgba(210, 153, 34, 0.25); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .faq-grid { grid-template-columns: 1fr; }
  .under { grid-template-columns: 1fr; gap: 24px; }
}

/* Tablet / small laptop: stack the bench, keep the glass as the main surface. */
@media (max-width: 960px) {
  body:has(#bench:not(.hidden)) {
    overflow: hidden;
  }
  body:has(#bench:not(.hidden)) #app {
    height: 100dvh;
    overflow: hidden;
  }
  .bench {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .center {
    order: 0;
    flex: 1 1 40vh;
    min-height: 38vh;
  }
  .source {
    order: 1;
    flex: 0 1 auto;
    max-height: 32vh;
    border: 0;
    border-top: 1px solid var(--line);
  }
  .lens {
    order: 2;
    flex: 0 1 auto;
    max-height: 26vh;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .pane { max-height: 32vh; }
  .top {
    grid-template-columns: auto 1fr;
    row-gap: 10px;
    padding: 10px 14px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .presets { grid-column: 1 / -1; order: 3; justify-content: flex-start; overflow: visible; }
  .presets::-webkit-scrollbar { display: none; }
  .rtt-wrap { grid-template-columns: 1fr; }
  .glass-wrap { min-height: 38vh; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 96px; }
  .band { padding: 40px 0; }
  .band-hero { padding: 24px 0 28px; }
  .band-setup { padding: 28px 0 24px; }
  .wrap { padding: 0 var(--gutter); }
  .home .wrap,
  .band-hero .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .hero-stage,
  .home-panel { padding: 8px 0 0; }
  .hero-stage { padding-left: 16px; }
  .band-head { margin-bottom: 20px; }
  .lede { font-size: 15px; }
  .hero-cta, .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-lg { justify-content: center; width: 100%; }
  .hero-tools { gap: 6px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .tab { padding: 10px 12px; }
  .os-tabs { grid-template-columns: 1fr; max-width: none; }
  .status {
    font-size: 11px;
    padding: 7px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(7px, env(safe-area-inset-bottom));
  }
  #status-mid { display: none; }
  .acc-sum {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
  }
  .acc-sum .route-tag { grid-column: 1; justify-self: start; }
  .acc-chev { grid-column: 2; grid-row: 1 / span 2; }
  .acc-body { padding: 2px 16px 20px; }
  .acc-title { font-size: 18px; }
  .tools-list {
    left: 0;
    right: auto;
    transform: none;
    min-width: min(220px, calc(100vw - 24px));
    max-height: min(70dvh, 440px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tools-list a { min-height: 44px; display: flex; align-items: center; }
  .drawer { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .drawer-card { padding: 20px 16px; }
  .paper { padding: 18px 16px 48px; font-size: 16px; }
  .paper-wrap { padding: 10px; }
  .field input, .field select, .field textarea, .row input {
    font-size: 16px;
    max-width: 100%;
  }
  .row { gap: 8px; }
  .row > .primary, .row > .ghost, .row > .chip { flex: 1 1 auto; justify-content: center; }
  .dl-meta code { display: block; overflow-x: auto; }
}

/* Phone: brand + Tools on row one, actions wrap below. */
@media (max-width: 640px) {
  .top {
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
  }
  .presets {
    grid-column: auto;
    order: 0;
    justify-content: flex-end;
  }
  .top-actions {
    grid-column: 1 / -1;
    order: 3;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .top {
    padding: 10px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px;
  }
  .word { font-size: 15px; letter-spacing: 0.05em; }
  .logo { width: auto; height: 16px; }
  .top-actions { gap: 6px; }
  .top-actions .ghost { padding: 8px 10px; font-size: 13px; }
  .status { flex-wrap: wrap; justify-content: flex-start; gap: 8px 10px; }
  .status > span:last-child { margin-left: auto; }
  .glass-bar { padding: 8px 11px; gap: 8px; }
  .glass-live { font-size: 9.5px; letter-spacing: 0.08em; }
  .steps > li { padding: 18px 16px 18px 52px; }
  .steps > li::before { left: 15px; top: 18px; }
  .dl { padding: 16px; }
  .dl-card { grid-template-columns: 1fr; padding: 18px 14px; }
  .dl-icon { display: none; }
  .dl-card .dl-copy h3 { font-size: 22px; }
  .dl-card .dl-actions { flex-direction: column; }
  .codes th, .codes td { padding: 9px 11px; }
  .codes th { width: 44%; }
  .wb-stats span { font-size: 10px; }
  .setup-h1 { font-size: clamp(26px, 8vw, 36px); }
  #helper .setup-h1 { font-size: clamp(20px, 5.5vw, 26px); }
  .center { min-height: 34vh; }
  .glass-wrap { min-height: 34vh; padding: 8px 8px 0; }
  .source, .lens, .pane { max-height: 30vh; padding: 12px; }
}

@media (pointer: coarse) {
  .presets a,
  .presets .tools-sum,
  .top-actions .ghost,
  .btn-lg,
  .panel-go,
  .primary,
  .chip {
    min-height: 44px;
  }
  .field input[type="checkbox"] { width: 20px; height: 20px; }
}

@media (max-width: 400px) {
  .word { display: none; }
  .hero-tools a { padding: 8px 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
