/* live.whenwipe.com — "field sheet" design system.
 *
 * One bold object: the paper field map (built in ink, planned in pencil,
 * under construction in caution stripes). Everything around it is a quiet
 * olive "table" with hairline rules. Caution yellow means "work happening
 * now" everywhere; on-air red is only the live dot.
 *
 * Dark by design: this page sits beside a video, so there is no light
 * theme (color-scheme is declared dark in <meta> and here).
 */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(../fonts/figtree-latin-wght-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format('woff2');
}

:root {
  color-scheme: dark;

  /* table (UI) */
  --mud: #1f231c;
  --tarp: #272c23;
  --tarp-2: #2f3529;
  --rule: #3d4335;
  --rule-strong: #535a49;
  --ink: #e7e0c9;
  --ink-2: #b5b09a;
  --ink-3: #9b9783;

  /* paper (field map) */
  --paper: #cfc6a6;
  --paper-ink: #2a2920;
  --paper-muted: #4f4c3a;
  --paper-pencil: #8f8768;
  --paper-grid: #c0b796;
  --paper-grid-major: #a69d7c;
  --river: #6d8c99;
  --road: #bcb290;

  /* signals */
  --caution: #f0c24b;
  --onair: #e5484d;
  --good: #0ca30c;
  --warn: #fab219;

  /* meters */
  --track: #3a4032;
  --fill: #b5b09a;

  --font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif; /* was Big Shoulders Stencil: unreadable at small sizes (operator 2026-10-11) */

  /* type scale: 13 / 14 / 16 / 18 / 21 / 28 / 40 / 56 */
  --t-xs: 0.8125rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.5rem;
  --t-3xl: 3.5rem;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  --gutter: clamp(16px, 2.2vw, 28px);
  --rail-w: 23rem;
  --radius: 2px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mud);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.5;
  font-feature-settings: 'kern' 1;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }

a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink-2); }

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

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

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 16px; height: 16px; flex: none; }

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -100px;
  z-index: 50;
  padding: var(--s2) var(--s3);
  background: var(--caution);
  color: var(--paper-ink);
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s3); }

/* ---------- headings ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 0.95;
}
.h-page {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-3xl);
  line-height: 0.95;
  letter-spacing: 0.005em;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: var(--t-lg);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.h-sub {
  font-size: var(--t-sm);
  font-weight: 650;
  color: var(--ink-2);
  line-height: 1.3;
}
.lede {
  font-size: var(--t-md);
  color: var(--ink-2);
  max-width: 62ch;
}
.muted { color: var(--ink-3); }
.small { font-size: var(--t-sm); }
.tnum { font-variant-numeric: tabular-nums; }

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

.masthead {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding: 0 var(--gutter);
  min-height: 56px;
  border-bottom: 1px solid var(--rule);
  background: var(--mud);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.wordmark-tail { color: var(--ink-2); font-weight: 600; }

.site-nav { margin-right: auto; }
.site-nav-list { list-style: none; display: flex; gap: var(--s1); }
.site-nav-link {
  display: block;
  padding: var(--s2) var(--s3);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav-link:hover { color: var(--ink); background: var(--tarp); }
.site-nav-link[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
  border-radius: 0;
}

.onair {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px var(--s3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: var(--t-sm);
  font-weight: 650;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.onair-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
}
.onair-clock { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; }
.onair-clock:empty { display: none; }
.onair[data-phase="live"] { color: var(--ink); border-color: var(--rule-strong); }
.onair[data-phase="live"] .onair-dot { background: var(--onair); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.22); }
.onair[data-phase="starting"] .onair-dot,
.onair[data-phase="reconnecting"] .onair-dot,
.onair[data-phase="stalled"] .onair-dot { background: var(--caution); }
.onair[data-phase="unreachable"] .onair-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }

@media (max-width: 760px) {
  .masthead { flex-wrap: wrap; gap: 0 var(--s3); padding-top: var(--s2); }
  .wordmark { font-size: 1.3rem; padding: var(--s2) 0; margin-right: auto; }
  .wordmark-tail { display: none; }
  .site-nav { order: 3; width: 100%; margin: 0 calc(var(--s3) * -1); }
  .site-nav-list { overflow-x: auto; }
  .onair { order: 2; }
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--s5) var(--gutter) var(--s6);
  color: var(--ink-3);
  font-size: var(--t-xs);
  display: grid;
  gap: var(--s2);
}
.site-footer-meta { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.site-footer-sep { width: 1px; height: 12px; background: var(--rule-strong); }
.site-footer a { color: var(--ink-2); }
.noscript { padding: var(--s4) var(--gutter); background: var(--tarp); }

/* ---------- generic regions ---------- */

.page {
  padding: var(--s6) var(--gutter) var(--s7);
  max-width: 1440px;
}
.region { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-content: start; min-width: 0; }
.region-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}
.region-link { font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; }

.ruled {
  border-top: 1px solid var(--rule);
  padding-top: var(--s4);
}

.empty {
  color: var(--ink-3);
  font-size: var(--t-sm);
  max-width: 48ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 36px;
  padding: 6px var(--s3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--tarp);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--tarp-2); border-color: var(--ink-3); }
.btn-primary { background: var(--caution); color: var(--paper-ink); border-color: var(--caution); }
.btn-primary:hover { background: #f5cf6b; border-color: #f5cf6b; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--tarp); color: var(--ink); border-color: var(--rule); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.5;
}
.pill .icon { width: 13px; height: 13px; }
.pill-active { border-color: var(--caution); color: var(--ink); }
.pill-active .icon { color: var(--caution); }
.pill-done .icon { color: var(--good); }
.pill-done { color: var(--ink); }

/* ---------- live layout ---------- */

.stage-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: var(--s5) var(--s6);
  padding: var(--s5) var(--gutter) var(--s7);
  align-items: start;
}
.stage { display: grid; gap: var(--s6); min-width: 0; }
.rail { display: grid; gap: var(--s6); min-width: 0; align-content: start; }
.rail > section + section { border-top: 1px solid var(--rule); padding-top: var(--s5); }

.strip {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas: 'map stock' 'unlocks stock';
  grid-template-rows: auto 1fr;
  gap: var(--s6) var(--s6);
  align-items: start;
}
.strip-map { grid-area: map; }
.strip-stock { grid-area: stock; }
.strip-unlocks { grid-area: unlocks; border-top: 1px solid var(--rule); padding-top: var(--s5); }

@media (max-width: 1080px) {
  .stage-view { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); }
  .rail > section + section { border-top: 0; padding-top: 0; }
  .rail > section:last-child { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: var(--s5); }
  .stage-view .rail { order: 2; }
  .stage-view .stage { display: contents; }
  .stage-view .player { order: 1; }
  .stage-view .strip { order: 3; }
}
@media (max-width: 680px) {
  .stage-view { padding-top: 0; padding-left: 0; padding-right: 0; gap: var(--s5); }
  .stage-view .player {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--mud);
  }
  .stage-view .rail, .stage-view .strip { padding: 0 var(--gutter); }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .rail > section + section { border-top: 1px solid var(--rule); padding-top: var(--s5); }
  .strip { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'map' 'stock' 'unlocks'; }
  .strip-stock { border-top: 1px solid var(--rule); padding-top: var(--s5); }
  .log { max-height: 22rem; }
}

/* ---------- player ---------- */

.player { display: grid; gap: var(--s2); min-width: 0; }
.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #10130e;
  overflow: hidden;
  border-radius: var(--radius);
}
@media (max-width: 680px) { .player-frame { border-radius: 0; } }
.player-media, .player-media video, .player-media iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.player-media video { object-fit: contain; background: #10130e; }
.player-overlay {
  position: absolute; inset: 0;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: var(--s2);
  padding: clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(16, 19, 14, 0.35), rgba(16, 19, 14, 0.88));
  transition: opacity 400ms ease;
}
.player-overlay[hidden] { display: none; }
.player-overlay-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.2vw, 3.5rem);
  line-height: 0.95;
}
.player-overlay-body { color: var(--ink-2); max-width: 46ch; font-size: clamp(0.9rem, 1.4vw, 1.0625rem); }
.player-overlay-actions { display: flex; gap: var(--s2); margin-top: var(--s2); flex-wrap: wrap; }
.player-overlay-mark {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--t-sm); font-weight: 650; color: var(--ink);
}
.player-overlay-mark::before {
  content: '';
  width: 10px; height: 10px;
  background: var(--caution);
}
.player[data-phase="stalled"] .player-overlay,
.player[data-phase="reconnecting"] .player-overlay {
  background: linear-gradient(180deg, rgba(16, 19, 14, 0.25), rgba(16, 19, 14, 0.82));
}
.player[data-phase="stalled"] video,
.player[data-phase="reconnecting"] video { filter: grayscale(0.7) brightness(0.6); }

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 36px;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
@media (max-width: 680px) { .player-bar { padding: 0 var(--gutter) var(--s1); } }
.player-actions { display: flex; gap: var(--s1); }

/* sound: the speaker button + volume in the bar, and the "Tap for sound" chip over the picture while muted */
.player-sound { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.player-sound .btn[aria-pressed="true"] { color: var(--ink); }
.player-sound .btn:disabled { opacity: 0.5; cursor: default; }
.sound-volume { display: inline-flex; align-items: center; }
.sound-volume input[type="range"] {
  width: 96px; height: 24px; margin: 0;
  accent-color: var(--caution);
  background: transparent;
  cursor: pointer;
}
.player-sound-hint {
  position: absolute; left: var(--s3); top: var(--s3); z-index: 3; /* the top: the bottom is the status overlay's, and the Twitch embed's own controls */
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 36px; padding: 0 var(--s3);
  background: rgba(16, 19, 14, 0.86);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: 650 var(--t-sm) / 1 var(--font-ui);
  cursor: pointer;
}
.player-sound-hint:hover { background: rgba(31, 35, 28, 0.94); border-color: var(--ink-3); }
.player-sound-hint[hidden] { display: none; }

/* preview frame (?state= overrides; no real video) */
.preview-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-tag {
  position: absolute; top: var(--s3); left: var(--s3);
  padding: 2px 8px;
  background: rgba(16, 19, 14, 0.75);
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 600;
  border-radius: var(--radius);
}

/* ---------- now panel ---------- */

.now-session { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.now-objective { font-size: var(--t-xl); font-weight: 650; line-height: 1.15; letter-spacing: -0.005em; margin-top: var(--s2); }
.now-jobs { list-style: none; display: grid; gap: var(--s2); margin-top: var(--s4); }
.now-job { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s2); align-items: center; font-size: var(--t-sm); }
.now-job-mark { width: 10px; height: 10px; background: repeating-linear-gradient(135deg, var(--caution) 0 3px, var(--paper-ink) 3px 5px); }
.now-job-count { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- fleet ---------- */

.fleet-figures { display: flex; gap: var(--s6); align-items: flex-end; flex-wrap: wrap; }
.figure { display: grid; gap: 2px; }
.figure-value { font-size: var(--t-2xl); font-weight: 650; line-height: 1; letter-spacing: -0.01em; }
.figure-value-sm { font-size: var(--t-xl); }
.figure-label { font-size: var(--t-sm); color: var(--ink-2); }

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, 18px);
  gap: 3px;
  margin-top: var(--s4);
}
.slot {
  position: relative;
  width: 18px; height: 18px;
  background: #22261e;
  box-shadow: inset 1px 1px 0 #171a14, inset -1px -1px 0 #3a4032;
}
.slot-filled {
  background: var(--fill);
  color: var(--paper-ink);
  box-shadow: inset 1px 1px 0 #d6d0b8, inset -1px -1px 0 #8f8a75;
}
.slot-filled .icon { width: 12px; height: 12px; position: absolute; top: 3px; left: 3px; }
.slot-filled.is-new { outline: 2px solid var(--caution); outline-offset: 1px; }
.slot-caption { font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s2); }

.queue-list { list-style: none; display: grid; gap: 6px; margin-top: var(--s3); font-size: var(--t-sm); }
.queue-item { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: var(--s2); align-items: baseline; }
.queue-pos { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.queue-kind { color: var(--ink-3); font-size: var(--t-xs); }

.disclosure { margin-top: var(--s3); }
.disclosure > summary {
  cursor: pointer;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  list-style: none;
  display: inline-flex;
  gap: var(--s2);
  align-items: center;
  padding: 4px 0;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before {
  content: '';
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 150ms ease;
}
.disclosure[open] > summary::before { transform: rotate(90deg); }

.roster { list-style: none; display: grid; margin-top: var(--s2); max-height: 22rem; overflow-y: auto; }
.roster-item { display: grid; grid-template-columns: 18px 1fr; gap: 2px var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.roster-item .icon { color: var(--ink-2); margin-top: 3px; }
.roster-name { font-weight: 650; }
.roster-role { color: var(--ink-3); font-weight: 500; }
.roster-task { grid-column: 2; color: var(--ink-2); }
.roster-meta { grid-column: 2; color: var(--ink-3); font-size: var(--t-xs); }

/* ---------- log ---------- */

.log {
  list-style: none;
  display: grid;
  max-height: 30rem;
  overflow-y: auto;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
  padding-bottom: 20px;
}
.log-item {
  display: grid;
  grid-template-columns: 3.75rem 16px 1fr;
  gap: var(--s2);
  padding: 7px 0;
  border-top: 1px solid var(--rule);
  font-size: var(--t-sm);
  line-height: 1.4;
}
.log-item:first-child { border-top: 0; }
.log-time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: var(--t-xs); padding-top: 2px; }
.log-item .icon { color: var(--ink-2); margin-top: 1px; }
.log-item[data-level="warn"] .icon { color: var(--warn); }
.log-item[data-kind="section_done"] .icon,
.log-item[data-kind="poi_started"] .icon { color: var(--caution); }
.log-item[data-kind="poi_built"] .icon,
.log-item[data-kind="unlock_landed"] .icon,
.log-item[data-kind="milestone"] .icon { color: var(--good); }
.log-item.is-new { animation: log-new 2.4s ease-out; }
@keyframes log-new {
  from { background: rgba(240, 194, 75, 0.14); }
  to { background: transparent; }
}

/* ---------- meters (stockpile, unlocks) ---------- */

.meter-list { list-style: none; display: grid; gap: var(--s3); }
.meter-row { display: grid; gap: 5px; }
.meter-head { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-sm); align-items: baseline; }
.meter-name { font-weight: 600; }
.meter-value { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-value strong { color: var(--ink); font-weight: 650; }
.meter {
  position: relative;
  height: 8px;
  background: var(--track);
  border-radius: 1px;
}
.meter-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--fill);
  border-radius: 0 2px 2px 0;
  max-width: 100%;
}
.meter-fill.is-active {
  background: repeating-linear-gradient(135deg, var(--caution) 0 5px, #c99a2c 5px 8px);
}
.meter-fill.is-done { background: var(--fill); }
.meter-tick {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}
.meter-tick-low { width: 1px; background: var(--ink-3); top: -2px; bottom: -2px; }
.meter-note { font-size: var(--t-xs); color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.meter-note .icon { width: 13px; height: 13px; }
.meter-note-active { color: var(--ink-2); }
.meter-note-active .icon { color: var(--caution); }
.meter-legend { font-size: var(--t-xs); color: var(--ink-3); display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s1); }
.meter-legend-key { display: inline-flex; align-items: center; gap: 6px; }
.meter-legend-key::before { content: ''; width: 2px; height: 12px; background: var(--ink); }
.meter-legend-key-low::before { width: 1px; background: var(--ink-3); }

.depot + .depot { margin-top: var(--s5); }

/* Camp stores: the whole chest census, grouped (DATA-CONTRACT.md §7.11). Two columns per row, never wider than the panel. */
.store-group + .store-group { margin-top: var(--s4); }
.store-list { list-style: none; display: grid; gap: 3px; }
.store-row { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-sm); align-items: baseline; }
.store-name { min-width: 0; overflow-wrap: anywhere; }
.store-count { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- goals (Road to Affiliate) ---------- */

.goal + .goal { margin-top: var(--s5); }
.goal-title { font-size: var(--t-md); font-weight: 650; margin: 0 0 var(--s1); }
.goal-headline { margin-bottom: 6px; }
.goal-figure { font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.goal-criteria { margin-top: var(--s3); }
.goal-note { margin-top: var(--s3); }
.goal.is-met .goal-figure { color: var(--good); }
.depot-name { font-size: var(--t-sm); font-weight: 650; color: var(--ink-2); margin-bottom: var(--s3); }

/* ---------- unlocks ---------- */

.unlock-list { list-style: none; display: grid; gap: var(--s4); }
.unlock { display: grid; gap: 6px; }
.unlock-head { display: flex; justify-content: space-between; gap: var(--s3); align-items: center; }
.unlock-title { font-weight: 650; font-size: var(--t-base); }
.unlock-summary { font-size: var(--t-sm); color: var(--ink-2); max-width: 60ch; }
.unlock-seen { font-size: var(--t-sm); color: var(--ink-3); max-width: 60ch; }

.unlock-board { list-style: none; display: grid; gap: 0; }
.unlock-board > .unlock {
  grid-template-columns: minmax(0, 40rem) minmax(12rem, 18rem);
  justify-content: start;
  gap: var(--s2) var(--s7);
  padding: var(--s5) 0;
  border-top: 1px solid var(--rule);
}
.unlock-board .unlock-body { display: grid; gap: var(--s2); }
.unlock-board .unlock-side { display: grid; gap: var(--s2); align-content: start; }
.unlock-board .unlock-title { font-size: var(--t-lg); font-family: var(--font-display); font-weight: 750; letter-spacing: 0.02em; }
@media (max-width: 720px) {
  .unlock-board > .unlock { grid-template-columns: minmax(0, 1fr); }
}

.sponsor-list { list-style: none; display: grid; font-size: var(--t-sm); }
.sponsor-item { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: var(--s2); padding: var(--s2) 0; border-top: 1px solid var(--rule); align-items: baseline; }
.sponsor-pos { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sponsor-poi { font-weight: 600; }
.sponsor-by { color: var(--ink-3); display: block; font-size: var(--t-xs); }

/* ---------- field map (the one bold object) ---------- */

.sheet {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 10px 10px 6px;
}
.sheet-plot { position: relative; }
.sheet-svg { width: 100%; height: auto; }
.sheet-overlay { position: absolute; inset: 0; }
.sheet-ref {
  position: absolute;
  font-size: 10px;
  font-weight: 650;
  color: var(--paper-muted);
  font-variant-numeric: tabular-nums;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
}
.sheet-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 6px 4px 0;
  font-size: 11px;
  color: var(--paper-muted);
  font-weight: 600;
}
.poi {
  position: absolute;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 1px;
}
.poi:hover, .poi.is-hot { box-shadow: 0 0 0 2px var(--paper-ink); }
.poi:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 2px; box-shadow: 0 0 0 4px var(--caution); }
.poi-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 3px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--paper-ink);
  background: rgba(207, 198, 166, 0.92);
  padding: 0 3px;
  pointer-events: none;
}
.poi-label-above { top: auto; bottom: calc(100% + 3px); }
.poi-label-end { left: auto; right: 0; transform: none; }
.poi-label-start { left: 0; transform: none; }
.sheet { container-type: inline-size; }
@container (max-width: 640px) {
  .poi-label:not(.is-key) { display: none; }
  .sheet-ref { font-size: 9px; }
}
.sheet-compact .poi-label { font-size: 10.5px; }
.sheet-large .poi-label { font-size: 12.5px; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-top: var(--s3);
  font-size: var(--t-xs);
  color: var(--ink-2);
  list-style: none;
}
.map-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.map-legend-item strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.swatch { width: 14px; height: 14px; flex: none; outline: 1px solid rgba(0, 0, 0, 0.25); }

/* ---------- tooltip ---------- */

.tip {
  position: fixed;
  z-index: 40;
  max-width: 17rem;
  padding: var(--s2) var(--s3);
  background: #12150f;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: var(--t-sm);
  pointer-events: none;
  display: grid;
  gap: 2px;
}
.tip[hidden] { display: none; }
.tip-value { font-weight: 700; color: var(--ink); }
.tip-label { color: var(--ink-2); }
.tip-line { color: var(--ink-3); font-size: var(--t-xs); }

/* ---------- standby ---------- */

.standby-view { padding: var(--s6) var(--gutter) var(--s7); max-width: 1600px; }
.standby-head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: 70ch; }
.standby-title { font-family: var(--font-display); font-weight: 850; font-size: clamp(3rem, 8vw, 6rem); line-height: 0.88; letter-spacing: 0; }
.standby-next { font-size: var(--t-lg); font-weight: 600; }
.standby-teaser { color: var(--ink-2); font-size: var(--t-md); max-width: 60ch; }
.standby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 1fr);
  gap: var(--s6) var(--s7);
  align-items: start;
}
.standby-side { display: grid; gap: var(--s6); align-content: start; }
.standby-side > section + section { border-top: 1px solid var(--rule); padding-top: var(--s5); }
.standby-main { display: grid; gap: var(--s7); align-content: start; min-width: 0; }
.standby-main > section + section { border-top: 1px solid var(--rule); padding-top: var(--s5); }
@media (max-width: 1000px) {
  .standby-grid { grid-template-columns: minmax(0, 1fr); }
}

.hero-figure { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.hero-figure-value { font-size: var(--t-3xl); font-weight: 650; line-height: 1; letter-spacing: -0.02em; }
.hero-figure-label { font-size: var(--t-md); color: var(--ink-2); }

.kpis { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); margin-top: var(--s3); }
.kpi { display: grid; gap: 2px; }
.kpi-value { font-size: var(--t-xl); font-weight: 650; line-height: 1.1; }
.kpi-label { font-size: var(--t-sm); color: var(--ink-2); }

.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s3); margin-top: var(--s2); }
.step { counter-increment: step; display: grid; grid-template-columns: 1.75rem 1fr; gap: var(--s2); }
.step::before { content: counter(step); color: var(--ink-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.step-title { font-weight: 600; }
.step-detail { grid-column: 2; font-size: var(--t-sm); color: var(--ink-2); }

.notice {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--caution);
  background: var(--tarp);
  font-size: var(--t-sm);
  color: var(--ink-2);
  max-width: 70ch;
}
.notice .icon { color: var(--caution); margin-top: 2px; }

/* ---------- map page ---------- */

.map-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.poi-table-wrap { overflow-x: auto; }
.poi-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 34rem; }
.poi-table th, .poi-table td { text-align: left; padding: var(--s2) var(--s3) var(--s2) 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.poi-table th { color: var(--ink-3); font-weight: 600; font-size: var(--t-xs); border-top: 0; }
.poi-table td.num, .poi-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.poi-table tr.is-hot td { background: var(--tarp); }
.poi-table .poi-name { font-weight: 650; }
.poi-sub { display: none; }
@media (max-width: 640px) {
  .poi-table { min-width: 0; }
  .poi-table .col-grid, .poi-table .col-sponsor { display: none; }
  .poi-sub { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
  .poi-table td.num, .poi-table th.num { white-space: nowrap; }
}
.poi-table .poi-name-btn { background: none; border: 0; padding: 0; font-weight: 650; cursor: pointer; text-align: left; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }

/* ---------- about ---------- */

.prose { max-width: 66ch; display: grid; gap: var(--s4); }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6) var(--s7); }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.skill-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 var(--s5); }
.skill { display: grid; grid-template-columns: 16px 1fr; gap: var(--s2); padding: var(--s2) 0; border-top: 1px solid var(--rule); font-size: var(--t-sm); align-items: start; }
.skill .icon { margin-top: 2px; }
.skill[data-status="working"] .icon { color: var(--good); }
.skill[data-status="partial"] .icon { color: var(--caution); }
.skill[data-status="missing"] .icon { color: var(--ink-3); }
.skill-name { font-weight: 600; }
.skill-status { display: block; color: var(--ink-3); font-size: var(--t-xs); }

.milestones { list-style: none; display: grid; }
.milestone { display: grid; grid-template-columns: 3rem 1fr auto; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--rule); align-items: baseline; }
.milestone-id { font-family: var(--font-display); font-weight: 800; font-size: var(--t-lg); color: var(--ink-3); line-height: 1; }
.milestone[data-status="in_progress"] .milestone-id { color: var(--caution); }
.milestone[data-status="done"] .milestone-id { color: var(--ink); }
.milestone-title { font-weight: 600; }
.milestone-detail { display: block; color: var(--ink-3); font-size: var(--t-sm); font-weight: 400; }

/* ---------- preview index ---------- */

.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s4); list-style: none; }
.preview-card { border-top: 1px solid var(--rule); padding-top: var(--s3); display: grid; gap: 4px; }
.preview-card a { font-weight: 650; }
.preview-card code, .code { font-size: var(--t-xs); color: var(--ink-3); }

/* ---------- debug strip ---------- */

.debug {
  position: fixed;
  right: 8px; bottom: 8px;
  z-index: 60;
  max-width: 24rem;
  padding: 8px 10px;
  background: rgba(12, 14, 10, 0.92);
  border: 1px solid var(--rule-strong);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-2);
  white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}

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

@media (forced-colors: active) {
  .slot-filled, .meter-fill { forced-color-adjust: none; }
  .onair-dot { forced-color-adjust: none; }
}

/* the one orchestrated moment: off air -> live */
.stage-view.is-entering { animation: stage-enter 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes stage-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.checking-view { padding: var(--s7) var(--gutter); color: var(--ink-3); min-height: 50vh; }
.preview-banner { padding: var(--s4) var(--gutter) 0; }
.preview-banner[hidden] { display: none; }
[hidden] { display: none !important; }
.rules { list-style: none; display: grid; gap: var(--s3); margin-top: var(--s2); }
.rule { display: grid; gap: 2px; padding-left: var(--s3); border-left: 2px solid var(--rule-strong); }
.rule .step-detail { grid-column: auto; font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- map page: tabs, the overview map, the live map frame ---------- */

.map-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); border-bottom: 1px solid var(--rule); margin-bottom: var(--s5); }
.map-tab {
  background: none;
  border: 0;
  padding: var(--s2) var(--s4);
  font-size: var(--t-sm);
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 0;
}
.map-tab:hover { color: var(--ink); background: var(--tarp); }
.map-tab[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.map-below {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: var(--s6) var(--s7);
  align-items: start;
  margin-top: var(--s2);
}
@media (max-width: 900px) { .map-below { grid-template-columns: minmax(0, 1fr); } }

.wmap { display: block; color: inherit; text-decoration: none; }
.wmap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-bottom: var(--s2); }
.wmap-bar-group { display: flex; gap: 2px; }
.wmap-btn { min-height: 34px; border-color: var(--rule); }
.wmap-btn.is-on { border-color: var(--caution); color: var(--ink); background: var(--tarp); }
.wmap-btn:disabled { opacity: 0.45; cursor: default; }
.wmap-help { flex: 1 1 20rem; }
.wmap-frame {
  position: relative;
  height: clamp(460px, 80vh, 880px);
  background: var(--paper);
  border-radius: 1px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
  outline-offset: 3px;
}
.wmap-mini .wmap-frame { height: auto; aspect-ratio: 1 / 1; max-height: 70vh; width: 100%; }
a.wmap:focus-visible { outline: 2px solid var(--caution); outline-offset: 3px; }
.wmap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.wmap-mini .wmap-canvas { touch-action: auto; cursor: pointer; }
.wmap-canvas.is-dragging { cursor: grabbing; }
.wmap-readout {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px;
  background: rgba(207, 198, 166, 0.92);
  color: var(--paper-ink);
  font-size: 11px; font-weight: 650;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
}
.wmap-readout.is-on { opacity: 1; }
.wmap-banner {
  position: absolute; left: 10px; top: 10px;
  max-width: calc(100% - 70px);
  padding: 4px 10px;
  background: var(--paper-ink);
  color: var(--caution);
  font-size: 12px; font-weight: 650;
}
.wmap-note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 3px 10px;
  background: rgba(42, 41, 32, 0.82);
  color: var(--ink);
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.wmap-caption { margin-top: var(--s2); max-width: 70ch; }
.wmap-host + .map-legend { margin-top: var(--s3); }

.bluemap-wrap {
  position: relative;
  height: clamp(480px, 80vh, 900px);
  background: #10130e;
  border-radius: 1px;
  overflow: hidden;
}
.bluemap-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.bluemap-note { margin-top: var(--s2); max-width: 70ch; }

/* ---------- camps, bots table ---------- */

.camp-list { list-style: none; display: grid; gap: var(--s4); }
.camp { display: grid; gap: 6px; padding-top: var(--s3); border-top: 1px solid var(--rule); }
.camp:first-child { border-top: 0; padding-top: 0; }
.camp-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.camp-name { font-weight: 650; }
.camp-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--t-xs); color: var(--ink-2); }
.camp-step { display: inline-flex; align-items: center; gap: 6px; }
.camp-step-mark { width: 10px; height: 10px; border: 1.5px solid var(--ink-3); flex: none; }
.camp-step[data-state="done"] .camp-step-mark { background: var(--ink); border-color: var(--ink); }
.camp-step[data-state="active"] .camp-step-mark { background: repeating-linear-gradient(135deg, var(--caution) 0 3px, var(--paper-ink) 3px 5px); border-color: var(--caution); }
.camp-step[data-state="active"] { color: var(--ink); }
.camp-line { font-size: var(--t-sm); color: var(--ink-2); max-width: 52ch; }
.camp-list-compact { gap: var(--s3); }
.camp-list-compact .camp-line { font-size: var(--t-xs); color: var(--ink-3); }
.fleet-camps { margin-top: var(--s5); display: grid; gap: var(--s3); }

.bot-name { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 650; }
.bot-name .icon { color: var(--ink-2); }
.bot-table { min-width: 0; }
.bot-table td.col-act, .bot-table th.col-act { text-align: right; white-space: nowrap; }
.bot-show { min-height: 28px; padding: 2px 8px; }
.bot-table .poi-sub { display: none; }
@media (max-width: 960px) {
  .bot-table .col-role, .bot-table .col-where, .bot-table .col-pos { display: none; }
  .bot-table .poi-sub { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; padding-left: 24px; }
}
@media (max-width: 560px) {
  .bot-table .col-task { display: none; }
}

/* ---------- work feed ---------- */

.work-list { list-style: none; display: grid; gap: var(--s4); }
.work-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.work-mark { width: 10px; height: 10px; margin-top: 6px; background: repeating-linear-gradient(135deg, var(--caution) 0 3px, var(--paper-ink) 3px 5px); }
.work-item[data-state="awaiting review"] .work-mark { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.work-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); }
.work-subject { font-weight: 650; }
.work-what { color: var(--ink-2); font-size: var(--t-sm); }
.work-meta { color: var(--ink-3); font-size: var(--t-xs); }

.ship-list { list-style: none; display: grid; }
.ship-item { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s2); padding: 8px 0; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.ship-item:first-child { border-top: 0; padding-top: 0; }
.ship-item .icon { color: var(--good); margin-top: 3px; }
.ship-subject { display: block; font-weight: 600; }
.ship-detail { display: block; color: var(--ink-2); font-size: var(--t-xs); }
.ship-meta { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.work-page { display: grid; gap: var(--s7); max-width: 56rem; }
.work-page .work-item { gap: var(--s4); }
.work-page .work-subject { font-size: var(--t-md); }
.work-page .ship-item { padding: 10px 0; }
.ship-day + .ship-day { margin-top: var(--s5); }
.ship-day-label { margin: var(--s4) 0 var(--s2); }
.log-item[data-kind="build"] .icon { color: var(--caution); }
.log-item[data-kind="levelup"] .icon, .log-item[data-kind="sleep"] .icon { color: var(--ink); }

.camp-waiting { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s3); }

.bot-table td.col-pos { white-space: nowrap; }

/* ---------- bot portraits (lane P2): round avatars over the role icon; only drawn when the box has the pictures ---------- */

.avatar {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%;
  width: 28px; height: 28px; background: var(--tarp-2, #2f3529); color: var(--ink-2); box-shadow: 0 0 0 1px var(--rule-strong);
}
.avatar .icon { width: 56%; height: 56%; margin: 0; }
.avatar-sm { width: 20px; height: 20px; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.has-photo .icon { visibility: hidden; }
.roster-item .avatar { margin-top: 0; }
.roster-item.has-avatar { grid-template-columns: 28px 1fr; }
.bot-name .avatar { color: var(--ink-2); }
.log-item.has-avatar { grid-template-columns: 3.75rem 20px 1fr; }
.log-item .avatar .icon { margin-top: 0; }
.site-footer [data-portrait-credit][hidden] { display: none; }
