/* ---------- Fonts (self-hosted League Spartan) ---------- */
@font-face { font-family: "League Spartan"; font-weight: 300; font-display: swap; src: url("/assets/fonts/league-spartan-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-weight: 300; font-display: swap; src: url("/assets/fonts/league-spartan-latin-ext-300-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "League Spartan"; font-weight: 400; font-display: swap; src: url("/assets/fonts/league-spartan-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-weight: 400; font-display: swap; src: url("/assets/fonts/league-spartan-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "League Spartan"; font-weight: 600; font-display: swap; src: url("/assets/fonts/league-spartan-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-weight: 600; font-display: swap; src: url("/assets/fonts/league-spartan-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "League Spartan"; font-weight: 800; font-display: swap; src: url("/assets/fonts/league-spartan-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "League Spartan"; font-weight: 800; font-display: swap; src: url("/assets/fonts/league-spartan-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --ink: #0a0a0a;          /* deep black */
  --paper: #f3f3f1;        /* white */
  --dim: rgba(243, 243, 241, 0.56);
  --faint: rgba(243, 243, 241, 0.32);
  --hair: rgba(243, 243, 241, 0.14);
  --accent: #ff4a1c;       /* [TEMPORARY accent: change this one value] */
  --gutter: clamp(16px, 3vw, 40px);
  --font: "League Spartan", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--paper); color: var(--ink); }

/* Fine grain over everything */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.045;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Small metadata type */
.meta {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.ph { color: var(--faint); }  /* placeholder text marker */

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

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--gutter) - 10px) calc(var(--gutter) - 12px) 0;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand, .nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 10px 12px;
  font-size: 12px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
}
.brand { font-weight: 600; white-space: nowrap; }
@media (max-width: 480px) { .brand, .nav a { padding: 10px 8px; font-size: 11px; letter-spacing: .12em; } .nav { gap: 0; } }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--dim); transition: color .2s; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Homepage / radar ---------- */
.stage {
  position: fixed; inset: 0;
  overflow: hidden;
}
.stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.stage.is-hot canvas { cursor: pointer; }

.labels { position: absolute; inset: 0; pointer-events: none; }
.axis-label {
  position: absolute; left: 0; top: 0;
  pointer-events: auto;
  padding: 14px 16px;
  min-width: 44px; min-height: 44px;
  white-space: nowrap;
  display: flex; flex-direction: column; gap: 4px;
  transition: opacity .3s;
  will-change: transform;
}
.axis-label .n { font-size: 10px; letter-spacing: .16em; color: var(--faint); font-weight: 400; }
.axis-label .t { font-size: 17px; font-weight: 400; letter-spacing: 0.01em; line-height: 1; }
.axis-label .c { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.axis-label.align-right { text-align: right; align-items: flex-end; }
.axis-label.align-center { text-align: center; align-items: center; }
.axis-label.is-active .t { font-weight: 600; }
.axis-label.is-active .n { color: var(--accent); }
.axis-label.is-dim { opacity: .2; }

/* Readout panel: details of the active segment, never overlapping the chart labels */
.readout {
  position: fixed;
  left: var(--gutter); bottom: var(--gutter);
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  z-index: 15;
}
.readout .hint { margin: 0; }
.readout .r-title { font-size: 30px; font-weight: 400; line-height: 1; margin: 10px 0 6px; letter-spacing: -0.01em; }
.readout .r-intro { margin: 0 0 14px; color: var(--dim); font-size: 14px; }
.readout ul { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--hair); }
.readout li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.readout li span:last-child { color: var(--faint); font-size: 12px; }
.open-link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--paper);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  transition: background .2s, color .2s;
}
.open-link:hover { background: var(--paper); color: var(--ink); }
.readout[data-state="idle"] .r-body { display: none; }
.readout[data-state="active"] .hint { display: none; }

.corner-note {
  position: fixed; right: var(--gutter); bottom: var(--gutter);
  text-align: right; z-index: 15; max-width: 300px;
}
.corner-note p { margin: 0 0 4px; }
.index-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  border-bottom: 1px solid var(--faint);
}
.index-cta:hover { border-color: var(--paper); }

.fallback-nav { display: none; }
.no-webgl .fallback-nav { display: block; position: fixed; inset: 0; padding: 120px var(--gutter); }
.no-webgl .labels, .no-webgl canvas, .no-webgl .readout { display: none; }

@media (max-width: 720px) {
  .readout {
    left: 0; right: 0; bottom: 0; width: auto;
    padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--ink) 75%, rgba(10,10,10,0));
  }
  .readout .r-title { font-size: 24px; margin-top: 6px; }
  .readout ul { display: none; }
  .readout .r-intro { margin-bottom: 10px; }
  .open-link { width: 100%; justify-content: space-between; }
  .corner-note { display: none; }
  .axis-label { padding: 12px; }
  .axis-label .t { font-size: 15px; }
  .readout[data-state="idle"] .mobile-index { display: inline-flex; }
}
.mobile-index { display: none; margin-top: 8px; }

/* ---------- Inner pages ---------- */
.page {
  max-width: 1200px; margin: 0 auto;
  padding: 140px var(--gutter) 80px;
  position: relative; z-index: 1;
}
.page-head { display: grid; gap: 14px; margin-bottom: 64px; }
.page-title { font-size: clamp(44px, 9vw, 120px); font-weight: 300; line-height: .9; letter-spacing: -0.02em; margin: 0; }
.page-intro { color: var(--dim); max-width: 520px; margin: 0; }

.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hair); }
.row {
  display: grid;
  grid-template-columns: 56px 1fr 180px 140px 90px;
  gap: 16px; align-items: baseline;
  padding: 22px 0; min-height: 64px;
  border-bottom: 1px solid var(--hair);
  transition: background .2s, padding .2s;
}
a.row:hover, .row.is-link:hover { background: rgba(243,243,241,.04); padding-left: 10px; }
.row .no { font-size: 11px; letter-spacing: .14em; color: var(--faint); }
.row .title { font-size: 22px; font-weight: 400; }
.row .cell { font-size: 13px; color: var(--dim); }
.row .yr { text-align: right; font-size: 13px; color: var(--dim); }
.row.head { padding: 10px 0; min-height: 0; }
.row.head * { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 400; }
.row .summary { grid-column: 2 / -1; color: var(--dim); font-size: 14px; max-width: 640px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.filters button {
  font: inherit; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  color: var(--dim); background: none; border: 1px solid var(--hair);
  min-height: 44px; padding: 0 16px; cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.filters button:hover { border-color: var(--paper); color: var(--paper); }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 56px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; color: var(--dim);
}
.back:hover { color: var(--paper); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.about-grid p { margin: 0 0 18px; font-size: 19px; max-width: 520px; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.facts li { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.facts li span:last-child { color: var(--dim); }
.mail { font-size: clamp(22px, 4vw, 40px); font-weight: 300; border-bottom: 1px solid var(--faint); display: inline-block; padding: 6px 0; }
.mail:hover { border-color: var(--paper); }

@media (max-width: 820px) {
  .row { grid-template-columns: 36px 1fr auto; }
  .row .cell { display: none; }
  .row .title { font-size: 19px; }
  .row .summary { grid-column: 2 / -1; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .page { padding-top: 110px; }
}

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