/* Stateful: one calm page. Light, warm, one accent colour, system fonts, no network. */

/* Optional typed enrichment. The original dots remain the quiet background. */
.entity-layer { transition: opacity 240ms ease; }
.entity-layer[data-level='0'] { opacity: 0; pointer-events: none; }
.entity-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.entity-layer[data-dense='true'] .entity-shape,
.entity-layer[data-dense='true'] .entity-dispute { visibility: hidden; }
.entity-layer[data-dense='true'] .entity-node:focus-visible .entity-shape { visibility: visible; fill: none; }
.entity-layer[data-dense='true'] .entity-node,
.entity-layer[data-dense='true'] .entity-node * { pointer-events: none; }
/* At dense close zoom the base is occluded, not repainted behind every entity.
   Its keyed dots and coordinates stay intact and return at overview. */
.map-svg[data-entity-density='dense'] > .dots,
.map-svg[data-entity-density='dense'] > .clusters,
.map-svg[data-entity-density='dense'] > .ring,
.map-svg[data-entity-density='dense'] > .ring-overlays,
.map-svg[data-entity-density='dense'] > .tick-hits { visibility: hidden; pointer-events: none; }
.entity-background { opacity: .18; pointer-events: none; }
.entity-edge { fill: none; stroke: #99c8bd; stroke-width: 1; opacity: .48; pointer-events: stroke; }
.entity-edge.selected { stroke: #e5d5ad; stroke-width: 2; opacity: 1; }
.entity-edge.disputed { stroke-dasharray: 6 5; }
.entity-edge.dim, .entity-node.dim { opacity: .15; }
.entity-cluster { fill: #99c8bd0b; stroke: #99c8bd30; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.entity-node { cursor: pointer; }
.entity-shape { stroke: #fffdf9; stroke-width: 1.5; }
.entity-hit { fill: none; stroke: none; pointer-events: all; }
.entity-node.selected .entity-shape, .entity-node:focus-visible .entity-shape {
  stroke: #ffffff; stroke-width: 4;
}
.entity-node.active .entity-shape { stroke: #bd8c27; stroke-width: 5; }
.entity-layer[data-activity-only='true'] .entity-shape { stroke-width: 2.5; }
.entities-in-play { margin: 12px 0; border-block: 1px solid var(--line, #deddd5); padding: 10px 0; }
.entities-in-play > summary { cursor: pointer; font-size: 18px; font-weight: 600; }
.in-play-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-height: 176px; overflow-y: auto; }
.in-play-entity { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: 100%;
  border: 1px solid #c8d7d0; border-radius: 8px; background: #f4f8f5; color: #264a40;
  padding: 7px 10px; font: inherit; font-size: 18px; text-align: left; cursor: pointer; }
.in-play-entity svg { width: 20px; height: 20px; flex: 0 0 20px; }
.in-play-entity span { min-width: 0; overflow-wrap: anywhere; }
.in-play-entity:focus-visible, .entities-in-play > summary:focus-visible { outline: 3px solid #365f50; outline-offset: 3px; }
.entity-node:focus-visible { outline: none; }
.entity-dispute { display: none; fill: none; stroke: #8a3b55; stroke-width: 2; stroke-dasharray: 3 3; }
.entity-node.disputed .entity-dispute { display: block; }
.entity-label { fill: #e8f3f0; paint-order: stroke; stroke: #10292d; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.entity-label.predicate { fill: #f2d08a; }
.entity-predicate-tip { position: absolute; top: 64px; left: 12px; max-width: calc(100% - 24px); padding: 8px 12px; color: #f2d08a; background: #10292df2; border: 1px solid #99c8bd; border-radius: 10px; font-size: 1rem; pointer-events: none; z-index: 4; }
.entity-name-tip { position: absolute; bottom: 8px; left: 12px; max-width: calc(100% - 24px); padding: 8px 12px; color: #e8f3f0; background: #10292df2; border: 1px solid #99c8bd; border-radius: 10px; font-size: 1rem; overflow-wrap: anywhere; pointer-events: none; z-index: 4; }
.map-zoom-controls { display: flex; gap: 6px; flex: none; }
.map-bar { flex-wrap: wrap; }
.map-zoom { min-width: 44px; min-height: 44px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1.2rem; }
.entity-list { display: grid; gap: 18px; margin: 18px 0 28px; }
.entity-list-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.entity-list-controls label { display: grid; gap: 5px; flex: 1 1 180px; font-size: 1rem; }
.entity-list-controls input, .entity-list-controls select { min-width: 0; width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.entity-list-results { display: grid; gap: 24px; max-height: 600px; overflow: auto; }
.entity-type-list ul { display: grid; gap: 8px; margin-top: 10px; }
.entity-type-list li { border-bottom: 1px solid var(--line); padding: 5px 0; }
.entity-type-list button { min-height: 44px; text-align: left; }
.entity-reader { position: fixed; z-index: 12; top: 24px; right: 24px; bottom: 24px; width: min(560px, calc(100vw - 48px)); padding: 24px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 60px #24352d30; font-size: 1rem; }
.entity-evidence { display: grid; gap: 18px; margin-top: 18px; overflow-wrap: anywhere; }
.entity-evidence .entry-link { display: block; min-height: 44px; text-align: left; }
.entity-dates { padding-left: 22px; border-left: 2px solid var(--accent-line); display: grid; gap: 16px; }
.enrichment-mode { margin: 10px 0; }
@media (max-width: 759px) {
  .entity-reader { position: static; width: 100%; margin-top: 12px; padding: 18px; }
  .entity-list-results { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .entity-layer { transition: none; }
}

/* TL1: a separate occurrence-time lens; Map/List retain their own layout. */
.chronology[hidden] { display: none; }
.chronology { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }
.chronology h3 { font-size: 1.3rem; }
.chronology-note { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.chronology-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .7fr); gap: 10px; }
.chronology-search, .chronology-type { display: grid; gap: 5px; font-weight: 600; min-width: 0; }
.chronology-search input, .chronology-type select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.chronology-tools, .chronology-paging { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chronology-control { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.chronology-tools .chronology-control { min-width: 44px; font-size: 1.2rem; }
.chronology-tools .chronology-range { margin-left: 6px; }
.chronology-control:disabled { cursor: default; opacity: .5; }
.chronology-range { font-weight: 650; }
.chronology-count { color: var(--muted); font-size: .9rem; }
.chronology-chart { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.chronology-axis, .chronology-row { display: grid; grid-template-columns: minmax(160px, 40%) minmax(0, 1fr); gap: 16px; padding: 8px 24px 8px 12px; }
.chronology-axis { min-height: 52px; align-items: center; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); cursor: ew-resize; touch-action: pan-y; user-select: none; }
.chronology-ticks { position: relative; height: 30px; margin: 0 22px; }
.chronology-ticks span { position: absolute; top: 8px; transform: translateX(-50%); white-space: nowrap; font-size: .75rem; }
.chronology-ticks span:first-child { transform: none; }
.chronology-ticks span:last-child { transform: translateX(-100%); }
.chronology-scroll { max-height: 390px; overflow: auto; }
.chronology-row { border-bottom: 1px solid var(--line); min-height: 64px; align-items: center; }
.chronology-label { min-width: 0; }
.chronology-event { min-height: 44px; text-align: left; color: var(--accent-dark); font: inherit; line-height: 1.4; background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; }
.chronology-label .chronology-event { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }
.chronology-track { position: relative; margin: 0 22px; min-width: 0; border-left: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); }
.chronology-track.paired { border-left: 2px dashed #8a3b55; }
.chronology-mark { position: absolute; width: 44px; height: 44px; transform: translateX(-50%); border: 0; background: none; cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.chronology-symbol { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-dark); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent-dark); }
.chronology-mark.band .chronology-symbol { width: 18px; height: 5px; border-radius: 2px; border: 0; box-shadow: none; }
.chronology-band { position: absolute; height: 9px; min-width: 2px; border-radius: 3px; background: #94b8b3; border: 1px solid var(--accent-dark); }
.chronology-mark.disputed .chronology-symbol { background: #8a3b55; box-shadow: 0 0 0 1px #8a3b55; }
.chronology-band.disputed { background: #e9cad3; border: 2px dashed #8a3b55; }
.chronology-warning { color: #8a3b55; }
.chronology-minimap { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.chronology-minimap label { display: grid; gap: 5px; font-size: .9rem; }
.chronology-minimap svg { display: block; width: 100%; height: 52px; }
.chronology-minimap input { width: 100%; min-height: 44px; accent-color: var(--accent-dark); }
.chronology-density { fill: #94b8b3; }
.chronology-viewport { fill: #2b6a6d12; stroke: var(--accent-dark); stroke-width: 2; }
.chronology-undated { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.chronology-mobile { display: none; }
.chronology :focus-visible { outline: 3px solid #a66b14; outline-offset: 2px; }
#memory.has-chronology .map-time, #memory.has-chronology .map-zoom-controls,
#memory.has-chronology .map-follow, #memory.has-chronology #search-form,
#memory.has-chronology #about { display: none; }
@media (max-width: 759px) {
  .chronology-chart, .chronology-tools, .chronology-minimap, .chronology-range, .chronology-window-count { display: none; }
  .chronology-mobile { display: grid; gap: 18px; list-style: none; padding: 0; }
  .chronology-mobile li { border-left: 3px solid var(--accent-line); padding-left: 12px; }
  .chronology-mobile li.disputed { border-color: #8a3b55; }
  .chronology-date { font-weight: 650; font-size: .9rem; line-height: 1.5; }
  .chronology-controls { grid-template-columns: minmax(0, 1fr); }
  .chronology { overflow-wrap: anywhere; }
}

:root {
  --bg: #faf6ef;
  --surface: #fffdf9;
  --ink: #2a2622;
  --muted: #5d564c;
  --line: #e2d9c8;
  --accent: #2b6a6d;
  --accent-dark: #1a4a4d;
  --accent-soft: #e3f0ef;
  --accent-line: #b6d3d1;
  --focus: #14393c;
  --radius: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 112.5%; /* 18px: the smallest body text on the page */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--surface);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  padding: 10px 16px;
  background: var(--surface);
  border: 2px solid var(--focus);
  border-radius: 10px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* Once a question is running the hero shrinks so the findings come into view. */
.asked .hero {
  padding: 14px 0 20px;
}

.asked h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.asked textarea {
  min-height: 3.6rem;
  font-size: 1.1rem;
}

.asked .examples-block {
  display: none;
}

/* ---- layout ------------------------------------------------------------ */

.top {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feedback-toggle { min-height: 44px; }
.feedback-panel {
  position: fixed;
  z-index: 30;
  top: 66px;
  right: max(20px, calc((100vw - 1240px) / 2 + 28px));
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100dvh - 86px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 32px #2a26221a;
}
.feedback-heading, .feedback-rating-row, .feedback-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feedback-heading { justify-content: space-between; margin-bottom: 16px; }
.feedback-heading h2 { margin: 0; font-size: 1.3rem; }
.feedback-form { font-size: 1rem; }
.feedback-rating-row { flex-wrap: wrap; }
.feedback-thumb { min-width: 48px; min-height: 44px; padding: 6px 10px; }
.feedback-thumb[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); }
.feedback-fields { display: grid; gap: 10px; margin-top: 14px; }
.feedback-form textarea, .feedback-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 10px;
}
.feedback-form textarea { min-height: 110px; }
.feedback-form :focus { border-color: var(--accent); }
.feedback-send { justify-self: start; min-height: 44px; }
.feedback-message { min-height: 1.55em; margin-top: 8px; color: var(--accent-dark); }
.answer-feedback { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 72px;
}

.hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 6px 0 16px;
  text-align: center;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.ask-form {
  text-align: left;
}

textarea,
input[type='search'] {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}

textarea {
  display: block;
  min-height: 4.2rem;
  font-size: 1.3rem;
  line-height: 1.45;
  resize: vertical;
}

textarea::placeholder,
input::placeholder {
  color: #6d665b;
}

textarea:focus,
input:focus {
  border-color: var(--accent);
}

.ask-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}

button {
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 12px 44px;
  font-size: 1.25rem;
  font-weight: 650;
}

.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.primary.is-busy {
  opacity: 0.55;
  cursor: progress;
}

.secondary {
  background: var(--surface);
  color: var(--accent-dark);
  border: 2px solid var(--accent-line);
  border-radius: 999px;
  padding: 7px 20px;
  font-weight: 600;
}

.secondary:hover:not(:disabled) {
  border-color: var(--accent);
}

.secondary:disabled {
  cursor: default;
  color: var(--muted);
  border-color: var(--line);
}

.pill {
  display: inline-block;
  padding: 3px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
}

.ask-note {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.examples-block {
  margin-top: 12px;
}

.hint {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 6px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.example,
.chip {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 8px 18px;
  text-align: left;
  font-size: 1rem;
  line-height: 1.4;
}

.example:hover,
.chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.3;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.quiet {
  color: var(--muted);
}

.workspace.two-up #memory {
  grid-row: 2;
}

@media (min-width: 1040px) {
  .workspace.two-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .workspace.two-up #memory {
    grid-column: 1;
    grid-row: 1;
  }
  .workspace.two-up #findings {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ---- memory ------------------------------------------------------------ */

.topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.two-up .topics {
  grid-template-columns: minmax(0, 1fr);
}

.topic-card,
.entry-row {
  display: flex;
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
}

.topic-card {
  flex-direction: column;
  gap: 4px;
  height: 100%;
}

.topic-card:hover,
.entry-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.topic-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.topic-blurb {
  color: var(--muted);
}

.topic-count {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 600;
}

.topic-card.pulse {
  border-color: var(--accent);
  background: var(--accent-soft);
  animation: gentle 1.4s ease-out;
}

@keyframes gentle {
  0% {
    box-shadow: 0 0 0 0 rgba(43, 106, 109, 0.45);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(43, 106, 109, 0);
  }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: 8px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.search-form {
  display: flex;
  gap: 10px;
  flex: 0 1 400px;
}

input[type='search'] {
  flex: 1;
  min-width: 0;
  padding: 9px 16px;
  border-radius: 999px;
}

.drill {
  display: grid;
  gap: 14px;
}

.back {
  justify-self: start;
  min-height: 44px;
  background: none;
  border: none;
  padding: 4px 2px;
  color: var(--accent-dark);
  font-weight: 650;
  text-align: left;
}

.back:hover {
  text-decoration: underline;
}

.plain-list {
  display: grid;
  gap: 10px;
}

.entry-row {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}

.entry-title {
  flex: 1 1 14rem;
  font-weight: 600;
}

.entry-meta {
  color: var(--muted);
  font-size: 1rem;
}

.entry-tag {
  font-style: italic;
}

.reading {
  gap: 16px;
}

.reading-meta {
  color: var(--muted);
  font-size: 1rem;
  margin-top: -8px;
}

.reading-text {
  display: grid;
  gap: 12px;
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.reading-text p {
  white-space: pre-line;
}

.source-headers {
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}

.source-excerpt p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reading-part {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.source-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
}

.version {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--bg);
}

.version summary {
  cursor: pointer;
}

.version .reading-text {
  margin-top: 10px;
}

.about {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.about summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 650;
}

.about p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 68ch;
}

/* ---- what I'm finding --------------------------------------------------- */

.run-live {
  display: grid;
  gap: 10px;
  padding: 10px 0 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

@media (min-width: 1040px) {
  .run-live {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}

.run-question {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.label,
.eyebrow {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

#run-question {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.run-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.status-line {
  font-weight: 600;
  color: var(--accent-dark);
}

.elapsed {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.run-status .secondary {
  margin-left: auto;
}

.quiet-note,
.end-note {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.link-button {
  justify-self: start;
  background: none;
  border: none;
  padding: 2px;
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration: underline;
}

.updates > summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 14px;
}

.update {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
  display: grid;
  gap: 8px;
}

.update-part {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.update p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.related-strip {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.related-title {
  font-weight: 650;
  font-size: 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-card {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 22px;
  display: grid;
  gap: 16px;
}

.update-list {
  display: grid;
  gap: 6px;
  padding-left: 1.4em;
  list-style: decimal;
}

.answer-direct .answer-conclusion {
  display: grid;
  gap: 10px;
}

.answer-heading {
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 700;
}

.answer-conclusion p {
  font-size: 1.3rem;
  line-height: 1.5;
  font-weight: 600;
}

.answer-part {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.answer-list {
  display: grid;
  gap: 10px;
  padding-left: 1.2em;
  list-style: disc;
}

.answer-part p,
.answer-list li {
  overflow-wrap: anywhere;
}

.cite {
  display: inline-block;
  padding: 0 9px;
  margin: 0 1px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.cite-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.noscript {
  padding: 24px;
}

/* ---- phone ------------------------------------------------------------- */

@media (max-width: 720px) {
  .top {
    padding: 16px 16px 0;
  }
  main {
    padding: 0 16px 56px;
  }
  .hero {
    padding: 14px 0 18px;
  }
  h1 {
    font-size: 2rem;
  }
  .panel {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .ask-row {
    flex-wrap: wrap;
  }
  .primary {
    width: 100%;
  }
  .examples {
    justify-content: flex-start;
  }
  .answer-card {
    padding: 18px 16px;
  }
  .search-form {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- living memory map --------------------------------------------------- */

.map-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.map-state {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.map-state.shown {
  opacity: 1;
}

.map-halo {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 106, 109, 0.18);
}

.map-state[data-kind='working'] .map-halo {
  animation: breathe 4s ease-in-out infinite;
}

.map-state[data-kind='frozen'] .map-halo {
  background: var(--muted);
  box-shadow: none;
}

.map-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 600;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(43, 106, 109, 0.15);
  }
  50% {
    box-shadow: 0 0 0 11px rgba(43, 106, 109, 0.07);
  }
}

.map-modes {
  flex: none;
  display: inline-flex;
  border: 2px solid var(--accent-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.map-mode {
  min-width: 80px;
  min-height: 44px;
  padding: 6px 20px;
  border: none;
  background: none;
  color: var(--accent-dark);
  font-weight: 650;
}

.map-mode[aria-pressed='true'] {
  background: var(--accent);
  color: #fff;
}

.map-frame {
  overflow: hidden;
  padding: 10px 10px 14px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 44%, #1b4348 0%, #10292d 48%, #0a1d20 100%);
  color: #cfe3df;
}

.map-stage {
  position: relative;
  width: 100%;
  max-width: min(100%, 74vh, calc(100vh - 340px));
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: visible;
}

.map-svg,
.map-cites {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.map-cites {
  pointer-events: none;
}

.map-caption {
  text-wrap: balance;
  margin-top: 10px;
  text-align: center;
  color: #a9c9c4;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.map-tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  max-width: min(300px, 86%);
  padding: 6px 12px;
  border-radius: 10px;
  background: #f4faf8;
  color: #12302f;
  font-size: 1rem;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.map-reset {
  position: absolute;
  z-index: 3;
  left: 10px;
  top: 10px;
  min-height: 44px;
  padding: 6px 18px;
  border: 1.5px solid rgba(143, 214, 204, 0.55);
  border-radius: 999px;
  background: rgba(11, 31, 34, 0.86);
  color: #e6f2ef;
  font-weight: 650;
}

.map-reset:hover {
  border-color: #bff5ec;
}

/* Hover follows the thin ticks; lit ticks also have invisible targets of at least 44 CSS px.
   Overlapping targets open distinct, full-size collection choices. No added motion. */
.tick-hover-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  stroke-linecap: butt;
  pointer-events: stroke;
}
.tick-touch-hit {
  fill: transparent;
  pointer-events: none;
}
.tick-hit.lit .tick-touch-hit {
  pointer-events: all;
}
.tick-hit.lit {
  cursor: pointer;
}
.tick-hit.lit:hover .tick-hover-hit,
.tick-hit.lit:focus-visible .tick-hover-hit {
  stroke: rgba(102, 240, 223, 0.2);
  outline: none;
}
.tick-hit.lit:focus-visible .tick-hover-hit {
  stroke: rgba(255, 255, 255, 0.4);
}
.map-svg.in-constellation .tick-hit,
.map-svg.in-topic .tick-hit,
.map-svg.in-constellation .tick-hit *,
.map-svg.in-topic .tick-hit * {
  pointer-events: none;
}
.tick-ring {
  fill: none;
  stroke: rgba(102, 240, 223, 0.5);
  stroke-width: 1.6;
  pointer-events: none;
}

.map-tick-tip,
.map-tick-panel {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  background: #f4faf8;
  color: #12302f;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.map-tick-tip {
  padding: 5px 11px;
  border-radius: 10px;
  max-width: min(260px, 70%);
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
.map-tick-panel {
  z-index: 4;
  width: min(260px, 78%);
  max-height: 100%;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding: 12px 14px 10px;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.4;
}
.map-stage.tick-panel-open {
  touch-action: pan-y;
}
.map-tick-name {
  margin: 0 0 4px;
  font-weight: 700;
}
.map-tick-line {
  margin: 0 0 6px;
}
.map-tick-sources,
.map-tick-choices {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.map-tick-sources li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.map-tick-source,
.map-tick-choice,
.map-tick-close {
  min-height: 44px;
  padding: 3px 12px;
  border: 1.5px solid #2b6b66;
  border-radius: 999px;
  background: #fff;
  color: #12302f;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.map-tick-source:hover,
.map-tick-choice:hover,
.map-tick-close:hover {
  background: #e3f3ef;
}
.map-tick-choice {
  width: 100%;
  min-width: 44px;
  white-space: normal;
  text-align: left;
}
.map-tick-subject {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  color: #355f5b;
}
.map-tick-close {
  display: block;
  margin-left: auto;
  min-height: 44px;
  border-color: transparent;
  font-weight: 550;
}

.map-svg :focus-visible,
.map-cites :focus-visible {
  outline: none;
  box-shadow: none;
}

.ring-line {
  fill: none;
  stroke: rgba(143, 214, 204, 0.16);
  stroke-width: 1.5;
}

.tick {
  stroke: rgba(143, 214, 204, 0.4);
  stroke-width: var(--tick-w, 2.4);
  stroke-linecap: round;
}

.tick.indexed {
  stroke: #c4f7ef;
  stroke-width: var(--tick-w-indexed, 4.4);
}

.tick-attempt {
  stroke: #f2a63b;
  stroke-width: var(--attempt-w, 11);
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tick-attempt.on {
  opacity: 0.92;
}

.tick-mark {
  fill: #66f0df;
}

.tick-flash {
  fill: rgba(102, 240, 223, 0.6);
  transform-box: fill-box;
  transform-origin: center;
  animation: tick-flash 1.4s ease-out forwards;
}

@keyframes tick-flash {
  0% {
    opacity: 1;
    transform: scale(0.5);
  }
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.tick-notch {
  stroke: #f0c25a;
  stroke-width: 4.6;
  stroke-linecap: round;
}

.disc {
  fill: rgba(143, 214, 204, 0.035);
  stroke: rgba(143, 214, 204, 0.13);
  stroke-width: 1.2;
}

.disc.lit {
  fill: rgba(143, 214, 204, 0.09);
  stroke: rgba(190, 255, 246, 0.42);
}

.disc.pulse {
  animation: disc-pulse 1.6s ease-out;
}

@keyframes disc-pulse {
  0% {
    fill: rgba(143, 214, 204, 0.3);
  }
  100% {
    fill: rgba(143, 214, 204, 0.09);
  }
}

.dot {
  fill: #8fd6cc;
  fill-opacity: 0.6;
  stroke: transparent;
  stroke-width: var(--hit, 10);
  cursor: pointer;
  transition: fill-opacity 0.2s ease;
}

.dot:hover {
  fill-opacity: 1;
  stroke: rgba(190, 255, 246, 0.26);
}

.dot:focus-visible {
  fill: #fff;
  fill-opacity: 1;
  stroke: #fff;
  stroke-width: 3;
}

.dot.hollow {
  fill: transparent;
  stroke: #8fd6cc;
  stroke-opacity: 0.8;
  stroke-width: 1.6;
}

.dot.dim:not(.lit) {
  opacity: 0.14;
}

.dot.lit {
  fill: #cffff8;
  fill-opacity: 0.96;
  stroke: rgba(120, 235, 220, 0.3);
  stroke-width: var(--halo, 12);
}

.dot.glow {
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 7px #8ffff0);
  animation: dot-glow 2s ease-out;
}

@keyframes dot-glow {
  0% {
    transform: scale(1);
  }
  18% {
    transform: scale(2.3);
  }
  100% {
    transform: scale(1);
  }
}

.topic-label {
  cursor: pointer;
}

.topic-label.dim {
  opacity: 0.4;
}

.label-hit {
  fill: transparent;
  stroke: none;
}

.topic-label:focus-visible .label-hit {
  stroke: #fff;
  stroke-width: 2;
}

.map-topic {
  fill: #e8f3f0;
  font-weight: 600;
  paint-order: stroke;
  stroke: #0e2528;
  stroke-width: 5px;
  stroke-linejoin: round;
  pointer-events: none;
  user-select: none;
}

.topic-label:hover .map-topic {
  fill: #fff;
}

.map-topic-count {
  fill: #7fc9bf;
  font-weight: 500;
}

.cite-d {
  pointer-events: all;
  cursor: pointer;
  animation: cite-in 0.7s ease-out;
}

@keyframes cite-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.cite-shape {
  fill: #f0c25a;
  stroke: #fff0c0;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(240, 194, 90, 0.6));
}

.cite-n {
  fill: #2c1f03;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.cite-d.hot .cite-shape,
.cite-d:focus-visible .cite-shape {
  fill: #ffe18d;
  stroke: #fff;
  stroke-width: 3;
}

.cite.cite-hot {
  background: #fbebb9;
  border-color: #d8a93a;
  color: #4b3500;
}

.map-connector {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.map-connector.shown {
  opacity: 1;
}

.connector-line {
  fill: none;
  stroke: #2fa59a;
  stroke-width: 1.6;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}

.connector-start {
  fill: #2fa59a;
}

.connector-end {
  fill: none;
  stroke: #8ffff0;
  stroke-width: 1.5;
  opacity: 0.85;
}

@media (min-width: 1040px) {
  .workspace.two-up #memory.has-map {
    position: sticky;
    top: 12px;
  }
}

@media (max-width: 720px) {
  .map-frame {
    padding: 6px 6px 12px;
    border-radius: 18px;
  }
  .map-stage {
    border-radius: 14px;
  }
}

/* ---- evolving knowledge map ------------------------------------------------ */
main {
  max-width: 1480px;
  height: calc(100dvh - 36px);
  min-height: 620px;
  padding: 0 18px 12px;
  display: flex;
  flex-direction: column;
}

.top {
  max-width: 1480px;
  padding: 4px 18px 0;
}

.hero,
.asked .hero {
  max-width: none;
  width: 100%;
  margin: 0;
  flex: none;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 4px 18px;
  padding: 4px 0 10px;
  text-align: left;
}

.hero h1,
.asked h1 {
  font-size: 1.4rem;
  margin: 0;
  white-space: nowrap;
}

.ask-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

textarea,
.asked textarea {
  flex: 1 1 300px;
  height: 54px;
  min-height: 54px;
  max-height: 110px;
  padding: 8px 14px;
  font-size: 1rem;
  line-height: 1.5;
}

.ask-row {
  flex: none;
  justify-content: flex-start;
  margin: 0;
}

.primary {
  min-width: 96px;
  min-height: 54px;
  padding: 5px 20px;
  font-size: 1.1rem;
}

.ask-note {
  flex: 1 1 100%;
  margin: 0;
  padding: 4px 12px;
}

.examples-block,
.asked .examples-block {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.examples-block .hint { flex: none; margin: 0; }
.examples {
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  gap: 8px;
}
.example {
  max-width: min(30vw, 400px);
  min-height: 44px;
  padding: 6px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace,
.workspace.two-up {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 14px;
}
.workspace #memory,
.workspace #findings {
  min-width: 0;
  min-height: 0;
}
.workspace #memory { grid-column: 1; grid-row: 1; }
.workspace #findings { grid-column: 2; grid-row: 1; }
.panel { padding: 14px 18px; }
.panel-head { margin-bottom: 6px; }
.panel-head h2,
#findings-heading {
  font-size: 1.22rem;
  margin-bottom: 6px;
}

#memory,
#findings {
  overflow-y: auto;
}
#memory.has-map {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#memory.is-loading { display: flex; flex-direction: column; overflow: hidden; }
.memory-loading { display: flex; flex: 1; min-height: 0; }
.memory-loading[hidden] { display: none; }
.map-shell-bar { display: block; flex: none; width: 130px; height: 48px; border-radius: 12px; background: var(--line); opacity: .4; }
.map-shell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-shell circle { fill: none; stroke: #9bb6ae; stroke-width: 1; opacity: .22; }
#memory.has-map .search-form,
#memory.has-map #about { display: none; }
#memory.has-map #memory-map {
  display: flex;
  flex: 1;
  min-height: 0;
}
.map-card {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.map-bar { flex: none; margin-bottom: 4px; }
.map-state { min-height: 44px; }
.map-state[data-kind='working'] .map-halo { animation: none; }
.map-state[data-kind='frozen'] .map-status { overflow: visible; white-space: normal; }
.map-follow {
  min-height: 44px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid #a9c9c4;
  color: var(--accent-dark);
  background: var(--surface);
  font-weight: 650;
}
.map-follow[aria-pressed='true'] { background: var(--accent); color: #fff; }
.map-follow:focus-visible,
.map-time :focus-visible,
.finding-link:focus-visible {
  outline: 3px solid #f0c25a;
  outline-offset: 2px;
}
.map-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
}
.map-stage {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  flex: 1 1 auto;
}
.map-caption {
  flex: none;
  margin-top: 2px;
}
.map-svg,
.map-cites { overflow: hidden; }
.map-time {
  flex: none;
  min-height: 44px;
  display: flex;
  gap: 5px;
  margin-top: 6px;
  align-items: stretch;
}
.time-control,
.time-tick {
  min-height: 44px;
  min-width: 54px;
  border: 1px solid rgba(143, 214, 204, 0.48);
  background: #143237;
  color: #f0f8f5;
  border-radius: 10px;
  padding: 3px 8px;
  line-height: 1.12;
  font-size: 1rem;
  cursor: pointer;
}
.time-control:disabled { opacity: 0.55; cursor: default; }
.time-ticks {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.time-tick {
  flex: 1 0 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.time-tick.selected,
.time-tick[aria-current='step'] {
  background: #f0c25a;
  color: #272213;
}
.tick-elapsed { font-variant-numeric: tabular-nums; }
.time-latest {
  flex: none;
  background: #f0c25a;
  color: #272213;
}

.disc { fill: rgba(143, 214, 204, 0.025); }
.dot { fill-opacity: 0.27; }
.dot.visited { fill-opacity: 0.55; }
.map-svg.in-constellation .dots,
.map-svg.in-constellation .clusters,
.map-svg.in-constellation .ring { opacity: 0.17; }
.map-svg.in-constellation .topic-label { opacity: 0.08; }
.map-svg.has-trail:not(.in-constellation):not(.in-topic) .topic-label { opacity: 0.14; }
.map-svg.in-topic .trail-markers { display: none; }
.map-svg.in-topic .trail-paths { opacity: 0.12; }
.map-svg.in-topic .topic-label { opacity: 0; pointer-events: none; }
.trail-route {
  fill: none;
  stroke: #99d8cc;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
  opacity: 0.8;
}
.trail-route.older { opacity: 0.25; }
.trail-converge {
  fill: none;
  stroke: #f0c25a;
  stroke-width: 3;
  opacity: 0.85;
}
.trail-step,
.trail-answer,
.topic-memory,
.trail-memory,
.trail-source { cursor: pointer; }
.trail-step-halo {
  fill: rgba(111, 243, 221, 0.13);
  stroke: rgba(153, 216, 204, 0.5);
  stroke-width: 2;
}
.trail-step.selected .trail-step-halo { fill: rgba(111, 243, 221, 0.3); stroke: #c9fff5; }
.trail-step-core { fill: #bff5ec; stroke: #122d30; stroke-width: 2; }
.trail-step.first-look .trail-step-core { fill: #b2c5c2; }
.trail-step-number { fill: #173b3b; font-weight: 800; pointer-events: none; }
.trail-label,
.trail-answer-label,
.trail-next-text {
  fill: #f5faf8;
  font-weight: 650;
  paint-order: stroke;
  stroke: #10292d;
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.trail-answer circle { fill: #f0c25a; stroke: #fff0c0; stroke-width: 3; }
.trail-answer-letter { fill: #3c2c08; font-weight: 800; pointer-events: none; }
.trail-answer-label { fill: #ffe49c; font-weight: 750; }
.trail-next circle { fill: #10292d; stroke: #e7ead6; stroke-width: 2.5; }
.trail-next-name { fill: #e7ead6; font-weight: 650; }
.satellite-link,
.topic-title-link {
  fill: none;
  stroke: rgba(143, 214, 204, 0.65);
  stroke-width: 2;
}
.topic-title-link { stroke-dasharray: 2 6; }
.topic-memory-back { fill: rgba(12, 37, 40, 0.92); stroke: rgba(143, 214, 204, 0.38); }
.topic-memory-dot,
.trail-memory circle { fill: #bff5ec; }
.topic-memory-text,
.trail-memory-text,
.trail-source-text { fill: #f3faf7; font-weight: 600; }
.trail-diamond { fill: #f0c25a; }
.trail-source.hollow .trail-diamond { fill: none; stroke: #f0c25a; stroke-width: 2; }
.trail-source-text { fill: #ffe49c; }
.trail-memory:focus-visible circle,
.topic-memory:focus-visible .topic-memory-back,
.trail-step:focus-visible .trail-step-core,
.trail-answer:focus-visible circle,
.trail-source:focus-visible .trail-diamond { stroke: #fff; stroke-width: 4; }
.satellite-hit { fill: transparent; pointer-events: all; }
.trail-step.appearing,
.trail-answer.appearing,
.trail-details > .appearing { animation: trail-reveal 250ms ease-out both; }
.motion-paused *,
.motion-paused *::before,
.motion-paused *::after { animation: none !important; transition: none !important; }
@keyframes trail-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .trail-step.appearing,
  .trail-answer.appearing,
  .trail-details > .appearing { animation: none; }
}

#findings { display: flex; flex-direction: column; }
.findings-empty { color: var(--muted); padding-top: 14px; }
#run-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.run-live { margin-bottom: 8px; }
.run-question { margin-bottom: 4px; }
.finding-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.finding-link {
  flex: 0 0 min(260px, 70%);
  min-height: 44px;
  padding: 6px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 9px;
  text-align: left;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finding-link.selected { border-color: var(--accent); background: #c5e9e4; }
.update[data-update-id] { cursor: pointer; }
.update-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.updates > summary { min-height: 44px; }

@media (max-width: 759px) {
  main {
    height: auto;
    min-height: 0;
    padding: 0 14px 36px;
    display: block;
  }
  .hero,
  .asked .hero {
    display: block;
    padding: 6px 0 10px;
  }
  .hero h1,
  .asked h1 { margin-bottom: 7px; }
  .ask-form { display: grid; grid-template-columns: minmax(0, 1fr) 96px; width: 100%; }
  textarea,
  .asked textarea { grid-column: 1; min-width: 0; width: 100%; height: 54px; min-height: 54px; }
  .ask-row { grid-column: 2; }
  .primary { min-height: 54px; width: auto; }
  #replay-pill { grid-column: 1 / -1; justify-self: start; }
  .ask-note { grid-column: 1 / -1; }
  .examples-block,
  .asked .examples-block { margin-top: 8px; }
  .examples-block .hint { display: none; }
  .example { max-width: 220px; }
  .workspace,
  .workspace.two-up {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .workspace #memory,
  .workspace #findings {
    grid-column: 1;
    grid-row: auto;
  }
  .workspace #memory { grid-row: 1; }
  .workspace #findings { grid-row: 2; }
  #memory.has-map { overflow: visible; }
  #memory.is-loading { overflow: visible; }
  .map-caption { min-height: 2lh; }
  .map-frame { min-height: 0; }
  .map-stage {
    width: min(100%, 370px);
    height: auto;
    flex: none;
    aspect-ratio: 1;
  }
  .map-reset {
    left: auto;
    right: 6px;
    top: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1rem;
    text-indent: -999px;
    white-space: nowrap;
    overflow: hidden;
  }
  .map-reset::before {
    content: '↖';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    text-indent: 0;
  }
  .map-bar { gap: 4px; }
  .map-mode { min-width: 44px; padding: 6px 10px; }
  .map-state { flex-basis: 100%; }
  .map-time { max-width: 100%; flex-wrap: wrap; }
  .time-ticks { order: 2; flex: 1 0 100%; }
  .time-tick { min-width: 44px; flex: 1 1 44px; padding: 3px 2px; }
  .time-latest { margin-left: auto; }
  #findings { overflow: visible; }
  #run-content { overflow: visible; }
  .finding-list { flex-wrap: wrap; overflow: visible; }
  .finding-link { flex: 1 1 100%; }
}

/* U1: newest-first updates and the run summary. */
#run-content { overflow-anchor: none; } /* the page keeps the reader's place itself (withScrollAnchor) */
.live-tally-slot[hidden],
.run-summary[hidden] { display: none; }
.live-tally {
  margin-top: 4px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.run-summary { margin-bottom: 14px; }
.run-summary-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 14px;
}
.run-summary-head {
  cursor: pointer;
  min-height: 44px;
  padding: 9px 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.run-summary-label { margin-right: 8px; font-weight: 700; color: var(--accent-dark); }
.tally-num {
  cursor: help;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.run-summary-table {
  width: 100%;
  margin: 2px 0 12px;
  border-collapse: collapse;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.run-summary-table th,
.run-summary-table td { padding: 6px 4px; border-top: 1px solid var(--line); }
.run-summary-table th { text-align: left; font-weight: 600; color: var(--muted); }
.run-summary-table td { text-align: right; }
.update-fresh { animation: update-fresh 2.4s ease-out; }
@keyframes update-fresh {
  from { background: var(--accent-soft); border-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .update-fresh { animation: none; }
}
