/* ==========================================================================
   Waqar Gulzar - AI Engineer
   One ink on one ground, like a 1-bit print. Two grounds: night and day.
   Every offset in this file is a multiple of --px, so the whole page stays on
   the same pixel grid as the WebGL background behind it.
   ========================================================================== */

@font-face { font-family: "Jersey 10"; src: url(fonts/jersey10.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(fonts/courier-prime-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(fonts/courier-prime-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #05070e;
  --ink: #8ec5ff;
  --flow: #24478f;
  --text: #dae6ff;
  --muted: #8aa2cc;
  --glass: rgba(6, 10, 21, .84);
  --glass-2: rgba(142, 197, 255, .06);
  --on-ink: #05070e;
  --warn: #ffd479;

  --px: 4px;
  --step: steps(4, end);
  --pixel: "Jersey 10", "Courier Prime", ui-monospace, monospace;
  --mono: "Courier Prime", ui-monospace, "Courier New", Courier, monospace;
  --wrap: 1160px;
  --ghost: 420px;
  --bar-h: 62px;
}

:root[data-theme="day"] {
  --bg: #eaf3ff;
  --ink: #1034d6;
  --flow: #2a49ff;
  --text: #0a1a52;
  --muted: #41548c;
  --glass: rgba(238, 245, 255, .86);
  --glass-2: rgba(16, 52, 214, .05);
  --on-ink: #ffffff;
  --warn: #8a5b00;
}

@media (max-width: 1000px) { :root { --ghost: 300px; } }
@media (max-width: 720px)  { :root { --ghost: 230px; } }

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

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scrollbar-color: var(--ink) var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
:root[data-theme="day"] { color-scheme: light; }

body {
  margin: 0;
  color: var(--text);
  font: 700 15px/1.6 var(--mono);
  overflow-x: hidden;
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

::selection { background: var(--ink); color: var(--on-ink); }
a { color: inherit; }
img, canvas, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -120px; z-index: 40;
  padding: 10px 18px; background: var(--ink); color: var(--on-ink);
  text-decoration: none; font: 400 20px/1 var(--pixel); letter-spacing: .08em;
}
.skip:focus { top: 12px; }

[id] { scroll-margin-top: calc(var(--bar-h) + 24px); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }

.boot header, .boot main, .boot footer { visibility: hidden; }
.boot .progress { opacity: 0; }

/* ------------------------------------------------------- the background ---- */

#flow {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
#veil {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 30; pointer-events: none;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.veiled #veil { background: var(--bg); animation: gone 0s 3s forwards; }
@keyframes gone { to { visibility: hidden; } }

/* No WebGL: a static dot screen instead of a dead black rectangle. */
.no-gl body { background-image: radial-gradient(var(--flow) 1.5px, transparent 1.6px); background-size: 12px 12px; }

/* -------------------------------------------------------- scroll gauge ---- */

.progress {
  position: fixed; inset: 0 0 auto 0; height: var(--px); z-index: 12;
  background: var(--glass-2); pointer-events: none; transition: opacity 240ms linear;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: var(--ink);
  transform-origin: 0 50%;
}

/* ------------------------------------------------------------- header ---- */

header {
  position: sticky; top: 0; z-index: 10;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px dashed var(--ink);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--bar-h); }

.brand {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; text-decoration: none; white-space: nowrap;
  font: 400 24px/1 var(--pixel); letter-spacing: .04em; color: var(--ink);
}
.brand canvas { width: 32px; height: 32px; flex: none; }
.brand small { color: var(--muted); }

nav ul { display: flex; gap: 2px; align-items: center; list-style: none; margin: 0; padding: 0; }
nav a, .ghost-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font: 400 20px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
nav a:hover, .ghost-btn:hover, .ghost-btn[aria-pressed="true"] { color: var(--on-ink); background: var(--ink); }

/* Five section links need room before the wordmark gets smaller, then the
   brackets go. The name is the last thing to leave the bar; Contact never goes. */
@media (max-width: 1180px) { .brand small { display: none; } }
@media (max-width: 1020px) { nav .opt:nth-of-type(n+4) { display: none; } }
@media (max-width: 820px)  { nav .opt { display: none; } }
@media (max-width: 620px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand canvas { width: 28px; height: 28px; }
}
@media (max-width: 520px) {
  .bar { gap: 4px; }
  nav a, .ghost-btn { padding: 0 7px; font-size: 18px; }
  nav .btn { font-size: 18px; padding: 0 10px; margin-left: 4px; }
  nav ul { gap: 0; }
}
@media (max-width: 340px) {
  .brand span { display: none; }
  .brand canvas { width: 26px; height: 26px; }
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font: 400 24px/1 var(--pixel); letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  background: var(--bg); border: 2px solid var(--ink);
  box-shadow: var(--px) var(--px) 0 var(--ink);
  transition: transform 120ms var(--step), box-shadow 120ms var(--step), background 120ms var(--step);
  cursor: pointer;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); background: var(--glass-2); }
.btn:active { transform: translate(var(--px), var(--px)); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--on-ink); box-shadow: var(--px) var(--px) 0 var(--text); }
.btn-primary:hover { background: var(--ink); box-shadow: 2px 2px 0 var(--text); }
nav .btn { min-height: 40px; font-size: 20px; padding: 0 14px; margin-left: 8px; }

/* ---------------------------------------------------------------- type ---- */

h1, h2, h3 { font-family: var(--pixel); font-weight: 400; color: var(--ink); margin: 0; letter-spacing: .02em; font-kerning: none; font-variant-ligatures: none; }
h1 { font-size: clamp(36px, 6.2vw, 84px); line-height: .9; text-transform: uppercase; margin-bottom: 24px; }
h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: .95; text-transform: uppercase; margin-bottom: 16px; }
h3 { font-size: 24px; line-height: 1.05; text-transform: uppercase; margin-bottom: 10px; }
p { margin: 0 0 16px; }
.lead { font-size: 16px; max-width: 62ch; }
.muted { color: var(--muted); }
.last { margin-bottom: 0; }
.small { font-size: 13px; }
/* The highlight never splits across two lines: it moves as one block instead. */
h1 .inv { background: var(--ink); color: var(--on-ink); padding: 0 .14em; white-space: nowrap; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Scramble: the real letter keeps its place in the line and a glyph is painted
   over it, so a heading never re-wraps while it animates. */
.sc { position: relative; visibility: hidden; }
.sc::after { content: attr(data-g); visibility: visible; position: absolute; left: 50%; top: .06em; transform: translateX(-50%); font-size: .72em; line-height: 1; }

/* ------------------------------------------------------------- windows ---- */

main { padding-block: 32px 100px; }
.stack { display: grid; gap: 40px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.win {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px dashed var(--ink);
}
.win::before, .win::after, .win-body::before, .win-body::after { content: ""; position: absolute; width: 8px; height: 8px; background: var(--ink); }
.win::before { top: -4px; left: -4px; }
.win::after { top: -4px; right: -4px; }
.win-body::before { bottom: -4px; left: -4px; }
.win-body::after { bottom: -4px; right: -4px; }

.win-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px dashed var(--ink);
  font: 400 20px/1.1 var(--pixel); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--glass-2);
}
.win-bar .meta { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.win-bar .meta b { color: var(--ink); font-weight: 400; }
.win-body { padding: 44px; }
.head { max-width: 700px; margin-bottom: 36px; }

.dot { width: 8px; height: 8px; background: var(--ink); animation: pulse 1.4s steps(2, start) infinite; flex: none; }
@keyframes pulse { 50% { opacity: .15; } }

@media (max-width: 820px) {
  .win-body { padding: 28px 20px; }
  .stack { gap: 28px; }
  .pair { grid-template-columns: 1fr; }
  main { padding-block: 24px 72px; }
  .wrap { padding-inline: 18px; }
}

/* ---------------------------------------------------------------- hero ---- */

.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.hero .win-body { padding-block: 52px; display: flex; flex-direction: column; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 36px 0 0; }
.hero-facts li { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px dashed var(--ink); padding: 5px 9px; }
.hero-facts li::before { content: "[x] "; color: var(--ink); }

.stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 20px; }

#ghost-slot {
  position: relative; min-height: var(--ghost);
  display: grid; place-items: center; cursor: pointer;
}
#ghost-slot canvas { width: min(256px, 70%); height: auto; aspect-ratio: 1; image-rendering: pixelated; display: none; }
.no-gl #ghost-slot canvas { display: block; }
#ghost-slot:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }
.slot-hint {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font: 400 18px/1 var(--pixel); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); opacity: 0; transition: opacity 160ms steps(4, end);
}
#ghost-slot:hover .slot-hint, #ghost-slot:focus-visible .slot-hint { opacity: 1; }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .stage { grid-template-rows: auto auto; }
  #ghost-slot { min-height: min(var(--ghost), 42vh); }
}

/* ------------------------------------------------------------- numbers ---- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
.stat { padding: 26px 12px; text-align: center; }
.stat + .stat { border-left: 1px dashed var(--ink); }
.stat b { display: block; font: 400 50px/1 var(--pixel); color: var(--ink); }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px dashed var(--ink); }
  .stat:nth-child(n+3) { border-top: 1px dashed var(--ink); }
  .stat b { font-size: 42px; }
}

/* -------------------------------------------------------------- ticker ---- */

.ticker {
  overflow: hidden; margin-block: 40px;
  border-block: 1px dashed var(--ink);
  background: var(--ink); color: var(--on-ink);
  font: 400 26px/1 var(--pixel); letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 0; white-space: nowrap;
}
.ticker div { display: inline-block; animation: tick 34s linear infinite; }
.ticker span { padding-right: 2.4em; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker:hover div { animation-play-state: paused; }

/* --------------------------------------------------------------- cards ---- */

/* Six cards want three columns on a wide screen, not four and two. */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  border: 1px dashed var(--ink); padding: 24px; background: var(--glass-2);
  transition: transform 120ms var(--step), box-shadow 120ms var(--step), background 120ms var(--step);
}
.card:hover { transform: translate(calc(var(--px) * -1), calc(var(--px) * -1)); box-shadow: var(--px) var(--px) 0 var(--ink); border-style: solid; background: var(--glass); }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.card canvas { margin-bottom: 18px; }
.card h3 { overflow-wrap: anywhere; }

.note {
  margin: 28px 0 0; padding: 16px 20px;
  border: 2px solid var(--ink); color: var(--text); background: var(--glass-2);
}
.note strong { color: var(--ink); text-transform: uppercase; }

/* ------------------------------------------------------------ pipeline ---- */

.pipe { border: 1px dashed var(--ink); background: var(--glass-2); padding: 24px 20px 20px; }
.pipe-track { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; }
.pipe-track li { position: relative; padding: 22px 10px 0; text-align: center; min-width: 0; }
.pipe-track li::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: var(--px);
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); opacity: .45;
}
.pipe-track li::after {
  content: ""; position: absolute; inset: 0 auto auto 0; height: 4px; width: 0;
  background: var(--ink); animation: fill 4200ms steps(24, end) infinite;
  animation-delay: calc(var(--i) * 700ms - 4200ms);
}
@keyframes fill { 0% { width: 0; } 22% { width: 100%; } 100% { width: 100%; } }
.pipe-track b { display: block; font: 400 26px/1 var(--pixel); color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.pipe-track span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.packets { position: relative; height: 12px; margin-top: 14px; overflow: hidden; }
.packets i { position: absolute; top: 4px; width: 6px; height: 6px; background: var(--ink); animation: travel 4200ms steps(30, end) infinite; }
.packets i:nth-child(1) { left: 0; animation-delay: 0ms; }
.packets i:nth-child(2) { left: 0; animation-delay: 180ms; }
.packets i:nth-child(3) { left: 0; animation-delay: 520ms; }
.packets i:nth-child(4) { left: 0; animation-delay: 980ms; }
.packets i:nth-child(5) { left: 0; animation-delay: 1420ms; }
.packets i:nth-child(6) { left: 0; animation-delay: 1980ms; }
.packets i:nth-child(7) { left: 0; animation-delay: 2500ms; }
.packets i:nth-child(8) { left: 0; animation-delay: 3100ms; }
@keyframes travel { 0% { left: 0; } 100% { left: 100%; } }

.pipe-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.pipe-legend p { margin: 0; font-size: 14px; color: var(--muted); }
.pipe-legend b { color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 900px) {
  .pipe-track { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 0; }
  .pipe-legend { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pipe-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------- stack ---- */

.stack-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.layer { border: 1px dashed var(--ink); padding: 20px; background: var(--glass-2); }
/* The languages strip runs the full width so the layers above stay a clean 3x2. */
.layer.wide { grid-column: 1 / -1; }
.layer h3 { display: flex; align-items: center; gap: 12px; font-size: 24px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li {
  font-size: 13px; padding: 6px 10px; border: 1px dashed var(--ink); color: var(--text);
  cursor: default; transition: background 120ms var(--step), color 120ms var(--step);
}
.chips li:hover { background: var(--ink); color: var(--on-ink); }

/* ---------------------------------------------------------------- work ---- */

.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.case { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; border-top: 1px dashed var(--ink); padding-top: 28px; }
.case > * { min-width: 0; }
.case h3 { font-size: clamp(26px, 2.6vw, 36px); margin-bottom: 14px; }
.case .case-main p { color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 400 18px/1 var(--pixel); letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-ink); background: var(--ink); padding: 5px 9px;
}
.badge::before { content: ""; width: 8px; height: 8px; background: currentColor; animation: pulse 1.2s steps(2, start) infinite; }

.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; font-size: 14px; }
.checks li::before { content: "[x]"; color: var(--ink); flex: none; }
.checks { color: var(--muted); }

.facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.facts b { display: block; font: 400 38px/1 var(--pixel); color: var(--ink); margin-bottom: 5px; }
.facts span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.case-side { border: 1px dashed var(--ink); padding: 22px; background: var(--glass-2); }
.case-side p strong { color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.case-side p { margin: 0; }

@media (min-width: 821px) { .case-side { position: sticky; top: calc(var(--bar-h) + 20px); } }
@media (max-width: 820px) { .case { grid-template-columns: 1fr; gap: 20px; } }

/* ----------------------------------------------------------------- now ---- */

.now-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr)); gap: 20px; }
.now-list li { border: 1px dashed var(--ink); padding: 20px; background: var(--glass-2); }
.now-list b { display: block; font: 400 22px/1 var(--pixel); color: var(--ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.now-list span { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------- process ---- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { position: relative; padding-top: 20px; }
.steps li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: var(--px); background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); opacity: .45; }
.steps li::after { content: ""; position: absolute; inset: 0 auto auto 0; height: var(--px); width: 0; background: var(--ink); }
.in .steps li::after { animation: grow 640ms steps(12, end) forwards; animation-delay: calc(var(--i) * 420ms); }
@keyframes grow { to { width: 100%; } }
.num { display: block; margin-bottom: 10px; font: 400 40px/1 var(--pixel); color: var(--ink); }
.steps p { margin: 0; font-size: 14px; color: var(--muted); }

/* ----------------------------------------------------- rate / avail ---- */

.price { font: 400 clamp(96px, 15vw, 172px)/.85 var(--pixel); color: var(--ink); margin: 0 0 24px; text-shadow: 6px 6px 0 var(--flow); }
.price small { font-size: .2em; color: var(--muted); letter-spacing: .06em; text-shadow: none; }
.pair .win-body { padding-block: 40px; }
.pair .win-body h3 { font-size: 26px; }

/* ------------------------------------------------------------- contact ---- */

.contact { text-align: center; }
.contact .head { margin-inline: auto; }
.contact .cta { justify-content: center; }
.mail { margin: 28px 0 0; color: var(--muted); }
.mail a { text-decoration: none; border-bottom: 1px dashed var(--ink); padding-bottom: 2px; }
.mail a:hover { color: var(--ink); }

/* -------------------------------------------------------------- footer ---- */

footer {
  border-top: 1px dashed var(--ink);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding-block: 26px; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: var(--ink); background: none; text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------ terminal ---- */

.term {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--glass); border: 1px dashed var(--ink);
}
.term-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px dashed var(--ink); background: var(--glass-2);
  font: 400 18px/1.1 var(--pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.term-bar .meta { color: var(--muted); }
.term-bar b { color: var(--ink); font-weight: 400; }

.term-screen {
  flex: 1; min-height: 232px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px; font: 700 13px/1.55 var(--mono); scrollbar-width: thin;
}
.term-out { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out .cm { color: var(--text); }
.term-out .ok { color: var(--ink); }
.term-out .dim { color: var(--muted); }
.term-out .key { color: var(--ink); }
.term-out .warn { color: var(--warn); }

.term-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px dashed var(--ink); }
.term-prompt { color: var(--ink); flex: none; font: 700 13px/1 var(--mono); }
.term-in {
  flex: 1; min-width: 0; background: none; border: 0; padding: 4px 0;
  font: 700 13px/1.4 var(--mono); caret-color: var(--ink);
}
.term-in:focus { outline: none; }
.term:focus-within { box-shadow: 0 0 0 2px var(--ink); }

.term-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px dashed var(--ink); }
.term-chips button {
  min-height: 28px; padding: 4px 8px; background: none; border: 1px dashed var(--ink); color: var(--muted);
  font: 400 16px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.term-chips button:hover { background: var(--ink); color: var(--on-ink); border-style: solid; }

@media (max-width: 520px) {
  .term-screen { min-height: 190px; }
  .term-chips button { font-size: 14px; }
}

/* ------------------------------------------------------------ entrances ---- */

/* A pane opens in eight hard frames. Never a soft fade. */
.js .reveal { clip-path: inset(0 0 100% 0); }
.js .reveal.in { animation: wipe 560ms steps(8, end) forwards; }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(-8px -8px -8px -8px); } }

/* --------------------------------------------------------- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { clip-path: none; animation: none; }
  .ticker div, .badge::before, .dot, .caret, .packets i, .pipe-track li::after { animation: none !important; }
  .pipe-track li::after { width: 100%; }
  .in .steps li::after { animation: none; width: 100%; }
  .btn, .card, .chips li { transition: none; }
}
.motion-off .ticker div,
.motion-off .badge::before,
.motion-off .dot,
.motion-off .packets i,
.motion-off .pipe-track li::after { animation: none !important; }
.motion-off .pipe-track li::after { width: 100%; }
.motion-off .in .steps li::after { animation: none; width: 100%; }
.motion-off .reveal, .motion-off .reveal.in { clip-path: none; animation: none; }
.motion-off .btn, .motion-off .card, .motion-off .chips li { transition: none; }

/* ---------------------------------------------------------------- print ---- */

@media print {
  /* Ink only. The palette is repointed at black so nothing prints as a blue
     block that a laser or a fax will turn into grey mud. */
  html {
    background: #fff;
    --bg: #fff; --ink: #000; --flow: #000; --text: #000; --muted: #3a3a3a;
    --glass: #fff; --glass-2: #fff; --on-ink: #fff; --warn: #000;
  }
  body { color: #000; background: #fff; font-size: 10.5pt; }
  #flow, #veil, .progress, header, .ticker, .term, #ghost-slot, footer .footer-nav, .cta, .no-print { display: none !important; }
  .win, .card, .layer, .case-side, .note, .pipe, .pipe-legend { background: none !important; border-color: #000 !important; backdrop-filter: none; box-shadow: none; }
  .win-body { padding: 14px 0; }
  .pair, .hero, .stage, .case { display: block; }
  .stage { display: none; }
  h1, h2, h3, .stat b, .facts b, .price, .num, .pipe-track b, .win-bar, .win-bar .meta, .win-bar .meta b { color: #000; text-shadow: none; }
  .stat b, .facts b, .price { font-size: 22pt; }
  .win { page-break-inside: avoid; border: 1px solid #000; padding: 0 12px; }
  .win::before, .win::after, .win-body::before, .win-body::after { display: none; }
  .case, .stack-grid .layer, .now-list li, .grid .card { page-break-inside: avoid; }
  a { text-decoration: none; }
  h2, h3, .badge { page-break-after: avoid; }
}