/* The walk replay page (index.html on branch viz); published as css/replay.css. */
/* Two instrument panes (network | environment) over one transport bar. Data: data/index.json + data/<id>.json
   (experiments/viz.py). Each spike carries its sampled cause: an earlier spike (a walk step), the stimulus, or none. */
:root {
  --bg: #eef0f2; --panel: #f8f9fa; --ink: #1b2026; --muted: #5d6670; --rule: #cfd5db; --edge: #9aa4ae;
  --stim: #3d6fb6; --lat1: #7a5bb0; --lat2: #a2569a; --critic: #6b7a89;
  --act0: #c9622f; --act1: #2f9a6a; --act2: #b8487a; --act3: #2a8f9d; --hop: #d9a400;
  --body: #2b3138; --accent: #c9622f; --track: #9aa4ae; --ground: #c3c9cf; --flame: #e08a1e;
  --display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --link: #1a5fb4;
  --serif: Didot, "Didot LT STD", "Bodoni Moda", "Bodoni 72", Cochin, "Hoefler Text", Georgia, serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1216; --panel: #161a20; --ink: #e3e7eb; --muted: #8b95a0; --rule: #2a3038; --edge: #48525c;
  --stim: #6f9be0; --lat1: #a58ae0; --lat2: #d083c6; --critic: #8d9aa8;
  --act0: #f08a52; --act1: #4cc690; --act2: #e07aa6; --act3: #4fc0cf; --hop: #ffd23f;
  --body: #d4d9de; --accent: #f08a52; --track: #48525c; --ground: #3a424b; --flame: #ffb347; --link: #7aa7f0; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f1216; --panel: #161a20; --ink: #e3e7eb; --muted: #8b95a0; --rule: #2a3038; --edge: #48525c;
  --stim: #6f9be0; --lat1: #a58ae0; --lat2: #d083c6; --critic: #8d9aa8;
  --act0: #f08a52; --act1: #4cc690; --act2: #e07aa6; --act3: #4fc0cf; --hop: #ffd23f;
  --body: #d4d9de; --accent: #f08a52; --track: #48525c; --ground: #3a424b; --flame: #ffb347; --link: #7aa7f0; color-scheme: dark }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--display); padding: 14px 16px; box-sizing: border-box; }
.wrap { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.masthead { text-align: center; display: grid; gap: 4px; padding: 10px 0 6px; }
h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 400; margin: 0; letter-spacing: 0.01em; line-height: 1.15; }
h1 b { font-weight: 700; }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); margin: 0; }
.authors { font-family: var(--serif); margin: 6px 0 0; font-size: 1.15rem; }
.authors a, .paper a, .tagline a { color: var(--link); text-decoration: none; }
html { scroll-behavior: smooth; }
.tagline .gh { display: inline-flex; vertical-align: -0.12em; margin-left: 0.1em; color: var(--ink); }
.tagline .gh svg { width: 1.05em; height: 1.05em; }
.tagline .gh:hover, .tagline .gh:focus-visible { color: var(--link); }
.authors a:hover, .authors a:focus-visible, .paper a:hover, .tagline a:hover, .tagline a:focus-visible { text-decoration: underline; }
.paper { justify-self: center; width: 100%; max-width: 880px; font-family: var(--serif); line-height: 1.6; font-size: 1.12rem; color: var(--body); }
.paper h2 { margin: 14px 0 4px; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.paper p { margin: 0 0 10px; }
.paper b { color: var(--ink); font-weight: 700; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pick label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.panes { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
@media (max-width: 860px) { .panes { grid-template-columns: 1fr; } }
.pane { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; display: grid; gap: 8px; min-width: 0; align-content: start; }
.pane h2 { margin: 0; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
canvas { width: 100%; display: block; }
#net { aspect-ratio: 16 / 11; }
#plant { aspect-ratio: 3 / 2; }
.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px 12px; font-family: var(--mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.readout div { display: grid; gap: 1px; }
.readout span:first-child { color: var(--muted); font-family: var(--display); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; }
button, select { font: 500 0.85rem var(--mono); color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: 5px 10px; cursor: pointer; max-width: 100%; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--hop); outline-offset: 2px; }
#scrub { flex: 1 1 220px; min-width: 0; accent-color: var(--stim); }
#clock { font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.78rem; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.legend i.hop { border-radius: 0; height: 2px; width: 14px; vertical-align: 3px; background: var(--hop); }
.legend i.inp { background: transparent; border: 1.5px solid var(--ink); width: 8px; height: 8px; }
.legend i.a2a { border-radius: 0; height: 1.5px; width: 14px; vertical-align: 3px; background: var(--stim); opacity: 0.6; }
.legend i.bg { background: var(--muted); opacity: 0.45; }
.sel { margin: 0; font-size: 0.78rem; color: var(--muted); font-family: var(--mono); min-height: 1.2em; }
#net { cursor: crosshair; }
#status { color: var(--muted); font-family: var(--mono); font-size: 0.82rem; }
