/* Foundation: fonts, tokens, reset, browser surfaces. See DESIGN.md. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/bigshoulders-700.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/bigshoulders-800.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/plexsans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/plexsans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/plexsans-600.woff2") format("woff2"); }

:root {
  /* Warm blackened iron. Neutrals are tinted toward the ember hue, never pure grey or navy. */
  --bg: #100e0d;
  --surface: #181513;
  --surface-2: #211d1a;
  --surface-3: #2a2521;
  --line: #342e29;
  --line-strong: #4a423b;
  --text: #efe7da;
  --muted: #ada296;
  --faint: #7d7368;

  --accent: #ea5a2c;          /* ember: actions, active sort, focus, links */
  --accent-soft: #ea5a2c26;
  --on-accent: #140a06;
  --brass: #d1a64f;           /* rank one / records only; never a second accent for UI chrome */
  --ok: #7fcf8c;
  --warn: #e7b04a;
  --danger: #ff9a8f;

  /* Heat ramp for data cells: 0 = lowest in column, 4 = highest. Hue-stable, lightness steps. */
  --heat-0: #1d1916;
  --heat-1: #2c2119;
  --heat-2: #43271a;
  --heat-3: #63301b;
  --heat-4: #8a3a1c;

  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 1px 0 rgba(255, 238, 220, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.38);
  --tab-h: 58px;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  /* Minor-third type scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5625rem;
  --fs-2xl: 1.953rem;
  --fs-3xl: 2.44rem;
  --fs-4xl: 3.05rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--line-strong) var(--bg); scrollbar-width: thin; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 var(--fs-md) / 1.5 var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  caret-color: var(--accent);
  background:
    radial-gradient(90% 45% at 12% -12%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    var(--bg);
  overflow-wrap: anywhere;
}

::selection { background: var(--accent); color: var(--on-accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 20;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; }

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