
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/JetBrainsMono.woff2") format("woff2");
}

:root {
  --ink: #e7e5e4;
  --accent-text: #fcd34d;
  --ground: #0b0e13;
  --accent: #e6bd2f;
  --ink-soft: #bcbbb4;
  --accent-ink: #161106;
  --surface: #0f131a;
  --dim:         color-mix(in oklab, var(--ink-soft) 88%, var(--ground));
  --sep:         color-mix(in oklab, var(--ink-soft) 45%, var(--ground));
  --line:        color-mix(in oklab, var(--ink) 16%, transparent);
  --surface-1:   color-mix(in oklab, var(--surface) 55%, transparent);
  --surface-2:   color-mix(in oklab, var(--surface) 75%, transparent);
  --page-top: clamp(var(--space-6), 5vw, var(--space-14));
  --page-bottom: clamp(var(--space-14), 9vw, var(--space-24));
  --radius: 0.25rem;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;
  --text-8xl:  6rem;
  --text-9xl:  8rem;
  --spacing: 0.25rem;
  --space-0_5: calc(var(--spacing) * 0.5);
  --space-1:   calc(var(--spacing) * 1);
  --space-1_5: calc(var(--spacing) * 1.5);
  --space-2:   calc(var(--spacing) * 2);
  --space-2_5: calc(var(--spacing) * 2.5);
  --space-3:   calc(var(--spacing) * 3);
  --space-3_5: calc(var(--spacing) * 3.5);
  --space-4:   calc(var(--spacing) * 4);
  --space-4_5: calc(var(--spacing) * 4.5);
  --space-5:   calc(var(--spacing) * 5);
  --space-5_5: calc(var(--spacing) * 5.5);
  --space-6:   calc(var(--spacing) * 6);
  --space-6_5: calc(var(--spacing) * 6.5);
  --space-7_5: calc(var(--spacing) * 7.5);
  --space-9:   calc(var(--spacing) * 9);
  --space-10:  calc(var(--spacing) * 10);
  --space-11:  calc(var(--spacing) * 11);
  --space-12:  calc(var(--spacing) * 12);
  --space-14:  calc(var(--spacing) * 14);
  --space-24:  calc(var(--spacing) * 24);
  --bp-sm: 40rem;

  --measure: 660px;

  --bg-opacity: 0.46;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--mono);
    line-height: 1.6;
    font-size: var(--text-base);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
  }

.wrap { max-width: 1060px; margin: 0 auto; padding-left: var(--space-6); padding-right: var(--space-6); }

.topnav { padding: var(--space-5_5) 0; }

.topnav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-9); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: var(--space-2_5);
    font-family: var(--mono); font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase;
    font-weight: 600; color: var(--ink-soft); text-decoration: none;
    padding: var(--space-1) 0; text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    transition: color 0.15s ease;
  }

.btn-ghost svg { width: var(--space-4_5); height: var(--space-4_5); flex: none; }

.btn-ghost:hover { color: var(--accent); }

/* The current page reads in the house gold, not dimmed (operator, 2026-08-20):
   you-are-here should be the brightest thing in the nav, not the quietest. */
.btn-ghost[aria-current="page"] { color: var(--accent-text); }

/* Flex, not grid (operator, 2026-08-21): every box is only as wide as its content asks,
   rows wrap where they must, and flex-grow stretches each row to fill the container edge
   to edge. Accepted trades: boxes no longer align into columns across rows, and the last
   row stretches too, so a lone box there runs full width. The old grid's forced 2-col and
   1-col phone bands (and the is-text value step-down that rode them) went with it: they
   existed to stop fixed-width tracks from overflowing values, and a content-sized box
   cannot overflow its own value. */
.tiles {
  display: flex; flex-wrap: wrap;
  gap: var(--space-2_5); margin: 0 0 var(--space-1);
}
/* Contrast is deliberate: the card sits over a photograph. See web/README.md. */
.tile {
  flex: 1 1 auto;
  border: 1px solid color-mix(in oklab, var(--ink) 24%, transparent);
  border-radius: var(--radius);
  background: var(--surface-2);
  /* Optical, not equal. Re-measure ink bounds before touching. See web/README.md.
     Sides widened 4_5 -> 6 -> 7_5 (operator, 2026-08-21, twice: more horizontal
     breathing room, then another nudge). */
  padding: var(--space-6) var(--space-7_5) var(--space-5);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-2_5);
  --track: color-mix(in oklab, var(--ink) 26%, transparent);
}
.tile-i {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-3_5); color: var(--cat, var(--ink-soft));
}
.tile-i svg { width: var(--space-7_5); height: var(--space-7_5); display: block; flex: none; }
/* Stays below the h2 that names the section. See web/README.md. */
.tile-v { font-size: var(--text-2xl); font-weight: 700; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.tile-den { color: var(--dim); }
.tile-l { font-size: var(--text-sm); font-weight: 600; color: var(--ink-soft); line-height: 1.35; overflow-wrap: anywhere; }
.tile-n { font-size: var(--text-sm); font-weight: 600; color: var(--dim); line-height: 1.35; overflow-wrap: anywhere; }

.meter { display: flex; width: 100%; gap: var(--space-0_5); height: 3px; margin: var(--space-2_5) 0 var(--space-1_5); }
.cell { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--track); }
.cell.on { background: var(--accent); }
.bar { position: relative; flex: 1 1 0; border-radius: 2px; background: var(--track); overflow: hidden; }
/* A nonzero share must never paint empty: 1 of 113 rounds under a pixel. */
.bar-fill { height: 100%; border-radius: 2px; background: var(--accent); min-width: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
h2 {
  font-family: var(--mono); font-size: var(--text-3xl); font-weight: 600;
  color: var(--ink);
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--ground) 78%, transparent) 0%,
      color-mix(in oklab, var(--ground) 42%, transparent) 42%,
      color-mix(in oklab, var(--ground) 28%, transparent) 70%,
      color-mix(in oklab, var(--ground) 54%, transparent) 100%),
    url("/couch-bg-storm-soft.jpg") center bottom / cover no-repeat;
  opacity: var(--bg-opacity);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
