/* FERAL · tracking station.
   One ground, one accent, one grid. Bone paper for anything that behaves like a field label,
   signal orange for anything alive, red only for lost. State is carried by luminance first and
   colour second, so a row reads the same to a colour-blind eye and in a screenshot. */

/* ── faces ─────────────────────────────────────────────────────────────── */
@font-face { font-family: "Shoulders"; src: url("/fonts/bigshoulders-700.woff2") format("woff2"); font-weight: 700; font-display: swap; font-style: normal; }
@font-face { font-family: "Shoulders"; src: url("/fonts/bigshoulders-500.woff2") format("woff2"); font-weight: 500; font-display: swap; font-style: normal; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-400.woff2") format("woff2"); font-weight: 400; font-display: swap; font-style: normal; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-500.woff2") format("woff2"); font-weight: 500; font-display: swap; font-style: normal; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-600.woff2") format("woff2"); font-weight: 600; font-display: swap; font-style: normal; }
@font-face { font-family: "Telemetry"; src: url("/fonts/jetbrains-400.woff2") format("woff2"); font-weight: 400; font-display: swap; font-style: normal; }
@font-face { font-family: "Telemetry"; src: url("/fonts/jetbrains-600.woff2") format("woff2"); font-weight: 600; font-display: swap; font-style: normal; }

:root {
  --ground: #080c0a;
  --panel: #0c1210;
  --panel-2: #101915;
  --panel-3: #16211c;
  --rule: #1b2a23;
  --rule-hi: #2b3f35;
  --bone: #ece6d8;
  --bone-2: #d5cfc1;
  --text: #d7ddd7;
  --text-2: #9fb0a6;
  --muted: #6f8278;
  --signal: #ff6b2c;
  --signal-2: #ff9057;
  --signal-dim: #a8461d;
  --danger: #e4483c;
  --cell: 8px;
  --r: 2px;
  --r-card: 4px;
  --maxw: 1360px;
  --hd-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-hi) var(--ground); }
body {
  background: var(--ground);
  color: var(--text);
  font: 400 15px/1.55 "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--signal); color: #0b0a08; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--bone); color: #111; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* the station's paper: a faint measurement grid under everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(120, 160, 140, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 160, 140, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 85%);
}

/* ── type helpers ──────────────────────────────────────────────────────── */
.display { font-family: "Shoulders", "Archivo Narrow", sans-serif; font-weight: 700; text-transform: uppercase; line-height: .88; letter-spacing: -.01em; }
.mono, .num { font-family: "Telemetry", ui-monospace, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }
.label { font-family: "Telemetry", monospace; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.up { color: var(--signal); }
.down { color: var(--danger); }
.flat { color: var(--muted); }
.bone-text { color: var(--bone); }

/* ── header ────────────────────────────────────────────────────────────── */
.hd { position: sticky; top: 0; z-index: 40; background: rgba(8, 12, 10, .88); backdrop-filter: blur(10px); }
.hd-in { max-width: var(--maxw); margin: 0 auto; height: var(--hd-h); padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.hd-rule { height: 1px; background: linear-gradient(to right, transparent, var(--rule) 12%, var(--rule) 88%, transparent); }
.mark { display: flex; align-items: center; gap: 9px; color: var(--bone); flex: none; }
.mark-glyph { width: 22px; height: 22px; color: var(--signal); }
.mark-word { font-family: "Shoulders", sans-serif; font-weight: 700; font-size: 25px; letter-spacing: .04em; line-height: 1; }
.nav { display: flex; gap: 2px; flex: none; }
.nav a { font-size: 13.5px; color: var(--text-2); padding: 7px 11px; border-radius: var(--r); transition: color .15s, background .15s; }
.nav a:hover { color: var(--bone); background: var(--panel-2); }
.nav a.on { color: var(--bone); }
.nav a.on::after { content: ""; display: block; height: 2px; background: var(--signal); margin-top: 5px; }
.hd-search { position: relative; flex: 1 1 auto; max-width: 320px; margin-left: auto; }
.hd-search input {
  width: 100%; height: 34px; padding: 0 12px; background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--r); font-size: 13px; color: var(--text);
}
.hd-search input::placeholder { color: var(--muted); }
.hd-search input:focus { border-color: var(--rule-hi); outline: none; }
.qlist { position: absolute; top: 40px; left: 0; right: 0; background: var(--panel-2); border: 1px solid var(--rule-hi); border-radius: var(--r-card); overflow: hidden; z-index: 50; }
.qlist .row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--rule); }
.qlist .row:last-child { border-bottom: 0; }
.qlist .row:hover { background: var(--panel-3); }
.qlist img, .qlist .ph { width: 24px; height: 24px; border-radius: var(--r); object-fit: cover; background: var(--panel-3); }
.qlist .nm { font-weight: 600; font-size: 13px; }
.qlist .sub { font-size: 11px; color: var(--muted); }
.hd-right { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--rule); border-radius: var(--r); transition: color .15s, border-color .15s; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--bone); border-color: var(--rule-hi); }
.hd-burger { display: none; width: 34px; height: 34px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; border: 1px solid var(--rule); border-radius: var(--r); }
.hd-burger span { width: 15px; height: 1.5px; background: var(--text); display: block; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule-hi);
  font-family: "Telemetry", monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); background: var(--panel-2); transition: transform .12s var(--ease), background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: var(--signal-dim); color: var(--bone); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-release { background: var(--signal); border-color: var(--signal); color: #160c06; font-weight: 600; }
.btn-release:hover { background: var(--signal-2); border-color: var(--signal-2); color: #160c06; }
.btn-wallet.on { color: var(--signal); border-color: var(--signal-dim); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.btn-bone { background: var(--bone); border-color: var(--bone); color: #14120e; font-weight: 600; }
.btn-bone:hover { background: #fff; border-color: #fff; color: #14120e; }
.btn-danger { color: var(--danger); border-color: rgba(228, 72, 60, .4); }

/* ── layout ────────────────────────────────────────────────────────────── */
.app { position: relative; z-index: 1; min-height: 60vh; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.sec-head h2 { font-family: "Shoulders", sans-serif; font-size: 46px; line-height: .9; text-transform: uppercase; color: var(--bone); letter-spacing: -.005em; }
.sec-head p { color: var(--text-2); font-size: 14px; max-width: 46ch; }
.rule-line { height: 1px; background: var(--rule); transform-origin: left center; }

/* ── the field (hero) ──────────────────────────────────────────────────── */
.field { position: relative; min-height: calc(78dvh - var(--hd-h)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; padding: 60px 0 44px; }
.field-copy { max-width: 620px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255, 107, 44, .15); }
.kicker .label { color: var(--bone-2); }
.field h1 { font-family: "Shoulders", sans-serif; font-size: clamp(46px, 6vw, 86px); line-height: .84; text-transform: uppercase; color: var(--bone); letter-spacing: -.012em; }
.field h1 em { font-style: normal; color: var(--signal); }
.field-sub { margin-top: 22px; font-size: 17px; line-height: 1.5; color: var(--text-2); max-width: 44ch; }
.field-cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.field-art { position: relative; min-height: 460px; }

/* specimen card: the bone label that names what the station is looking at */
.specimen {
  background: var(--bone); color: #14120e; border-radius: var(--r-card); padding: 18px 20px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.specimen .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.specimen .label { color: #6c6558; }
.specimen b { font-family: "Shoulders", sans-serif; font-size: 30px; line-height: 1; text-transform: uppercase; }
.specimen .meta { margin-top: 12px; border-top: 1px solid rgba(20, 18, 14, .16); padding-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
.specimen .meta div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.specimen .meta span { color: #6c6558; font-family: "Telemetry", monospace; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.specimen .meta b { font-family: "Telemetry", monospace; font-size: 12px; font-weight: 600; }

/* ── ping sweep ────────────────────────────────────────────────────────── */
.sweep { position: relative; border: 1px solid var(--rule); border-radius: var(--r-card); background: linear-gradient(180deg, var(--panel) 0%, #070b09 100%); overflow: hidden; }
.sweep-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.sweep-canvas { display: block; width: 100%; height: 190px; }
.sweep-rows { max-height: 236px; overflow: hidden; }
.ping {
  display: grid; grid-template-columns: 10px minmax(48px, max-content) minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 9px 14px; border-top: 1px solid var(--rule); font-size: 12.5px;
}
.ping .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.ping .dot.dim { background: var(--muted); }
.ping .dot.bad { background: var(--danger); }
.ping .tk { font-family: "Telemetry", monospace; font-weight: 600; color: var(--bone); font-size: 12px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ping .txt { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ping .t { font-family: "Telemetry", monospace; font-size: 11px; color: var(--muted); }
.ping.fresh { background: rgba(255, 107, 44, .06); }
.ping.empty { display: block; padding: 14px; color: var(--muted); font-size: 12.5px; }

/* ── readout strip ─────────────────────────────────────────────────────── */
.readout { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.readout div { padding: 18px 20px; border-right: 1px solid var(--rule); }
.readout div:last-child { border-right: 0; }
.readout b { display: block; font-family: "Telemetry", monospace; font-weight: 600; font-size: 26px; color: var(--bone); letter-spacing: -.02em; }
.readout span { display: block; margin-top: 4px; }

/* ── collar cards (a token with its agent) ─────────────────────────────── */
.collars { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; }
.collar { background: var(--panel); padding: 16px 18px 14px; display: block; transition: background .15s; position: relative; }
.collar:hover { background: var(--panel-2); }
.collar-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.collar-img { width: 40px; height: 40px; border-radius: var(--r); object-fit: cover; background: var(--panel-3); }
.collar-nm b { display: block; font-size: 15px; font-weight: 600; color: var(--bone); line-height: 1.2; }
.collar-nm span { font-family: "Telemetry", monospace; font-size: 11px; color: var(--muted); }
.collar-mc { text-align: right; }
.collar-mc b { display: block; font-family: "Telemetry", monospace; font-weight: 600; font-size: 14px; color: var(--bone); }
.collar-mc span { font-family: "Telemetry", monospace; font-size: 11px; }
.spark { display: block; width: 100%; height: 38px; margin: 12px 0 10px; }
.collar-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: "Telemetry", monospace; font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.collar-meta b { color: var(--text-2); font-weight: 600; }
.collar-agent { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
.collar-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.state { display: inline-flex; align-items: center; gap: 7px; font-family: "Telemetry", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.state i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.state.alive { color: var(--signal); } .state.alive i { background: var(--signal); box-shadow: 0 0 0 3px rgba(255, 107, 44, .16); }
.state.dormant { color: var(--text-2); } .state.dormant i { background: var(--text-2); opacity: .7; }
.state.dead { color: var(--danger); } .state.dead i { background: var(--danger); }
.state.none { color: var(--muted); }
.progress { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.progress .bar { flex: 1; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--signal); }
.progress span { font-family: "Telemetry", monospace; font-size: 10.5px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border: 1px solid var(--rule-hi); border-radius: var(--r); font-family: "Telemetry", monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.badge.hot { color: var(--signal); border-color: var(--signal-dim); }
.badge.bone { background: var(--bone); color: #14120e; border-color: var(--bone); }

/* ── tables / tape ─────────────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.panel-body { padding: 16px; }
.tape { width: 100%; border-collapse: collapse; font-family: "Telemetry", monospace; font-size: 12px; }
.tape th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.tape td { padding: 9px 14px; border-bottom: 1px solid rgba(27, 42, 35, .55); color: var(--text-2); }
.tape tr:last-child td { border-bottom: 0; }
.tape tr:hover td { background: var(--panel-2); }
.tape .r { text-align: right; }
.tape a { color: var(--text-2); }
.tape a:hover { color: var(--signal); }
.scroll-x { overflow-x: auto; }

/* ── log (feed) ────────────────────────────────────────────────────────── */
.log-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.entry { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry:hover { background: rgba(16, 25, 21, .5); }
.entry .av { width: 44px; height: 44px; border-radius: var(--r); object-fit: cover; background: var(--panel-3); display: grid; place-items: center; font-family: "Telemetry", monospace; font-size: 12px; color: var(--text-2); }
.entry .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.entry .who b { font-family: "Telemetry", monospace; font-size: 12px; font-weight: 600; color: var(--bone); letter-spacing: .04em; }
.entry .who a { color: var(--signal); font-family: "Telemetry", monospace; font-size: 11.5px; }
.entry .who .t { color: var(--muted); font-family: "Telemetry", monospace; font-size: 11px; margin-left: auto; }
.entry .said { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.entry .reply { margin-top: 6px; font-size: 12px; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; }
.entry .did { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 4px 9px; border-radius: var(--r); font-family: "Telemetry", monospace; font-size: 11px; border: 1px solid var(--rule-hi); color: var(--text-2); }
.entry .did.ok { color: var(--signal); border-color: var(--signal-dim); background: rgba(255, 107, 44, .07); }
.entry .did.bad { color: var(--danger); border-color: rgba(228, 72, 60, .35); }
.entry .did a { text-decoration: underline; text-underline-offset: 2px; }
.entry .vote { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; margin-left: 12px; font-family: "Telemetry", monospace; font-size: 11px; color: var(--muted); }
.entry .vote button { color: var(--muted); }
.entry .vote button:hover, .entry .vote button.on { color: var(--signal); }

/* ── creature page ─────────────────────────────────────────────────────── */
.c-head { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 20px 0 18px; }
.c-head img, .c-head .ph { width: 56px; height: 56px; border-radius: var(--r-card); object-fit: cover; background: var(--panel-3); }
.c-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.c-title h1 { font-family: "Shoulders", sans-serif; font-size: 44px; line-height: .9; text-transform: uppercase; color: var(--bone); }
.c-title .nm { color: var(--text-2); font-size: 14px; }
.c-stats { display: flex; gap: 28px; }
.c-stats div { text-align: right; }
.c-stats b { display: block; font-family: "Telemetry", monospace; font-weight: 600; font-size: 18px; color: var(--bone); }
.c-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.chart-box { position: relative; height: 320px; padding: 8px 4px 4px; }
.chart-box canvas { display: block; width: 100%; height: 100%; }
.tf { display: flex; gap: 2px; }
.tf button { font-family: "Telemetry", monospace; font-size: 11px; padding: 4px 8px; color: var(--muted); border-radius: var(--r); }
.tf button.on { color: var(--signal); background: var(--panel-3); }
.trade-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.trade-tabs button { padding: 11px; background: var(--panel); font-family: "Telemetry", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.trade-tabs button.on { background: var(--signal); color: #14120e; font-weight: 600; }
.trade-tabs button.on.sell { background: var(--danger); color: #fff; }
.amount { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule-hi); border-radius: var(--r); padding: 10px 12px; margin-top: 12px; background: var(--ground); }
.amount input { flex: 1; background: none; border: 0; outline: none; font-family: "Telemetry", monospace; font-size: 20px; color: var(--bone); min-width: 0; }
.amount span { font-family: "Telemetry", monospace; font-size: 12px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.quick button { border: 1px solid var(--rule); border-radius: var(--r); padding: 6px 0; font-family: "Telemetry", monospace; font-size: 11px; color: var(--text-2); }
.quick button:hover { border-color: var(--signal-dim); color: var(--bone); }
.est { margin-top: 10px; font-family: "Telemetry", monospace; font-size: 11.5px; color: var(--muted); min-height: 16px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(27, 42, 35, .6); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); font-family: "Telemetry", monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.kv b { font-family: "Telemetry", monospace; font-weight: 600; color: var(--text); }
.addr { display: flex; align-items: center; gap: 8px; font-family: "Telemetry", monospace; font-size: 11.5px; color: var(--text-2); background: var(--ground); border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 10px; overflow: hidden; }
.addr code { overflow: hidden; text-overflow: ellipsis; }
.gauge { margin-top: 10px; }
.gauge-bar { height: 8px; border: 1px solid var(--rule-hi); border-radius: 2px; position: relative; overflow: hidden; background: var(--ground); }
.gauge-bar i { position: absolute; inset: 0 auto 0 0; background: var(--signal); }
.gauge-ticks { display: flex; justify-content: space-between; margin-top: 4px; }

/* ── release form ──────────────────────────────────────────────────────── */
.release { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; align-items: start; padding: 32px 0 80px; }
.step { border-top: 1px solid var(--rule); padding: 24px 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
.step-n { font-family: "Telemetry", monospace; font-size: 11px; color: var(--signal); letter-spacing: .1em; padding-top: 4px; }
.step h3 { font-family: "Shoulders", sans-serif; font-size: 28px; text-transform: uppercase; color: var(--bone); margin-bottom: 4px; }
.step > div > p { color: var(--text-2); font-size: 13.5px; margin-bottom: 16px; }
.f { margin-bottom: 16px; }
.f > label { display: block; font-family: "Telemetry", monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.f input[type=text], .f textarea, .f input[type=number] {
  width: 100%; background: var(--ground); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 10px 12px; font-size: 14px; color: var(--text);
}
.f textarea { min-height: 84px; resize: vertical; font-family: inherit; }
.f input:focus, .f textarea:focus { border-color: var(--signal-dim); outline: none; }
.f .hint { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.f .err { margin-top: 6px; font-size: 11.5px; color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pick button { text-align: left; border: 1px solid var(--rule); border-radius: var(--r); padding: 11px 12px; transition: border-color .15s, background .15s; }
.pick button b { display: block; font-family: "Telemetry", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.pick button span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.pick button.on { border-color: var(--signal); background: rgba(255, 107, 44, .07); }
.pick button.on b { color: var(--signal); }
.dropzone { border: 1px dashed var(--rule-hi); border-radius: var(--r-card); padding: 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.dropzone:hover { border-color: var(--signal-dim); }
.dropzone img { width: 56px; height: 56px; border-radius: var(--r); object-fit: cover; }
.dropzone .ph { width: 56px; height: 56px; border-radius: var(--r); background: var(--panel-3); display: grid; place-items: center; color: var(--muted); }
.preview-card { position: sticky; top: calc(var(--hd-h) + 20px); }

/* ── how it works: the wire diagram ────────────────────────────────────── */
.wire { position: relative; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--panel); padding: 28px; overflow: hidden; }
.wire svg { width: 100%; height: auto; display: block; }
.wire .node-box { fill: var(--panel-2); stroke: var(--rule-hi); }
.wire .node-box.hot { stroke: var(--signal-dim); }
.wire .node-t { fill: var(--bone); font-family: "Telemetry", monospace; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.wire .node-s { fill: #6f8278; font-family: "Telemetry", monospace; font-size: 9px; letter-spacing: .1em; }
.wire .w { stroke: var(--rule-hi); stroke-width: 1.2; fill: none; }
.wire .w.hot { stroke: var(--signal-dim); }
.wire .pulse { fill: var(--signal); }

.steps-stack { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; }
.steps-stack article { background: var(--panel); padding: 26px 28px; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }
.steps-stack article h3 { font-family: "Shoulders", sans-serif; font-size: 30px; text-transform: uppercase; color: var(--bone); line-height: .95; }
.steps-stack article p { color: var(--text-2); font-size: 14.5px; max-width: 62ch; }
.steps-stack .n { font-family: "Telemetry", monospace; font-size: 11px; color: var(--signal); letter-spacing: .12em; }

/* ── media ─────────────────────────────────────────────────────────────── */
.media { border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; background: #060908; position: relative; }
.media video { width: 100%; display: block; }
.media figcaption { padding: 12px 16px; border-top: 1px solid var(--rule); color: var(--text-2); font-size: 13px; }
.media figcaption b { color: var(--bone); font-family: "Telemetry", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 4px; }

/* ── docs / legal ──────────────────────────────────────────────────────── */
.doc { padding: 40px 0 90px; }
.doc h1 { font-family: "Shoulders", sans-serif; font-size: 56px; line-height: .92; text-transform: uppercase; color: var(--bone); margin-bottom: 14px; letter-spacing: -.005em; }
.doc h2 { font-family: "Shoulders", sans-serif; font-size: 28px; text-transform: uppercase; color: var(--bone); margin: 36px 0 10px; }
.doc h3 { font-size: 15px; color: var(--bone); margin: 22px 0 6px; }
.doc p, .doc li { color: var(--text-2); font-size: 14.5px; line-height: 1.65; max-width: 72ch; }
.doc p + p { margin-top: 12px; }
.doc h2 + p { margin-top: 4px; }
.doc ul { padding-left: 18px; margin: 10px 0; }
.doc li { margin-bottom: 6px; }
.doc code { font-family: "Telemetry", monospace; font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 1px 5px; color: var(--bone-2); }
.doc pre { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px 16px; overflow-x: auto; }
.doc pre code { background: none; border: 0; padding: 0; font-size: 12px; line-height: 1.6; }
.ep { border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 8px; background: var(--panel); }
.ep b { font-family: "Telemetry", monospace; font-size: 12.5px; color: var(--bone); }
.ep b i { font-style: normal; color: var(--signal); margin-right: 8px; }
.ep p { margin-top: 5px; font-size: 13px; }

/* ── footer ────────────────────────────────────────────────────────────── */
.ft { border-top: 1px solid var(--rule); margin-top: 60px; padding: 34px 0 44px; }
.ft-in { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.ft nav { display: flex; gap: 18px; flex-wrap: wrap; }
.ft nav a { font-family: "Telemetry", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ft nav a:hover { color: var(--bone); }
.ft-note { margin-top: 22px; color: var(--muted); font-size: 12px; max-width: 78ch; line-height: 1.6; }

/* ── overlay, toasts, misc ─────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(4, 7, 6, .72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.overlay[hidden] { display: none; }
.modal { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--rule-hi); border-radius: var(--r-card); padding: 22px; position: relative; }
.modal h3 { font-family: "Shoulders", sans-serif; font-size: 26px; text-transform: uppercase; color: var(--bone); margin-bottom: 6px; }
.modal p { color: var(--text-2); font-size: 13.5px; }
.modal .x { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 18px; line-height: 1; }
.modal .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r); margin-top: 8px; text-align: left; }
.modal .opt:hover { border-color: var(--signal-dim); background: var(--panel-2); }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--rule-hi); border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--text); max-width: 92vw; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }
.toast.bad::before { background: var(--danger); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: "Shoulders", sans-serif; font-size: 26px; text-transform: uppercase; color: var(--text-2); margin-bottom: 6px; }
.skel { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.loading-rows { display: grid; gap: 1px; }
.loading-rows div { height: 64px; }

/* ── reveal (GSAP sets the end state; CSS holds the start) ─────────────── */
/* the start state only exists once GSAP is on the page, so a failed bundle can never leave the
   site blank: without .has-motion everything is simply visible */
.has-motion [data-reveal] { opacity: 0; transform: translateY(18px); }
.no-motion [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .field { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding-top: 34px; }
  .field-art { min-height: 0; }
  .c-grid, .log-grid, .release { grid-template-columns: 1fr; }
  .preview-card { position: static; }
}
@media (max-width: 860px) {
  .hd-in { gap: 12px; padding: 0 16px; }
  .nav, .hd-search, .hd-right .btn-release { display: none; }
  .hd-burger { display: flex; }
  .hd.open .nav { display: flex; position: absolute; top: var(--hd-h); left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--rule); flex-direction: column; padding: 8px 16px 14px; gap: 2px; }
  .hd.open .nav a { padding: 11px 6px; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .section { padding: 56px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sec-head h2 { font-size: 36px; }
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout div:nth-child(2) { border-right: 0; }
  .readout div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .collars { grid-template-columns: 1fr; }
  .c-head { grid-template-columns: 44px 1fr; }
  .c-stats { grid-column: 1 / -1; justify-content: space-between; gap: 12px; }
  .c-stats div { text-align: left; }
  .steps-stack article { grid-template-columns: 1fr; gap: 10px; }
  .two, .pick { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .step-n { padding-top: 0; }
  .field h1 { font-size: clamp(42px, 13vw, 64px); }
  .doc h1 { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
