/* AR/VR Voices Map — styled to match alexbrodriguez.net's "grain" design system.
   Fonts and noise texture are vendored in ./assets so the page is self-contained. */

@font-face { font-family: "Droid Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(./assets/fonts/DroidSerif-normal-400.woff2) format("woff2"); }
@font-face { font-family: "Droid Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url(./assets/fonts/DroidSerif-normal-700.woff2) format("woff2"); }
@font-face { font-family: "Droid Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(./assets/fonts/DroidSerif-italic-400.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(./assets/fonts/OpenSans-normal-400.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(./assets/fonts/OpenSans-normal-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(./assets/fonts/OpenSans-italic-400.woff2) format("woff2"); }

:root {
  --font-serif: "Droid Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ink: #181818; --fg: #444; --fg-title: #555; --fg-muted: #777; --fg-soft: #999;
  --fg-faint: #aaa; --fg-ghost: #bbb; --link: #333; --link-hover: #000;
  --bg: #fff; --bg-page: #f5f5f5; --panel-dark: #2b2f2b;
  --border: #ddd; --border-light: #efefef; --border-hair: #e9e9e9;
  --grain: #1c6d3a; --accent: #1c6d3a; --accent-hover: #125f2f; --accent-deep: #0c4d21;
  --mint: #ceecd7; --radius: 3px; --radius-sm: 2px; --container: 960px; --gutter: 20px;
}

* , *:before, *:after { box-sizing: border-box; }
/* keep the hidden attribute authoritative even for elements with display rules */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
/* the full-bleed map uses 50vw breakout margins, which can overshoot by the
   scrollbar width — clip the sliver instead of showing a horizontal scrollbar */
body { overflow-x: hidden; }
h1,h2,h3,h4,h5,h6,p,hr,ol,ul,figure { margin: 0; }
ol,ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.grain {
  background-color: #fcfcfa;
  font-family: var(--font-sans); font-size: 14px; line-height: 21px; color: var(--fg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column;
}
.grain:before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background-image: url(./assets/noise-texture.png); background-repeat: repeat;
  opacity: .24; mix-blend-mode: multiply; pointer-events: none;
}
.grain > * { position: relative; z-index: 1; }
.grain main { flex: 1; }
.grain .container { width: var(--container); max-width: 100%; margin: 0 auto; padding: 0 20px; }
.grain a { color: var(--link); text-decoration: none; }

/* ------- header (copied from site) ------- */
.grain .site-header { padding-top: 56px; }
.grain .header-inner { display: flex; align-items: flex-end; border-bottom: 1px solid var(--border-light); padding-bottom: 18px; }
.grain .masthead { flex: 1; display: flex; align-items: center; gap: 14px; }
.grain .site-title { font-family: var(--font-serif); font-size: 36px; color: var(--fg-title); margin: 0; font-weight: 400; line-height: 1; white-space: nowrap; }
.grain .site-title a { color: var(--fg-title); text-decoration: none; }
.grain .site-tagline { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; color: var(--fg-ghost); margin: 7px 0 0; font-weight: 700; white-space: nowrap; }
.grain .main-nav ul { display: flex; gap: 2px; }
.grain .main-nav a { display: block; text-decoration: none; color: #666; font-family: var(--font-sans); font-size: 14px; padding: 6px 15px; white-space: nowrap; border-top: 3px solid transparent; transition: all .12s ease-in-out; }
.grain .main-nav a:hover { color: #000; transform: translateY(-2px); }
.grain .main-nav li:first-child a:hover { border-color: var(--accent); }
.grain .main-nav li:nth-child(2) a:hover { border-color: #2f9e57; }
.grain .main-nav li:nth-child(3) a:hover { border-color: var(--accent-hover); }
.grain .main-nav li.current a { color: var(--fg-title); }
.grain .eyebrow { font-family: var(--font-sans); text-transform: uppercase; font-weight: 700; font-size: 11px; letter-spacing: .04em; color: var(--fg-muted); margin: 0 0 18px; }

/* ------- footer: one short line (this page only; the site keeps its own) ------- */
.grain .colophon { border-top: 1px solid var(--border-light); margin-top: 14px; padding: 9px 0 11px; }
.grain .colophon .container { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-sans); font-size: 11px; color: var(--fg-faint); }
.grain .colophon .left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grain .colophon .sep { color: var(--fg-ghost); }
.grain .colophon a { color: var(--fg-muted); text-decoration: none; }
.grain .colophon a:hover { color: var(--accent); }

/* ------- page head: title + Home link on the left, compact legend on the right ------- */
.map-head { padding: 26px 0 0; }
.map-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; margin: 0 0 12px; }
.map-ident { flex: none; }
.map-title { font-family: var(--font-serif); font-weight: 400; color: var(--ink); font-size: 30px; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
.home-link {
  display: inline-block; margin-top: 6px; font-family: var(--font-sans);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--fg-soft); text-decoration: none;
}
.home-link:hover { color: var(--accent); }

.example-banner {
  border: 1px solid #e3d9ae; background: #faf5df; color: #6b5d1c; border-radius: var(--radius);
  padding: 10px 14px; font-size: 12.5px; line-height: 1.55; margin: 0 0 12px;
}
.version-banner {
  border: 1px solid var(--mint); background: #edf7f0; color: var(--accent-deep); border-radius: var(--radius);
  padding: 9px 14px; font-size: 12.5px; margin: 0 0 12px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
}
.linklike { color: var(--accent); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.linklike:hover { color: var(--accent-hover); }

/* ------- timeline (history of VR) ------- */
.timeline { display: flex; align-items: center; gap: 10px; padding: 8px 0 2px; }
.tl-controls { display: flex; gap: 4px; flex: none; }
.tl-controls button {
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--fg-muted); font-size: 13px; line-height: 1;
}
.tl-controls button:hover { color: var(--accent); border-color: var(--accent); }
.tl-track {
  position: relative; flex: 1; height: 38px; cursor: pointer;
  touch-action: none; /* the scrubber owns touch gestures */
}
.tl-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 2px solid var(--border); transform: translateY(-50%);
}
.tl-tick { position: absolute; top: 50%; width: 1px; height: 8px; background: var(--fg-ghost); transform: translate(-50%, -50%); }
.tl-tick span {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 700; color: var(--fg-ghost); letter-spacing: .02em;
}
.tl-dot {
  position: absolute; top: calc(50% - 9px); width: 7px; height: 7px; border-radius: 50%;
  transform: translateX(-50%); border: 1px solid #fff; padding: 0; cursor: pointer; z-index: 2;
}
.tl-dot:hover { transform: translateX(-50%) scale(1.5); }
.tl-handle {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); z-index: 3; pointer-events: none;
  transition: left .2s ease;
}
.tl-yearlab { flex: none; font-family: var(--font-serif); font-size: 22px; color: var(--ink); min-width: 58px; text-align: right; }
/* reserved fixed height so changing the year never shifts the page layout or
   scroll position; long event lists scroll internally */
.tl-events {
  display: flex; align-items: flex-start; align-content: flex-start; gap: 7px 14px; flex-wrap: wrap;
  padding: 4px 0 8px; font-size: 11.5px; color: var(--fg-muted);
  height: 64px; overflow-y: auto;
}
.tle-note { color: var(--fg); font-style: italic; font-size: 12px; }
.tle-item {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--fg-muted); border: 1px solid var(--border-light); border-radius: 9999px;
  padding: 2.5px 9px; background: var(--bg); cursor: pointer; white-space: nowrap;
}
.tle-item:hover { color: var(--accent); border-color: var(--accent); }
.tle-item a { color: var(--fg-soft); }
.tle-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* timeline-hidden nodes fade out but keep their DOM (so they can fade back in) */
.node.yrout { opacity: 0 !important; pointer-events: none; }
@media (max-width: 760px) {
  .timeline { gap: 6px; }
  .tl-tick span { display: none; }
  .tl-tick:nth-child(4n+1) span { display: block; }
  .tl-yearlab { font-size: 18px; min-width: 42px; }
  .tl-track { height: 44px; }
  .tl-handle { width: 22px; height: 22px; }
  .tle-note { font-size: 11px; }
  .tl-events { height: 96px; }
}

/* ------- toolbar ------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border-light); margin-top: 8px; position: relative; z-index: 30; }
.search {
  font-family: var(--font-sans); font-size: 13px; color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
  padding: 7px 10px; width: 230px;
}
.search:focus { outline: 2px solid var(--mint); border-color: var(--accent); }
.filter { position: relative; }
.filter summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 9999px; padding: 6px 13px; background: var(--bg);
  white-space: nowrap;
}
.filter summary::-webkit-details-marker { display: none; }
.filter summary:hover { color: var(--ink); border-color: var(--fg-soft); }
.filter[open] summary, .filter summary.active { border-color: var(--accent); color: var(--accent); }
.filter .pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 215px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.09); padding: 9px 11px; max-height: 300px; overflow: auto;
}
.filter .pop label { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 3px 0; cursor: pointer; color: var(--fg); }
.filter .pop label:hover { color: var(--ink); }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--fg-muted); cursor: pointer; white-space: nowrap; }
.toggle input, .filter .pop input { accent-color: var(--accent); }
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 9999px; overflow: hidden; margin-left: auto; }
.view-switch button { font-size: 12px; font-weight: 700; padding: 6px 15px; color: var(--fg-muted); background: var(--bg); }
.view-switch button.on { background: var(--accent); color: #fff; }
.history-btn { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 9999px; padding: 6px 13px; background: var(--bg); white-space: nowrap; }
.history-btn:hover, .history-btn.on { color: var(--accent); border-color: var(--accent); }

/* mobile-only "Filters" button; the group itself is transparent to desktop layout */
.filters-btn { display: none; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 9999px; padding: 6px 13px; background: var(--bg); white-space: nowrap; }
.filters-btn.active { color: var(--accent); border-color: var(--accent); }
.filter-group { display: contents; }
.filter-group-head { display: none; }

/* ------- map ------- */
/* the detail panel overlays whichever view (map or list) is active, so it lives
   on the shared wrapper rather than inside the map container */
.content-area { position: relative; }
/* full-bleed: the diagram breaks out of the centered content column, edge to edge */
.map-wrap { position: relative; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.map-stage { position: relative; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fffefc; overflow: hidden; height: 80vh; }
/* touch-action pan-y: one finger scrolls the page past the map; two-finger
   pinch/pan gestures are delivered to the app's own zoom handling */
#map { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#map:active { cursor: grabbing; }

.zoom-ctrl { position: absolute; bottom: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; }
.zoom-ctrl button {
  width: 30px; height: 30px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; color: var(--fg-muted); line-height: 1;
}
.zoom-ctrl button:hover { color: var(--ink); border-color: var(--fg-soft); }

.tt-score { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.tt-score-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #a7afa7; }
.tt-bar { flex: 1; height: 5px; min-width: 60px; background: rgba(255,255,255,.18); border-radius: 3px; overflow: hidden; }
.tt-bar-fill { display: block; height: 100%; background: #7fc79a; border-radius: 3px; }
.tt-score-num { font-family: var(--font-mono); font-size: 10.5px; color: #d9ded9; }
.panel .tt-score.panel-score { margin: 2px 0 8px; }
.panel .tt-score.panel-score .tt-score-label { color: var(--fg-soft); }
.panel .tt-score.panel-score .tt-bar { background: #e8e8e2; }
.panel .tt-score.panel-score .tt-bar-fill { background: var(--accent); }
.panel .tt-score.panel-score .tt-score-num { color: var(--fg-muted); }
.panel .p-dim { color: var(--fg-soft); font-size: 11.5px; }
.p-img-wrap { margin: 4px 0 10px; }
.p-img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); display: block; }
.p-img-credit { font-size: 10.5px; color: var(--fg-soft); margin-top: 4px; }
.p-img-credit a { color: var(--fg-muted); text-decoration: underline; }
.node .initials { font-family: var(--font-sans); font-weight: 700; pointer-events: none; }
/* legacy hardware: slight desaturation (status border carries the red key) */
.node .nzoom.legacy image { filter: saturate(.7); }
/* screen-space label layer: constant font size at every zoom; which labels render
   is decided per frame by a collision pass in app.js (placeLabels) */
.labels { pointer-events: none; }
.labels text {
  font-family: var(--font-sans); fill: #5c5c56;
  paint-order: stroke; stroke: rgba(252, 252, 250, 0.92); stroke-width: 3px; stroke-linejoin: round;
}
.labels .life-badge { fill: #8a8a80; }

/* svg pieces (classes applied from JS) */
.band-col { fill: var(--accent); }
.band-rect { cursor: default; } /* wedges act as background (click-away) */
.band-rect.sel { stroke: var(--accent); stroke-width: 1.5; }
.band-label { font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; fill: var(--fg-soft); cursor: pointer; }
/* the conceptual center: elegant, low-contrast small caps */
.center-lab {
  font-family: var(--font-serif); font-variant: small-caps; letter-spacing: .22em;
  fill: #9aa89e; pointer-events: none;
}
.band-label:hover, .band-label.sel { fill: var(--accent); }
.grid-line { stroke: #e7e5de; stroke-width: 1; }
.ring-guide { fill: none; stroke: #e3e1d8; stroke-width: 1; stroke-dasharray: 2 5; }
.life-badge { fill: #8a8a80; font-weight: 700; }
.pop-head { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-ghost); margin: 7px 0 2px; }
.filter .pop .pop-head:first-child { margin-top: 0; }
.node { cursor: pointer; transition: opacity .25s ease; }
/* density LOD: people over budget fade out and lose interactivity */
.node.lodout { opacity: 0 !important; pointer-events: none; }
.node text { font-family: var(--font-sans); fill: #5c5c56; pointer-events: none; }
.node.dim { opacity: .13; }
/* hover focus: the hovered node and everything connected to it scale up;
   everything else fades and shrinks. Smooth both ways. */
.node .nscale { transition: transform .18s ease; }
svg.hovering .node.focus .nscale { transform: scale(1.45); }
/* lower-weight neighbors scale less and sit lighter (nodes are never dropped) */
svg.hovering .node.focus.fw-mid .nscale { transform: scale(1.22); }
svg.hovering .node.focus.fw-lo .nscale { transform: scale(1.05); }
svg.hovering .node.focus.fw-lo { opacity: .75; }
svg.hovering .node.unfocus .nscale { transform: scale(.75); }
svg.hovering .node.unfocus { opacity: .12; }
.node .ring { fill: none; stroke: #c99700; stroke-width: 2.5; stroke-dasharray: 3 3; }
.node:focus { outline: none; }
.node:focus .shape { stroke: var(--ink); stroke-width: 2.5; }
.edge { fill: none; pointer-events: none; }

/* ------- legend: compact block of a few tight rows next to the title ------- */
.legend {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
  font-size: 10px; color: var(--fg-muted); padding: 4px 0 0; max-width: 560px;
}
.legend .lg-group { display: flex; flex-wrap: wrap; gap: 2px 9px; align-items: center; justify-content: flex-end; }
.legend .lg-title { text-transform: uppercase; font-weight: 700; font-size: 8.5px; letter-spacing: .06em; color: var(--fg-ghost); white-space: nowrap; }
.legend .lg-item { display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.legend svg { display: inline-block; vertical-align: middle; flex: none; }
@media (max-width: 760px) {
  .legend { align-items: flex-start; max-width: none; }
  .legend .lg-group { justify-content: flex-start; }
}

/* ------- detail panel ------- */
.panel {
  /* hugs the viewport edge, matching the full-bleed map */
  position: absolute; top: 0; right: calc(50% - 50vw); bottom: 0; width: 330px; z-index: 25;
  background: rgba(255,255,254,.97); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 18px 20px 24px;
}
.panel-close { position: absolute; top: 8px; right: 12px; font-size: 21px; color: var(--fg-soft); z-index: 2; }
.panel-close:hover { color: var(--ink); }
.panel h2 { font-family: var(--font-serif); font-weight: 400; font-size: 23px; line-height: 1.2; color: var(--ink); margin: 2px 24px 2px 0; }
.panel .p-kicker { text-transform: uppercase; font-weight: 700; font-size: 10px; letter-spacing: .07em; color: var(--fg-soft); margin-bottom: 7px; }
.panel .p-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 3px; }
.chip { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; border-radius: 9999px; padding: 2.5px 9px; background: #f0efe9; color: var(--fg-muted); }
.chip.tier { background: var(--mint); color: var(--accent-deep); }
.chip.legacy-chip { background: #f0e8d8; color: #8a6d3b; }
.chip.co-chip { letter-spacing: .02em; }
.chip.co-past { opacity: .62; }
.chip.status-announced, .chip.status-shipping { background: var(--mint); color: var(--accent-deep); }
.chip.status-reported, .chip.status-leaked { background: #faf0dc; color: #8a5a00; }
.chip.status-rumored { background: #f1eaf6; color: #6d28d9; }
.chip.status-cancelled { background: #eeeeea; color: #87877f; text-decoration: line-through; }
.chip.status-launched_constrained { background: var(--mint); color: var(--accent-deep); }
.chip.status-prototype { background: #f1eaf6; color: #6d28d9; }
.panel h3 { font-family: var(--font-sans); text-transform: uppercase; font-weight: 700; font-size: 10.5px; letter-spacing: .06em; color: var(--fg-soft); margin: 17px 0 6px; }
.panel p, .panel li { font-size: 12.8px; line-height: 1.6; color: var(--fg); }
.panel .p-links a { display: inline-flex; gap: 5px; align-items: baseline; margin: 0 10px 5px 0; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.panel .p-links a:hover { color: var(--accent-hover); }
.panel .p-links .pl-type { font-weight: 400; color: var(--fg-soft); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.panel .takes li { margin-bottom: 9px; }
.panel .takes .tk-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-soft); }
.panel .takes a { color: var(--accent); font-weight: 700; }
.panel .rel li { margin-bottom: 4px; }
.panel .rel-more summary { cursor: pointer; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 6px; }
.panel .rel button { color: var(--accent); font-weight: 700; font-size: 12.5px; }
.panel .rel button:hover { color: var(--accent-hover); }
.panel .rel .rel-type { color: var(--fg-soft); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; margin-right: 5px; }
.panel .rel .rel-ev { color: var(--fg-soft); font-size: 10.5px; margin-left: 5px; }
.panel .rel .rel-ev:hover { color: var(--accent); }
.panel table.reach { border-collapse: collapse; width: 100%; }
.panel table.reach td { font-size: 12px; padding: 3px 0; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.panel table.reach td:first-child { color: var(--fg-soft); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .05em; padding-right: 10px; white-space: nowrap; }

/* ------- list view ------- */
.list-wrap { margin-top: 2px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.list-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 760px; }
.list-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-soft); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafaf7; }
.list-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover { background: #f6f8f4; }
.list-table tbody tr.changed td:first-child { box-shadow: inset 3px 0 0 #c99700; }
.list-table .lt-name { font-family: var(--font-serif); font-size: 14.5px; color: var(--ink); }
.list-table .lt-namecell { min-width: 220px; }
.lt-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; border: 1px solid var(--border); float: left; }
.lt-avatar-blank { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; }
.list-table .lt-dim { color: var(--fg-soft); font-size: 11px; }
.list-table a { color: var(--accent); }
.list-table .muted-row td { opacity: .4; }

/* ------- version history ------- */
.history { margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 16px 20px 6px; position: relative; max-height: 380px; overflow-y: auto; }
.history-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--border-light); padding-bottom: 10px; }
.history-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 21px; color: var(--ink); margin-right: auto; }
.history-list li { border-bottom: 1px solid var(--border-light); padding: 13px 0; }
.history-list li:last-child { border-bottom: 0; }
.hv-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hv-version { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 700; }
.hv-date { font-size: 11px; color: var(--fg-soft); }
.hv-current { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.hv-load { margin-left: auto; }
.hv-summary { font-size: 12.5px; color: var(--fg); margin: 5px 0 0; }
.hv-details { margin-top: 6px; }
.hv-details summary { cursor: pointer; font-size: 11px; font-weight: 700; color: var(--fg-soft); text-transform: uppercase; letter-spacing: .05em; }
.hv-details ul { margin: 6px 0 0 2px; }
.hv-details li { border: 0; padding: 1.5px 0; font-size: 12px; color: var(--fg-muted); }
.hv-details .hv-k { color: var(--fg-soft); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }
.hv-notes { font-size: 11.5px; color: var(--fg-soft); font-style: italic; margin-top: 5px; }


/* ------- responsive ------- */
@media (max-width: 920px) {
  .panel { width: 290px; }
}
@media (max-width: 760px) {
  .grain .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .grain .colophon .container { flex-direction: column; gap: 8px; align-items: flex-start; }

  .map-head { padding: 18px 0 0; }
  .map-title { font-size: 27px; }

  .toolbar { padding: 10px 0; gap: 7px; }
  .search { width: 100%; }
  .view-switch { margin-left: 0; }

  /* filter pills + toggles collapse into a bottom sheet behind the Filters button */
  .filters-btn { display: inline-block; }
  .filter-group { display: none; }
  .filter-group.open {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--bg); border-top: 1px solid var(--border);
    border-radius: 10px 10px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18);
    padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 72vh; overflow-y: auto;
  }
  .filter-group-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--border-light); padding-bottom: 8px; margin-bottom: 4px; }
  .filter-group-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 19px; color: var(--ink); margin: 0; }
  .filter-group-head .panel-close { position: static; }
  .filter-group.open .filter { display: block; border-bottom: 1px solid var(--border-light); }
  .filter-group.open .filter summary { border: 0; border-radius: 0; padding: 10px 2px; font-size: 12.5px; background: none; }
  /* checklists expand inline, accordion-style, instead of floating popovers */
  .filter-group.open .filter .pop {
    position: static; min-width: 0; max-height: none; box-shadow: none; border: 0;
    border-left: 2px solid var(--border-light); border-radius: 0;
    padding: 2px 0 10px 12px; margin-left: 2px;
  }
  .filter-group.open .toggle { display: flex; padding: 11px 2px; border-bottom: 1px solid var(--border-light); font-size: 12.5px; }

  .panel {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 62vh; border-left: 0; border-top: 1px solid var(--border);
    border-radius: 10px 10px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.13); z-index: 60;
  }
}

/* full-screen map mode (CSS overlay — works on iPhone where the native
   Fullscreen API isn't available for arbitrary elements) */
body.map-fs { overflow: hidden; }
/* .grain gives header/main/footer sibling stacking contexts (z-index:1), which
   traps the fixed stage under the later-painted footer; lift main while in
   full screen so the stage really covers the whole page */
body.map-fs .grain main { z-index: 3; }
body.map-fs .map-stage {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50;
  height: auto; border: 0; border-radius: 0;
}
body.map-fs .panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; }
@media (max-width: 760px) {
  body.map-fs .panel { top: auto; left: 0; width: 100%; z-index: 60; }
}
.zoom-ctrl #zoomFull.on { color: var(--accent); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------- standalone-service additions (list link, families, edit mode) ------- */

/* small deep link from the click panel into /list */
.view-in-list {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--fg-muted); text-decoration: none; margin-bottom: 4px;
}
.view-in-list:hover { color: var(--accent); }

/* multi-generation families: panel generations list */
.gens { list-style: none; margin: 8px 0 0; padding: 0; }
.gens li.gen { border: 1px solid var(--border-light); border-radius: var(--radius); margin-bottom: 6px; background: var(--bg); }
.gens li.gen.gen-current { border-color: var(--accent); }
.gens .gen-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: 0; padding: 6px 8px; cursor: pointer; font: inherit; color: var(--fg);
}
.gens .gen-row:hover { background: var(--mint-soft, #eef5ef); border-radius: var(--radius); }
.gen-thumb {
  width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none;
  border: 1px solid var(--border-light); background: #fff;
}
.gen-thumb-blank {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: #2f4a5e;
}
.gen-main { font-size: 12.5px; line-height: 1.35; min-width: 0; }
.gen-years { color: var(--fg-muted); font-size: 11px; margin-left: 2px; }
.gen-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: baseline; }
.gen-details { padding: 2px 10px 9px; font-size: 12px; }
.gen-details .reach td { font-size: 11.5px; }
.gens li.gen.gen-open { box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* expanded generation dims unrelated connections in the panel list */
.panel.genfocus .rel li { opacity: .4; }
.panel.genfocus .rel li.gen-hit { opacity: 1; }
.panel.genfocus .rel li.gen-hit > button { color: var(--accent); }

/* admin edit mode */
body.map-editing #map g.node { cursor: grab; }
body.map-editing #map g.node:active { cursor: grabbing; }
body.map-editing .map-stage { outline: 2px dashed #c9a700; outline-offset: -2px; }
.edit-pick { outline: none; }
#map g.node.edit-picked circle.hit { stroke: #c9a700; stroke-width: 2.5; stroke-dasharray: 4 3; }

/* future (not-yet-shipped) generations read slightly muted in the panel */
.gens li.gen.gen-future .gen-row { opacity: .78; }
.gens li.gen.gen-future .gen-years { font-style: italic; }
