/* Tunnex landing — "the page is a wire trace".
   Ink on paper, one signal colour, hairline rules, frame headers in hex. */

/* ===== TOKENS ===== */
:root {
  --paper: #f1eee4;
  --paper-2: #e8e4d8;
  --slip: #fbfaf5;
  --ink: #141414;
  --muted: #5c5850;
  --hair: #cbc5b5;
  --signal: #ff4d00;      /* fills only; ink text on top (5.5:1) */
  --signal-ink: #b53600;  /* orange text on paper (5.2:1) */
  --ink-muted: #9a958a;   /* muted text on ink (6.2:1) */
  --ink-hair: #3a3833;

  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --pad: 32px;
  --nav-h: 60px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }
code, .mono { font-family: var(--mono); }
::selection { background: var(--signal); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.frame--ink :focus-visible, .footer :focus-visible { outline-color: var(--signal); }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Inline code in prose */
p code, li code, dd code, td code, th code {
  font-size: .86em;
  padding: 0 .3em;
  background: rgba(20,20,20,.07);
  overflow-wrap: anywhere;
}

/* Status chips */
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 600;
  font-size: .92em;
  line-height: 1.3;
  padding: 0 .4em;
}
.chip--err { background: var(--signal); color: var(--ink); }
.chip--ok { background: var(--ink); color: var(--paper); }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.nav__row { display: flex; align-items: center; gap: 24px; min-height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__word {
  font-family: var(--display);
  font-stretch: 68%;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .01em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__tag {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--ink);
  padding: 1px 6px;
}
.menu { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.menu a { font-size: 14px; font-weight: 500; text-decoration: none; }
.menu a:not(.menu__cta):hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.menu__cta { background: var(--ink); color: var(--paper); padding: 8px 16px; font-weight: 600 !important; }
.menu__cta:hover { background: var(--signal); color: var(--ink); }

.nav__burger { display: none; margin-left: auto; width: 40px; height: 40px; background: none; border: 1px solid var(--ink); }
.nav__burger span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); transition: transform .2s; }
.nav.menu-open .nav__burger span:first-child { transform: translateY(3px) rotate(45deg); }
.nav.menu-open .nav__burger span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { padding-bottom: 0; }
.hero__spec {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.hero__spec i { font-style: normal; color: var(--signal-ink); padding: 0 .5em; }

.hero__top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: end;
  padding: 56px 0 48px;
}
.hero__title {
  grid-column: 1 / 9;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(46px, 7.4vw, 122px);
  line-height: .9;
  letter-spacing: -.012em;
}
.hero__title mark { background: var(--signal); color: var(--ink); padding: 0 .05em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__side { grid-column: 9 / 13; display: grid; gap: 18px; }
.hero__lede { font-size: 18px; line-height: 1.5; }

/* Command slab (copy button) */
.cmd {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: var(--ink); color: var(--paper);
  border: 0;
  padding: 14px 16px;
  font-family: var(--mono); font-size: 15px;
  text-align: left;
  transition: background .15s;
}
.cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmd__p { color: var(--signal); font-weight: 600; }
.cmd__copy {
  flex-shrink: 0;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid #5c5850; color: #b9b4a6;
  padding: 2px 7px;
}
.cmd:hover { background: #000; }
.cmd:hover .cmd__copy, .cmd.copied .cmd__copy { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.cmd--xl { font-size: 20px; padding: 18px 20px; }
.cmd--sig { background: var(--signal); color: var(--ink); max-width: 640px; }
.cmd--sig .cmd__p { color: var(--ink); }
.cmd--sig .cmd__copy { border-color: var(--ink); color: var(--ink); }
.cmd--sig:hover { background: #ff6a29; }
.cmd--sig:hover .cmd__copy, .cmd--sig.copied .cmd__copy { background: var(--ink); color: var(--signal); }

.arrow-link {
  justify-self: start;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.arrow-link:hover { text-decoration-color: currentColor; }

/* ===== FIG. 1 — WIRE TRACE ===== */
.fig {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}
.fig__cap { grid-column: 1 / 4; font-size: 14px; color: var(--muted); padding-right: 8px; }
.fig__no { display: block; color: var(--ink); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.trace__toggle {
  display: inline-block; margin-top: 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  background: none; border: 1px solid var(--ink); padding: 3px 9px; color: var(--ink);
}
.trace__toggle:hover { background: var(--ink); color: var(--paper); }
.trace__toggle[hidden] { display: none; }

.trace {
  --hexw: 176px;
  --gap: 20px;
  --row: 36px;
  grid-column: 4 / 13;
  position: relative;
  min-width: 0;
  border: 1px solid var(--ink);
  background: var(--slip);
}
.trace__head, .trace__lifelines, .ev {
  display: grid;
  grid-template-columns: var(--hexw) minmax(0, 1fr);
  column-gap: var(--gap);
}
.lanes3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.trace__head {
  position: relative; z-index: 1;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--slip);
}
.trace__hexhd { color: var(--muted); font-weight: 500; }
.trace__head .lanes3 > span { text-align: center; line-height: 1.25; }
.trace__head small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

.trace__lifelines { position: absolute; inset: 0 16px; pointer-events: none; }
.trace__lifelines .lanes3 i { position: relative; }
.trace__lifelines .lanes3 i::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  border-left: 1px dashed var(--hair);
}
.trace__lifelines > span:first-child { border-right: 1px solid var(--hair); margin-right: calc(var(--gap) / -2); }

.trace__log { position: relative; z-index: 1; padding: 8px 16px 10px; }

.ev { align-items: center; min-height: var(--row); transition: opacity .3s, background .3s; }
.ev__hex { align-self: start; padding-top: 1px; line-height: 1.5; font-size: 12px; color: var(--muted); white-space: nowrap; letter-spacing: .02em; }
.ev__hex b { color: var(--signal-ink); font-weight: 600; }
.ev__lane { position: relative; height: var(--row); --l: 16.667%; --w: 33.333%; }
.span-ie .ev__lane { --l: 16.667%; --w: 33.333%; }
.span-el .ev__lane { --l: 50%; --w: 33.333%; }
.span-il .ev__lane { --l: 16.667%; --w: 66.667%; }

.ev__lbl {
  position: absolute; top: 1px; left: var(--l);
  max-width: calc(100% - var(--l));
  padding-left: 8px;
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev__lbl b { font-weight: 600; }
.ev__arrow {
  position: absolute; top: 24px; left: var(--l); width: var(--w); height: 2px;
  background: var(--ink);
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.ev--l .ev__arrow { transform-origin: right center; }
.ev__arrow::after {
  content: ""; position: absolute; top: -4px;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.ev--r .ev__arrow::after { right: -1px; border-left: 8px solid var(--ink); }
.ev--l .ev__arrow::after { left: -1px; border-right: 8px solid var(--ink); }

/* Blocked at the edge */
.ev--stop .ev__arrow { background: repeating-linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 9px); }
.ev--stop .ev__arrow::after { border: 0; right: -2px; top: -7px; width: 4px; height: 16px; background: var(--signal); }

/* Streaming DATA frames */
.ev--data .ev__arrow { background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 12px); }
.trace.is-streaming .ev--data .ev__arrow { animation: dash .5s linear infinite; }
.tok { color: var(--signal-ink); font-weight: 600; }
.cnt { color: var(--muted); }

/* Notes on the laptop lifeline (agent actions) */
.ev__note {
  position: absolute; top: 5px; right: 0;
  max-width: 100%;
  font-family: var(--mono); font-size: 12px;
  background: var(--slip);
  border: 1px solid var(--ink);
  padding: 1px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev__note b { font-weight: 600; }

.trace__out {
  position: relative; z-index: 1;
  border-top: 1px solid var(--ink);
  padding: 10px 16px;
  font-size: 13px;
  background: var(--slip);
  min-height: 42px;
}
.trace__out-lbl { background: var(--ink); color: var(--paper); padding: 1px 6px; margin-right: 6px; font-size: 12px; }
.trace.is-typing #trace-out::after { content: "\2588"; color: var(--signal); animation: blink 1s steps(1) infinite; margin-left: 1px; }

/* Animation states (JS adds .is-anim; without it, the full trace is static) */
.trace.is-anim .ev:not(.on) { opacity: 0; }
.trace.is-anim .ev:not(.on) .ev__arrow { transform: scaleX(0); }
.ev.is-cur { background: rgba(255,77,0,.09); }

/* ===== INDEX (four pillars) ===== */
.index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 64px;
  border-top: 1px solid var(--ink);
}
.index li { padding: 18px 24px 40px; border-left: 1px solid var(--ink); }
.index li:first-child { border-left: 0; padding-left: 0; }
.index__n { display: block; font-size: 12px; font-weight: 600; color: var(--signal-ink); margin-bottom: 8px; }
.index h2 {
  font-family: var(--display); font-stretch: 78%; font-weight: 800;
  font-size: 28px; line-height: 1; margin-bottom: 10px; letter-spacing: -.005em;
}
.index h2 a { text-decoration: none; }
.index h2 a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.index p { font-size: 15px; color: var(--muted); }

/* ===== FRAMES (sections) ===== */
.frame { border-top: 1px solid var(--ink); padding: 72px 0 88px; }
.frame--alt { background: var(--paper-2); }
.frame--ink { background: var(--ink); color: var(--paper); border-top-color: var(--ink); }
.frame__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}
.frame__hd {
  grid-column: 1 / 4;
  align-self: start;
  position: sticky; top: calc(var(--nav-h) + 24px);
  display: grid; gap: 4px;
  padding-right: 16px;
}
.hex { font-size: 13px; color: var(--muted); letter-spacing: .03em; }
.hex b { color: var(--signal-ink); font-weight: 600; }
.ftype { font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.fsub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.frame--ink .hex, .frame--ink .fsub { color: var(--ink-muted); }
.frame--ink .hex b { color: var(--signal); }
.frame__body { grid-column: 4 / 13; min-width: 0; }

.h2 {
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(42px, 6.2vw, 92px);
  line-height: .92;
  letter-spacing: -.012em;
  margin-bottom: 20px;
  max-width: 17ch;
}
.h2--xl { font-size: clamp(48px, 8vw, 128px); max-width: 12ch; margin-bottom: 36px; }
.h3 {
  font-family: var(--display); font-stretch: 82%; font-weight: 800;
  font-size: 24px; line-height: 1.1; margin-bottom: 12px;
}
.lede { font-size: 19px; max-width: 56ch; margin-bottom: 28px; }
.body { margin-bottom: 20px; max-width: 52ch; }
.kicker { font-size: 13px; font-weight: 600; color: var(--signal-ink); margin-bottom: 8px; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 70ch; }
.note b { color: var(--ink); }
.note a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; margin-top: 44px; }
.cols > * { min-width: 0; }
.cols--rule > :last-child { border-left: 1px solid var(--ink); padding-left: 56px; margin-left: -1px; }
.cols--rule { margin-top: 32px; }
.cols--wide { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; margin-top: 12px; }

/* Register (MCP tools) */
.reg { font-size: 13.5px; border-bottom: 1px solid var(--hair); }
.reg > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--hair); }
.reg dt { font-weight: 600; overflow-wrap: anywhere; }
.reg dd { color: var(--muted); }

/* Agent loop transcript */
.loop { counter-reset: s; font-size: 13.5px; border-bottom: 1px solid var(--hair); }
.loop li { counter-increment: s; position: relative; padding: 8px 0 8px 34px; border-top: 1px solid var(--hair); overflow-wrap: anywhere; }
.loop li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; color: var(--signal-ink); font-weight: 600; }
.loop b { font-weight: 600; }
.loop span { color: var(--muted); }
.loop i { color: var(--muted); }
.loop .loop__say { color: var(--ink); font-weight: 600; }

/* Code block */
.code { display: flex; flex-direction: column; background: var(--ink); color: var(--paper); margin-top: 20px; }
.code pre { padding: 4px 20px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.code .k { color: var(--signal); }
.code .s { color: #f2c3a0; }
.code .c { color: var(--signal); font-weight: 600; }
.code .p, .code .m { color: var(--ink-muted); }
.code__copy {
  align-self: flex-end; margin: 10px 10px 0;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  background: var(--ink); border: 1px solid #5c5850; color: #b9b4a6; padding: 2px 7px;
}
.code__copy:hover, .code__copy.copied { background: var(--signal); border-color: var(--signal); color: var(--ink); }

.ticks { margin-top: 18px; display: grid; gap: 6px; font-size: 15px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: "+"; position: absolute; left: 0; font-family: var(--mono); font-weight: 600; color: var(--signal-ink); }

/* ===== DATASHEET TABLES ===== */
.sheet-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sheet {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 15px;
  margin-top: 8px;
}
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--hair); }
.sheet thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
  border-top: 0; border-bottom: 1px solid var(--ink);
  padding-top: 8px; padding-bottom: 8px;
}
.sheet tbody th { font-weight: 600; }
.sheet .hl { font-weight: 700; color: var(--ink); box-shadow: inset 3px 0 0 var(--signal); padding-left: 12px; }
.sheet thead .hl { color: var(--ink); }
.sheet .na { color: var(--muted); }
.sheet .num { font-family: var(--mono); font-size: 14px; }
.sheet code { background: none; padding: 0; }

.sheet--vs { font-size: 14px; }
.sheet--vs tbody th { width: 22%; }
.sheet--vs td:last-child { font-weight: 600; box-shadow: inset 3px 0 0 var(--signal); padding-left: 12px; }
.sheet--flags tbody th { width: 44%; font-weight: 500; }
.sheet--flags tbody th code { font-size: 14px; font-weight: 600; }
.sheet--plans { max-width: 820px; }
.sheet--plans tbody th { width: 28%; }
.sheet--cmp { min-width: 600px; }
.sheet--cmp td, .sheet--cmp thead th:not(:first-child) { text-align: center; padding-right: 8px; padding-left: 8px; }
.sheet--cmp tbody th { width: 34%; }
.sheet--cmds tbody th { width: 30%; }

.rcp {
  background: none; border: 0; padding: 0 2px; margin-left: -2px; text-align: left;
  font-family: var(--mono); font-size: 14px;
  cursor: copy;
}
.rcp code { overflow-wrap: anywhere; border-bottom: 1px dashed var(--muted); }
.rcp:hover, .rcp.copied { background: var(--signal); }
.rcp.copied::after { content: " copied"; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }

/* ===== INSPECTOR SPECIMEN ===== */
.specimen {
  background: var(--slip);
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 20px 22px 16px;
  margin-right: 8px;
}
.specimen__req { font-size: 15px; padding-bottom: 12px; border-bottom: 1px dashed var(--ink); margin-bottom: 14px; overflow-wrap: anywhere; }
.specimen__notes { display: grid; gap: 12px; }
.specimen__notes dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--signal-ink); }
.specimen__notes dd { font-size: 15px; }
.specimen__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 12px; }
.specimen__act span { border: 1px solid var(--ink); padding: 3px 9px; }
.specimen__act span:first-child { background: var(--ink); color: var(--paper); }
.specimen__cap { margin-top: 14px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.feat { border-bottom: 1px solid var(--hair); }
.feat > div { padding: 10px 0; border-top: 1px solid var(--hair); }
.feat dt { font-weight: 700; }
.feat dd { color: var(--muted); font-size: 15px; }

/* ===== SECURITY ===== */
.facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: 44px; border-top: 1px solid var(--ink); }
.facts3 > div { padding-top: 16px; min-width: 0; }
.facts3 dt { font-family: var(--display); font-stretch: 82%; font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.facts3 dd { font-size: 15px; color: var(--muted); }

/* ===== ENGINEERING ===== */
.bytes { margin: 12px 0 40px; max-width: 720px; }
.bytes__row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--slip); }
.bytes__row > span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-left: 1px solid var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; min-width: 0; }
.bytes__row > span:first-child { border-left: 0; }
.bytes__row .b4 { grid-column: span 4; }
.bytes__row i { font-style: normal; color: var(--muted); font-size: 11px; }
.bytes__row b { font-size: 22px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.bytes__row .is-sig { background: var(--signal); }
.bytes__row .is-sig i { color: var(--ink); }
.bytes figcaption { margin-top: 10px; font-size: 12px; color: var(--muted); }

.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-bottom: 1px solid var(--hair); }
.spec > div { padding: 12px 0; border-top: 1px solid var(--hair); }
.spec dt { font-weight: 700; }
.spec dd { color: var(--muted); font-size: 15px; }

/* ===== INSTALL ===== */
.stack { display: grid; gap: 10px; max-width: 560px; margin-top: 8px; }
.result { margin: 16px 0 52px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; overflow-wrap: anywhere; }
.result span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.result code { background: none; padding: 0; font-size: 14px; margin-right: 16px; }
.scroll-hint { display: none; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }

/* ===== GOAWAY / CTA ===== */
.frame--ink .h2 { color: var(--paper); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cta .cmd { flex: 1 1 420px; }
.frame--ink .arrow-link { color: var(--paper); }
.contact { margin-top: 56px; border-top: 1px solid var(--ink-hair); max-width: 720px; font-size: 14px; }
.contact li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ink-hair); }
.contact span { color: var(--ink-muted); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; padding-top: 1px; }
.contact a { text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; overflow-wrap: anywhere; }

/* ===== FOOTER ===== */
.footer { background: var(--ink); color: var(--ink-muted); border-top: 1px solid var(--ink-hair); }
.footer__row { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 20px; font-size: 12px; }
.footer a { color: var(--paper); text-decoration-color: var(--signal); text-underline-offset: 3px; }
.footer__row a { margin-left: auto; }

/* ===== KEYFRAMES ===== */
@keyframes dash { to { background-position: -12px 0; } }
@keyframes blink { 50% { opacity: 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1180px) {
  .hero__title { grid-column: 1 / -1; }
  .hero__side { grid-column: 1 / 8; margin-top: 32px; }
  .fig__cap { grid-column: 1 / -1; margin-bottom: 16px; max-width: 70ch; }
  .trace { grid-column: 1 / -1; }
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index li:nth-child(3) { border-left: 0; padding-left: 0; }
  .index li:nth-child(n+3) { border-top: 1px solid var(--ink); }
}

@media (max-width: 960px) {
  :root { --pad: 20px; }
  .menu a:not(.menu__cta) { display: none; }
  .nav__burger { display: block; margin-left: 0; }
  .menu { gap: 12px; }
  .nav.menu-open .menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: 8px var(--pad) 20px;
  }
  .nav.menu-open .menu a:not(.menu__cta) {
    display: block; padding: 10px 0; border-bottom: 1px solid var(--hair);
    font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 30px; line-height: 1.1;
  }
  .nav.menu-open .menu .menu__cta { margin-top: 16px; text-align: center; padding: 12px; }

  .frame { padding: 48px 0 64px; }
  .frame__hd {
    grid-column: 1 / -1; position: static;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
    padding: 0 0 12px; margin-bottom: 24px; border-bottom: 1px solid var(--hair);
  }
  .frame--ink .frame__hd { border-bottom-color: var(--ink-hair); }
  .ftype { font-size: 20px; order: -1; }
  .frame__body { grid-column: 1 / -1; }
  .cols, .cols--wide { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cols--rule > :last-child { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--ink); padding-top: 32px; }
  .facts3 { grid-template-columns: minmax(0, 1fr); }
  .facts3 > div + div { border-top: 1px solid var(--hair); margin-top: 16px; }
  .spec { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .hero__top { padding: 36px 0 32px; }
  .hero__side { grid-column: 1 / -1; margin-top: 24px; }
  .trace { --row: 34px; }
  .trace__head, .trace__lifelines, .ev { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .ev__hex, .trace__hexhd, .trace__lifelines > span:first-child { display: none; }
  .trace__log { padding: 6px 10px 8px; }
  .trace__head { padding: 8px 10px; font-size: 11px; }
  .trace__head small { font-size: 10px; }
  .trace__lifelines { inset: 0 10px; }
  .ev__lbl, .ev__note { font-size: 11px; }
  .lg { display: none; }
  .trace__out { padding: 10px; font-size: 12px; }
  .index { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .index li, .index li:nth-child(3) { border-left: 0; padding: 16px 0 24px; }
  .index li + li { border-top: 1px solid var(--ink); }
  .index h2 { font-size: 26px; }
  .cmd--xl { font-size: 16px; padding: 14px 16px; }
  .code pre { font-size: 12.5px; padding: 4px 16px 16px; }
  .sheet { font-size: 14px; }
  .sheet--vs tbody th { width: auto; }
  .sheet--flags, .sheet--flags tbody, .sheet--flags tr, .sheet--flags th, .sheet--flags td { display: block; width: auto !important; }
  .sheet--flags thead { display: none; }
  .sheet--flags tr { padding: 10px 0; border-top: 1px solid var(--hair); }
  .sheet--flags tr:first-child { border-top: 0; }
  .sheet--flags th, .sheet--flags td { border: 0; padding: 0; }
  .sheet--cmds tbody th { width: 34%; }
  .bytes__row > span { padding: 6px 6px 8px; font-size: 10px; }
  .bytes__row b { font-size: 15px; }
  .contact li { grid-template-columns: 80px minmax(0, 1fr); }
  .scroll-hint { display: block; }
  .footer__row a { margin-left: 0; }
}

@media (max-width: 400px) {
  .brand__tag { display: none; }
  .hero__spec { font-size: 11px; }
  .sheet--vs thead th, .sheet--vs td, .sheet--vs th { font-size: 13px; }
}

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