@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/playfair-latin.woff2') format('woff2');
}
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #238636;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:hover { text-decoration: underline; }
header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
header .brand { font-size: 1.2rem; font-weight: 700; color: var(--text); }
header nav a { margin-left: 1.5rem; font-size: .95rem; }
main { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1, h1.section-title, .tree-head {
  font-family: "Playfair Display", Georgia, serif;
}
h1 { font-size: 2.2rem; margin-bottom: .5rem; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.stats { display: flex; gap: 1rem; justify-content: center; margin: 2rem 0; flex-wrap: wrap; }
.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.2rem 2rem; text-align: center; min-width: 140px;
}
.stat .num { font-size: 1.8rem; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; transition: border-color .15s;
}
.card:hover { border-color: var(--accent); }
.card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .9rem; }
h1.section-title { margin: 0 0 1.2rem; font-size: 1.4rem; }
.evidence-banner { font-family: "Playfair Display", Georgia, serif; font-size: 1.4rem; font-weight: 700; margin: 0 0 1.2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.video-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.video-card .thumb {
  aspect-ratio: 16/9; background: #21262d;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.video-card .body { padding: 1rem; }
.video-card .title { font-weight: 600; margin-bottom: .3rem; }
.video-card .meta { color: var(--muted); font-size: .82rem; }
.tweet {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.1rem 1.3rem; margin-bottom: .8rem;
}
.tweet .date { color: var(--muted); font-size: .82rem; margin-bottom: .3rem; }
footer {
  border-top: 1px solid var(--border); margin-top: 3rem; padding: 1.5rem;
  text-align: center; color: var(--muted); font-size: .85rem;
}

/* dossier */
.dossier-hero {
  text-align: left;
  padding: 3rem 2rem;
  margin: 0 -2rem 2rem;
  background: linear-gradient(rgba(13,17,23,.42), rgba(13,17,23,.62)), url("/hero.webp") center/cover;
  border-bottom: 1px solid var(--border);
}
.brand-logo { height: 40px; width: 40px; vertical-align: -11px; margin-right: .6rem; border-radius: 8px; }
.dossier-hero h1 { font-size: 2.4rem; }
.lede { font-size: 1.15rem; color: var(--text); max-width: 700px; margin-top: .6rem; }
.prose { max-width: 720px; margin-bottom: 2.5rem; }
.prose p { margin-bottom: 1rem; color: var(--text); }
.prose em { color: var(--muted); }
.timeline { margin-bottom: 2.5rem; border-left: 2px solid var(--border); padding-left: 1.5rem; }
.incident { margin-bottom: 1.5rem; position: relative; }
.incident-date { color: var(--muted); font-size: .82rem; font-family: monospace; }
.incident-title { font-weight: 700; font-size: 1.05rem; margin: .15rem 0 .3rem; }
.incident p { color: var(--muted); font-size: .92rem; max-width: 680px; }
.count {
  font-size: .8rem; color: var(--muted); font-weight: 400;
  border: 1px solid var(--border); border-radius: 999px; padding: .1rem .6rem;
  vertical-align: middle; margin-left: .3rem;
}

/* eras */
.era {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.3rem 1.5rem; margin-bottom: 1rem; max-width: 760px;
}
.era h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.era-years {
  font-size: .78rem; color: var(--muted); font-weight: 400;
  border: 1px solid var(--border); border-radius: 999px; padding: .1rem .6rem;
  vertical-align: middle; margin-left: .4rem;
}
.era p { color: var(--muted); font-size: .93rem; }

/* evidence tree */
.tree-head {
  margin: 2rem 0 1rem; font-size: 1.05rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--border);
}
.shot {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.shot .thumb {
  aspect-ratio: 16/10; background: #21262d;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.shot .cap { padding: .7rem 1rem; font-size: .85rem; color: var(--muted); }
.logex {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem 1.3rem; margin-bottom: .8rem;
}
.logex .logsrc { color: var(--muted); font-size: .82rem; margin-bottom: .3rem; font-family: monospace; }
.logex p { font-size: .93rem; }
.muted { color: var(--muted); font-size: .9rem; }
.title-note { color: var(--muted); font-size: .8rem; margin: .3rem 0 1.2rem; }

/* video heatmap timeline */
.heatbar {
  position: sticky; top: 64px; z-index: 5;
  display: flex; gap: 2px; align-items: flex-end;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: .7rem .8rem; margin-bottom: 1.8rem;
  overflow-x: auto;
}
.heat {
  flex: 1 0 10px; min-width: 10px; height: 36px;
  background: var(--accent); border-radius: 3px;
  transition: transform .1s;
}
.heat:hover { transform: scaleY(1.25); }
.month-head {
  margin: 2rem 0 .8rem; font-size: 1.1rem;
  padding-top: 1rem; scroll-margin-top: 150px;
}
.video-row {
  padding: .55rem .2rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.video-row .vtitle { font-weight: 500; }
.video-row .vmeta { color: var(--muted); font-size: .82rem; white-space: nowrap; font-family: monospace; }

/* heatmap labels */
.heatlabels {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: .8rem; font-family: monospace;
  padding: 0 .2rem; margin-bottom: .3rem;
}
.heat { background: #3a3a3a; }

/* split heat blocks: primary (bottom) + commentary (top) */
.heat.split { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.heat.split span { display: block; width: 100%; }
.cat-tag {
  font-size: .72rem; color: #93c5fd; border: 1px solid #3b82f6; border-radius: 999px;
  padding: .05rem .5rem; vertical-align: middle; white-space: nowrap;
}
.legend-p { color: #e34a33; font-weight: 600; }
.legend-c { color: #3b82f6; font-weight: 600; }

/* video tabs */
.tabs { display: flex; gap: .5rem; margin: 1.2rem 0 1rem; }
.tab {
  padding: .55rem 1.3rem; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: .95rem;
}
.tab:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }
.tab.on { background: var(--panel); color: var(--text); border-color: var(--accent); }
.tab span { font-weight: 400; font-size: .82rem; color: var(--muted); margin-left: .3rem; }

/* back to top */
#topbtn {
  display: none; position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  font-size: 1.3rem; cursor: pointer; opacity: .85;
}
#topbtn:hover { border-color: var(--accent); opacity: 1; }

/* tweets: pager + search */
.pager { display: flex; gap: .6rem; align-items: center; justify-content: center; margin: 2rem 0 1rem; flex-wrap: wrap; }
.pg { padding: .4rem .9rem; border: 1px solid var(--border); border-radius: 8px; font-size: .88rem; }
.pg:hover { text-decoration: none; border-color: var(--accent); }
.pgcur { color: var(--muted); font-size: .88rem; padding: .4rem .6rem; }
.searchbox { margin-bottom: 1.5rem; }
.searchbox input {
  width: 100%; max-width: 560px; padding: .7rem 1rem; font-size: 1rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; color: var(--text);
}
.searchbox input:focus { outline: none; border-color: var(--accent); }
#results { display: none; margin-top: 1rem; }

/* tweet provenance */
.tweet .orig { font-size: .78rem; margin-left: .5rem; white-space: nowrap; }
.tweet .ts { color: var(--muted); font-size: .78rem; margin-top: .4rem; font-family: monospace; }
.tweet .tid { user-select: all; }

/* evidence screenshot gallery */
a.shot {
  display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--panel);
}
a.shot:hover { border-color: var(--accent); }
a.shot img { display: block; width: 100%; height: auto; }

/* live room */
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 900px; border-radius: 10px; border: 1px solid var(--border); }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.offline-wrap { text-align: center; margin: 2rem 0; }
.offline-wrap img { width: 100%; max-width: 900px; border-radius: 10px; margin-bottom: 1rem; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #e34a33; margin-left: .4rem; animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* video pages */
.video-embed video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.processing { background: var(--panel); border: 1px dashed var(--border); border-radius: 10px; padding: 2rem; text-align: center; max-width: 900px; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .9rem; }
details { margin-top: 1rem; }
details summary { cursor: pointer; color: var(--accent); }
details p { white-space: pre-wrap; font-size: .9rem; color: var(--muted); margin-top: .5rem; }

/* dossier tables + quotes */
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border: 1px solid var(--border); }
.prose th { background: var(--panel); }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1rem 0; padding: .6rem 1rem; background: var(--panel); border-radius: 0 8px 8px 0; }
.prose blockquote p { margin: .4rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }

/* references */
.ref-row { padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.ref-row:last-child { border-bottom: 0; }
.ref-date { color: var(--muted); font-family: monospace; font-size: .8rem; margin-right: .7rem; }
.ref-row .arch { font-size: .8rem; margin-left: .4rem; }

/* dossier chapters */
.prose > h2 {
  font-size: 1.5rem; margin-top: 0; padding-bottom: .6rem;
  border-bottom: 2px solid var(--accent); display: inline-block;
}
.prose hr {
  border: 0; height: 1px; margin: 3rem 0 2.5rem;
  background: linear-gradient(90deg, transparent, var(--border) 25%, var(--border) 75%, transparent);
}
.prose > h3 { color: var(--text); font-size: 1.15rem; margin-top: 2rem; font-weight: 700; }

/* art gallery */
.art-title { font-weight: 600; margin-top: .4rem; font-size: .92rem; }
.art-orig { color: var(--muted); font-size: .75rem; font-family: monospace; }

/* transcripts */
.transcript { max-height: 420px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: .8rem 1rem; margin-top: .5rem; background: var(--panel); }
.transcript p { margin: 0 0 .5rem; font-size: .92rem; }

/* ---- mobile ---- */
@media (max-width: 720px) {
  main { padding: 1.5rem 1rem; }
  header { flex-wrap: wrap; gap: .4rem .8rem; padding: .7rem 1rem; }
  nav { flex-wrap: wrap; gap: .2rem .9rem; }
  nav a { font-size: .92rem; }
  header nav { display: flex; flex-wrap: nowrap; gap: .85rem; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { margin-left: 0; font-size: .88rem; white-space: nowrap; }
  .hero h1, .dossier-hero h1 { font-size: 1.7rem; }
  .dossier-hero { margin: 0 -1rem 1.5rem; padding: 2rem 1.2rem; }
  .prose { overflow-x: auto; }
  .prose table { font-size: .82rem; }
  .prose th, .prose td { overflow-wrap: anywhere; }
  .heat { overflow-x: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .tabs { flex-wrap: wrap; }
  .brand-logo { height: 34px; width: 34px; }
}

.toc { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: 0 0 2rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.toc a { font-size: .9rem; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--link); }

.cite-btn { display: block; margin: 2.5rem auto 0; padding: .45rem 1.2rem; font-size: .85rem;
  background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer; }
.cite-btn:hover { color: var(--text); border-color: var(--link); }
.tsnip { color: var(--muted); font-size: .88rem; margin-top: .3rem; font-style: italic; }

.card-icon { width: 44px; height: 44px; border-radius: 8px; margin-bottom: .6rem; display: block; }

.archive-stat { color: var(--muted); font-size: .92rem; letter-spacing: .02em; margin: 0 0 1.5rem; }
.tline { cursor: pointer; border-radius: 4px; padding: .15rem .4rem; margin: 0 -.4rem; }
.tline:hover { background: rgba(88,166,255,.12); }
.rel-head { font-family: 'Playfair Display', Georgia, serif; margin: 2.5rem 0 1rem; font-size: 1.3rem; }
.era-timeline { width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 0 0 1.5rem; }

.era-timeline { display: flex; align-items: stretch; margin: 0 0 2rem; padding: 1.5rem 1rem;
  border: 1px solid var(--border); border-radius: 10px; background: rgba(88,166,255,.03); }
.era { text-align: center; flex: 0 0 auto; padding: 0 .5rem; position: relative; }
.era-name { font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; }
.era-dates { color: var(--link); font-size: .9rem; margin-top: .15rem; }
.era-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--link); margin: .8rem auto 0; }
.era-line { flex: 1 1 auto; border-top: 2px solid var(--link); margin-top: 3.6rem; min-width: 30px; }
.era-line.gap { border-top-style: dashed; border-color: var(--muted); position: relative; }
.era-line.gap span { position: absolute; top: -1.7rem; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: .78rem; color: var(--muted); letter-spacing: .03em; }
@media (max-width: 720px) {
  .era-name { font-size: .85rem; }
  .era-line.gap span { font-size: .68rem; }
}

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.vcard { display: block; border: 1px solid #2a2a2a; border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; background: #161616; }
.vcard:hover { border-color: #4a4a4a; }
.vcard-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.vcard-body { padding: .6rem .8rem; }
.vcard-body h3 { font-size: .95rem; margin: 0 0 .3rem; line-height: 1.3; }
.vcard-body p { font-size: .8rem; color: #999; margin: 0; }

/* X images on tweet cards + AI gallery (2026-10-29) */
.tweet-imgs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }
.tweet-imgs a { display: block; }
.tweet-imgs img { display: block; max-height: 230px; width: auto; max-width: 100%; border-radius: 8px; border: 1px solid #2a2a2a; }
.vcard-thumb.art-thumb { aspect-ratio: 4/3; object-fit: contain; background: #0b0b0b; }
.art-entry { margin: 0 0 1.6rem; }
.art-full { max-width: 100%; height: auto; display: block; border-radius: 10px; }
.art-apps { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.song { border-bottom: 1px solid var(--border); padding: 1.1rem 0 1.3rem; }
.song-head { display: flex; gap: 1rem; align-items: flex-start; }
.song-cover { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex: none; }
.song-title { margin: 0 0 .25rem; font-size: 1.15rem; }
.song-meta { color: var(--muted); font-size: .85rem; }
.song-style { color: var(--muted); font-size: .88rem; margin-top: .35rem; white-space: pre-wrap; }
.song-player { width: 100%; max-width: 340px; margin-top: .7rem; background: #000; border-radius: 8px; }
.song-lyrics { margin-top: .6rem; }
.song-lyrics summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.lyrics-body { margin-top: .45rem; padding: .6rem .8rem; background: var(--panel); border-left: 3px solid var(--border); font-size: .92rem; }
.art-app { margin-top: .45rem; }
.art-post-text { color: var(--text); font-size: .92rem; margin: .25rem 0 .15rem; padding: .5rem .7rem; border-left: 3px solid var(--border); background: var(--panel); white-space: pre-wrap; word-break: break-word; }
.art-post-text a.post-text-link { color: var(--text); text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.art-post-text a.post-text-link:hover { color: var(--accent); }
