/* ============================================================
   NY Lotto: Triple Watch — "Riso"

   Risograph print on faded stock. Nothing below the token block
   names a colour directly, so the palette lives in one place.

   Type: Archivo carries the interface and every figure — an American
   grotesque cut from newspaper and typewriter forms, the same world
   the badge came out of. Source Serif carries running prose, because
   paragraphs on paper want a serif.

   Corners are square throughout. The only circles are the orbs and
   pips, which are the lottery-ball motif rather than decoration.
   ============================================================ */

:root {
  color-scheme: light;

  --paper: #F3F0E7;
  --paper-deep: #EBE7DB;
  --surface: #FDFBF6;
  --surface-sunk: #F6F2E8;
  --surface-lift: #FFFEFB;

  --ink: #1E2227;
  --ink-soft: #3F454C;
  --mute: #665F52;
  --faint: #6E6858;

  --rule: #D9D1BE;
  --rule-soft: #E7E1D2;
  --rule-ink: #C4BAA3;

  --accent: #2C5E8F;
  --accent-deep: #1F4569;
  --accent-wash: #E4EAF1;
  --on-accent: #FDFBF6;

  --warm: #C0504A;
  --warm-deep: #973B36;
  --warm-wash: #F5E4E1;
  --on-warm: #FDFBF6;

  --lift-1: 0 1px 0 rgba(62, 48, 26, 0.05), 0 2px 6px -4px rgba(62, 48, 26, 0.18);
  --lift-2: 0 1px 0 rgba(62, 48, 26, 0.06), 0 10px 26px -18px rgba(62, 48, 26, 0.4);

  /* Body sits at 17px; nothing on any page drops below 13px. */
  --step--2: 0.8125rem;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.375rem;

  --s-1: 6px;
  --s-2: 10px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 34px;
  --s-6: 52px;

  /* AR. maker-mark palette. Kept separate from the product palette above:
     these three values belong to the maker, not to Triple Watch. Gold is an
     accent only — a dot, a hairline — never a fill or body text. */
  --ar-ink: #13161B;
  --ar-bone: #F3F2EE;
  --ar-gold: #C59E58;

  --ui: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --prose: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* ---------------------- foundation ---------------------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Two ambient layers: a soft ink wash, then the tooth of the stock. */
body::before {
  content: '';
  position: fixed;
  inset: -30vmax;
  z-index: -2;
  background:
    radial-gradient(40vmax 40vmax at 14% 8%, rgba(44, 94, 143, 0.10), transparent 62%),
    radial-gradient(44vmax 44vmax at 88% 84%, rgba(192, 80, 74, 0.085), transparent 64%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    radial-gradient(rgba(96, 76, 48, 0.16) 0.5px, transparent 0.5px),
    radial-gradient(rgba(96, 76, 48, 0.09) 0.5px, transparent 0.5px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

h1, h2, h3, h4 {
  font-family: var(--ui);
  font-weight: 700;
  letter-spacing: -0.018em;
  text-wrap: balance;
  color: var(--ink);
}

/* Every figure is tabular so columns of numbers line up down the page. */
.orb, .pip, .sel-orb, .stat b, .figure, .roster-gap, .rank, .sel-rank,
.sel-gap, .tl-label, td, th, .tl-axis, .meter-head { font-variant-numeric: tabular-nums; }

a { color: inherit; }

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--s-4); }

.rise { animation: rise 0.6s cubic-bezier(0.22, 0.85, 0.3, 1) backwards; }
.rise:nth-child(1) { animation-delay: 0.03s; }
.rise:nth-child(2) { animation-delay: 0.1s; }
.rise:nth-child(3) { animation-delay: 0.17s; }
.rise:nth-child(4) { animation-delay: 0.24s; }
.rise:nth-child(5) { animation-delay: 0.31s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, body::before, body::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; transform: none; }
}

/* One label idiom shared by every small-caps element in the app. */
.eyebrow, .card-label, .stat span, .track-label, .meter-head,
.roster-gap em, th, .sel-head, .legend, .field label, .tl-axis {
  font-family: var(--ui);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- masthead ---------- */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) 0 var(--s-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -0.022em;
}

.brand-badge { width: 96px; height: 96px; flex: none; display: block; }

.brand-name { display: flex; flex-direction: column; line-height: 1.08; white-space: nowrap; }

.brand-name b {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 5px;
}

/* ============================================================
   Menubar

   A true application bar: navigation on the left in divided cells,
   standing information on the right. Full-bleed, with its contents
   held to the page measure.

   It says *where you are*. The drawing switcher below says *what you
   are looking at* — different parts, so the two never read alike.
   ============================================================ */

.menubar {
  margin: 0 calc(50% - 50vw) var(--s-5);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.menubar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--s-4);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--s-4);
}

/* Cells share dividers, so the run reads as one control rather than four links. */
.menubar-items { display: flex; align-items: stretch; }

.menubar-items a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--rule-soft);
  transition: color 0.18s ease, background 0.18s ease;
}

.menubar-items a:first-child { border-left: 1px solid var(--rule-soft); }
.menubar-items a:hover { background: var(--surface-sunk); color: var(--ink); }

/* Current page: tinted ground plus a 3px cap rule drawn inside the cell. */
.menubar-items a[aria-current='page'] {
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-weight: 700;
  box-shadow: inset 0 3px 0 var(--accent);
}

.menubar-aside {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.menubar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* A stale feed is the one thing in the bar worth colouring. */
.menubar-aside.is-stale { color: var(--warm-deep); }
.menubar-aside.is-stale .menubar-dot { background: var(--warm); }

/* ---------- drawing switcher (a filter, not navigation) ---------- */

.track-switch { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.track-label { font-size: var(--step--2); color: var(--mute); }
.track-opts { display: flex; gap: var(--s-1); }

.track-opts a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--rule-ink);
  border-radius: 999px;
  background: var(--surface);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.track-opts a:hover { border-color: var(--accent); color: var(--accent-deep); }

.track-opts a[aria-current='true'] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* ---------- section rhythm ---------- */

.eyebrow { font-size: var(--step--2); color: var(--mute); margin: 0 0 var(--s-2); }

.section { margin: 0 0 var(--s-6); }
.section > h2 { font-size: var(--step-2); margin: 0 0 var(--s-1); }

.section-sub {
  margin: 0 0 var(--s-4);
  color: var(--mute);
  font-family: var(--prose);
  font-size: var(--step-0);
  line-height: 1.55;
  max-width: 66ch;
}

/* ---------- surfaces ---------- */

.card, .panel, .selector, .timeline-shell, .filters {
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--lift-1);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

/* Standing note at the right of a controls row — a count, not a status. */
.controls-note { font-size: var(--step--1); color: var(--mute); }

/* ---------- hero cards ---------- */

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-6); }

.card {
  position: relative;
  padding: var(--s-4) var(--s-4) var(--s-5);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

/* A 3px ink bar across the top — the one place a card declares its subject. */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--bar, var(--rule));
}

.card.landed { --bar: var(--accent); }
.card.absent { --bar: var(--warm); }

.card-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--step--2); color: var(--mute); margin: 0 0 var(--s-4); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.ember { background: var(--warm); }

.orb-row { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }

.orb {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--on-accent);
  background: var(--accent);
  text-decoration: none;
  box-shadow: inset 0 0 0 5px rgba(253, 251, 246, 0.16);
}

.orb.ember { background: var(--warm); color: var(--on-warm); }

/* A hairline ring standing off the ball, like a registration mark. */
.orb::after {
  content: '';
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.35;
}

.orb.ember::after { border-color: var(--warm); }

.orb-facts { min-width: 0; }

.figure { font-size: var(--step-3); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 var(--s-1); }
.figure.aura { color: var(--accent-deep); }
.figure.ember { color: var(--warm-deep); }

.orb-facts p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.orb-facts p + p { margin-top: var(--s-1); color: var(--mute); }

.tag {
  display: inline-block;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 9px;
  border: 1px solid currentColor;
  color: var(--mute);
}

.tag.midday { color: var(--accent-deep); }
.tag.evening { color: var(--warm-deep); }

/* ---------- drought meter ---------- */

.meter { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--rule-soft); }
.meter-head { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--step--2); color: var(--mute); margin-bottom: var(--s-2); }
.meter-track { height: 8px; background: var(--surface-sunk); border: 1px solid var(--rule-soft); }

.meter-fill { height: 100%; background: var(--warm); animation: fill 1s cubic-bezier(0.22, 0.85, 0.3, 1) backwards 0.3s; }

@keyframes fill { from { width: 0 !important; } }

.meter-note { margin: var(--s-2) 0 0; font-family: var(--prose); font-size: var(--step--1); line-height: 1.5; color: var(--mute); }

/* ---------- roster ---------- */

.roster { display: flex; flex-direction: column; }

.roster-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-bottom: 0;
  text-decoration: none;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.roster-row:last-child { border-bottom: 1px solid var(--rule-soft); }
.roster-row:hover { background: var(--surface-lift); box-shadow: var(--lift-1); }

.rank { flex: none; width: 24px; text-align: right; font-size: var(--step--1); font-weight: 700; color: var(--faint); }
.roster-row.cold .rank { color: var(--warm-deep); }

.pip {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: var(--step-0);
  font-weight: 700;
  border: 1.5px solid var(--rule-ink);
  color: var(--ink-soft);
  background: var(--surface-sunk);
  transition: border-color 0.16s ease, color 0.16s ease;
}

.roster-row.cold .pip { border-color: var(--warm); color: var(--warm-deep); }
.roster-row.warm .pip { border-color: var(--accent); color: var(--accent-deep); }

.roster-meta { min-width: 0; flex: 1; }
.roster-meta b { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 2px; }
.roster-meta span { font-size: var(--step--2); color: var(--mute); }

.roster-gap { flex: none; text-align: right; font-weight: 700; font-size: var(--step-1); letter-spacing: -0.02em; }

.roster-gap em {
  display: block;
  font-style: normal;
  font-size: var(--step--2);
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.09em;
  margin-top: 1px;
}

.spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.spark i { width: 4px; background: var(--rule-ink); display: block; }
.spark i.now { background: var(--warm); }

/* ---------- triple selector ---------- */

.selector { margin: 0 0 var(--s-5); padding: var(--s-4); }

.sel-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
  min-height: 24px;
}

.sel-top .sort-toggle { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }

.sel-head { margin: 0; text-align: center; font-size: var(--step--2); color: var(--mute); }

.sort-toggle {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sort-toggle a { color: var(--faint); text-decoration: none; padding-bottom: 2px; transition: color 0.18s ease; }
.sort-toggle a:hover { color: var(--ink-soft); }
.sort-toggle a[aria-current='true'] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.sort-toggle i { font-style: normal; color: var(--rule-ink); }

.sel-row { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); }

.sel-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s-1); text-decoration: none; flex: 0 0 auto; }

.sel-rank {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  min-width: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--rule-ink);
  font-size: var(--step--2);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--faint);
}

.sel-item.cold .sel-rank { color: var(--warm-deep); border-color: var(--warm); }
.sel-item.is-active .sel-rank { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.sel-orb {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--step-1);
  font-weight: 700;
  border: 1.5px solid var(--rule-ink);
  background: var(--surface-sunk);
  color: var(--ink-soft);
  transition: transform 0.2s cubic-bezier(0.22, 0.85, 0.3, 1),
              border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sel-gap { font-size: var(--step--2); font-weight: 600; color: var(--faint); transition: color 0.2s ease; }

.sel-item.cold .sel-orb { border-color: var(--warm); color: var(--warm-deep); }

.sel-item:hover .sel-orb {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--surface-lift);
}

.sel-item:hover .sel-gap { color: var(--ink-soft); }
.sel-item:focus-visible { outline: none; }
.sel-item:focus-visible .sel-orb { outline: 2px solid var(--accent); outline-offset: 4px; }

.sel-item.is-active .sel-orb {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 4px rgba(253, 251, 246, 0.18);
}

.sel-item.is-active.cold .sel-orb { background: var(--warm); border-color: var(--warm); color: var(--on-warm); }
.sel-item.is-active .sel-gap { color: var(--ink); }

.sel-note {
  margin: var(--s-4) auto 0;
  max-width: 68ch;
  text-align: center;
  font-family: var(--prose);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--mute);
}

/* ---------- timeline ---------- */

.timeline-shell { padding: var(--s-4); }
.timeline-scroll { overflow-x: auto; padding-bottom: var(--s-1); }
.timeline { min-width: 760px; display: grid; gap: 4px; }

.tl-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: var(--s-3); }

.tl-label { font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); text-decoration: none; transition: color 0.16s ease; }
.tl-label:hover { color: var(--accent-deep); }

/* Decade rules behind the marks: ten years is 21.75% of the 1980–2026 span. */
.tl-lane {
  position: relative;
  height: 28px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0, transparent calc(21.75% - 1px),
      var(--rule) calc(21.75% - 1px), var(--rule) 21.75%),
    var(--surface-sunk);
  border: 1px solid var(--rule-soft);
}

.tl-mark {
  position: absolute;
  top: 5px;
  width: 3px;
  height: 16px;
  background: var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tl-mark.evening { background: var(--warm); }
.tl-mark:hover { transform: scaleY(1.45); box-shadow: 0 0 0 1px var(--surface); z-index: 2; }

.tl-axis { display: flex; justify-content: space-between; margin: var(--s-2) 0 0 72px; font-size: var(--step--2); color: var(--faint); }

.legend {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin: var(--s-3) 0 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--2);
  color: var(--mute);
  letter-spacing: 0.06em;
}

.legend span { display: flex; align-items: center; gap: var(--s-1); }
.legend i { width: 10px; height: 10px; display: block; }

/* ---------- stat grid ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  box-shadow: var(--lift-1);
  margin-bottom: var(--s-5);
}

.stat { background: var(--surface); padding: var(--s-3) var(--s-4) var(--s-4); }
.stat b { display: block; font-size: var(--step-3); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; margin-bottom: var(--s-1); }
.stat span { font-size: var(--step--2); color: var(--mute); }

/* ---------- panels, tables ---------- */

.columns { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s-3); align-items: start; }
.columns > *, .hero > * { min-width: 0; }
.table-scroll, .timeline-scroll { max-width: 100%; overflow-x: auto; }

.panel { padding: var(--s-4); }
.panel h2, .panel h3 { margin: 0 0 var(--s-1); font-size: var(--step-1); }
.panel-sub { margin: 0 0 var(--s-4); font-family: var(--prose); font-size: var(--step--1); color: var(--mute); line-height: 1.5; }

table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }

th {
  text-align: left;
  font-size: var(--step--2);
  color: var(--mute);
  padding: 0 var(--s-3) var(--s-2) 0;
  border-bottom: 2px solid var(--rule-ink);
  white-space: nowrap;
}

td { padding: 12px var(--s-3) 12px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; padding-right: 0; }
td.key { color: var(--ink); font-weight: 700; }
tbody tr { transition: background 0.14s ease; }
tbody tr:hover { background: var(--surface-sunk); }

/* ---------- prose ---------- */

.prose { max-width: 66ch; }
.prose h1 { font-size: var(--step-3); margin: 0 0 var(--s-3); letter-spacing: -0.03em; }

.prose h2 {
  font-size: var(--step-1);
  margin: var(--s-6) 0 var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--rule);
}

.prose p, .prose li, .prose dd { font-family: var(--prose); font-size: var(--step-0); color: var(--ink-soft); line-height: 1.72; }

/* Lead paragraph: the one place the page raises its voice. */
.prose > p:first-of-type { font-size: var(--step-1); line-height: 1.6; color: var(--ink); }

.prose a { color: var(--accent-deep); text-underline-offset: 3px; }

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', monospace;
  font-size: 0.88em;
  background: var(--surface-sunk);
  border: 1px solid var(--rule-soft);
  color: var(--accent-deep);
  padding: 1px 6px;
}

.prose dl { display: grid; gap: var(--s-3); margin: 0; }
.prose dt { font-family: var(--ui); font-weight: 700; color: var(--ink); }
.prose dd { margin: 3px 0 0; }

/* ---------- filters, pager ---------- */

.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--s-4); padding: var(--s-3); }

.field { display: flex; flex-direction: column; gap: var(--s-1); }
.field label { font-size: var(--step--2); color: var(--mute); }

.field input, .field select {
  font: inherit;
  font-size: var(--step--1);
  padding: 10px 12px;
  border: 1px solid var(--rule-ink);
  background: var(--surface-lift);
  color: var(--ink);
}

.field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }

.filters button {
  font-family: var(--ui);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.16s ease;
}

.filters button:hover { background: var(--accent-deep); }

.pager { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); font-size: var(--step--1); color: var(--mute); }

.pager a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--rule-ink);
  background: var(--surface);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.pager a:hover { border-color: var(--accent); background: var(--surface-lift); }
.pager a[aria-disabled='true'] { color: var(--faint); pointer-events: none; opacity: 0.5; }

/* ---------- footer ---------- */

.foot {
  margin-top: 0;
  padding: var(--s-4) 0 var(--s-6);
  font-family: var(--prose);
  font-size: var(--step--1);
  color: var(--mute);
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  justify-content: space-between;
}

.foot a { color: var(--ink-soft); text-underline-offset: 3px; }
.empty { padding: var(--s-5) 0; color: var(--mute); font-family: var(--prose); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .hero, .columns { grid-template-columns: 1fr; }
  .orb { width: 108px; height: 108px; font-size: 2.4rem; }
}

@media (max-width: 820px) {
  .masthead { grid-template-columns: 1fr; justify-items: center; gap: var(--s-3); }
  .menubar-inner { padding: 0 var(--s-3); }
  .menubar-items { flex-wrap: wrap; justify-content: center; flex: 1; }
  .menubar-aside { display: none !important; }
  .sel-top { flex-direction: column; gap: var(--s-2); }
  .sel-top .sort-toggle { position: static; transform: none; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 var(--s-3); }

  .brand-badge { width: 72px; height: 72px; }
  .brand { font-size: var(--step-1); gap: var(--s-2); }

  .selector, .card, .panel, .timeline-shell { padding: var(--s-3); }
  .orb { width: 92px; height: 92px; font-size: 2rem; }
  .orb::after { inset: -8px; }
  .orb-row { gap: var(--s-3); }
  .figure { font-size: var(--step-2); }

  .sel-row { gap: var(--s-2); }
  .sel-orb { width: 56px; height: 56px; font-size: var(--step-0); }

  .section > h2 { font-size: var(--step-1); }
  .prose h1 { font-size: var(--step-2); }
  .stat b { font-size: var(--step-2); }

  .roster-row { flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: var(--s-3); }
  .roster-meta { flex: 1 1 60%; }
  .roster-gap { margin-left: auto; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .field { flex: 1 1 45%; }
  .field input, .field select { width: 100%; }
  .filters button { flex: 1 1 100%; }
  .pager { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .sel-row { gap: var(--s-1); }
  .sel-orb { width: 50px; height: 50px; font-size: var(--step--1); }
  .menubar-items a { padding: 0 13px; }
  .brand-badge { width: 60px; height: 60px; }
  .brand { font-size: var(--step-0); }
}

/* ============================================================
   AR. — maker mark

   Signs the work; never competes with the badge. Every placement
   below is smaller and quieter than the product's own identity,
   and none of them touch the masthead badge or the favicon.
   ============================================================ */

/* Masthead credit — the third grid column the layout already held open. */
.maker {
  grid-column: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
}

.maker > span:first-child {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ~34px against the badge's 96px: a supporting credit, not a co-headline. */
.maker-mark { display: block; width: 34px; }
.maker-mark svg { display: block; width: 100%; height: auto; }

/* Ink band — gives the mark its own surface so contrast never depends on the
   paper behind it. Full-bleed while the content stays in the wrap. */
.ar-band {
  margin: var(--s-6) calc(50% - 50vw) 0;
  padding: var(--s-4) var(--s-4);
  background: var(--ar-ink);
  display: flex;
  justify-content: center;
}

.ar-band-mark { display: block; width: 230px; max-width: 62vw; }
.ar-band-mark svg { display: block; width: 100%; height: auto; }

/* Method colophon — a moment of authorship at the end of the document. */
.colophon {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--ar-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  text-align: center;
}

.colophon-note {
  margin: 0;
  max-width: 52ch;
  font-family: var(--prose);
  font-size: var(--step--1);
  color: var(--mute);
  line-height: 1.6;
}

.colophon-mark { display: block; width: 132px; }
.colophon-mark svg { display: block; width: 100%; height: auto; }

@media (max-width: 820px) {
  /* Masthead stacks, so the credit sits under the brand rather than beside it. */
  .maker { grid-column: 1; justify-self: center; }
}

@media (max-width: 620px) {
  .ar-band { padding: var(--s-3); }
  .ar-band-mark { width: 200px; }
  .colophon-mark { width: 112px; }
}
