/* The State of Agentic AI Open Source — design system (see paper/design-direction.md)
   Dark-only by commitment: the artifact is a map of points of light. */

@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-v26-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-v26-latin-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-v26-latin-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-v20-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-v20-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono-v20-latin-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0c12;
  --panel: rgba(17, 20, 29, 0.92);
  --panel-solid: #11141d;
  --edge: #232838;
  --ink: #e8eaf0;
  --dim: #9aa1b2;
  --dim2: #5c6474;
  --accent: #e8a15c;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 17px/1.62 var(--serif); overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.mono { font-family: var(--mono); }
.flex { flex: 1; }

/* ---------------------------------------------------------------- canvas */
/* wrapper pins the scene to the viewport no matter what the GL lib does to the canvas */
#mapwrap { position: fixed; inset: 0; background: var(--bg); }
#map { position: absolute !important; inset: 0; width: 100%; height: 100%; }
#mapdim { position: fixed; inset: 0; pointer-events: none; background: var(--bg);
  opacity: 0; transition: opacity 0.5s; }
@media (prefers-reduced-motion: reduce) { #mapdim { transition: none; } }
#vignette { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 62% 45%, transparent 55%, rgba(6, 8, 12, 0.55) 100%); }
body[data-mode="explore"] #vignette { display: none; }

/* ---------------------------------------------------------------- masthead */
/* hidden for the whole title page; slides down into existence once the reader
   is fully past the divider (story.js toggles .docked) */
#masthead { position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 14px 22px;
  font-family: var(--sans); font-size: 13px;
  background: var(--bg); border-bottom: 1px solid var(--edge);
  transform: translateY(-102%); will-change: transform;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1); }
#masthead.docked { transform: translateY(0); }
body[data-mode="explore"] #masthead { transform: none !important; }
@media (prefers-reduced-motion: reduce) { #masthead { transition: none; } }
#masthead .marklink { flex: none; display: flex; color: var(--ink); }
#masthead .mark { height: 16px; width: auto; aspect-ratio: 390 / 588;
  opacity: 0.85; }
#masthead .marklink:hover .mark { opacity: 1; }
#masthead .brand { font-weight: 600; letter-spacing: 0.01em; }
#masthead .brand-sub { color: var(--dim2); font-size: 11px; letter-spacing: 0.14em; }

/* ---------------------------------------------------------------- buttons */
button { font: 600 13px/1 var(--sans); color: var(--dim); cursor: pointer; }
.ghost { background: rgba(17, 20, 29, 0.7); border: 1px solid var(--edge);
  border-radius: 3px; padding: 8px 14px; backdrop-filter: blur(6px); }
.ghost:hover, .ghost[aria-pressed="true"] { color: var(--ink); border-color: #39415a; }
#modeBtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #241505; }
#modeBtn[aria-pressed="true"]:hover { filter: brightness(1.08); }
.cta { background: var(--accent); color: #241505; border: 0; border-radius: 3px;
  padding: 11px 20px; font-size: 14px; }
.cta:hover { filter: brightness(1.08); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent);
  font: inherit; font-size: 14px; }
.linklike:hover { text-decoration: underline; }
:is(button, input, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- progress rail */
#rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 30; display: flex; flex-direction: column; gap: 10px; }
#rail button { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--dim2);
  background: transparent; padding: 0; }
#rail button.on { background: var(--accent); border-color: var(--accent); }
body[data-mode="explore"] #rail { display: none; }

/* ---------------------------------------------------------------- story */
/* The narrative runs as one continuous column down the left; the map owns the rest.
   #story must NOT swallow pointer events over the map — only its content does. */
#story { position: relative; z-index: 20; pointer-events: none; }
body[data-mode="explore"] #story { display: none; }

#column { width: min(560px, 94vw); pointer-events: auto;
  background: rgba(10, 12, 18, 0.955);
  border-right: 1px solid var(--edge); backdrop-filter: blur(12px);
  box-shadow: 28px 0 90px rgba(0, 0, 0, 0.38); }

.step { min-height: 100vh; display: flex; align-items: center; padding: 12vh 58px; }

.step .panel { width: 100%; }
.mapnote { font-family: var(--sans); font-size: 12.5px; color: var(--dim2); }
.mapnote::before { content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: -1px; }

/* the 25-region index inside the territory step — hover lights the region on
   the map, click pins it (regions.js). Tracks are minmax(0,1fr): a plain 1fr
   floors at min-content, so the two longest labels blew the column open
   instead of ellipsizing. Height-capped with internal scroll for short
   viewports (all rows fit without it on a normal screen). */
#regions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px 14px; margin: 16px 0 14px;
  max-height: 42vh; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
.region { display: flex; align-items: center; gap: 7px; padding: 3px 6px;
  border: 0; background: none; border-radius: 3px; cursor: pointer; min-width: 0;
  font: 400 12px/1.5 var(--sans); color: var(--dim); text-align: left; }
.region:hover, .region:focus-visible { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.region.on { background: rgba(232, 161, 92, 0.13); color: var(--ink); }
.region .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.region .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.region .ct { font: 400 10px var(--mono); color: var(--dim2); }
@media (max-width: 480px) { #regions { grid-template-columns: 1fr; } }

/* sub-clusters unfolded under a pinned region (regions.js) */
.subregions { grid-column: 1 / -1; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px 14px;
  margin: 2px 0 6px; padding: 4px 0 4px 10px;
  border-left: 2px solid var(--edge); }
.region.sub { font-size: 11.5px; }
.region.sub .sw { width: 6px; height: 6px; opacity: 0.75; }
@media (max-width: 480px) { .subregions { grid-template-columns: 1fr; } }

/* the browse-all-120 problem list (steps.js) */
.browse { font-family: var(--sans); margin: 4px 0 12px; }
.browse summary { cursor: pointer; font-size: 12.5px; color: var(--accent); }
.browse summary:hover { text-decoration: underline; }
#probList { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px 14px; margin: 10px 0 2px;
  max-height: 34vh; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
@media (max-width: 480px) { #probList { grid-template-columns: 1fr; } }

/* map-recolor legends (language / pulse) — dots match the map exactly */
.maplegend { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 6px 0 0 15px;
  font: 400 12px var(--sans); color: var(--dim); }
.maplegend .sw, .leg .sw { display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* the redundancy-census set toggle (neardup step) */
.dupchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }


/* the fragmentation ladder (xlens step) */
#xlensRows { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 14px 0; }
.fragrow, .fraghead { display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 38px 40px;
  gap: 10px; align-items: center; }
.fragrow { border: 0; background: none; border-radius: 3px; padding: 4px 6px;
  cursor: pointer; font: 400 12px/1.5 var(--sans); color: var(--dim); text-align: left; }
.fragrow:hover, .fragrow:focus-visible { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.fragrow.on { background: rgba(232, 161, 92, 0.13); color: var(--ink); }
.fragrow .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fragrow .fbar { height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 3px;
  overflow: hidden; }
.fragrow .fbar i { display: block; height: 100%; background: var(--accent);
  opacity: 0.85; border-radius: 3px; }
.fragrow.on .fbar i { opacity: 1; }
.fragrow .fv, .fragrow .fn { font-size: 10.5px; color: var(--dim2); text-align: right; }
.fragrow.on .fv { color: var(--accent); }
.fraghead { padding: 0 6px 2px; font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim2); }
.fraghead .fbar { background: none; height: auto; font-size: 9px; }
.fraghead .fv, .fraghead .fn { text-align: right; }

.plate { color: var(--dim2); font-size: 11px; letter-spacing: 0.16em; margin: 0 0 14px; }
.step h2 { font: 500 27px/1.25 var(--serif); margin: 0 0 14px; letter-spacing: -0.005em; }
.step p { margin: 0 0 13px; color: #c9cedb; }
.step p:last-child { margin-bottom: 0; }
.step em { font-style: italic; }
.step .fine { font-family: var(--sans); font-size: 13px; color: var(--dim); }
.stat { color: var(--accent); font-weight: 500; font-size: 0.94em; }

/* hard separation between the intro and the story column */
.divider { height: 2px; background: var(--edge); width: 100%; pointer-events: none; }
#story.past-hero .hero-inner { opacity: 0; pointer-events: none; transition: opacity 0.25s; }
@media (prefers-reduced-motion: reduce) { #story.past-hero .hero-inner { transition: none; } }

/* hero — an OPAQUE title plate: the cloud behind the title is a baked picture
   (assets/hero-bg.webp, regenerate with site/bake_hero.py); the live canvas
   only ever shows below the divider */
.step.hero { min-height: 100vh; align-items: center; justify-content: center; padding: 8vh 20px;
  background: var(--bg) url('assets/hero-bg.webp') center / cover no-repeat; }
.hero-inner { position: relative; z-index: 0; /* own stacking context so the
  ::before scrim sits above the section's baked-picture background */
  width: min(720px, 90vw); pointer-events: auto;
  text-align: center; padding: 56px 30px; }
.hero-inner::before { content: ''; position: absolute; inset: -12% -18%; z-index: -1;
  background: radial-gradient(closest-side, rgba(6, 8, 12, 0.88) 45%,
    rgba(6, 8, 12, 0.62) 70%, transparent 100%); }
.hero-brand { color: inherit; text-decoration: none; white-space: nowrap; }
.hero-brand:hover { color: var(--ink); }
.hero-title { font: 500 clamp(26px, 3.4vw, 40px)/1.25 var(--serif);
  margin: 0 0 26px; letter-spacing: 0.01em; }
.nowrap { white-space: nowrap; }
/* selector must out-rank `.step p` or the auto margins lose and the box
   hugs the left edge (the long-standing off-center bug) */
.hero-inner .hero-meta { color: var(--dim); font-size: 12.5px;
  letter-spacing: 0.28em; margin: 0 auto; }
.hero-inner .count { color: var(--accent); font-weight: 500; }
.hero-inner .scrollhint { color: var(--dim2); font-size: 11px; letter-spacing: 0.3em;
  margin-top: 7vh; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scrollhint { animation: none; } }

/* ---------------------------------------------------------------- chart */
.chart { margin: 18px 0 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--edge); stroke-width: 1; }
.chart .tick, .chart .axlab { font: 400 11px var(--mono); fill: var(--dim2); }
.chart .dline { stroke: var(--accent); stroke-width: 2; fill: none;
  stroke-linejoin: round; stroke-linecap: round; }
.chart .darea { fill: var(--accent); opacity: 0.1; }
.chart .dband { fill: var(--accent); opacity: 0.07; }
.chart .ddot { fill: var(--accent); stroke: var(--panel-solid); stroke-width: 2; }
.chart .dlabel { font: 500 12px var(--mono); fill: var(--ink); }
.chart .xh { stroke: var(--dim2); stroke-width: 1; }
/* timeline scrubber (authorship chart) */
.chart .dline-future { opacity: 0.28; }
.chart .scrub-guide { stroke: var(--dim2); stroke-width: 1; opacity: 0.7; }
.chart .handle { cursor: grab; }
.chart .handle:active { cursor: grabbing; }
.chart .hitarea { touch-action: none; cursor: ew-resize; }
.chart figcaption, .chart .cap { font: 400 11.5px/1.5 var(--sans); color: var(--dim2); margin-top: 8px; }
.chart details { font: 400 12px var(--sans); color: var(--dim); margin-top: 6px; }
.chart summary { cursor: pointer; font-size: 11px; color: var(--dim2); }
.chart table { border-collapse: collapse; margin-top: 6px; font-family: var(--mono); font-size: 11px; }
.chart td, .chart th { border: 1px solid var(--edge); padding: 3px 8px; text-align: right; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; display: none;
  background: #060810f2; border: 1px solid var(--edge); border-radius: 3px;
  padding: 6px 9px; font: 400 11.5px var(--mono); color: var(--ink); }

/* ---------------------------------------------------------------- tooltip */
#tooltip { position: fixed; z-index: 50; pointer-events: none; display: none;
  max-width: 300px; background: #060810f2; border: 1px solid var(--edge);
  border-radius: 3px; padding: 8px 11px; font-family: var(--sans); font-size: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }
#tooltip .tn { font-weight: 600; font-size: 13px; }
#tooltip .ts { color: var(--dim); margin-top: 2px; }
#tooltip .tg { margin-top: 4px; font-family: var(--mono); font-size: 10.5px;
  color: var(--dim2); letter-spacing: 0.04em; }
#tooltip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: -1px; }

/* ---------------------------------------------------------------- detail panel */
#detail { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45;
  width: min(400px, 94vw); background: var(--panel); border-left: 1px solid var(--edge);
  backdrop-filter: blur(10px); overflow-y: auto; padding: 22px 26px;
  transform: translateX(8px); opacity: 0; transition: transform 0.25s, opacity 0.25s; }
#detail.on { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { #detail { transition: none; } }
#detailClose { position: absolute; top: 12px; right: 14px; font-size: 16px; padding: 4px 10px; }
#detail h2 { font: 500 22px/1.2 var(--serif); margin: 4px 0 2px; word-break: break-word; }
#detail .owner { font-family: var(--sans); font-size: 13px; color: var(--dim); margin: 0 0 12px; }
#detail .lede { font-size: 15.5px; line-height: 1.55; color: #c9cedb; margin: 0 0 14px; }
#detail .statrow { font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
#detail .statrow b { color: var(--ink); font-weight: 500; }
#detail .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
#detail .tag { font: 400 10.5px var(--mono); letter-spacing: 0.06em; color: var(--dim);
  border: 1px solid var(--edge); border-radius: 2px; padding: 3px 8px; }
#detail .tag .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 5px; }
#detail h4 { font: 600 10.5px var(--sans); letter-spacing: 0.14em; color: var(--dim2);
  text-transform: uppercase; margin: 18px 0 8px; }
#detail .nbrs { display: flex; flex-direction: column; gap: 4px; }
#detail .nbr { display: flex; gap: 8px; align-items: baseline; font-family: var(--sans);
  font-size: 12.5px; color: var(--dim); background: none; border: 0; padding: 3px 2px;
  text-align: left; cursor: pointer; font-weight: 400; }
#detail .nbr:hover { color: var(--ink); }
#detail .nbr .st { font-family: var(--mono); font-size: 10.5px; color: var(--dim2); }
#detail .gh { display: inline-block; margin-top: 16px; font-family: var(--sans);
  font-size: 13px; color: var(--accent); text-decoration: none; }
#detail .gh:hover { text-decoration: underline; }
#detail .triage { font-family: var(--sans); font-size: 12px; color: var(--dim);
  border-left: 2px solid var(--accent); padding: 2px 0 2px 10px; margin: 0 0 14px; }

/* ---------------------------------------------------------------- explore ui */
#exploreUi { position: fixed; z-index: 35; inset: 0; pointer-events: none; }
#exploreRail { position: absolute; left: 0; top: 54px; bottom: 0; width: 268px;
  pointer-events: auto; background: var(--panel); border-right: 1px solid var(--edge);
  backdrop-filter: blur(10px); overflow-y: auto; padding: 4px 0 20px; }
#exploreRail section { padding: 14px 18px 6px; border-bottom: 1px solid var(--edge); }
#exploreRail h3 { font: 500 10.5px var(--mono); letter-spacing: 0.16em; color: var(--dim2);
  margin: 0 0 10px; }
#exploreRail .hint { font: 400 11px var(--sans); letter-spacing: 0; color: var(--dim2);
  text-transform: none; }
#legend .row { display: flex; align-items: center; gap: 8px; padding: 3px 4px;
  border-radius: 3px; cursor: pointer; font-family: var(--sans); font-size: 12px; }
#legend .row:hover { background: rgba(255, 255, 255, 0.04); }
#legend .row.off { opacity: 0.35; }
#legend .sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
#legend .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--dim); }
#legend .row:hover .lbl { color: var(--ink); }
#legend .ct { font-family: var(--mono); font-size: 10.5px; color: var(--dim2); }
/* micro-cluster / problem-lens modes list every cluster — cap and scroll */
#legend.big { max-height: 44vh; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: var(--edge) transparent; }
#search { width: 100%; background: rgba(10, 12, 18, 0.8); border: 1px solid var(--edge);
  border-radius: 3px; color: var(--ink); font: 400 13px var(--sans); padding: 8px 10px; }
#search::placeholder { color: var(--dim2); }
#hud { font: 400 11px var(--mono); color: var(--dim2); margin: 10px 0; min-height: 14px; }
#resetBtn { width: 100%; }

/* ---------------------------------------------------------------- charts: bars & lines */
.chart .bar { fill: #55607055; stroke: none; }
.chart .bar:hover { fill: #55607088; }
.chart .bar.accent { fill: var(--accent); opacity: 0.88; }
.chart .bar.accent:hover { opacity: 1; }
.chart .sline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .sdot { stroke: var(--panel-solid); stroke-width: 2; }
.chart .leader { stroke: var(--dim2); stroke-width: 1; opacity: 0.6; }
/* pickable bars: click pins the datum on the map (chart.js onPick) */
.chart .bar.pickable, .chart .hrow.pickable rect, .chart .pslot.pickable rect { cursor: pointer; }
.chart .pslot.picked .bar { stroke: var(--ink); stroke-width: 1.2; }
.chart .bar.picked { stroke: var(--ink); stroke-width: 1.4; fill-opacity: 1;
  fill: #556070aa; }
.chart .bar.accent.picked { fill: var(--accent); opacity: 1; }
/* h-bars: label line above the bar (full column width — never overflows) */
.chart .hlab { font: 400 11.5px var(--sans); fill: var(--dim); }
.chart .hrow:hover .hlab, .chart .hrow.picked .hlab { fill: var(--ink); }
.chart .hrow.picked .bar { stroke: var(--ink); stroke-width: 1.2; }
/* chart legend (paired bars) */
.leg { display: flex; gap: 16px; margin: 12px 0 2px;
  font: 400 11.5px var(--sans); color: var(--dim); }
/* table twins can be wide — scroll inside their box, never out of the column */
.chart details .twrap { max-width: 100%; overflow-x: auto; }
.chart td:first-child, .chart th:first-child { text-align: left; }

/* ---------------------------------------------------------------- stat tiles */
.tiles { display: flex; gap: 10px; margin: 14px 0; }
.tile { flex: 1; border: 1px solid var(--edge); border-radius: 4px; padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile .tv { font-size: 22px; font-weight: 500; color: var(--accent); line-height: 1.1; }
.tile .tl { font: 400 11px/1.35 var(--sans); color: var(--dim); }

/* ---------------------------------------------------------------- chips */
#cats, #vertSubs { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 14px 0; }
#xlensChips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.chip { font: 600 12px var(--sans); color: var(--dim); background: none;
  border: 1px solid var(--edge); border-radius: 20px; padding: 6px 13px; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: #39415a; }
.chip.on { background: rgba(232, 161, 92, 0.14); border-color: var(--accent); color: var(--ink); }
.chip.tiny { font-weight: 400; font-size: 11px; padding: 4px 10px; }

/* ---------------------------------------------------------------- method / gravity tables */
.mtable { border-collapse: collapse; margin: 14px 0; width: 100%;
  font: 400 12.5px/1.5 var(--sans); color: var(--dim); }
.mtable th { font: 500 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim2); text-align: left; }
.mtable td, .mtable th { border-bottom: 1px solid var(--edge); padding: 6px 12px 6px 0; }
.mtable td b { color: var(--ink); font-weight: 600; }
.mtable td.mono { text-align: right; color: var(--ink); }
.mtable .accentrow td { color: var(--ink); }
.mtable .accentrow td.mono { color: var(--accent); }
/* pickable table rows (named-agent table): hover isolates, click pins */
.mtable .pickrow { cursor: pointer; }
.mtable .pickrow:hover td { color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.mtable .pickrow.on td { background: rgba(232, 161, 92, 0.1); color: var(--ink); }
.mtable .pickrow.on td.mono { color: var(--accent); }

/* ---------------------------------------------------------------- appendix */
#appendix { padding: 10vh 58px 12vh; }
#appendix h2 { font: 500 24px/1.25 var(--serif); margin: 0 0 14px; }
#appendix p { margin: 0 0 13px; color: #b8bdc9; font-size: 15px; line-height: 1.62; }
#appendix b { color: var(--ink); font-weight: 500; }
#appendix .credits { border-top: 1px solid var(--edge); padding-top: 14px; margin-top: 22px;
  font-family: var(--sans); font-size: 12px; color: var(--dim2); }
#appendix .credits .mark { display: inline-block; height: 14px; width: auto;
  aspect-ratio: 390 / 588; vertical-align: -2px; margin-right: 9px;
  color: var(--dim); }
#appendix .credits a { color: var(--dim); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: var(--dim2); }
#appendix .credits a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- explore rail extras */
.modes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.fgroup { margin-bottom: 10px; }
.fgroup > label { display: block; font: 500 9.5px var(--mono); letter-spacing: 0.14em;
  color: var(--dim2); margin-bottom: 5px; }
.fgroup .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fselect { width: 100%; background: rgba(10, 12, 18, 0.8); border: 1px solid var(--edge);
  border-radius: 3px; color: var(--ink); font: 400 12px var(--sans); padding: 6px 8px; }
.deep { display: flex; align-items: center; gap: 7px; margin: 9px 0 0;
  font: 400 12px var(--sans); color: var(--dim); cursor: pointer; }
.deep input { accent-color: var(--accent); }

/* bake mode (?bare=1): nothing but the map, for the hero-bg screenshot */
.bare #masthead, .bare #story, .bare #rail, .bare #vignette,
.bare #exploreUi, .bare #detail, .bare #mapdim, .bare #tooltip { display: none !important; }

/* ---------------------------------------------------------------- mobile */
.mobilenote { display: none; }
@media (max-width: 900px) {
  .mobilenote { display: block; font: 400 12.5px/1.5 var(--sans); color: var(--dim2);
    margin: 18px auto 0; max-width: 320px; }
  #column { width: 100%; border-right: 0; }
  #exploreRail { width: min(86vw, 300px); }
  .hero-title { font-size: 24px; }
  .hero-inner .hero-meta { font-size: 11px; letter-spacing: 0.22em; }
  #rail { display: none; }
}
