/* Theme: “declassified case file”. Dark = operations room (default); light = grey paper. */
:root {
  --bg: #090c0f;
  --bg-grid: rgba(120, 200, 190, .035);
  --panel: #0e1317;
  --panel-2: #131a1f;
  --border: #1e282e;
  --border-strong: #2c3a42;
  --edge: #2a3940;
  --text: #d6dfe2;
  --muted: #7a8a92;
  --accent: #6fcfbf;
  --accent-soft: rgba(111, 207, 191, .12);
  --documented: #5cc28e;
  --claimed: #d9a441;
  --unverified: #7a8a92;
  --outside: #d0715e;
  --shadow: 0 12px 36px rgba(0, 0, 0, .55);
  --side-w: 272px;
  --panel-w: 0px;
  --top-h: 58px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eeeff1;
  --bg-grid: rgba(30, 40, 50, .045);
  --panel: #f9f9fa;
  --panel-2: #e7e8eb;
  --border: #d7d9dd;
  --border-strong: #bfc2c8;
  --edge: #c3c6cc;
  --text: #1e2124;
  --muted: #5f646b;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, .1);
  --documented: #1a7a46;
  --claimed: #9a6200;
  --unverified: #73787f;
  --outside: #b0452f;
  --shadow: 0 10px 30px rgba(20, 30, 40, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--sans);
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input { font: inherit; color: inherit; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 12px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

/* ── Top bar ── */
.top {
  height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--border); position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { color: var(--accent); }
.brand:hover { text-decoration: none; }
.search { flex: 1; max-width: 560px; position: relative; }
.search input, .vs-search input, .index-bar input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel-2); outline: none;
}
.search input:focus, .vs-search input:focus, .index-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dropdown {
  position: absolute; top: 42px; left: 0; right: 0; max-height: 70vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
}
.dd-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.dd-item:hover, .dd-item.active { background: var(--accent-soft); }
.dd-item .t { font-weight: 600; }
.dd-item.typed { box-shadow: inset 3px 0 0 var(--c); padding-left: 13px; border-radius: 0 7px 7px 0; margin-bottom: 4px; } /* square left edge: the colour bar is a straight line */
.dd-item.typed:hover, .dd-item.typed.active { background: color-mix(in srgb, var(--c) 14%, transparent); }
.dd-type { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; vertical-align: 1px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 75%, var(--text)); background: color-mix(in srgb, var(--c) 15%, transparent); }
.dd-item .s { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.dd-sep { border-top: 1px solid var(--border); margin: 6px 0; }
.dd-doc-head { display: flex; gap: 12px; align-items: center; }
.dd-doc-head .link { font-family: inherit; text-transform: none; letter-spacing: 0; }
.dd-mod { display: block; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--accent); text-decoration: none; }
.dd-mod:hover { text-decoration: underline; }
.dd-doc { padding: 4px 0 8px; border-bottom: 1px solid var(--border); }
.dd-doc:last-child { border-bottom: 0; }
.dd-doc-t { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px 2px; font-weight: 600; font-size: 13px; color: var(--text); }
.dd-doc-t span { color: var(--muted); font-weight: 400; white-space: nowrap; }
.dd-doc-hit { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text); text-decoration: none; }
.dd-doc-hit:hover { background: var(--accent-soft); text-decoration: none; }
.dd-doc-more { padding: 2px 10px 4px; }
.views { display: flex; gap: 2px; background: var(--panel-2); padding: 3px; border-radius: 9px; border: 1px solid var(--border); margin-left: auto; } /* the search stops at 560px: the nav and icons keep to the right edge on wide windows */
.views a { padding: 5px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.views a:hover { color: var(--text); text-decoration: none; }
.views a.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; color: var(--muted); font-size: 16px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
#btn-settings { position: relative; display: inline-grid; place-items: center; }
#btn-settings svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#btn-settings[aria-expanded="true"] { background: var(--panel-2); color: var(--accent); }
#btn-settings .set-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
#btn-settings .set-dot[hidden] { display: none; }
.settings-pop { position: fixed; z-index: 70; top: calc(var(--top-h) - 4px); right: 8px; width: min(320px, calc(100vw - 16px)); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 14px 16px 12px; display: grid; gap: 14px; }
.settings-pop[hidden] { display: none; }
.settings-pop h4 { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.settings-pop .set-theme { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sp-note { margin: 0; font-size: 11.5px; color: var(--muted); }
.only-mobile { display: none; }

/* ── Layout ── */
.app {
  display: grid; grid-template-columns: var(--side-w) 1fr var(--panel-w);
  height: calc(100% - var(--top-h));
}
.app.has-panel { --panel-w: var(--panel-user-w, 440px); }
.side { background: var(--panel); border-right: 1px solid var(--border); overflow: auto; }
.main { position: relative; overflow: hidden; min-width: 0; }
.view { position: absolute; inset: 0; }
.panel { background: var(--panel); border-left: 1px solid var(--border); overflow: auto; position: relative; }

/* ── Filters ── */
.f-block { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.f-block h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex: none; width: 34px; height: 20px; border-radius: 10px; background: var(--border); position: relative; transition: background .15s; margin-top: 2px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.f-types { display: grid; gap: 2px; }
.f-type { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 6px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.f-type:hover { background: var(--panel-2); }
.f-type input { display: none; }
.f-type .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.f-type .n { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.f-type.off { opacity: .4; }
.f-type.off .sw { background: transparent !important; outline: 1.5px solid var(--muted); outline-offset: -1.5px; }
.hist { width: 100%; height: 44px; display: block; }
.hist rect { fill: var(--border); }
.hist rect.in { fill: var(--accent); opacity: .75; }
.range2 { position: relative; height: 22px; }
.range2 input { position: absolute; left: 0; right: 0; width: 100%; margin: 0; pointer-events: none; background: none; -webkit-appearance: none; appearance: none; height: 22px; }
.range2 input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); cursor: pointer; }
.range2 input::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); cursor: pointer; }
.range2::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border); cursor: pointer; color: var(--text); line-height: 1.6;
}
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.on { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.chip .n { color: var(--muted); font-size: 11px; }
.chip.on .n { color: inherit; opacity: .8; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip.dim { opacity: .55; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; cursor: pointer; }
.btn { background: var(--panel-2); border: 1px solid var(--border); border-radius: 7px; padding: 6px 12px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.primary { background: var(--accent); color: var(--panel); border-color: var(--accent); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 11px; text-transform: none; letter-spacing: 0; }
.f-stats { padding: 14px 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.f-stats b { color: var(--text); font-weight: 600; }
.f-stats details { margin-top: 8px; }
.f-stats summary { cursor: pointer; }
.f-stats ul { padding-left: 16px; margin: 6px 0; max-height: 200px; overflow: auto; }

/* ── Graph ── */
#cy { position: absolute; inset: 0; }
.legend {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 24px);
  background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; font-size: 11.5px; color: var(--muted);
  backdrop-filter: blur(6px);
}
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ── Timeline ── */
.timeline { position: absolute; inset: 0; overflow: auto; padding: 8px 28px 60px; }
.tl-decade { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 16px 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 10px; }
.tl-decade small { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tl-items { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 0; }
.tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 8px 12px 8px 0; position: relative; cursor: pointer; border-radius: 8px; }
.tl-item:hover { background: var(--panel); }
.tl-item.sel { background: var(--accent-soft); }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--bg); }
.tl-date { padding-left: 18px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-name { font-weight: 600; }
.tl-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--c); font-weight: 600; margin-right: 6px; }
.tl-desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Map ── */
#map { position: absolute; inset: 0; background: var(--panel-2); }
.leaflet-container { font: inherit; }
#map { isolation: isolate; } /* Leaflet's panes (z-index up to 1000) stay inside the map, below the header's search results */
.dd-head { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.leaflet-tooltip { background: var(--panel); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.leaflet-tooltip-top::before { border-top-color: var(--panel); }

/* ── Videos ── */
#view-videos { overflow: auto; }
.player-col { max-width: 1100px; margin: 0 auto; padding: 18px 22px 60px; }
.player-wrap { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.player-wrap iframe, .player-wrap video, #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa4b2; font-size: 15px; padding: 20px; text-align: center; }
.vd-head { margin: 14px 0 6px; }
.vd-head h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; line-height: 1.3; }
.vd-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 14px 0 0; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tab-body { padding: 12px 0; }
.ts {
  font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-soft);
  border: 0; border-radius: 5px; padding: 1px 6px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ts:hover { background: var(--accent); color: var(--panel); }
.moment { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: start; }
.moment .who { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.transcript-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; position: sticky; top: 0; background: var(--bg); padding: 6px 0; z-index: 1; }
.transcript-tools input { flex: 1; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); outline: none; }
.transcript p { margin: 0; padding: 6px 8px; border-radius: 7px; display: grid; grid-template-columns: 66px 1fr; gap: 8px; cursor: pointer; }
.transcript p:hover { background: var(--panel); }
.transcript p.now { background: var(--accent-soft); }
mark { background: rgba(227, 179, 65, .4); color: inherit; border-radius: 3px; padding: 0 1px; }
.vid-list { padding: 4px 8px 40px; }
.vs-search { padding: 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.vs-search .small { margin-top: 6px; min-height: 18px; }
.vs-pl-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 16px 2px; }
.vs-to-list { padding: 10px 16px 0; }
.vs-hits { padding: 4px 0 20px; border-top: 1px solid var(--border); margin-top: 8px; }
.vs-hits .vb-sec { margin: 12px 8px 4px; font-size: 12px; }
.vb-hits { margin-top: 28px; }
.hit-more { padding: 2px 8px 6px; }
.vb-open-side { margin: 4px 0 8px; }
.vl-item { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px; border-radius: 9px; cursor: pointer; }
.vl-item:hover { background: var(--panel-2); }
.vl-item.on { background: var(--accent-soft); }
.vl-item img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.vl-item .t { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vl-item .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.vl-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 8px 4px; }
.hit { padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.hit:hover { background: var(--panel-2); }
.hit-video { font-weight: 600; font-size: 12.5px; padding: 12px 8px 2px; display: flex; justify-content: space-between; gap: 8px; }
.hit-video span { color: var(--muted); font-weight: 400; white-space: nowrap; }
.doc-hit { color: inherit; text-decoration: none; }
.doc-hit .ts { align-self: start; }
.tq-scope { margin: 6px 0 4px; }

/* ── Index ── */
#view-index, #view-shelf { overflow: auto; }
.index-bar { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 16px 24px 10px; display: flex; gap: 12px; align-items: center; }
.index-bar input { max-width: 420px; }
.index { padding: 0 24px 60px; }
.ix-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.ix-group h3 i { width: 10px; height: 10px; border-radius: 3px; }
.ix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; cursor: pointer; position: relative; }
.card:hover { border-color: var(--accent); }
.card .t { font-weight: 600; line-height: 1.3; }
.card .s { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.outside { opacity: .6; }

/* ── Detail panel ── */
.panel-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
#panel-body { padding: 20px 22px 60px; }
.p-kicker { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; padding-right: 30px; }
.badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 5px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.badge.type { color: #fff; border-color: transparent; }
.badge.credible { color: var(--documented); border-color: currentColor; background: transparent; }
.badge.reporter { color: var(--claimed); border-color: currentColor; background: transparent; }
.badge.outside { color: var(--outside); border-color: currentColor; background: transparent; }
.p-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 4px; }
.p-aka { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.p-creds { margin: 2px 0 8px; font-size: 14px; }
#panel-body.reading .p-creds { font-size: 15px; }
.p-meta { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 2px; margin: 6px 0 4px; }
.p-sec { margin-top: 20px; }
.p-sec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cred-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cred-list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
.cred-cat { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--border); white-space: nowrap; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fact { border-left: 3px solid var(--st); padding: 2px 0 2px 11px; }
.fact .meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.st { font-weight: 600; color: var(--st); text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.needs { color: var(--outside); }
.conn-group { margin-bottom: 10px; }
.conn-group .lbl { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.conn-notes { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.conn-notes li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.conn-notes li > span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mention-video { padding: 8px 0; border-bottom: 1px solid var(--border); }
.mention-video .mv-t { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.mention-video .mv-t span { color: var(--muted); font-weight: 400; white-space: nowrap; }
.mention-video .mv-ts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.snip { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.p-body { line-height: 1.6; }
.p-body p { margin: 0 0 10px; }
.p-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.p-edit { margin-top: 28px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p-edit code { background: var(--panel-2); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }
.play-card { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; margin-top: 12px; }
.play-card img { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; cursor: pointer; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .app.has-panel { --panel-w: var(--panel-user-w, 380px); }
  .views a { padding: 5px 9px; }
}
@media (max-width: 860px) {
  :root { --side-w: 0px; }
  .only-mobile { display: inline-block; }
  .brand span { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  .views { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 30; box-shadow: var(--shadow); background: var(--panel); }
  .side { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: min(320px, 88vw); z-index: 25; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .app.has-panel { --panel-w: 0px; }
  .panel { position: fixed; inset: var(--top-h) 0 0 0; z-index: 26; }
  .timeline { padding: 4px 16px 80px; }
  .tl-item { grid-template-columns: 84px 1fr; gap: 8px; }
  .index-bar, .index { padding-left: 16px; padding-right: 16px; }
  .player-col { padding: 12px 16px 80px; }
  .legend { display: none; }
}

/* ───────── Case-file styling ───────── */
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--mono); font-weight: 600; letter-spacing: .16em; font-size: 13px; }
.brand-text small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em; color: var(--muted); margin-top: 3px; }
.views a { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.f-block h4, .p-sec h4, .tl-type, .badge, .vl-group, .ix-group h3, .st, .cred-cat, .tabs button { font-family: var(--mono); }
.top { background: color-mix(in srgb, var(--panel) 92%, transparent); }
#view-graph, #view-map { background: var(--bg); }
#view-graph::before, .timeline, #view-index, #view-claims, #view-videos, #view-shelf {
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
#view-graph::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
#view-graph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
}
.legend { z-index: 2; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; }
.graph-hud {
  position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--muted); text-transform: uppercase; pointer-events: none; line-height: 1.7;
}
.graph-hud b { color: var(--accent); font-weight: 500; }

/* dossier header */
.dossier-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px dashed var(--border-strong); padding: 0 34px 8px 0; margin-bottom: 14px;
}
.dossier-strip b { color: var(--text); font-weight: 500; }
.p-title { font-weight: 600; letter-spacing: -.01em; }
.badge { border-radius: 2px; letter-spacing: .12em; font-weight: 500; font-size: 10.5px; }
.badge.type { color: var(--bg); }
.badge.credible, .badge.reporter, .badge.outside { border-width: 1.5px; }
.stamp { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 1px 6px; border: 1.5px solid currentColor; border-radius: 2px; color: var(--st); }
.fact { border-left-width: 2px; }
.cred-cat { border-radius: 2px; font-weight: 500; letter-spacing: .04em; }
.p-bio { font-size: 14.5px; line-height: 1.65; }
.p-bio p:first-child::first-line { font-weight: 500; }
.p-bio blockquote { margin: 10px 0; padding: 4px 0 4px 12px; border-left: 2px solid var(--accent); color: var(--text); font-style: italic; }
.glimpses { display: grid; gap: 12px; }
.glimpse { margin: 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); }
.glimpse p { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.55; font-style: italic; color: var(--text); }
.glimpse p::before { content: '“'; } .glimpse p::after { content: '”'; }
.glimpse footer { margin-top: 5px; font-size: 12px; color: var(--muted); }
.glimpse footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.p-sources { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* dot-connecting */
.dots-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.dots-item .why { font-size: 12px; color: var(--muted); margin-top: 3px; }
.dots-item .new { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--accent); border: 1px solid var(--accent); padding: 0 4px; border-radius: 2px; margin-left: 6px; vertical-align: 1px; }
.trace { position: relative; }
.trace input { width: 100%; height: 34px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--border); background: var(--panel-2); outline: none; }
.trace input:focus { border-color: var(--accent); }
.trace .dropdown { top: 38px; }
.path { margin-top: 10px; display: grid; gap: 2px; }
.path .hop { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.path .via { font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding: 2px 0 2px 14px; border-left: 1px dashed var(--border-strong); margin-left: 9px; }

/* claims ledger */
#view-claims { overflow: auto; }
.claims { padding: 0 24px 60px; display: grid; gap: 8px; }
.claim { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--st); border-radius: 4px; padding: 10px 14px; }
.claim .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.seg button { background: var(--panel); border: 0; padding: 6px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; color: var(--muted); border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-soft); color: var(--text); }
.card, .claim, .btn, .chip, .search input, .vs-search input, .index-bar input, .dropdown, .player-wrap { border-radius: 4px; }
.chip { border-radius: 3px; }
.views, .views a { border-radius: 4px; }

/* official records */
.record-card { margin-top: 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-2); padding: 12px; display: grid; gap: 10px; }
.record-card img { width: 100%; max-height: 220px; object-fit: cover; object-position: top; border-radius: 3px; border: 1px solid var(--border); background: #fff; }
.rec-meta { display: grid; grid-template-columns: 76px 1fr; gap: 3px 10px; margin: 0; font-size: 12.5px; }
.rec-meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.rec-meta dd { margin: 0; }
.rec-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.transcript { max-height: min(52vh, 560px); overflow: auto; position: relative; border: 1px solid var(--border); border-radius: 4px; padding: 4px; background: color-mix(in srgb, var(--panel) 60%, transparent); }
@media (min-width: 1500px) { .player-col { max-width: 1200px; } }

/* watch list in dossiers */
.dv-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 3px; overflow: hidden; cursor: pointer; }
.dv-frame img { width: 100%; height: 100%; object-fit: contain; display: block; border: 0; max-height: none; border-radius: 0; background: #000; }
.dv-frame .wplay { font-size: 28px; }
.dv-frame:hover .wplay, .dv-frame:focus-visible .wplay { opacity: 1; }
.dv-frame.playing { cursor: auto; }
.record-card > .dv-frame { width: 100%; max-width: 760px; }
.dv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dv-car { outline: none; }
.dv-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.dv-track::-webkit-scrollbar { display: none; }
.dv-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; gap: 6px; align-content: start; }
.dv-slide .dv-frame { max-width: 760px; width: 100%; }
.dv-cap .wt { color: inherit; text-decoration: none; }
.dv-cap .wt:hover { text-decoration: underline; }
.dv-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; max-width: 760px; }
.dv-nav > button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; }
.dv-nav > button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.dv-nav > button:disabled { opacity: .3; cursor: default; }
.dv-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; flex: 0 1 auto; }
.dv-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--border); cursor: pointer; }
.dv-dot.on { background: var(--accent); transform: scale(1.25); }
.dv-count { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 6px; min-width: 44px; }
.watch { display: grid; gap: 8px; }
.watch-item { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: start; padding: 6px; margin: 0 -6px; border-radius: 4px; cursor: pointer; }
.watch-item:hover { background: var(--panel-2); }
.wthumb { position: relative; }
.wthumb img { width: 128px; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; display: block; background: var(--panel-2); }
.wplay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 18px; text-shadow: 0 1px 6px rgba(0,0,0,.7); opacity: .85; }
.watch-item:hover .wplay { opacity: 1; }
.wdur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.75); color: #fff; font-family: var(--mono); font-size: 10px; padding: 0 4px; border-radius: 2px; }
.wt { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ws { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wlinks { display: flex; gap: 10px; align-items: center; margin-top: 5px; font-size: 12px; }
.about a { word-break: break-all; }
.about .ts { margin: 0 1px; }

/* ───────── Landing page ───────── */
.app.is-home { grid-template-columns: 1fr; }
.app.is-home .side, .app.is-home .panel { display: none; }
body.is-home #btn-side { display: none; } /* no side panel on the landing page */
#view-home { overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: center; overflow: hidden;
  background:
    radial-gradient(ellipse at 66% 50%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px; border-bottom: 1px solid var(--border); }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 34%, transparent 62%); }
.hero-inner { position: relative; z-index: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 64px 40px; }
.hero-inner > * { max-width: 600px; }
.hero-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero-kicker b { color: var(--accent); font-weight: 500; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.hero h1 { font-size: clamp(46px, 7.2vw, 96px); line-height: .98; letter-spacing: -.035em; font-weight: 600; margin: 22px 0 18px; }
.hero-tagline { font-family: "IBM Plex Serif", Georgia, serif; font-style: italic; font-size: clamp(24px, 2.8vw, 34px); color: var(--accent); margin: 0; line-height: 1.2; }
.hero-qualifier { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
.hero-lede { font-size: 17px; line-height: 1.6; color: color-mix(in srgb, var(--text) 82%, var(--muted)); margin: 26px 0 26px; }
.hero-lede em { font-style: normal; color: var(--text); border-bottom: 1px dashed var(--accent); }
.hero-search { position: relative; }
.hero-search input { width: 100%; height: 50px; padding: 0 16px; font-size: 15px; border-radius: 4px; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel) 92%, transparent); outline: none; backdrop-filter: blur(4px); }
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-search .dropdown { top: 56px; z-index: 5; }
/* the hero clips its dotted background (overflow: hidden); while the search results are open it lets them overlay
   the sections below */
.hero:has(.hero-search .dropdown:not([hidden])) { overflow: visible; z-index: 4; }
.hero:has(.hero-search .dropdown:not([hidden])) .hero-scroll { display: none; }
.hero-search input { scroll-margin-top: 12px; }
/* landing page: one search box at a time. The header's hides while the hero's is on screen (body.hero-q) */
.top .search { transition: opacity .15s; }
body.hero-q .top .search { opacity: 0; visibility: hidden; }
.hero-cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hero-cta .btn { padding: 10px 18px; font-size: 14px; text-decoration: none; }
.hero-scroll { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); font-family: var(--mono); z-index: 1; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

.home-wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px 40px; }
.home-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.home-wrap h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; margin: 0 0 22px; font-weight: 600; }
.home-sec { padding: 56px 0 8px; }
.home-stats { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border); border-top: 0; background: var(--panel); }
.hs { padding: 22px 20px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.hs:last-child { border-right: 0; }
.hs b { font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hs span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hs small { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 4px; }
.home-rule { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 64px 0 8px; align-items: start; }
.home-rule p { color: color-mix(in srgb, var(--text) 85%, var(--muted)); font-size: 15.5px; line-height: 1.65; margin: 0 0 12px; }
.stamps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stamps li { border: 1px solid var(--border); border-left: 3px solid var(--st); background: var(--panel); padding: 16px 18px; border-radius: 4px; }
.stamps li p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.stamps .stamp { font-size: 11px; }
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.path-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; min-height: 210px; }
.path-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.pc-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.path-card h3 { margin: 4px 0 2px; font-size: 19px; letter-spacing: -.01em; }
.path-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; flex: 1; }
.pc-cta { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 10px; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.way { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; padding: 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--panel) 50%, transparent); }
.way:hover { background: var(--panel); text-decoration: none; }
.way:hover b { color: var(--accent); }
.way-n { font-family: var(--mono); font-size: 11px; color: var(--muted); grid-row: span 2; padding-top: 3px; }
.way b { font-size: 16px; }
.way span:last-child { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.latest { display: grid; border-top: 1px solid var(--border); }
.latest-item { display: grid; grid-template-columns: 180px 130px 1fr; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; align-items: baseline; }
.latest-item:hover { background: var(--panel); text-decoration: none; }
.li-date { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.li-date em { font-style: normal; color: var(--claimed); border: 1px solid currentColor; padding: 0 4px; border-radius: 2px; font-size: 10px; margin-left: 4px; text-transform: uppercase; letter-spacing: .08em; }
.li-type { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.li-name { font-weight: 500; }
.home-foot { margin-top: 72px; padding: 28px 0 10px; border-top: 1px dashed var(--border-strong); display: grid; gap: 10px; font-size: 13px; color: color-mix(in srgb, var(--text) 80%, var(--muted)); line-height: 1.6; }
.home-foot b { font-family: var(--mono); letter-spacing: .14em; font-weight: 500; }

@media (max-width: 1000px) {
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .hs { border-bottom: 1px solid var(--border); }
  .paths, .ways { grid-template-columns: 1fr 1fr; }
  .home-rule { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 860px) {
  .hero::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent), var(--bg) 92%); }
  .hero-inner, .home-wrap { padding-left: 16px; padding-right: 16px; }
  /* phones: the hero starts just below the header instead of being centred in a tall box */
  .hero { min-height: 0; align-items: flex-start; }
  .hero-inner { padding-top: 28px; padding-bottom: 40px; }
  .hero-scroll { display: none; }
  .paths, .ways { grid-template-columns: 1fr; }
  .latest-item { grid-template-columns: 1fr; gap: 2px; }
  .home-stats { grid-template-columns: 1fr 1fr; }
}
/* nav: text menu on desktop; on phones a full-width bottom tab bar with icon + short label */
.nv-ic, .nv-short { display: none; }
@media (max-width: 860px) {
  .views { left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 0; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); border-radius: 0; border: 0; border-top: 1px solid var(--border); overflow: visible; }
  .views a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 0 4px; border-radius: 6px;
    font-size: 9.5px; letter-spacing: .04em; white-space: nowrap; min-width: 0; }
  .views a.active { background: var(--accent-soft); box-shadow: none; color: var(--text); }
  .views a.active .nv-ic { stroke: var(--accent); }
  .nv-ic { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .nv-full { display: none; }
  .nv-short { display: block; }
  .home-foot { padding-bottom: 80px; }
}

/* hero dot card */
.hero-card { position: absolute; z-index: 3; width: min(340px, calc(100% - 24px)); background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 14px 16px 12px; box-shadow: var(--shadow); backdrop-filter: blur(6px);
  animation: hcIn .16s ease-out; }
@keyframes hcIn { from { opacity: 0; transform: translateY(4px); } }
.hc-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; font-size: 13px; }
.hc-kicker { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-right: 26px; }
.hc-file { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted); margin-left: auto; text-transform: uppercase; }
.hc-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 9px 0 2px; line-height: 1.25; }
.hc-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hc-quote { margin: 10px 0 8px; padding: 2px 0 2px 11px; border-left: 2px solid var(--accent); font-family: "IBM Plex Serif", Georgia, serif; font-style: italic; font-size: 14.5px; line-height: 1.5; }
.hc-meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.hc-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.hc-actions .hc-random { margin-left: auto; font-size: 12px; font-family: var(--mono); }
.hero h1 { max-width: none; white-space: nowrap; font-size: clamp(38px, 6.6vw, 96px); }
.badge.mass { color: var(--accent); border-color: currentColor; background: transparent; border-width: 1.5px; }
.mass-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--panel-2); font-size: 13px; }
.mb-head { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted); }
.mb-n { font-size: 17px; color: var(--text); font-weight: 600; font-family: var(--sans); margin-right: 2px; }
.mb-head b { color: var(--accent); font-weight: 500; }
.mb-cov { margin-top: 5px; color: var(--muted); line-height: 1.5; }

/* Small screens: the sidebar drawer and the dossier panel are position:fixed (out of the grid),
   so the main view must be the only grid column — otherwise it lands in the 0-width sidebar column. */
@media (max-width: 860px) {
  .app, .app.has-panel, .app.is-home { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  /* keep the drawer, dossier and nav above Leaflet's panes/controls (z-index up to 1000) */
  .side { z-index: 1100; }
  .panel { z-index: 1100; }
  .views { z-index: 1200; }
  .top { z-index: 1300; }
  .side.open { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45), var(--shadow); }
}
/* phones: the filter drawer and the file card are modal, covering the header and the bottom menu until dismissed */
@media (max-width: 860px) {
  .side { top: 0; z-index: 1400; padding-bottom: 24px; padding-top: env(safe-area-inset-top, 0px); }
  .panel { inset: 0; z-index: 1400; padding-top: env(safe-area-inset-top, 0px); }
  .panel-close { top: calc(10px + env(safe-area-inset-top, 0px)); }
  .side-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 4px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
}

/* ───────── Panel: resize, tools, reading view, collapsing ───────── */
.panel-tools { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 2px; }
.panel-close { position: static; }
.dossier-strip { padding-right: 76px; }
.panel-resize { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 4; }
.panel-resize:hover, body.resizing .panel-resize { background: linear-gradient(90deg, transparent 2px, var(--accent) 2px, var(--accent) 4px, transparent 4px); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe { pointer-events: none; }
@media (min-width: 861px) { .panel { position: relative; } } /* phones: a fixed full-screen sheet under the top bar (see the 860px rules) */
.collapsed { display: none !important; }
.show-all { margin-top: 6px; font-family: var(--mono); font-size: 11.5px; display: inline-block; }
/* reading view: dossier takes over the main area */
.app.reading { grid-template-columns: 1fr !important; }
.app.reading .side, .app.reading .main { display: none; }
.app.reading .panel { border-left: 0; }
.app.reading .panel-resize { display: none; }
#panel-body.reading { max-width: 1240px; margin: 0 auto; padding: 28px 40px 80px; }
#panel-body.reading .p-title { font-size: 32px; }
#panel-body.reading .p-bio { font-size: 15.5px; max-width: 72ch; }
.rd-nav { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0; margin: 14px 0 6px; background: var(--panel); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.rd-nav a { color: var(--muted); }
.rd-nav a:hover { color: var(--accent); text-decoration: none; }
.rd-nav a span { color: var(--accent); }
.rd-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
.rd-side { border-left: 1px dashed var(--border-strong); padding-left: 32px; }
.rd-grid .p-sec { scroll-margin-top: 60px; }
@media (max-width: 1000px) { .rd-grid { grid-template-columns: 1fr; } .rd-side { border-left: 0; padding-left: 0; } }
@media (max-width: 860px) { #panel-expand, .panel-resize { display: none; } }

/* books & films */
.shelf { padding: 4px 24px 60px; display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 16px; container: shelf / inline-size; }
.shelf-card { display: grid; grid-template-columns: 220px 1fr; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 14px; }
.shelf-card.book { grid-template-columns: 140px 1fr; }
.sc-cover { position: relative; cursor: pointer; align-self: start; }
.sc-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; display: block; }
.sc-cover .wplay { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.sc-spine { aspect-ratio: 2 / 3; border-radius: 3px; padding: 14px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 34%, var(--panel-2)), var(--panel-2)); border-left: 5px solid var(--c); }
.shelf-card.film .sc-spine { aspect-ratio: 16 / 9; }
.sc-spine b { font-size: 14px; line-height: 1.25; }
.sc-spine span { font-size: 11px; color: var(--muted); line-height: 1.3; }
.sc-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.shelf-card h3 { margin: 4px 0 2px; font-size: 18px; cursor: pointer; }
.shelf-card h3:hover { color: var(--accent); }
.sc-credits { font-size: 13px; color: var(--muted); }
.sc-sum { font-size: 13.5px; line-height: 1.5; margin: 8px 0; }
.sc-people { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0 10px; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.p-meta { font-size: 13px; color: var(--muted); margin: -2px 0 8px; }
@media (max-width: 860px) {
  .shelf { padding: 4px 16px 40px; grid-template-columns: 1fr; }
  .shelf-card, .shelf-card.book { grid-template-columns: 1fr; }
  #view-shelf .index-bar { flex-wrap: wrap; }
  .sc-cover:has(.sc-spine) { display: none; } /* text covers just repeat the title on small screens */
}

/* official records in dossiers and index */
.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rec-list li { font-size: 13px; line-height: 1.35; }
.rec-list li > a { color: var(--text); text-decoration: none; }
.rec-list li > a:hover { color: var(--accent); }
.ix-records summary { cursor: pointer; list-style: none; }
.ix-records summary::-webkit-details-marker { display: none; }
.ix-records summary h3::after { content: ' ▸'; color: var(--muted); }
.ix-records[open] summary h3::after { content: ' ▾'; }

/* X posts embedded in the player (X serves the video) */
.player-wrap.x-embed { aspect-ratio: auto; min-height: 320px; background: transparent; overflow: visible; }
.player-wrap.x-embed #yt, .player-wrap.x-embed #local-video { display: none !important; }
.player-wrap.x-embed .player-empty { position: static; padding: 0; display: block; }
.x-post { max-width: 560px; margin: 0 auto; min-height: 320px; display: grid; place-items: center; }
.x-post .twitter-tweet { margin: 0 !important; }
.toast { position: fixed; left: 50%; bottom: 70px; transform: translate(-50%, 20px); background: var(--panel); color: var(--text); border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 9px 14px; border-radius: 4px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* first load: progress of the archive's data (templates/app.html), shown only if it takes a moment */
.boot { position: fixed; inset: var(--top-h) 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 5; pointer-events: none; }
.boot[hidden] { display: none; }
.boot-bar { width: min(320px, 70vw); height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.boot p { margin: 0; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* a new deploy while the tab is open (app.js, checkBuild) */
.update { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); padding: 8px 8px 8px 14px; border-radius: 4px; font-size: 13px; z-index: 61; max-width: calc(100vw - 32px); }

/* video browser */
.vid-browse { max-width: 1320px; margin: 0 auto; padding: 18px 24px 70px; }
.vb-head h2 { margin: 0 0 4px; font-size: 26px; }
.vb-head p { margin: 0 0 14px; font-size: 14px; }
.vb-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.vb-bar input { flex: 1 1 260px; max-width: 460px; background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 9px 12px; border-radius: 4px; font: inherit; }
.vb-kinds { flex-wrap: wrap; }
.vb-sec { margin: 22px 0 10px; font-size: 15px; letter-spacing: .02em; }
.vb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px 16px; }
.vb-card { cursor: pointer; }
.vb-card:hover .vb-t { color: var(--accent); }
.vb-thumb { position: relative; }
.vb-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; background: var(--panel-2); }
.vb-thumb .wdur { position: absolute; right: 6px; bottom: 6px; }
.vb-mom { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; font-family: var(--mono); }
.vb-t { font-weight: 600; font-size: 14px; line-height: 1.3; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-s, .vb-p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.vb-p { color: var(--text); opacity: .8; }
.vd-back { margin-bottom: 6px; font-size: 13px; }
@media (max-width: 860px) { .vid-browse { padding: 12px 16px 90px; } .vb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 10px; } }

/* cookie consent */
.consent { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 80; width: min(720px, calc(100% - 32px));
  background: var(--panel); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 4px;
  padding: 14px 16px; display: flex; gap: 14px; align-items: center; font-size: 13.5px; line-height: 1.45; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1; }
.consent a { color: var(--accent); }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 860px) { .consent { flex-direction: column; align-items: stretch; bottom: 70px; } .consent-actions { justify-content: flex-end; } }

/* type-filter gesture hint: mouse vs touch wording */
.f-hint { font-size: 11.5px; color: var(--muted); margin: 6px 6px 0; line-height: 1.35; }
.f-hint .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .f-hint .hint-mouse { display: none; } .f-hint .hint-touch { display: inline; } }

/* footer links (home + sidebar) */
.home-links { font-size: 12.5px; color: var(--muted); }
.home-links a, .side-links a { color: inherit; } .home-links a:hover, .side-links a:hover { color: var(--accent); }
.side-links { margin-top: 8px; color: var(--muted); }

/* shelf cards v2: actions under the cover, synopsis and people on the right */
.shelf-card { grid-template-columns: 240px 1fr; align-items: start; }
.shelf-card.book { grid-template-columns: 170px 1fr; }
.sc-left { display: grid; gap: 10px; align-content: start; }
.sc-left .sc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-left .sc-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
.sc-cover img.sc-book { aspect-ratio: auto; width: 100%; height: auto; object-fit: contain; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.p-cover { display: block; width: 140px; border-radius: 3px; margin: 4px 0 12px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
/* book and film headers: title block on the left two-thirds, cover on the right third, top-aligned with the title */
.p-head.has-cover { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.p-head.has-cover .p-cover { width: 100%; max-width: 240px; justify-self: end; margin: 6px 0 12px; }
/* reading view: the header uses the body's columns (.rd-grid), the cover lined up with the right-hand column's content */
#panel-body.reading .p-head.has-cover { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 48px; }
#panel-body.reading .p-head.has-cover .p-cover { justify-self: start; max-width: 200px; margin-left: 33px; }
@media (max-width: 600px) { /* phones: title first, the cover centred below it */
  .p-head.has-cover { grid-template-columns: 1fr; gap: 4px; }
  .p-head.has-cover .p-cover { justify-self: center; max-width: 180px; margin: 8px 0 14px; }
}
@media (max-width: 860px) {
  .shelf-card, .shelf-card.book { grid-template-columns: 1fr; }
  .shelf-card.book .sc-left { grid-template-columns: 120px 1fr; align-items: start; }
  .shelf-card.book .sc-left .sc-actions { flex-direction: column; }
  .sc-cover:has(.sc-book) { display: block; }
}

/* books: tall cover on the left, buttons in a row on the right (films keep them under the trailer) */
.shelf-card.book { grid-template-columns: 150px 1fr; }
.shelf-card.book .sc-body .sc-actions { margin-top: 12px; }
.sc-actions .btn { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .shelf-card, .shelf-card.book { grid-template-columns: minmax(0, 1fr); } /* must follow the desktop rule above; minmax lets long content wrap */
  .shelf-card.book .sc-left { display: block; }
  .shelf-card.book .sc-cover img.sc-book { width: 130px; }
}

.sc-body { min-width: 0; }
/* featured (frontmatter shelf_featured): full row, bigger trailer, tinted like a featured Latest card */
.shelf-card.is-featured { grid-column: 1 / -1; grid-template-columns: minmax(200px, 480px) minmax(440px, 1fr); gap: 22px; padding: 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.shelf-card.book.is-featured { grid-template-columns: 200px 1fr; }
.shelf-card.is-featured h3 { font-size: 24px; margin-top: 8px; }
.shelf-card.is-featured .sc-sum { font-size: 15px; }
.sc-kicker .lt-tag { margin: 0 8px; }
@media (max-width: 860px) { .shelf-card.is-featured, .shelf-card.book.is-featured { grid-template-columns: minmax(0, 1fr); padding: 14px; } .shelf-card.is-featured h3 { font-size: 20px; } }
/* when the side panel narrows the middle column, the trailer gives way first (above); too narrow for both, it stacks */
@container shelf (max-width: 700px) { .shelf-card.is-featured { grid-template-columns: minmax(0, 1fr); } }
.sc-btn-buy { border-color: color-mix(in srgb, #ff9900 55%, var(--border)) !important; }

@media (max-width: 860px) { #panel-body { padding-bottom: 84px; } }

/* ── nav v3: Explore · Timeline · World · Library · More ── */
.views .nv-more { background: none; border: 0; color: var(--muted); font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 4px; cursor: pointer; }
.views .nv-more:hover, .views .nv-more.open { color: var(--text); }
.views .nv-more.active { background: var(--panel); color: var(--text); }
.views a .nv-short, .views a .nv-full { display: none; }
.top-about { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.top-about:hover { color: var(--accent); text-decoration: none; }
.more-menu { position: fixed; z-index: 70; top: calc(var(--top-h) - 4px); right: 64px; min-width: 260px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.more-menu[hidden] { display: none; }
.more-menu a { display: grid; padding: 8px 10px; border-radius: 4px; color: var(--text); font-size: 13.5px; }
.more-menu a:hover { background: var(--panel-2); text-decoration: none; }
.more-menu a small { color: var(--muted); font-size: 12px; }
.more-menu .mm-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.more-menu .mm-social { grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; }
.more-menu .mm-social .mm-ic { grid-row: span 2; display: flex; color: var(--text); }
.more-menu .mm-social b, .more-menu .mm-social small { grid-column: 2; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.social-btn:hover { color: var(--text); text-decoration: none; }
.foot-social { display: inline-flex; align-items: center; gap: 5px; vertical-align: -2px; }
@media (min-width: 861px) { .more-menu .mm-about { display: none; } } /* desktop shows About in the top bar */
/* the bottom tab bar holds five: Latest, Explore, World, Videos, More (Timeline moves into More); desktop keeps Timeline as a tab */
@media (min-width: 861px) { .more-menu .mm-narrow { display: none; } }
@media (max-width: 860px) { .views .nv-wide { display: none; } }
.lib-title { margin: 0 0 12px; font-size: 26px; }
#view-shelf .lib-title { padding: 20px 24px 0; margin-bottom: 0; }
#view-shelf .index-bar { padding-top: 12px; }
@media (max-width: 860px) { #view-shelf .lib-title { padding: 16px 16px 0; } }
@media (max-width: 860px) {
  .views { grid-template-columns: repeat(5, 1fr) !important; }
  .views .nv-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 5px 0 4px; font-size: 9.5px; letter-spacing: .04em; }
  .views .nv-more.active, .views .nv-more.open { background: var(--accent-soft); color: var(--text); }
  .views .nv-more.active .nv-ic, .views .nv-more.open .nv-ic { stroke: var(--accent); }
  .nv-caret { display: none; }
  .top-about { display: none; }
  .more-menu { top: auto; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); min-width: 0; padding: 8px; }
  .more-menu a { padding: 11px 12px; font-size: 15px; }
}

/* ── server-rendered article (scripts/pages.mjs): for crawlers and no-JS readers; the app removes it on boot ── */
.js .ssr { display: none; }
html:not(.js) body { overflow: auto; height: auto; }
html:not(.js) .top, html:not(.js) .app, html:not(.js) .views, html:not(.js) .more-menu, html:not(.js) .top-about, html:not(.js) .settings-pop, html:not(.js) #btn-settings { display: none; }
.ssr { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; line-height: 1.6; }
.ssr-nav { font-size: 13px; margin-bottom: 24px; }
.ssr-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ssr-facts li, .ssr-moments li { margin-bottom: 8px; }
.ssr-st { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.ssr-by, .ssr-src, .ssr-note { color: var(--muted); font-size: .92em; }
.ssr-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* full text of a graph link (hover / tap) */
.edge-tip { position: absolute; z-index: 30; max-width: 300px; padding: 7px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12px; line-height: 1.4; color: var(--text); pointer-events: none; }
.edge-tip div { color: var(--muted); margin-top: 3px; }

/* ── exploration mode: trail bar, node menu ── */
.p-explore { margin: 2px 0 10px; }
.trail-bar { position: absolute; z-index: 12; top: 40px; left: 16px; right: 16px; display: grid; gap: 6px; pointer-events: none; }
.trail-bar > * { pointer-events: auto; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tb-tools { font-size: 12px; color: var(--muted); }
.tb-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.tb-step { display: inline-flex; align-items: center; background: var(--panel); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--c); border-radius: 0 5px 5px 0; max-width: 240px; }
.tb-step:hover { border-color: var(--accent); }
.tb-name { background: none; border: 0; color: var(--text); font: inherit; font-size: 12.5px; padding: 4px 8px 4px 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tb-step.on .tb-name { font-weight: 600; }
.tb-x { background: none; border: 0; border-left: 1px solid var(--border); color: var(--muted); font-size: 14px; line-height: 1; padding: 4px 7px; cursor: pointer; }
.tb-x:hover { color: var(--text); }
.tb-step.on { border-color: var(--accent); font-weight: 600; }
.tb-sep { color: var(--muted); }
.tb-hint, .tb-hidden { background: color-mix(in srgb, var(--bg) 80%, transparent); padding: 2px 6px; border-radius: 4px; }
.node-menu { position: absolute; z-index: 40; min-width: 210px; background: var(--panel); border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow); padding: 5px; display: grid; }
.node-menu .nm-title { font-weight: 600; font-size: 12.5px; padding: 5px 9px 7px 11px; box-shadow: inset 3px 0 0 var(--c); margin-bottom: 4px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-menu button { background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; text-align: left; padding: 7px 9px; border-radius: 4px; cursor: pointer; }
.node-menu button:hover { background: var(--accent-soft); }
@media (max-width: 860px) { .trail-bar { top: 8px; left: 8px; right: 8px; } .node-menu button { padding: 10px 10px; font-size: 14.5px; } }
@media (max-width: 860px) { #view-graph.exploring .graph-hud { display: none; } }
.tb-step.closed { border-style: dashed; } /* on the trail, connections hidden */
/* the key-files map: starting points above the graph */
.tb-start { background: var(--panel); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--c); border-radius: 0 5px 5px 0; color: var(--text); font: inherit; font-size: 12.5px; padding: 4px 10px 4px 12px; cursor: pointer; white-space: nowrap; }
.tb-start:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) {
  .tb-starts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -8px; padding-right: 8px; }
  .tb-starts::-webkit-scrollbar { display: none; }
  .tb-start { font-size: 13.5px; padding: 6px 12px 6px 14px; }
  .tb-lbl-start { flex: none; line-height: 1.25; } /* two lines at most: “Start” / “a story” */
  .tb-lbl-start span { display: block; white-space: nowrap; }
}
/* a story: title, numbered steps, back/next, the step's caption and files */
.tb-story { gap: 8px; }
.tb-stitle { font-size: 13.5px; background: color-mix(in srgb, var(--bg) 80%, transparent); padding: 2px 6px; border-radius: 4px; }
.tb-pager { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.tb-arrow { flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; padding: 0; }
.tb-arrow:hover { border-color: var(--accent); color: var(--accent); }
.tb-arrow.tb-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.tb-arrow.tb-next:hover { filter: brightness(1.08); color: #fff; }
.tb-arrow.tb-close { color: var(--muted); }
.tb-dots { display: inline-flex; gap: 3px; }
.tb-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; padding: 0; }
.tb-dot.done { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.tb-dot.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.tb-dot:hover { border-color: var(--accent); }
.tb-caption { display: block; max-width: 760px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--border); border-radius: 7px; padding: 8px 11px; font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow); }
.tb-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tb-file { font-size: 12px; padding: 3px 9px 3px 11px; }
@media (max-width: 860px) {
  .tb-story .tb-stitle { display: none; }
  /* one line on phones: ✕/‹, the step dots, › (8 steps fit from 340px up; narrower, the dots scroll) */
  .tb-story { flex-wrap: nowrap; }
  .tb-dots { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tb-dots::-webkit-scrollbar { display: none; }
  .tb-dot { flex: none; }
  .tb-caption { font-size: 13px; max-height: 32vh; overflow-y: auto; }
}
/* incident outcome: explained / partly explained / hoax */
.badge.outcome-explained { color: var(--muted); border: 1.5px solid currentColor; background: transparent; }
.badge.outcome-disputed { color: #c9a227; border: 1.5px solid currentColor; background: transparent; }
.badge.outcome-hoax { color: var(--outside); border: 1.5px solid currentColor; background: transparent; }
.p-outcome { margin: 10px 0 4px; padding: 8px 10px; border-left: 3px solid var(--muted); background: var(--panel-2, rgba(127,127,127,.08)); font-size: 14px; line-height: 1.45; }
.p-outcome.outcome-disputed { border-left-color: #c9a227; }
.p-outcome.outcome-hoax { border-left-color: var(--outside); }
.p-outcome .src { display: block; margin-top: 6px; min-width: 0; }
.p-outcome .src > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ── Latest ── */
.app.no-side { --side-w: 0px; }
.app.no-side .side { visibility: hidden; overflow: hidden; border: 0; }
body.no-side #btn-side { display: none; }
#view-latest { overflow: auto; background: var(--bg); }
.latest-page { max-width: 980px; margin: 0 auto; padding: 28px 24px 80px; }
.lt-added h2 { margin: 4px 0 6px; }
.lt-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lt-top .home-kicker { margin: 0; }
.lt-rss { display: inline-flex; border-radius: 5px; opacity: .9; }
.lt-rss:hover { opacity: 1; }
.lt-cats { flex-wrap: wrap; margin-bottom: 18px; }
.lt-filtering { margin: -4px 0 16px; font-size: 13px; color: var(--muted); }
.lt-filtering .link { margin-left: 6px; }
.side-rss { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.side-rss:hover { color: var(--accent); }
.lt-cats button span { opacity: .6; font-size: 11px; margin-left: 3px; }
.lt-list { display: grid; gap: 12px; }
.lt-card { display: grid; grid-template-columns: 1fr 220px; gap: 16px; padding: 14px; border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 6px; background: var(--panel); }
.lt-card:not(:has(.lt-thumb)) { grid-template-columns: 1fr; }
.lt-card.is-new { box-shadow: 0 0 0 1px color-mix(in srgb, var(--claimed) 45%, transparent); }
.lt-thumb { order: 2; position: relative; cursor: pointer; align-self: start; /* image on the right: every card's date and headline start on the same line */ border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.lt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lt-thumb .wplay { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fff; text-shadow: 0 1px 8px #000; }
.lt-thumb .wdur { position: absolute; right: 6px; bottom: 6px; font-family: var(--mono); font-size: 11px; background: rgba(0,0,0,.75); color: #fff; padding: 1px 5px; border-radius: 3px; }
.lt-kicker { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lt-kind { color: var(--c); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.lt-tag { font-style: normal; border: 1px solid currentColor; padding: 0 4px; border-radius: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.lt-tag.up { color: var(--claimed); }
.lt-tag.new { color: var(--documented); }
.lt-card h3 { margin: 6px 0 4px; font-size: 17px; line-height: 1.3; }
.lt-card h3 a { color: var(--text); }
.lt-sum { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lt-people { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.lt-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lt-added { margin-top: 44px; }
.lt-added > p { margin: 0 0 12px; }
.lt-rows { display: grid; border-top: 1px solid var(--border); margin-bottom: 12px; }
.lt-row { display: grid; grid-template-columns: 110px 1fr 140px 120px; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; align-items: baseline; font-size: 13.5px; }
.lt-row:hover { background: var(--panel); text-decoration: none; }
.lt-row-type { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.lt-row-date, .lt-row-added { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.home-more { margin: 14px 0 0; font-size: 13.5px; }
@media (max-width: 860px) {
  .latest-page { padding: 18px 16px 60px; }
  .lt-card { grid-template-columns: 1fr; }
  .lt-cats { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .lt-cats button { white-space: nowrap; flex: none; }
  .lt-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ── Panel animations (View Transitions; see panelTransition in app.js) ── */
.panel { view-transition-name: panel; }
::view-transition-group(panel) { overflow: hidden; }
/* keep the text at its real size while the box morphs: no stretching, pinned to the top-left */
::view-transition-old(panel), ::view-transition-new(panel) { height: 100%; width: auto; object-fit: none; object-position: left top; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .28s; animation-timing-function: cubic-bezier(.22, .7, .2, 1); }
/* only the panel moves: the rest of the page switches at once (a crossfade would double the graph) */
::view-transition-old(root) { display: none; }
::view-transition-new(root) { animation: none; }
/* expand / collapse: the old layout gives way quickly, so the two don't ghost over each other */
html[data-vt="expand"]::view-transition-old(panel), html[data-vt="collapse"]::view-transition-old(panel) { animation-duration: .12s; }
@keyframes vt-in-right { from { transform: translateX(100%); } }
@keyframes vt-out-right { to { transform: translateX(100%); } }
@keyframes vt-in-up { from { transform: translateY(100%); } }
@keyframes vt-out-down { to { transform: translateY(100%); } }
html[data-vt="open"]::view-transition-new(panel) { animation-name: vt-in-right; }
html[data-vt="close"]::view-transition-old(panel) { animation-name: vt-out-right; }
@media (max-width: 860px) {
  /* phones: the dossier is a full-screen sheet that rises from and sinks to the bottom */
  html[data-vt="open"]::view-transition-new(panel) { animation-name: vt-in-up; }
  html[data-vt="close"]::view-transition-old(panel) { animation-name: vt-out-down; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* expand and close: accented so it's clear the panel can be widened */
.panel-tools .icon-btn { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); width: 32px; height: 32px; }
.panel-tools .icon-btn:hover { color: var(--panel); background: var(--accent); border-color: var(--accent); }
.panel-tools { gap: 6px; }
.lt-tag.feat { color: var(--accent); }
.lt-card.is-featured { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.lt-card:has(.lt-cover) { grid-template-columns: 1fr 120px; }
.lt-thumb.lt-cover { aspect-ratio: auto; background: none; cursor: pointer; }
.lt-thumb.lt-cover img { height: auto; object-fit: contain; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
@media (max-width: 860px) { .lt-card:has(.lt-cover) { grid-template-columns: 1fr 90px; } .lt-thumb:not(.lt-cover) { order: 0; } } /* phones: one column, so text is aligned anyway: videos on top, covers small on the right */

.panel-tools .icon-btn svg { display: block; margin: auto; }

/* sessions of a multi-part recording, under the video title */
.vd-series { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.vd-series > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vd-series > div:first-child > span:first-child { margin-right: auto; }
.vd-parts { display: flex; flex-wrap: wrap; gap: 4px; }
.vd-parts button { min-width: 28px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.vd-parts button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.vd-series > div:first-child > * { font-size: 12.5px; }

/* claims */
.badge.claim-open { color: var(--muted); border: 1.5px solid currentColor; background: transparent; }
.badge.claim-disputed { color: #c9a227; border: 1.5px solid currentColor; background: transparent; }
.badge.claim-supported { color: var(--documented); border: 1.5px solid currentColor; background: transparent; }
.badge.claim-refuted { color: var(--outside); border: 1.5px solid currentColor; background: transparent; }
.p-outcome.claim-disputed { border-left-color: #c9a227; }
.p-outcome.claim-supported { border-left-color: var(--documented); }
.p-outcome.claim-refuted { border-left-color: var(--outside); }
.cl-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; font-size: 13.5px; }
.cl-time { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.cl-time > li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0 10px 12px; position: relative; }
.cl-time > li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--claimed); }
.cl-time > li.cl-disputes::before { background: var(--outside); }
.cl-time > li.cl-context::before { background: var(--muted); }
.cl-date { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 4px; }
.cl-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cl-stance { font-size: 12px; color: var(--muted); }
.cl-disputes .cl-stance { color: var(--outside); font-weight: 600; }
.cl-basis, .cl-first { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border: 1px solid var(--border); border-radius: 3px; color: var(--muted); }
.cl-first { border-color: var(--accent); color: var(--accent); }
.cl-text { margin-top: 4px; font-size: 14px; line-height: 1.45; }
.cl-src { margin-top: 4px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-links li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cl-links li > div { flex-basis: 100%; }
.cl-lbl { font-size: 12px; color: var(--muted); }
.claim-st { font-weight: 600; }
.cl-ev .lbl { font-weight: 600; } .cl-ev.cl-supports .lbl { color: var(--documented); } .cl-ev.cl-disputes .lbl { color: var(--outside); }
.claim-st.claim-disputed { color: #c9a227; } .claim-st.claim-supported { color: var(--documented); } .claim-st.claim-refuted { color: var(--outside); }
@media (max-width: 600px) { .cl-time > li { grid-template-columns: 1fr; gap: 2px; } }

.claims-head { padding: 18px 24px 0; }
.claims-head > p { margin: 4px 0 12px; max-width: 760px; }
.claims-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.claim-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); text-decoration: none; }
.claim-card:hover { border-color: var(--accent); text-decoration: none; } /* the border marks it: no link underline on the whole card */
.cc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-name { font-size: 16px; font-weight: 600; line-height: 1.35; }
@media (max-width: 600px) { .claims-head { padding: 14px 16px 0; } }

/* a file's picture: on its page, and on its Latest card (16:9, like video thumbnails) */
.p-image { margin: 6px 0 14px; }
.p-image img { display: block; width: 100%; max-width: 720px; border-radius: 4px; }
.p-image figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; max-width: 720px; }
/* archived copy of a web source (Wayback Machine), beside the original link */
.arch { color: var(--muted); font-size: .92em; margin-left: 2px; }
.arch:hover { color: var(--accent); }
