/* Galaxy — the bar industry as a star map.
   Brand palette lifted straight from jlittrell.com: navy ground, cream light, coral for action,
   green for confirmed. Token names are kept from the earlier build so every view inherits the
   rebrand without touching its markup. */

:root {
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.2vw, 3rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 14px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shell-max: 1400px;
}

/* Night shift (default) — jlittrell.com dark */
:root, [data-theme='dark'] {
  --bg: #07223d;
  --bg-deep: #04162a;
  --surface: #0a2a4a;
  --surface-2: #0e3458;
  --surface-3: #154270;
  --border: rgba(244, 236, 220, 0.14);
  --border-soft: rgba(244, 236, 220, 0.08);
  --text: #f4ecdc;
  --muted: rgba(244, 236, 220, 0.66);
  --faint: rgba(244, 236, 220, 0.42);
  --brass: #eb4171;          /* brand coral: action, and the highlight on a sourced fact */
  --brass-dim: #a82c50;
  --brass-ink: #ffffff;
  --cool: #8fb4d8;           /* steel blue: uncertainty, never mistaken for a fact */
  --cool-dim: #4d7ba8;
  --danger: #ff6b6b;
  --ok: #52ca28;             /* brand green: corroborated by more than one source */
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --graph-bg: #05192e;
}

/* Day shift — jlittrell.com light */
[data-theme='light'] {
  --bg: #f4ecdc;
  --bg-deep: #ece2cd;
  --surface: #ffffff;
  --surface-2: #fbf6ec;
  --surface-3: #f2e9d6;
  --border: rgba(7, 34, 61, 0.16);
  --border-soft: rgba(7, 34, 61, 0.10);
  --text: #07223d;
  --muted: rgba(7, 34, 61, 0.66);
  --faint: rgba(7, 34, 61, 0.42);
  --brass: #d12d5d;
  --brass-dim: #b32049;
  --brass-ink: #ffffff;
  --cool: #3f6c99;
  --cool-dim: #6491bd;
  --danger: #b3261e;
  --ok: #3ea015;
  --shadow: 0 18px 40px rgba(7, 34, 61, 0.16);
  --graph-bg: #efe4cf;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: var(--text-base); line-height: 1.55;
  font-feature-settings: 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; }
p { margin: 0 0 var(--space-4); }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 2px; }
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: var(--space-8) 0; }

.skip-link {
  position: fixed; left: var(--space-4); top: -60px; z-index: 90;
  background: var(--brass); color: var(--brass-ink); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--space-3); }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-3) clamp(var(--space-4), 3vw, var(--space-10));
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: baseline; gap: var(--space-2); text-decoration: none; color: var(--brass); }
.brand .logo { flex: none; align-self: center; }
.brand-name { font-family: var(--serif); font-size: var(--text-lg); color: var(--text); letter-spacing: .01em; }
.brand-tag {
  font-size: var(--text-xs); color: var(--faint); text-transform: uppercase; letter-spacing: .12em;
  border: 1px solid var(--border); border-radius: 999px; padding: 1px var(--space-2);
}
.nav { display: flex; gap: var(--space-5); margin-left: auto; font-size: var(--text-sm); }
.nav a { text-decoration: none; color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--text); border-bottom-color: var(--border); }
.nav a[aria-current='page'] { color: var(--text); border-bottom-color: var(--brass); }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2); }
.nav-toggle { display: none; }
.mobile-nav {
  position: sticky; top: 57px; z-index: 39; display: grid; gap: var(--space-1);
  padding: var(--space-3) var(--space-4); background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a { text-decoration: none; padding: var(--space-2); border-radius: var(--radius-sm); color: var(--text); }
.mobile-nav a:hover { background: var(--surface-2); }

main { flex: 1; }
.view { max-width: var(--shell-max); margin: 0 auto; padding: clamp(var(--space-5), 3vw, var(--space-10)); width: 100%; }
.view--wide { max-width: none; padding: 0; }
.footer {
  border-top: 1px solid var(--border-soft); padding: var(--space-6) clamp(var(--space-4), 3vw, var(--space-10));
  color: var(--faint); font-size: var(--text-xs);
}
.footer p { margin: 0 0 var(--space-1); }
.footer a { color: var(--muted); }

/* ---------- primitives ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  font-size: var(--text-sm); cursor: pointer; text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--brass-dim); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 500; }
.btn-primary:hover { background: var(--brass); border-color: var(--brass); filter: brightness(1.06); }
.btn-danger { border-color: color-mix(in oklab, var(--danger) 45%, var(--border)); color: var(--danger); background: transparent; }
.btn-danger:hover { background: color-mix(in oklab, var(--danger) 12%, transparent); border-color: var(--danger); }
.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); padding: var(--space-5);
}
.eyebrow {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .16em;
  color: var(--faint); margin-bottom: var(--space-2);
}
.page-title { font-family: var(--serif); font-size: var(--text-xl); font-weight: 400; }
.lede { color: var(--muted); max-width: 68ch; }
.section-title { font-size: var(--text-lg); font-family: var(--serif); font-weight: 400; margin-bottom: var(--space-3); }
.hairline { border-top: 1px solid var(--border-soft); margin: var(--space-6) 0; }
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--serif); font-size: var(--text-lg); margin: var(--space-8) 0 var(--space-3); font-weight: 400; }
.prose ul { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.prose li { margin-bottom: var(--space-2); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.serif { font-family: var(--serif); }
.nowrap { white-space: nowrap; }

/* chips + tags */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border: 1px solid var(--border); border-radius: 999px;
  padding: var(--space-1) var(--space-3); font-size: var(--text-xs); color: var(--muted);
  background: transparent; cursor: pointer;
}
.chip:hover { border-color: var(--brass-dim); color: var(--text); }
.chip[aria-pressed='true'], .chip.is-on { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--border); color: var(--muted); }
.chip--ghost {
  border-style: dashed; border-color: var(--cool-dim); color: var(--cool);
  background: color-mix(in oklab, var(--cool) 8%, transparent);
}
.chip--fact { border-color: var(--brass-dim); color: var(--brass); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.badge {
  font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase;
  padding: 1px var(--space-2); border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--faint);
}
.badge--corrob { border-color: var(--brass-dim); color: var(--brass); }
.badge--single { border-color: var(--border); color: var(--muted); }
.badge--derived { border-style: dashed; border-color: var(--cool-dim); color: var(--cool); }
/* "waiting", "held", "this page only" — states that are recorded but not published. Cool blue,
   not green: green has to mean one thing on this site, and that thing is "it is on the map". */
.badge--local { border-color: var(--cool-dim, var(--border)); color: var(--cool); }
.badge--ok { border-color: var(--ok); color: var(--ok); }

/* A save that did not land. Said in the copy too — colour is never the only signal. */
.is-warn { color: var(--danger); }

/* source links */
.src-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.src {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); color: var(--muted); text-decoration: none;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 1px var(--space-2); background: var(--surface-2); max-width: 100%;
}
.src:hover { color: var(--text); border-color: var(--brass-dim); }
.src-glyph {
  width: 14px; height: 14px; flex: none; display: grid; place-items: center;
  border-radius: 2px; background: var(--surface-3); color: var(--brass);
  font-size: 9px; font-family: var(--mono); text-transform: uppercase;
}
.src-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.no-src { font-size: var(--text-xs); color: var(--cool); border: 1px dashed var(--cool-dim); border-radius: var(--radius-sm); padding: 1px var(--space-2); }

/* forms */
input[type='text'], input[type='search'], input[type='url'], input[type='email'],
input[type='number'], select, textarea {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
  font: inherit; font-size: var(--text-sm); width: 100%;
}
textarea { min-height: 80px; resize: vertical; }
label { font-size: var(--text-xs); color: var(--faint); text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: var(--space-2); }
.field { margin-bottom: var(--space-4); }
label.switch { font-size: var(--text-sm); color: var(--muted); }

/* notice blocks */
.notice {
  border-left: 2px solid var(--brass-dim); padding: var(--space-3) var(--space-4);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm); color: var(--muted);
}
.notice--cool { border-left-color: var(--cool-dim); }
.notice p:last-child { margin-bottom: 0; }

.empty {
  border: 1px dashed var(--border); border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-5); text-align: center; color: var(--muted);
}
.empty h3 { font-family: var(--serif); font-weight: 400; margin-bottom: var(--space-2); }

/* boot / skeleton */
.boot { display: grid; place-items: center; gap: var(--space-4); padding: var(--space-24) 0; }
.boot-bars { display: flex; gap: 6px; }
.boot-bars i { width: 6px; height: 26px; background: var(--surface-3); border-radius: 2px; animation: pour 1.1s var(--ease) infinite; }
.boot-bars i:nth-child(2) { animation-delay: .12s } .boot-bars i:nth-child(3) { animation-delay: .24s } .boot-bars i:nth-child(4) { animation-delay: .36s }
@keyframes pour { 0%, 100% { transform: scaleY(.4); background: var(--surface-3) } 50% { transform: scaleY(1); background: var(--brass-dim) } }
.boot-text { color: var(--faint); font-size: var(--text-sm); }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shim 1.4s linear infinite; border-radius: var(--radius-sm); }
@keyframes shim { to { background-position: -200% 0 } }

/* ---------- graph explorer ---------- */
.graph-shell {
  display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px;
  height: calc(100vh - 58px); min-height: 560px;
}
.graph-rail, .graph-panel {
  overflow-y: auto; padding: var(--space-5); background: var(--bg);
  border-inline: 1px solid var(--border-soft);
}
.graph-rail { border-left: 0; }
.graph-panel { border-right: 0; background: var(--bg-deep); }
.graph-stage { position: relative; background: var(--graph-bg); overflow: hidden; }
.graph-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* Where you are, and the way back out. The map has three depths, so the one thing that must never
   be in doubt is which one you are standing on. */
.drill-crumbs {
  position: absolute; left: var(--space-4); top: var(--space-4); z-index: 3;
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  max-width: calc(100% - 9rem);
  background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}
.crumb {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--serif); font-size: var(--text-sm); line-height: 1.2;
  color: var(--cool); text-decoration: none; border-bottom: 1px solid transparent;
}
.crumb:hover { color: var(--text); border-bottom-color: var(--brass); }
.crumb.is-here { color: var(--text); font-weight: 600; cursor: default; }
.crumb-sep { color: var(--faint); font-size: var(--text-sm); }
.crumb:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
@media (max-width: 640px) {
  .drill-crumbs { left: var(--space-3); top: var(--space-3); padding: var(--space-2); max-width: calc(100% - 1.5rem); }
  .crumb, .crumb-sep { font-size: var(--text-xs); }
}
.graph-hud {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center;
  font-size: var(--text-xs); color: var(--faint);
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
  max-width: calc(100% - 6rem);   /* never slide under the zoom buttons */
}
.graph-count {
  position: absolute; right: var(--space-4); top: var(--space-4);
  text-align: right; font-size: var(--text-xs); color: var(--faint); line-height: 1.5;
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3); pointer-events: none;
}
.legend-key { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend-line { width: 22px; height: 0; border-top: 1.5px solid var(--text); }
.legend-line--thin { border-top-width: 1px; border-color: var(--brass-dim); }
.legend-line--dash { border-top: 1px dashed var(--cool); }
.legend-line--dim { border-top-width: 1px; border-color: var(--muted); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text); box-shadow: 0 0 6px var(--text); }
.legend-sq { width: 9px; height: 9px; background: transparent; border: 1.5px solid var(--brass); transform: rotate(45deg); }
.graph-zoom { position: absolute; right: var(--space-4); bottom: var(--space-4); display: grid; gap: var(--space-2); }
.graph-zoom .btn { background: color-mix(in oklab, var(--bg) 80%, transparent); }
.rail-group { margin-bottom: var(--space-6); }
.rail-group h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: var(--space-3); }
.switch, .switch span { text-transform: none; letter-spacing: 0; }
.switch { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); margin-bottom: var(--space-2); cursor: pointer; }
.switch input { accent-color: var(--brass); margin-top: 3px; }
.range-wrap { display: flex; align-items: center; gap: var(--space-2); }
input[type='range'] { accent-color: var(--brass); width: 100%; }
.node-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.node-list li { border-bottom: 1px solid var(--border-soft); }
.node-list li:last-child { border-bottom: 0; }
.node-list button {
  display: flex; justify-content: space-between; gap: var(--space-2); width: 100%; text-align: left;
  background: transparent; border: 0; padding: var(--space-2) var(--space-3); cursor: pointer; font-size: var(--text-sm);
}
.node-list button:hover, .node-list button[aria-current='true'] { background: var(--surface-2); }
.node-list .nl-deg { color: var(--faint); font-size: var(--text-xs); font-family: var(--mono); }
.panel-name { font-family: var(--serif); font-size: var(--text-lg); font-weight: 400; margin-bottom: var(--space-1); }
.panel-block { margin-bottom: var(--space-5); }
.panel-block h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: var(--space-2); }

/* ---------- stop / timeline rows ---------- */
.stops { list-style: none; margin: 0; padding: 0; }
.stop {
  position: relative; padding: var(--space-4) 0 var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-soft);
}
.stop::before {
  content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--border-soft);
}
.stop::after {
  content: ''; position: absolute; left: 0; top: var(--space-5); width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--brass-dim);
}
.stop--undated::after { border-color: var(--cool-dim); border-style: dashed; }
.stop:last-child::before { bottom: 50%; }
.stop-head { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: baseline; }
.stop-venue { font-family: var(--serif); font-size: var(--text-lg); font-weight: 400; text-decoration: none; border-bottom: 1px solid var(--border); }
.stop-venue:hover { border-bottom-color: var(--brass); }
.stop-role { color: var(--muted); font-size: var(--text-sm); }
.stop-years { font-family: var(--mono); font-size: var(--text-xs); color: var(--brass); letter-spacing: .04em; }
.stop-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.help-complete {
  font-size: var(--text-xs); background: transparent; border: 1px dashed var(--cool-dim);
  color: var(--cool); border-radius: var(--radius-sm); padding: 1px var(--space-2); cursor: pointer;
}
.help-complete:hover { background: color-mix(in oklab, var(--cool) 14%, transparent); }

.person-header { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; justify-content: space-between; }
.person-actions {
  position: sticky; top: 66px; z-index: 20; display: flex; flex-wrap: wrap; gap: var(--space-2);
  background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(6px);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--border-soft); margin-bottom: var(--space-5);
}
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(var(--space-6), 4vw, var(--space-12)); }
.rel-group { margin-bottom: var(--space-5); }
.rel-group h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: var(--space-2); }
.rel { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-soft); }
.rel-name { font-family: var(--serif); font-size: var(--text-base); text-decoration: none; border-bottom: 1px solid var(--border); }
.rel-name:hover { border-bottom-color: var(--brass); }

/* venue timeline */
.vt-hint { display: none; }
.vt-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--surface); }
.vt { min-width: 620px; padding: var(--space-5); }
.vt-axis { position: relative; height: 22px; margin-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.vt-tick { position: absolute; top: 0; font-size: var(--text-xs); color: var(--faint); font-family: var(--mono); transform: translateX(-50%); }
.vt-tick::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 1px; height: 6px; background: var(--border); }
.vt-row { position: relative; height: 34px; display: flex; align-items: center; }
.vt-row + .vt-row { border-top: 1px dashed var(--border-soft); }
.vt-bar {
  position: absolute; height: 20px; border-radius: 3px; display: flex; align-items: center;
  padding: 0 var(--space-2); font-size: var(--text-xs); white-space: nowrap; overflow: hidden;
  background: color-mix(in oklab, var(--brass) 26%, var(--surface-2)); border: 1px solid var(--brass-dim);
  color: var(--text); text-decoration: none;
}
.vt-bar--slim { overflow: visible; padding: 0; }
.vt-cap {
  position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  font-size: var(--text-xs); color: var(--muted); white-space: nowrap;
}
.vt-cap--flip { left: auto; right: calc(100% + 6px); }
.vt-bar:hover { background: color-mix(in oklab, var(--brass) 42%, var(--surface-2)); }
.vt-bar--point { border-style: dashed; }
.vt-open { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--brass-dim); }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.venue-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-4); text-decoration: none; display: block; }
.venue-card:hover { border-color: var(--brass-dim); }
.venue-card h3 { font-family: var(--serif); font-weight: 400; font-size: var(--text-base); margin-bottom: var(--space-1); }
.lineage { border-left: 2px solid var(--brass-dim); padding-left: var(--space-4); margin: 0 0 var(--space-4); }
.lineage p { font-family: var(--serif); font-size: var(--text-base); margin-bottom: var(--space-2); }

/* path finder */
.path-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); align-items: end; }
.hops { list-style: none; margin: var(--space-6) 0 0; padding: 0; }
.hop { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: var(--space-3); padding-bottom: var(--space-5); position: relative; }
.hop::before { content: ''; position: absolute; left: 16px; top: 30px; bottom: 0; width: 1px; background: var(--border); }
.hop:last-child::before { display: none; }
.hop-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--brass-dim); color: var(--brass); font-family: var(--mono); font-size: var(--text-xs);
  background: var(--bg);
}
.hop--derived .hop-num { border-color: var(--cool-dim); border-style: dashed; color: var(--cool); }
.degrees { font-family: var(--serif); font-size: var(--text-xl); color: var(--brass); }

/* ---------- swipe onboarding ---------- */
.onb { max-width: 720px; margin: 0 auto; }
.onb-progress { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); font-size: var(--text-xs); color: var(--faint); }
.onb-track { flex: 1; height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.onb-fill { height: 100%; background: var(--brass); transition: width .4s var(--ease); }
.onb-step-label { text-transform: uppercase; letter-spacing: .14em; }
.deck { position: relative; height: 430px; margin-bottom: var(--space-5); }
.deck-card {
  position: absolute; inset: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow);
  display: flex; flex-direction: column; touch-action: none; will-change: transform;
  overflow-y: auto; overscroll-behavior: contain;
}
.deck-card--back { transform: scale(.96) translateY(14px); opacity: .5; pointer-events: none; }
.deck-card--back2 { transform: scale(.92) translateY(28px); opacity: .25; pointer-events: none; }
.deck-card.is-dragging { transition: none; }
.deck-card.is-settling { transition: transform .3s var(--ease), opacity .3s var(--ease); }
.dc-kicker { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: var(--space-3); }
.dc-name { font-family: var(--serif); font-size: var(--text-xl); font-weight: 400; margin-bottom: var(--space-2); }
.dc-sub { color: var(--muted); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.dc-why {
  margin-top: auto; border-top: 1px solid var(--border-soft); padding-top: var(--space-3);
  font-size: var(--text-xs); color: var(--faint);
}
.dc-why strong { color: var(--muted); font-weight: 500; }
.dc-stamp {
  position: absolute; top: var(--space-6); font-size: var(--text-lg); font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .1em; padding: var(--space-1) var(--space-3);
  border: 2px solid currentColor; border-radius: var(--radius-sm); opacity: 0; pointer-events: none;
  transition: opacity .12s linear;
}
.dc-stamp--yes { right: var(--space-6); color: var(--ok); transform: rotate(8deg); }
.dc-stamp--no { left: var(--space-6); color: var(--danger); transform: rotate(-8deg); }
.dc-stamp--up { left: 50%; top: var(--space-4); transform: translateX(-50%); color: var(--cool); }
.deck-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.kbd-hint { text-align: center; font-size: var(--text-xs); color: var(--faint); margin-top: var(--space-3); }
kbd {
  font-family: var(--mono); font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 3px; padding: 0 4px; color: var(--muted); background: var(--surface-2);
}
.typeahead { position: relative; }
.ta-list {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); list-style: none; margin: 0; padding: 0;
  box-shadow: var(--shadow);
}
.ta-list li button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: var(--space-2) var(--space-3); cursor: pointer; font-size: var(--text-sm); }
.ta-list li button:hover, .ta-list li button.is-active { background: var(--surface-3); }
.ta-list .ta-sub { color: var(--faint); font-size: var(--text-xs); }

/* year range slider */
.yr { padding: var(--space-5) 0 var(--space-2); }
.yr-track { position: relative; height: 46px; }
.yr-line { position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--surface-3); border-radius: 2px; }
.yr-sel { position: absolute; top: 22px; height: 2px; background: var(--brass); }
.yr-handle {
  position: absolute; top: 10px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--brass); cursor: grab; display: grid; place-items: center;
}
.yr-handle:active { cursor: grabbing; }
.yr-handle span { font-size: 10px; font-family: var(--mono); color: var(--brass); }
.yr-ticks { position: relative; height: 18px; }
.yr-tick { position: absolute; transform: translateX(-50%); font-size: 11px; font-family: var(--mono); color: var(--faint); }
.yr-readout { font-family: var(--mono); color: var(--brass); font-size: var(--text-sm); }
.yr-anchor { display: block; width: 100%; text-align: left; margin-bottom: var(--space-2); }

/* reveal */
.reveal-stage { position: relative; height: min(66vh, 560px); background: var(--graph-bg); border: 1px solid var(--border-soft); border-radius: var(--radius-md); overflow: hidden; }
.reveal-stage canvas { display: block; width: 100%; height: 100%; }
.reveal-caption {
  position: absolute; left: var(--space-5); top: var(--space-5); max-width: 34ch;
  font-family: var(--serif); font-size: var(--text-lg); color: var(--text);
  opacity: 0; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal-caption.is-in { opacity: 1; transform: none; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-4); margin: var(--space-5) 0; }
.stat { border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface); }
.stat b { display: block; font-family: var(--serif); font-size: var(--text-lg); color: var(--brass); font-weight: 400; }
.stat span { font-size: var(--text-xs); color: var(--faint); }

/* drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 60;
  background: var(--bg-deep); border-left: 1px solid var(--border); overflow-y: auto;
  box-shadow: var(--shadow); animation: slidein .28s var(--ease);
}
@keyframes slidein { from { transform: translateX(100%) } }
.drawer-inner { padding: var(--space-6); }
.scrim { position: fixed; inset: 0; background: rgba(4, 22, 42, 0.66); z-index: 55; border: 0; }
.bar-meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: var(--space-1) 0 var(--space-1); }
.bar-meter i { display: block; height: 100%; background: var(--brass); }
.bar-meter--cool i { background: var(--cool-dim); }
.meter-row { margin-bottom: var(--space-4); font-size: var(--text-sm); }
.meter-row .mr-top { display: flex; justify-content: space-between; gap: var(--space-3); }
.meter-row .mr-note { font-size: var(--text-xs); color: var(--faint); }

.toast {
  position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--brass-dim); color: var(--text);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); z-index: 80;
  font-size: var(--text-sm); box-shadow: var(--shadow); animation: pop .25s var(--ease);
  max-width: min(520px, 92vw);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px) } }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table-wrap { overflow-x: auto; }
.table-wrap .table { min-width: 460px; }
.table th, .table td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.table th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 500; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); font-size: var(--text-sm); margin: 0; }
.dl dt { color: var(--faint); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; padding-top: 3px; }
.dl dd { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .graph-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .graph-panel { display: none; }
  .graph-shell.has-sel .graph-panel {
    display: block; position: fixed; right: 0; top: 58px; bottom: 0; width: min(360px, 92vw); z-index: 45;
    border-left: 1px solid var(--border);
  }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .brand-tag { display: none; }
  /* On a phone the map has to be the first thing you see; the filter rail moves below it. */
  .graph-shell { display: flex; flex-direction: column; height: auto; }
  .graph-stage { order: 1; height: 62vh; min-height: 380px; }
  .graph-rail { order: 2; border: 0; border-top: 1px solid var(--border-soft); max-height: none; }
  .graph-panel { order: 3; }
  .graph-shell.has-sel .graph-panel { top: 0; }
}
@media (max-width: 620px) {
  .topbar { gap: var(--space-3); }
  .brand-name { font-size: var(--text-base); white-space: nowrap; }
  .topbar-actions .btn .btn-label { display: none; }
  #btn-honesty { padding-inline: var(--space-2); }
  .vt-hint { display: block; color: var(--brass-dim); }
  .reveal-stage { height: min(52vh, 380px); }
  .table { font-size: var(--text-xs); }
  /* Keep the card and its action buttons on one phone screen — a taller deck pushed the
     answer buttons below the fold, which read as a dead end. Cards scroll internally. */
  .deck { height: min(58vh, 440px); }
  .deck-card { padding: var(--space-5); touch-action: pan-y; }
  .person-actions { top: 57px; }
  .graph-hud { left: var(--space-2); right: var(--space-2); bottom: var(--space-2); font-size: 10px; gap: var(--space-2); max-width: none; }
  /* On a phone the trail can run the full width, so the count moves underneath it rather than
     sitting on top of the one control that tells you where you are. */
  .graph-count { font-size: 10px; right: auto; left: var(--space-3); top: 3.4rem; text-align: left; }
  #btn-honesty .btn-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------------
   Galaxy simplification: one search box, four city pills, everything else
   folded behind a disclosure. The rail should read as two controls, not eight.
   --------------------------------------------------------------------------- */
.rail-label {
  display: block; font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .14em; color: var(--faint); margin-bottom: var(--space-2);
}
.rail-search {
  width: 100%; font-size: var(--text-base); padding: var(--space-3) var(--space-4);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}
.rail-search:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.rail-search::placeholder { color: var(--faint); }

.pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill {
  font: inherit; font-size: var(--text-sm); cursor: pointer;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-lg);
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); transition: background var(--t, 160ms) ease, color 160ms ease;
}
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill.is-on { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }
.pill:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.rail-more { margin-top: var(--space-6); border-top: 1px solid var(--border-soft); padding-top: var(--space-4); }
.rail-more > summary {
  cursor: pointer; font-size: var(--text-sm); color: var(--muted);
  list-style: none; display: flex; align-items: center; gap: var(--space-2);
}
.rail-more > summary::-webkit-details-marker { display: none; }
.rail-more > summary::before { content: '+'; font-family: var(--mono); color: var(--brass); }
.rail-more[open] > summary::before { content: '\2212'; }
.rail-more > summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.rail-more[open] > summary { margin-bottom: var(--space-4); }

/* The "Add yourself" call to action is the one coloured button in the topbar. */
.cta-add { white-space: nowrap; }
@media (max-width: 720px) { .cta-add { display: none; } }

/* Folded citations: three chips visible, the rest one click away. */
.src-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.src-more { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.src-more > summary {
  cursor: pointer; list-style: none; font-size: var(--text-xs); font-family: var(--mono);
  color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 2px var(--space-2);
}
.src-more > summary::-webkit-details-marker { display: none; }
.src-more > summary:hover { color: var(--text); border-color: var(--brass); }
.src-more[open] > summary { color: var(--faint); }

/* The selection card becomes a full-width sheet on a phone, with a real way out. */
.panel-close { display: none; }
@media (max-width: 620px) {
  .graph-shell.has-sel .graph-panel {
    width: 100%; left: 0; right: 0; top: 58px; bottom: 0; overflow-y: auto;
    padding-top: var(--space-10);
  }
  .panel-close {
    display: inline-flex; position: absolute; top: var(--space-3); right: var(--space-3);
    font: inherit; font-size: var(--text-xs); cursor: pointer; z-index: 2;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-2) var(--space-4);
  }
}

/* ---------- corrections and additions ---------- */
/* The flag button has to be findable without shouting: coral only on hover, so a page full of
   records reads as records, not as a page full of buttons. */
.flag-btn {
  font-size: var(--text-xs); background: transparent; border: 1px dashed var(--border);
  color: var(--faint); border-radius: var(--radius-sm); padding: 1px var(--space-2); cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.flag-btn:hover, .flag-btn:focus-visible {
  color: var(--brass); border-color: var(--brass-dim);
  background: color-mix(in oklab, var(--brass) 10%, transparent);
}
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--brass);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.fix-strip {
  border: 1px dashed var(--border); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); font-size: var(--text-sm); color: var(--muted);
}
.fix-strip p { margin: 0 0 var(--space-2); }
.fix-strip p:last-child { margin-bottom: 0; }
.rail-fix { font-size: var(--text-xs); color: var(--faint); margin: var(--space-4) 0 0; }

.grid-2, .grid-3 { display: grid; gap: var(--space-3); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: var(--space-5); }
.seg-btn {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  padding: var(--space-2) var(--space-5); font: inherit; font-size: var(--text-sm);
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.is-on { background: var(--brass); color: var(--brass-ink); }

.add-form { max-width: 62ch; }
.add-tiles { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
@media (min-width: 900px) { .add-tiles { grid-template-columns: repeat(3, 1fr); } }
.add-tile h3 { margin-bottom: var(--space-2); }
.add-tile p { margin-bottom: var(--space-3); }

.report-preview {
  font-family: var(--mono); font-size: var(--text-xs); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: var(--space-3); margin: var(--space-2) 0 0; white-space: pre-wrap; word-break: break-word;
  max-height: 40vh; overflow: auto;
}

.modal-wrap { position: fixed; inset: 0; z-index: 90; }
.modal-scrim { position: absolute; inset: 0; background: rgba(4, 22, 42, .72); }
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(56ch, 94vw); max-height: 92vh; overflow-y: auto;
  background: var(--bg-deep); border-color: var(--border); box-shadow: var(--shadow);
  animation: pop-in .22s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) } }
.modal-x { position: absolute; top: var(--space-3); right: var(--space-3); background: transparent; border: 0; color: var(--faint); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.modal-x:hover { color: var(--text); }
.modal .section-title { padding-right: 4rem; }
body.modal-open { overflow: hidden; }

/* ---------------------------------------------------------------- account + typed answers

   The sign-in button is deliberately quiet: it sits next to the theme toggle, not next to the
   call to action, because signing in is not what this site wants from a visitor. */
.account-btn[data-state='in'] {
  border-color: color-mix(in oklab, var(--brass) 45%, transparent);
  color: var(--text);
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-answer {
  margin: var(--space-4) 0 0;
  padding: var(--space-4);
  border: 1px solid color-mix(in oklab, var(--cool) 30%, transparent);
  border-radius: var(--radius-md, 10px);
  background: color-mix(in oklab, var(--cool) 7%, transparent);
}
.vf-answer-lead { margin: 0 0 var(--space-3); font-size: var(--text-sm); color: var(--cool); }
.vf-answer-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}
.vf-answer-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.vf-answer-field > span { font-size: var(--text-sm); color: var(--text); }
.vf-answer-field em { font-style: normal; }
.vf-answer-field input,
.vf-answer-field select {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--text-base);
}
.vf-answer-field input:focus-visible,
.vf-answer-field select:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.vf-answer-src { margin-top: var(--space-3); }

/* A value somebody typed over the seed, still waiting for a second pair of eyes. It has to look
   different from a sourced value without looking like a mistake. */
.fix-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: var(--text-xs, 0.75rem);
  color: var(--cool);
  white-space: nowrap;
}
.fix-tag b { font-weight: 500; color: var(--text); }
.fixed-value {
  border-bottom: 1px dashed color-mix(in oklab, var(--brass) 60%, transparent);
}

/* The inline editor on a person or bar page. Closed, it is one quiet link. */
.edit-open { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-end; }
.edit-open input {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  min-width: 8rem;
}
.edit-note { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--cool); }
.edit-note[data-bad='1'] { color: var(--danger); }

/* Click-to-edit. The affordance has to be findable without turning every value on the page into
   a button — so the pencil only appears on hover or focus, and the value itself never moves. */
.qe {
  cursor: text;
  border-radius: 4px;
  padding: 0 0.15rem;
  margin: 0 -0.15rem;
  transition: background-color 120ms ease;
}
.qe:hover, .qe:focus-visible { background: color-mix(in oklab, var(--brass) 14%, transparent); }
.qe:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.qe-pen {
  opacity: 0;
  margin-left: 0.3rem;
  font-size: 0.8em;
  color: var(--brass);
  transition: opacity 120ms ease;
}
.qe:hover .qe-pen, .qe:focus-visible .qe-pen { opacity: 1; }
.qe-box { display: block; cursor: auto; }
.qe-box .edit-open { margin-top: var(--space-2); }
.qe-fh { font-size: var(--text-sm); }
.stop-years-edit { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: var(--text-sm); margin-top: 0.15rem; }
@media (hover: none) {
  /* No hover on a phone, so the pencil is always on. */
  .qe-pen { opacity: 0.7; }
}
.qe-lead {
  font-size: var(--text-xs, 0.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cool);
  opacity: 0.75;
}
.qe-box .qe-fh { gap: 0.45rem; }
.qe-box .qe-fh span { white-space: nowrap; }
.qe-box .qe-src { min-width: 16rem; flex: 1 1 16rem; }

/* ============================================================ lookup fields + add sheet
   Two rules drive every number here:
   1. 16px inputs. Anything smaller and iOS Safari zooms the page on focus, which throws the
      sheet off screen and reads as a bug.
   2. 44px tap targets on the option rows. A list of 30px rows is a list you mis-tap. */
.pick { position: relative; margin-bottom: var(--space-5); }
.pick-label, .qa-yr label, .qa-role label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cool);
  margin-bottom: 0.35rem;
}
.pick-input {
  width: 100%;
  font-size: 16px;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pick-input:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.pick-list {
  position: absolute;
  z-index: 70;
  left: 0; right: 0;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  max-height: 17rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(3, 14, 28, 0.55);
  -webkit-overflow-scrolling: touch;
}
.pick-opt {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 55%, transparent);
}
.pick-opt:last-child { border-bottom: 0; }
.pick-opt.is-on, .pick-opt:hover { background: color-mix(in oklab, var(--brass) 16%, transparent); }
.pick-opt-name { font-weight: 500; }
.pick-opt-sub { font-size: var(--text-xs); color: var(--cool); opacity: 0.85; }
.pick-opt--new .pick-opt-name { color: var(--brass); }
.pick-empty { padding: 0.7rem 0.8rem; font-size: var(--text-sm); color: var(--cool); }
.pick-note, .qa-foot-note { font-size: var(--text-xs); color: var(--cool); opacity: 0.8; margin: 0.35rem 0 0; }
.pick-chosen {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ok);
  border-radius: 8px;
  background: color-mix(in oklab, var(--ok) 10%, transparent);
}
.pick--new .pick-chosen { border-color: var(--brass); background: color-mix(in oklab, var(--brass) 10%, transparent); }
.pick-tag {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--ok);
  color: var(--ok);
}
.pick-tag--new { border-color: var(--brass); color: var(--brass); }
.pick-clear {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--cool);
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--text-sm);
  min-height: 32px;
}

/* the add sheet */
.sheet--qa { max-width: 34rem; }
.qa-body { padding-bottom: var(--space-4); }
.qa-years { display: flex; align-items: flex-end; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.qa-yr { flex: 0 0 6.5rem; }
.qa-year {
  width: 100%;
  font-size: 16px;
  padding: 0.7rem 0.6rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.qa-still { display: flex; align-items: center; gap: 0.45rem; font-size: var(--text-sm); min-height: 44px; }
.qa-still input { width: 20px; height: 20px; }
.qa-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.45rem; }
.qa-chip {
  font-size: var(--text-xs);
  padding: 0.4rem 0.6rem;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--cool);
  cursor: pointer;
}
.qa-chip:hover, .qa-chip:focus-visible { border-color: var(--brass); color: var(--text); }
.qa-role input { width: 100%; font-size: 16px; padding: 0.7rem 0.8rem; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.qa-more { margin-top: var(--space-4); border-top: 1px solid var(--border); padding-top: var(--space-3); }
.qa-more summary { cursor: pointer; font-size: var(--text-sm); color: var(--cool); min-height: 40px; display: flex; align-items: center; }
.qa-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.qa-foot .btn { min-height: 46px; }
.qa-foot-note { flex: 1 1 100%; color: var(--danger); opacity: 1; }

/* section heads that carry an action */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.sec-head .section-title { margin-bottom: 0; }

/* an addition nobody has backed up yet */
.stop--pending { border-left: 2px dashed var(--brass); padding-left: 0.8rem; opacity: 0.95; }
.badge--pending { border-color: var(--brass); color: var(--brass); }
.pending-note { font-size: var(--text-xs); color: var(--cool); margin-top: var(--space-3); max-width: 62ch; }

@media (max-width: 640px) {
  /* On a phone the sheet is a bottom sheet: the fields sit under the thumb, Save is pinned, and
     the whole thing can be flicked away downward. */
  .sheet--qa {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-width: none;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
  }
  /* The Save bar is pinned, so the scrollable body needs room to clear it or the last field
     sits underneath and reads as cut off. */
  .sheet--qa .qa-body { overflow-y: auto; flex: 1 1 auto; padding-bottom: var(--space-6); }
  .qa-foot { padding-bottom: max(var(--space-4), env(safe-area-inset-bottom)); }
  .qa-foot .btn { flex: 1 1 auto; }
  .qa-yr { flex: 1 1 6rem; }
  .pick-list { max-height: 45vh; }
  .sec-head { align-items: stretch; }
  .sec-head .btn { width: 100%; }
}
.qa-chip.is-on { border-color: var(--brass); color: var(--text); background: color-mix(in oklab, var(--brass) 14%, transparent); }

/* ============================================================ the connect screen
   Two boxes and an answer. On a wide screen the boxes sit side by side with the word "and"
   between them; on a phone they stack and the word disappears, because a vertical "and" is
   noise. */
.page--narrow { max-width: 56rem; }
.cx { margin-top: var(--space-6); }
.cx-boxes { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-4); align-items: start; }
.cx-and {
  align-self: center;
  padding-top: 1.4rem;
  font-family: var(--serif);
  font-size: var(--text-lg);
  color: var(--cool);
  opacity: 0.7;
}
.cx-answer { margin-top: var(--space-5); }
.cx-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: var(--space-5);
  color: var(--cool);
}
.cx-empty p { margin: 0 0 0.4rem; }
.cx-card {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 12px;
  padding: var(--space-5);
  background: var(--surface);
  margin-bottom: var(--space-4);
}
.cx-card--yes { border-left-color: var(--ok); }
.cx-card--pending { border-left-color: var(--brass); }
.cx-card--gone { border-left-color: var(--cool); opacity: 0.9; }
.cx-card--add { border-left-color: var(--brass); border-left-style: dashed; }
.cx-card-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.cx-card-line { font-size: var(--text-sm); color: var(--text); margin-bottom: var(--space-4); }
.cx-list { margin: 0 0 var(--space-4); padding-left: 1.1rem; font-size: var(--text-sm); }
.cx-list li { margin-bottom: 0.3rem; }
.cx-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.cx-acts .btn { min-height: 44px; }
.cx-note { font-size: var(--text-xs); color: var(--danger); }
.cx-mini { display: grid; grid-template-columns: 1fr 6rem 6rem; gap: 0.7rem; align-items: start; margin: var(--space-4) 0 0.3rem; }
.cx-mini label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.07em; color: var(--cool); margin-bottom: 0.3rem; }
.cx-mini input {
  width: 100%;
  font-size: 16px;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cx-third { margin-bottom: var(--space-3); }
.cx-more { margin-top: var(--space-2); }
.cx-more summary { cursor: pointer; font-size: var(--text-sm); color: var(--cool); min-height: 44px; display: flex; align-items: center; }
.cx-foot { margin-top: var(--space-7); font-size: var(--text-xs); max-width: 66ch; }
.badge--gone { border-color: var(--cool); color: var(--cool); }
.badge--new { border-color: var(--brass); color: var(--brass); }

@media (max-width: 720px) {
  .cx-boxes { grid-template-columns: 1fr; gap: var(--space-3); }
  .cx-and { display: none; }
  .cx-mini { grid-template-columns: 1fr 1fr; }
  .cx-mini-f { grid-column: 1 / -1; }
  .cx-acts .btn { flex: 1 1 auto; }
}
.cx-kind { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: var(--space-3); }
.cx-kind-q { font-size: var(--text-sm); color: var(--cool); }

/* ---------- accolades ----------

   Awards get exactly one visual privilege on this site: a warm border. No gold gradients, no
   trophies, no laurel wreaths. The reason is that everything else here is a sourced fact rendered
   plainly, and dressing one class of fact up in medals would make the plain ones look like the
   afterthought. A win reads stronger than a nomination through weight and a left rule, which is the
   same device the timeline already uses, so nothing new has to be learned to read it. */

.chip--award {
  border-color: var(--brass-dim); color: var(--brass);
  background: color-mix(in oklab, var(--brass) 10%, transparent);
  text-decoration: none;
}
a.chip--award:hover { border-color: var(--brass); color: var(--text); }

.acc-body { margin-bottom: var(--space-6); }
.acc-body-name {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em;
  color: var(--faint); margin-bottom: var(--space-2);
}
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-row {
  display: grid; gap: var(--space-1);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  border-left: 2px solid transparent;
}
.acc-row:last-child { border-bottom: 0; }
.acc-row--rank { border-left-color: var(--cool-dim); }
.acc-row--win { border-left-color: var(--brass); }
.acc-what { font-size: var(--text-sm); color: var(--text); }
.acc-row--win .acc-what { font-weight: 600; }
.acc-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--muted);
}
.acc-quote {
  font-family: var(--serif); font-size: var(--text-sm); color: var(--muted);
  border-left: 1px solid var(--border-soft); padding-left: var(--space-3); margin-top: var(--space-1);
}

/* A ranked list, printed as a list. The number is the whole point of a ranked list, so it is set in
   the mono face at a fixed width: the ranks then line up as a column the eye can run down, which is
   how anybody actually reads a top fifty. */
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.rank-row {
  display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: baseline;
  gap: var(--space-3); padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
}
.rank-row:last-child { border-bottom: 0; }
.rank-num {
  font-family: var(--mono); font-size: var(--text-sm); color: var(--brass);
  text-align: right; font-variant-numeric: tabular-nums;
}
.rank-name { font-size: var(--text-base); }
.rank-name a { color: var(--text); }
.rank-city { font-size: var(--text-xs); }
@media (max-width: 620px) {
  .rank-row { grid-template-columns: 2.4rem 1fr; }
  .rank-city { grid-column: 2; }
}

/* The rail's second section: rooms an awards body named that nobody has documented. Rendered as
   links rather than drill buttons because there is no depth below them to open yet. */
.node-list .nl-sep {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint); background: var(--surface-2);
}
.node-list .nl-link {
  display: flex; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); font-size: var(--text-sm);
  color: var(--muted); text-decoration: none;
}
.node-list .nl-link:hover { background: var(--surface-2); color: var(--text); }
.nl-deg--award { color: var(--brass); }
/* A hundred underlined links in a column reads as a wall of blue rather than a list of bars, so the
   rank list underlines on hover only. The names are still links, still keyboard-focusable, and still
   the only clickable thing in the row. */
.rank-name a { text-decoration: none; border-bottom: 1px solid var(--border-soft); }
.rank-name a:hover, .rank-name a:focus-visible { border-bottom-color: var(--brass); }

/* ============================================================
   ARCHIVED BANNER — appended 2026-09-05
   The Bar Galaxy is read-only. The dataset stays browsable.
   Contributions, corrections, claims, and reports are closed.
   Case study at https://www.jlittrell.com/case-studies/the-bar-galaxy
   ============================================================ */
body::before {
  content: "Archived. This dataset is read-only. Contributions are closed. Read the case study →";
  display: block;
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 10px 16px;
  background: #eb4171;
  color: #ffffff;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
body {
  position: relative;
}
/* Wrap the pseudo-element in a click-through anchor via JS is not available on prerendered pages,
   so we make the banner itself clickable via a sibling link. Since we can't inject HTML from CSS,
   we rely on the ::before message and let curious readers navigate to jlittrell.com manually.
   The site remains fully functional read-only. */
