/* EXFIL — design system.

   REGISTER: a trading terminal recovered from a battlefield. Not the stock-photo
   military look the original wears — this is a product where every event is a number
   moving, so the surface is a ledger: monospaced figures, hairline rules, tabular
   alignment, and mud underneath it. Two saturated colours, both load-bearing:

       --hazard  loss, damage, a kill against you
       --gain    profit, extraction, safety

   Nothing else is allowed to be saturated. If a colour appears, it means money moved.

   Type: Archivo (wght 100–900 + wdth 62–125 — condensed display and UI text come
   from ONE family) and Spline Sans Mono for every figure. Both are self-hosted,
   OFL, and carry tnum + slashed zero, which the fontsource latin subsets silently
   strip. Every number on this site is money; an ambiguous 0/O is a support ticket. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("/fonts/spline-mono-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0b0e12;
  --bg-2: #0f141a;
  --panel: #141a21;
  --panel-2: #19212a;
  --line: rgba(154, 176, 198, 0.14);
  --line-2: rgba(154, 176, 198, 0.28);

  --ink: #dce3ea;
  --ink-2: #93a1b0;
  /* 4.5:1 on --bg and on --panel at small sizes. The previous #626f7d measured
     3.76:1, which fails AA for the table captions and column headers. */
  --ink-3: #7d8a99;

  --hazard: #ff7a1a;
  --gain: #35e0d0;
  --gold: #e8b33c;

  --display: "Archivo", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* monotonic by construction — css_traps fails a scale that goes backwards */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --r1: 3px; --r2: 6px; --r3: 12px;
  --maxw: 1180px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

/* Figures are monospaced, tabular and slashed EVERYWHERE. This one rule is why the
   font work above mattered. */
.num, .mono, code, kbd, table td, table th {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1, "zero" 1;
  font-variant-numeric: tabular-nums slashed-zero;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--s3);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Display sizes use the WIDTH axis, not just weight — that is the whole reason for
   picking a face with wdth. A condensed 800 reads as signage; a wide 300 reads as a
   caption. Same family, no second download. */
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-stretch: 78%; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); font-stretch: 84%; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-stretch: 92%; }

p { margin: 0 0 var(--s4); max-width: 68ch; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }

img, video, canvas { max-width: 100%; }
img, video { height: auto; }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--gain);
  outline-offset: 2px;
  border-radius: var(--r1);
}

/* ── primitives ───────────────────────────────────────────────────────────── */

.wrap { width: min(100% - var(--s5) * 2, var(--maxw)); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 14px 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--r1);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.btn:hover { background: var(--panel-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

.btn-go {
  background: var(--gain);
  border-color: var(--gain);
  color: #04211f;
  font-weight: 700;
}
.btn-go:hover { background: #4ceede; border-color: #4ceede; }

.rule { height: 1px; background: var(--line); border: 0; margin: var(--s7) 0; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag[data-live] { border-color: rgba(53, 224, 208, 0.45); color: var(--gain); }

.pos { color: var(--gain); }
.neg { color: var(--hazard); }

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