/* Fonts ship with the site (fonts/, SIL Open Font License) so every device shows the same type and nothing loads
   from a third party: Inter for the text, Anton for the JermaDB wordmark. Accented letters beyond Latin-1 load
   inter-latin-ext only when a page needs them; anything else (Japanese titles, emoji) falls back to the system font. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/anton-latin.woff2) format("woff2"); }
:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1d21; --muted: #5d636d; --border: #dde1e6;
  --accent: #7b4fd6; --cmp: #c66a00;   /* --cmp: the second side in Compare */
  --archive: #1f8a4c; --archive-bg: #eaf6ee;
  --reupload: #2563c9; --reupload-bg: #eaf1fc;
  --encore: #b0186f; --encore-bg: #fbeaf4;
  --lost: #767b83; --lost-bg: #f0f1f3;
  --warn: #9a5b00; --essential: #c62828;
  --mark-bg: #ffe58a; --mark-text: #1b1d21;
}
/* Dark: the system setting (Auto), unless the Theme button chose Light; or the Theme button chose Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #1a1d22; --text: #e8eaed; --muted: #9aa0a8; --border: #2c3037;
    --accent: #a98bf0; --cmp: #f5a524;
    --archive: #4cc47f; --archive-bg: #13281c;
    --reupload: #6ea1f5; --reupload-bg: #15223a;
    --encore: #f27cc0; --encore-bg: #2e1424;
    --lost: #9aa0a8; --lost-bg: #1f2227;
    --warn: #e0a24a; --essential: #ff6b6b;
    --mark-bg: #8a6d00; --mark-text: #fff8dc;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #111317; --surface: #1a1d22; --text: #e8eaed; --muted: #9aa0a8; --border: #2c3037;
    --accent: #a98bf0; --cmp: #f5a524;
    --archive: #4cc47f; --archive-bg: #13281c;
    --reupload: #6ea1f5; --reupload-bg: #15223a;
    --encore: #f27cc0; --encore-bg: #2e1424;
    --lost: #9aa0a8; --lost-bg: #1f2227;
    --warn: #e0a24a; --essential: #ff6b6b;
    --mark-bg: #8a6d00; --mark-text: #fff8dc;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); }
a { color: inherit; }
button { font: inherit; }
input, select, textarea { font-family: inherit; }

/* what the archive covers: one still, centred line (phones keep the first sentence; About has the rest) */
.coverage { background: var(--surface); border-bottom: 1px solid var(--border); font-size: .85rem; color: var(--muted); text-align: center; }
.coverage-text { margin: 0; padding: .3rem 1rem; }
.coverage strong { color: var(--text); }
@media (max-width: 640px) { .coverage-more { display: none; } }
/* ---- Timeline page */
.timeline > h2 { margin: .2rem 0 .2rem; font-size: 1.5rem; }
.tl-sub { color: var(--muted); margin: 0 0 .9rem; }
.tl-controls { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .6rem; }
.tl-stage { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; cursor: grab; }
.tl-strip { position: relative; height: 440px; }
.tl-scroll.dragging { cursor: grabbing; user-select: none; }
.tl-scroll:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.tl-axis { position: absolute; left: 0; right: 0; top: 380px; border-top: 1px solid var(--muted); opacity: .5; }
.tl-chunk { position: absolute; top: 0; height: 100%; }
.tl-chunk .status-archive { --c: var(--archive); }
.tl-chunk .status-encore { --c: var(--encore); }
.tl-chunk .status-reupload { --c: var(--reupload); }
.tl-chunk .status-lost { --c: var(--lost); }
.tl-chunk .status-video { --c: var(--accent); }
.tl-tick { position: absolute; top: 380px; height: 26px; padding: 12px 0 0 4px; border-left: 1px solid var(--border);
           font-size: .75rem; line-height: 1; color: var(--muted); white-space: nowrap; pointer-events: none; }
.tl-tick.year { height: 36px; padding-top: 10px; border-left-color: var(--text); color: var(--text); font-weight: 700; font-size: .95rem; }
.tl-tick.day { height: 6px; padding-top: 26px; border-left: 0; background: linear-gradient(var(--border), var(--border)) no-repeat 0 0 / 1px 6px; }
.tl-dot { position: absolute; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; }
.tl-dot.lost, .tl-tag.lost, .tl-stem.lost { opacity: .45; }
.tl-dot:hover { transform: scale(1.6); }
.tl-tag { position: absolute; height: 22px; padding: 0 9px; border: 1px solid var(--c); border-radius: 11px; background: var(--surface);
          color: var(--text); font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.tl-tag.lost { border-style: dashed; }
.tl-tag:hover, .tl-tag:focus-visible { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.tl-stem { position: absolute; width: 1px; background: color-mix(in srgb, var(--c) 55%, transparent); pointer-events: none; }
.tl-stem::after { content: ''; position: absolute; left: -3px; bottom: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.tl-more { position: absolute; top: 176px; padding: 0 .4rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
           color: var(--muted); font: inherit; font-size: .75rem; cursor: pointer; white-space: nowrap; }
.tl-end { position: absolute; top: 414px; font-size: .78rem; color: var(--muted); white-space: nowrap; padding-left: 6px; }
.tl-end.right { transform: translateX(-100%); padding: 0 6px 0 0; }
.tl-film { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 3; }
.tl-film-item { position: absolute; top: 46px; width: 176px; height: 99px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border);
                background: var(--surface); transform-origin: 50% 100%; transition: opacity .12s; text-decoration: none; }
.tl-film-item.centre { border: 2px solid var(--archive); }
.tl-film-item:focus-visible { opacity: 1 !important; outline: 2px solid var(--text); outline-offset: 2px; }
.tl-film-item.status-video.centre { border-color: var(--accent); }
.tl-film-item .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-film-title { position: absolute; left: 0; right: 0; bottom: 0; padding: .2rem .45rem; background: rgba(0, 0, 0, .62); color: #fff;
                 font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-film-lines { position: absolute; top: 0; pointer-events: none; overflow: visible; }
.tl-film-lines line { stroke: var(--muted); stroke-width: 1; }
.tl-centre { position: absolute; left: 50%; top: 150px; height: 230px; border-left: 1px dashed var(--muted); opacity: .45; pointer-events: none; z-index: 2; }
.tl-centre-date { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); z-index: 4; padding: .05rem .5rem;
                   border-radius: 999px; background: var(--surface); color: var(--text); font-size: .78rem; font-weight: 600; pointer-events: none; white-space: nowrap; }
.tl-centre::after { content: ''; position: absolute; left: -6px; bottom: -1px; border: 6px solid transparent; border-bottom-color: var(--muted); }
.tl-card { position: absolute; top: 12px; z-index: 6; width: 300px; max-width: calc(100% - 16px); padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 12px;
           background: var(--surface); box-shadow: 0 8px 28px rgba(0, 0, 0, .2); }
.tl-card:focus { outline: none; }
.tl-card .tl-card-close { position: absolute; top: .3rem; right: .35rem; min-height: 0; padding: .1rem .45rem; }
.tl-card p { margin: 0; }
.tl-card-meta { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.tl-card-meta .badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor;
                       border-radius: 999px; padding: 0 .45rem; color: var(--archive); }
.tl-card-meta .badge.status-encore { color: var(--encore); }
.tl-card-meta .badge.status-reupload { color: var(--reupload); }
.tl-card-meta .badge.status-lost { color: var(--lost); }
.tl-card-meta .badge.status-video { color: var(--accent); }
.tl-card p.tl-card-title { font-weight: 600; font-size: 1.02rem; margin: .35rem 0 .1rem; line-height: 1.3; padding-right: 1.4rem; }
.tl-card-game { color: var(--muted); font-size: .88rem; }
.tl-card p.tl-card-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.tl-card-links a { font-size: .85rem; font-weight: 600; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.tl-card-links a:hover { border-color: var(--accent); }
.tl-day-list { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 210px; overflow-y: auto; }
.tl-day-list button { display: block; width: 100%; text-align: left; font: inherit; font-size: .9rem; padding: .3rem .4rem; border: 0;
                      border-left: 3px solid var(--archive); background: none; color: var(--text); cursor: pointer; }
.tl-day-list button + * { margin-top: 2px; }
.tl-day-list button:hover, .tl-day-list button:focus-visible { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tl-day-list .status-encore { border-left-color: var(--encore); }
.tl-day-list .status-reupload { border-left-color: var(--reupload); }
.tl-day-list .status-lost { border-left-color: var(--lost); }
.tl-day-list .status-video { border-left-color: var(--accent); }
.tl-dot.open { transform: scale(1.9); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text); }
.tl-tag.open { background: var(--c); color: var(--surface); }
.tl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.tl-key { margin-right: .9rem; white-space: nowrap; }
.tl-key-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; background: var(--archive); }
.tl-key.status-encore .tl-key-dot { background: var(--encore); }
.tl-key.status-reupload .tl-key-dot { background: var(--reupload); }
.tl-key.status-lost .tl-key-dot { background: var(--lost); opacity: .45; }
.tl-key.status-video .tl-key-dot { background: var(--accent); }
/* keyboard users: the first Tab offers a jump past the top bar */
.skip-link { position: absolute; left: .5rem; top: -4rem; z-index: 100; padding: .5rem .9rem; border-radius: 8px;
             background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: .5rem; }
main:focus { outline: none; }
.notice button { font: inherit; font-weight: 600; cursor: pointer; padding: .45rem .9rem; border: 1px solid var(--border);
                 border-radius: 8px; background: var(--surface); color: var(--text); }
.notice .dev-hint { font-size: .85rem; }
header.top { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; gap: .6rem;
             padding: .75rem 1rem; background: var(--surface);
             border-bottom: 1px solid var(--border); }
/* two tiers: the site (wordmark, the three views, About, theme), then the search and its tools */
.top-row-1, .top-tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.top-tools[hidden] { display: none; }
.top-views { display: flex; flex-wrap: wrap; gap: .5rem; }
.top-row-1 > .about-link { margin-left: auto; }
.view-link[aria-current="page"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); font-weight: 700; }
/* JermaDB wordmark: a nod to a certain movie database: black heavy condensed type on a yellow tile, same in both themes */
.brand { display: inline-block; padding: .18rem .5rem .1rem; border-radius: 5px; background: #f5c518; color: #000;
         font-family: Anton, Impact, "Arial Narrow Bold", sans-serif; font-weight: 400;
         font-synthesis: none; font-size: 1.8rem; line-height: 1.05; letter-spacing: .01em; text-decoration: none; }
.brand:hover { background: #ffd43b; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-wrap { position: relative; flex: 1 1 320px; }
#search { width: 100%; padding: .75rem 1rem; font-size: 1.1rem; border: 1px solid var(--border);
          border-radius: 8px; background: var(--bg); color: var(--text); }
#search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .25rem 0;
               list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
               box-shadow: 0 8px 24px rgb(0 0 0 / .18); max-height: 70vh; overflow: auto; z-index: 20; }
.sugg-group { padding: .35rem .8rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
              color: var(--muted); }
.sugg { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .8rem; cursor: pointer; }
.sugg small { color: var(--muted); white-space: nowrap; }
.sugg.active, .sugg:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }
#filters-btn, .about-link, .view-link, #theme-btn, #surprise, #filters-reset, .filter-chip, .tabs button, #clear-btn, #search-help-btn {
  padding: .6rem 1rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg);
  color: var(--text); cursor: pointer; text-decoration: none; font-weight: 600; }
#filters-panel { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
                 gap: .75rem; padding: .75rem; border: 1px solid var(--border); border-radius: 8px; }
#filters-panel[hidden] { display: none; }
/* 36 guests: the list scrolls rather than stretching the panel */
.guest-fieldset { max-height: 15rem; overflow-y: auto; }
.guest-fieldset small { color: var(--muted); }
fieldset { margin: 0; border: 1px solid var(--border); border-radius: 6px; }
fieldset label { display: block; }
legend { color: var(--text); font-size: .95rem; font-weight: 700; padding: 0 .3rem; }
label.status-archive { color: var(--archive); }
label.status-reupload { color: var(--reupload); }
label.status-lost { color: var(--lost); }
#filter-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem; }
#filter-chips:empty { display: none; }
.filter-chip { border-radius: 999px; padding: .15rem .65rem; font-size: .85rem; }

main { padding: 1rem; max-width: 1500px; margin: 0 auto; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
           padding: .9rem 1.1rem; margin-bottom: 1rem; }
.summary h2 { margin: 0 0 .2rem; }
.sub { color: var(--muted); }
.counts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.count-pill { padding: .15rem .6rem; border-radius: 999px; font-size: .85rem; border: 1px solid var(--border); }
.count-pill.status-archive { color: var(--archive); background: var(--archive-bg); border-color: var(--archive); }
.count-pill.status-reupload { color: var(--reupload); background: var(--reupload-bg); border-color: var(--reupload); }
.count-pill.status-lost { color: var(--lost); background: var(--lost-bg); border: 1px dashed var(--lost); }

.tabs { display: none; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.col > h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.col-body { max-height: calc(100vh - 250px); overflow-y: auto; padding: 2px .35rem 2px 2px;
            display: flex; flex-direction: column; gap: .5rem; }
.group { margin: .75rem 0 .1rem; font-size: 1rem; }
.empty-col, .empty, .notice { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }

.card { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; padding: .8rem;
        background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border);
        border-radius: 8px; transition: opacity .15s, box-shadow .15s; }
.card.stream.status-archive { border-left-color: var(--archive); background: var(--archive-bg); }
.card.stream.status-reupload { border-left-color: var(--reupload); background: var(--reupload-bg); }
.card.stream.status-lost { border: 1px dashed var(--lost); border-left: 5px dashed var(--lost); background: var(--lost-bg); }
.card.video { border-left-color: var(--accent); }
.thumb { width: 240px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; background: var(--border); }
.thumb.placeholder { background: repeating-linear-gradient(135deg, var(--border) 0 8px, transparent 8px 16px); }
.title { font-weight: 600; font-size: 1.05rem; text-decoration: none; }
a.title:hover { text-decoration: underline; }
.meta, .count { color: var(--muted); font-size: .85rem; }
.card .title { display: block; font-size: 1.15rem; line-height: 1.3; }
.card .body > * + * { margin-top: .5rem; }
.credit { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; font-size: .85rem; color: var(--muted); text-decoration: none; }
.credit .badge { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
                 padding: .1rem .5rem; border-radius: 999px; border: 1px solid currentColor; }
.credit .chan { color: var(--text); opacity: .85; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.credit:hover .chan { text-decoration: underline; }
.card.video .credit { color: var(--accent); }
/* labelled facts (Streamed / Length / Videos, Uploaded / After Stream) in small boxes */
.facts { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.fact { display: flex; flex-direction: column; padding: .25rem .6rem .3rem; border: 1px solid var(--border);
        border-radius: 8px; background: var(--surface); }
.fact dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact dd { margin: 0; font-size: .95rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact.gap { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); cursor: help; }
.fact.gap dt, .fact.gap dd { color: var(--accent); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.card-actions .watch-toggle, .card-actions .status-archive .credit { color: var(--archive); }
.status-reupload .credit { color: var(--reupload); }
.status-lost .credit { color: var(--lost); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .35rem; }
.chip { font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--border);
        background: var(--bg); color: var(--text); cursor: pointer; }
.chip.status-archive { border-color: var(--archive); }
.chip.status-reupload { border-color: var(--reupload); }
.chip.status-lost { border: 1px dashed var(--lost); }
.card .body { min-width: 0; }
.src { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; max-width: 100%; min-width: 0; }
.src .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.src .ev-time { flex: none; }
.chip .mk { font-weight: 700; margin-right: .25rem; }
.chip.ev-strong .mk { color: var(--archive); }
.chip.ev-weak { border-style: dashed; }
.chip.ev-weak .mk, .chip.ev-unv .mk, .chip.ev-notx .mk { color: var(--muted); }
.ev-time { font-size: .76rem; color: var(--muted); }
.ev-cover { margin-top: .3rem; font-size: .82rem; color: var(--warn); }
.ev-cover a { color: inherit; }
.ev-note { margin-top: .3rem; font-size: .82rem; color: var(--muted); }
.hl { display: inline-block; margin-left: .45rem; font-size: .72rem; font-weight: 600; padding: 0 .45rem;
      border-radius: 999px; border: 1px solid; vertical-align: .1em; white-space: nowrap; }
.hl-essential { color: var(--essential); border-color: var(--essential); }
.hl-notable { color: var(--archive); border-color: var(--archive); }
.watch-copy { display: block; margin-top: .2rem; font-size: .8rem; color: var(--reupload); }

.columns.dimming .card.video:not(.linked) { opacity: .35; }
.card.linked { box-shadow: 0 0 0 2px var(--accent); }
.card.focused, .card.flash { animation: flash 1.4s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }

.sources { margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1.1rem; }
.sources h2 { margin: 0 0 .6rem; font-size: 1rem; }
.source-table { width: 100%; border-collapse: separate; border-spacing: 0 .35rem; table-layout: fixed; }
.source-table thead th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
                         color: var(--muted); font-weight: 600; padding: 0 .55rem; }
.source-table thead th:first-child { width: 40%; }
.source-row > th, .source-row > td { vertical-align: top; text-align: left; font-weight: normal; padding: .35rem .55rem; overflow-wrap: anywhere; }
.source-row > th { border-left: 4px solid var(--border); border-radius: 6px 0 0 6px; }
.source-row > td { border-radius: 0 6px 6px 0; }
.source-row[hidden] { display: none; }
.source-row.status-archive > * { background: var(--archive-bg); }
.source-row.status-archive > th { border-left-color: var(--archive); }
.source-row.status-reupload > * { background: var(--reupload-bg); }
.source-row.status-reupload > th { border-left-color: var(--reupload); }
.source-row.status-lost > * { background: var(--lost-bg); }
.source-row.status-lost > th { border-left: 4px dashed var(--lost); }
.src-stream, .src-video { font: inherit; text-align: left; background: none; border: 0; padding: 0; color: var(--text); }
button.src-stream, .src-video { cursor: pointer; }
.src-stream { font-weight: 600; }
.src-videos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.src-video { text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 800px) {   /* phones: stream on its own line, its videos indented beneath */
  .source-table thead { display: none; }
  .source-table, .source-table tbody, .source-row, .source-row > th, .source-row > td { display: block; width: auto; }
  .source-row { margin-bottom: .35rem; }
  .source-row[hidden] { display: none; }
  .source-row > th { border-radius: 6px 6px 0 0; }
  .source-row > td { border-left: 4px solid transparent; border-radius: 0 0 6px 6px; padding-left: 1.6rem; }
  .source-row.status-archive > td { border-left-color: var(--archive); }
  .source-row.status-reupload > td { border-left-color: var(--reupload); }
  .source-row.status-lost > td { border-left: 4px dashed var(--lost); }
}
#clear-btn, #search-help-btn, #filters-btn, .about-link, .view-link, #theme-btn, #surprise, #filters-reset, .tabs button, .close-btn, .src-toggle, #to-top {
  min-height: 2.6rem; }
#filters-btn:hover, .about-link:hover, .view-link:hover, #clear-btn:hover, #search-help-btn:hover, #quote-help-btn:hover, #surprise:hover, #filters-reset:hover,
.close-btn:hover, .src-toggle:hover, #to-top:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
#search-help-btn, #quote-help-btn { width: 2.6rem; padding: 0; border-radius: 50%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); vertical-align: -3px; }
fieldset label { padding: .2rem 0; }
#filters-panel { position: relative; padding-top: 2.6rem; }
#filters-panel select, #filters-panel label select { font: inherit; padding: .3rem .4rem; }
.close-btn { padding: .35rem .7rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg);
             color: var(--text); cursor: pointer; font-weight: 600; }
#filters-close, #search-help-close, #quote-help-close { position: absolute; top: .5rem; right: .5rem; }
.help-wrap { position: relative; display: inline-flex; }
/* In the search row the tips boxes are placed against the row, not their "?": the row's edges keep them on screen
   wherever the "?" lands. Each still opens just below its button (vertical static position + the button's height). */
.top-tools { position: relative; }
.top-tools .help-wrap { position: static; }
.top-tools :is(#search-help, #quote-help) { top: auto; margin-top: calc(2.6rem + 8px); width: min(560px, 100%); overflow-x: auto; }
.top-tools #search-help { left: 0; right: auto; }
.top-tools #quote-help { right: 0; left: auto; }
#search-help , #quote-help { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: min(560px, 92vw);
               padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
               box-shadow: 0 10px 30px rgb(0 0 0 / .22); font-size: .9rem; }
#search-help h3 , #quote-help h3 { margin: 0 0 .5rem; }
#search-help table , #quote-help table { border-collapse: collapse; }
#search-help th, #search-help td , #quote-help th, #quote-help td { text-align: left; padding: .3rem .8rem .3rem 0; vertical-align: top; }
#search-help table , #quote-help table { width: 100%; }
#search-help code , #quote-help code { white-space: nowrap; font-size: .85rem; }
#search-help code, #search-help kbd , #quote-help code, #quote-help kbd { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 .3rem; }
.credits-head, .about-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.about { max-width: 900px; margin: 0 auto; padding: 1rem 0 2rem; }
.about-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1.2rem; }
.about-toc a { font-size: .85rem; padding: .2rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--surface); }
.about-toc a:hover { border-color: var(--accent); }
.about-sec { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1.1rem; margin-bottom: 1rem; scroll-margin-top: 1rem; }
.about-sec h3 { margin: 0 0 .5rem; font-size: 1rem; }
.about-sec p { line-height: 1.55; }
.about-list { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .45rem; }
.about-list .hl { margin: 0 .4rem 0 0; }
.about-list .mk { display: inline-block; width: 1.4rem; text-align: center; font-weight: 700; }
.more-about { font-size: .85rem; }
.search-hint { margin: -.5rem 0 1rem; padding: .5rem .8rem; border-left: 4px solid var(--reupload); background: var(--reupload-bg);
               border-radius: 6px; font-size: .95rem; }
.src-toggle { margin-top: .6rem; padding: .45rem .9rem; border: 1.5px solid var(--border); border-radius: 8px;
              background: var(--bg); color: var(--text); cursor: pointer; font-weight: 600; }
#to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; padding: .6rem 1rem; border: 1.5px solid var(--border);
          border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600;
          box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
#to-top[hidden] { display: none; }
.watch-toggle { display: block; margin-top: .4rem; font: inherit; font-size: .8rem; padding: .2rem .7rem;
                border: 1.5px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); cursor: pointer; }
.watch-toggle:hover { border-color: var(--accent); }
.watch-toggle[aria-pressed="true"] { border-color: var(--archive); color: var(--archive); font-weight: 600; }
.card.watched .thumb { opacity: .45; }
.card.watched .title::before { content: "\2713  "; color: var(--archive); }
.src-video.watched { color: var(--muted); }
.count-pill.watched-pill { color: var(--archive); border-color: var(--archive); }
.credits-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.credits-table th, .credits-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
@media (max-width: 560px) {   /* phones: the four columns fit by wrapping long names and roles */
  .credits-table { font-size: .85rem; table-layout: fixed; }
  .credits-table th, .credits-table td { padding: .45rem .35rem; overflow-wrap: anywhere; }
  .credits-table th:nth-child(n+3), .credits-table td:nth-child(n+3) { width: 4.2rem; }
}

@media (max-width: 800px) {
  .tabs { display: flex; gap: .5rem; margin-bottom: .5rem; }
  .tabs button { flex: 1; }
  .tabs button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
  .columns { grid-template-columns: 1fr; }
  .columns.show-streams .col-videos, .columns.show-videos .col-streams { display: none; }
  .col > h2 { display: none; }
  .col-body { max-height: none; }
  .card { grid-template-columns: 112px 1fr; gap: .75rem; padding: .7rem; }
  .thumb { width: 112px; }
  .card .title { font-size: 1.05rem; }
  .fact { padding: .2rem .5rem .25rem; }
  .fact dd { font-size: .88rem; }
}

/* quote search */
.quote-row { flex: 1 1 280px; display: flex; gap: .75rem; align-items: center; }
.quote-wrap { flex: 1 1 320px; }
#quote-input { width: 100%; padding: .6rem 1rem; font-size: 1rem; border: 1px solid var(--border);
               border-radius: 8px; background: var(--bg); color: var(--text); }
#quote-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#quote-clear { min-height: 2.6rem; }
#quote-help-btn { min-height: 2.6rem; border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
                  cursor: pointer; font-weight: 700; }
.quote-header { margin: .25rem 0 .5rem; font-size: 1.25rem; }
.quote-coverage { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.quote-searching { display: flex; align-items: center; gap: .6rem; padding: 1.5rem 0; color: var(--muted); }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%;
           animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
/* a card's snippets before its transcript arrives: one snippet's height, so filling in moves little */
.quote-snips.pending .snip, .quote-snips.failed .snip { color: var(--muted); font-style: italic; }
.quote-snips.pending { min-height: 3.2em; }
/* quote pages keep the reader's place themselves (app.js fillSnippets), the same in every browser */
html:has(.quote-header), .col-body:has(.quote-snips) { overflow-anchor: none; }
.quote-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: -.4rem 0 .8rem; color: var(--muted); }
.quote-progress button { font: inherit; font-size: .88rem; font-weight: 600; padding: .3rem .8rem; border: 1px solid var(--border);
                         border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.quote-progress button:hover { border-color: var(--accent); }
.quote-linked { margin: 0 0 1rem; padding: .6rem .8rem; border: 1px dashed var(--accent); border-radius: 10px; }
.quote-linked h3 { margin: 0 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.quote-sentinel { height: 1px; }
.link-btn { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-decoration: underline; }
.quote-snips { margin-top: .5rem; padding: .4rem .6rem; border-left: 3px solid var(--accent); border-radius: 4px;
               background: color-mix(in srgb, var(--accent) 7%, var(--surface)); font-size: .88rem; }
.snip { margin: .2rem 0; }
.snip-more { margin: .2rem 0 0; color: var(--muted); font-size: .82rem; }
mark { background: var(--mark-bg); color: var(--mark-text); border-radius: 3px; padding: 0 .15rem; }

/* ---- home page ---------------------------------------------------------- */
.home { display: grid; gap: 1.5rem; padding: 1rem 0; }
.home h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.strip-viewport { overflow: hidden; border-radius: 10px; }
.strip-track { display: flex; width: max-content; animation: strip-scroll var(--strip-duration, 60s) linear infinite; }
.strip-track.static { animation: none; }
.strip-viewport:hover .strip-track, .strip-viewport:focus-within .strip-track, .strip.paused .strip-track { animation-play-state: paused; }
.strip-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .5rem; }
.strip-head h2 { margin: 0; }
.strip-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.strip-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; }
.strip-view, .tl-tabs button, .tl-zoom button { font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text);
              border: 0; padding: .3rem .9rem; }
.strip-view:first-child, .tl-tabs button:first-child, .tl-zoom button:first-child { border-radius: 999px 0 0 999px; }
.strip-view:last-child, .tl-tabs button:last-child, .tl-zoom button:last-child { border-radius: 0 999px 999px 0; }
.strip-view + .strip-view, .tl-tabs button + button, .tl-zoom button + button { border-left: 1px solid var(--border); }
.strip-view:focus-visible, .tl-tabs button:focus-visible, .tl-zoom button:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.strip-view[aria-pressed="true"], .tl-tabs button[aria-pressed="true"], .tl-zoom button[aria-pressed="true"] { background: var(--accent); color: var(--surface); }
.strip-card.game .strip-title { font-size: 1.02rem; }
.strip-kind { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .15rem; }
/* a series is a stack: faint card edges behind it (a third for big series) */
.strip-set { padding-top: 14px; }
.strip-grid { padding-top: 14px; }
.strip-card.series { box-shadow: 4px -4px 0 -1px var(--surface), 4px -4px 0 0 var(--border),
                                 8px -8px 0 -1px var(--surface), 8px -8px 0 0 var(--border); }
.strip-card.series.deep { box-shadow: 3px -3px 0 -1px var(--surface), 3px -3px 0 0 var(--border),
                                      6px -6px 0 -1px var(--surface), 6px -6px 0 0 var(--border),
                                      9px -9px 0 -1px var(--surface), 9px -9px 0 0 var(--border); }
.strip-card .hl { align-self: flex-start; margin: .1rem 0; }
.strip-pause { font: inherit; font-size: .8rem; cursor: pointer; color: var(--muted); background: none; border: 1px solid var(--border);
               border-radius: 999px; padding: .1rem .7rem; }
.strip-lost { font-size: .8rem; font-weight: 600; color: var(--lost); }
.strip-card.lost { border-style: dashed; border-color: var(--lost); }
.legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .88rem; color: var(--muted); }
.legend .hl { margin: 0 .35rem 0 0; }
.hl-none { color: var(--muted); border-color: var(--border); font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.strip-set { display: flex; gap: 12px; padding-right: 12px; }
@keyframes strip-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } }
.strip-card { flex: 0 0 248px; width: 248px; display: flex; flex-direction: column; gap: .2rem; text-decoration: none;
              background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.strip-card:hover, .strip-card:focus-visible { border-color: var(--accent); }
.strip-card .thumb { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; }
.strip-title { font-weight: 600; line-height: 1.3; }
/* home strip cards (not the series lists, whose titles differ only at the end): two lines at most, and room for two always kept, so every card's facts row lines up */
.strip-card.game .strip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2em * 1.3); }
.strip-meta { font-size: .8rem; color: var(--muted); }
.strip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.strip-grid .strip-card { width: auto; }
.strip-nav { display: flex; gap: .5rem; margin-top: .6rem; }
.home { min-width: 0; }
.home > section, .home > .home-pair, .home-pair > section { min-width: 0; }
.pick-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
a.button, #another-series { display: inline-block; cursor: pointer; color: inherit; font: inherit; padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 8px;
           background: var(--bg); text-decoration: none; font-weight: 600; }
/* (phones keep the full card width: at 200px the three fact boxes broke onto a second row on some cards only) */

/* ---- filters: Archive Tools ---------------------------------------------- */
.archive-tools { border: 1px dashed var(--border); border-radius: 8px; padding: .35rem .6rem; align-self: start; }
.archive-tools summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.archive-tools[open] summary { margin-bottom: .4rem; }
.archive-tools .tools-body { display: grid; gap: .4rem; }
.snip-time { margin-left: .35rem; font-size: .82rem; white-space: nowrap; color: var(--muted); }
.snip-time:hover { color: inherit; }

/* Home: year row under the Essential | Recommended switch */
.strip-years { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .6rem; }
.strip-year, .tl-years button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: .15rem .65rem; font-size: .85rem; cursor: pointer; }
.strip-year[aria-pressed="true"], .tl-years button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.strip-year:disabled, .tl-years button:disabled { opacity: .35; cursor: default; }
.strip-empty { margin: .5rem 0 0; }

/* Home: Try This Series */
.picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.picks > section { min-width: 0; }
.series-pick .hl { display: inline-block; margin: .3rem 0 0; }

/* Drag to scroll the strip (vertical page scrolling still works on touch) */
.strip-viewport:has(.strip-track:not(.static)) { cursor: grab; touch-action: pan-y; }
.strip-viewport.dragging { cursor: grabbing; user-select: none; }
.strip-viewport.dragging .strip-card { pointer-events: none; }

/* ---- theme button, footer --------------------------------------------------- */
#theme-btn { display: inline-flex; align-items: center; gap: .4rem; }
.theme-ico { display: inline-flex; line-height: 1; }
@media (max-width: 700px) { .theme-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.site-foot { max-width: 1500px; margin: 1.5rem auto 0; padding: 1rem; border-top: 1px solid var(--border);
             color: var(--muted); font-size: .85rem; text-align: center; }
.site-foot p { margin: 0; }
.disclaimer { color: var(--muted); }

/* ---- About hook ---------------------------------------------------------------- */
.about-hook { margin: .25rem 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--accent); border-radius: 6px;
              background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.about-hook p { margin: .2rem 0; }
.about-hook ul { margin: .3rem 0; padding-left: 1.2rem; }
.about-hook li { margin: .2rem 0; }
.about-hook a { color: var(--accent); font-weight: 600; }

/* ---- Stats (tiles, bars and charts on the Stats page) ----------------------------------------------------------------- */
.stats-head { display: flex; justify-content: space-between; align-items: center; }
.stats-head h2 { margin: 0; font-size: 1.3rem; }
.stats-scope { margin: .35rem 0 .8rem; color: var(--muted); font-size: .9rem; }
.stats-scope strong { color: var(--text); }
.stats-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1rem; }
.stats-tiles div { padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.stats-tiles dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.stats-tiles dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-tiles dd small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.stats-sec { margin: 0 0 1.1rem; }
.stats-sec h3 { margin: 0 0 .45rem; font-size: 1rem; }
.status-bar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; }
.status-bar .seg { min-width: 3px; }
.status-bar .status-archive { background: var(--archive); }
.status-bar .status-reupload { background: var(--reupload); }
.status-bar .status-lost { background: var(--lost); }
.stats-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .45rem 0 0; padding: 0; list-style: none; font-size: .9rem; }
.stats-legend small { color: var(--muted); }
.stats-toggle { display: inline-flex; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stats-toggle button { padding: .25rem .7rem; border: 0; background: var(--bg); color: var(--text); cursor: pointer; font-size: .85rem; }
.stats-toggle button + button { border-left: 1px solid var(--border); }
.stats-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--surface); font-weight: 600; }
.stats-years { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin: 0; padding: 1.1rem 0 1.3rem;
               list-style: none; border-bottom: 1px solid var(--border); }
.ybar { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.ybar-fill { display: block; width: 100%; min-height: 1px; background: var(--accent); border-radius: 4px 4px 0 0; }
.ybar:hover .ybar-fill { background: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.ybar:hover::after { content: attr(data-v); position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%);
                     padding: 0 .3rem; border-radius: 4px; background: var(--text); color: var(--surface); font-size: .72rem; white-space: nowrap; }
.ybar-year { position: absolute; top: calc(100% + .25rem); left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); }
.stats-table { margin-top: .35rem; font-size: .85rem; }
.stats-table summary { cursor: pointer; color: var(--muted); }
.stats-table table { width: 100%; margin-top: .35rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: .15rem .4rem; text-align: right; border-bottom: 1px solid var(--border); }
.stats-table th:first-child { text-align: left; }
.stats-games { margin: 0; padding-left: 1.4rem; }
.stats-games li { margin: 0 0 .45rem; }
.stats-games a { font-weight: 600; }
.stats-games small { display: block; color: var(--muted); font-size: .8rem; }
.gbar { display: block; height: 6px; margin: .2rem 0 .1rem; border-radius: 3px; background: var(--bg); }
.gbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.stats-legend .hl { margin: 0 .3rem 0 0; }

/* ---- full Stats page ---------------------------------------------------------------- */
.statspage { max-width: 1200px; margin: 0 auto; padding: 1rem 0 2rem; }
.statspage .stats-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stats-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1.1rem; }
.stats-card.wide { grid-column: 1 / -1; }
.stats-card h3 { margin: 0 0 .6rem; font-size: 1rem; }
.stats-card h4 { margin: 0 0 .35rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.stats-note { margin: .45rem 0 0; color: var(--muted); font-size: .85rem; }
.stats-years.week { height: 110px; }
.ybar-hit { all: unset; position: relative; display: flex; align-items: flex-end; width: 100%; height: 100%; cursor: pointer; }
.ybar-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ybar.on .ybar-fill { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.ybar.on .ybar-year { color: var(--text); font-weight: 700; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.hbars li { display: grid; grid-template-columns: minmax(8rem, 40%) minmax(0, 1fr) 3.5rem; align-items: center; gap: .6rem; }
.hbars .gbar { margin: 0; height: 10px; }
.hbar-label { text-align: left; font-size: .9rem; overflow-wrap: anywhere; }
button.hbar-label, a.hbar-label { all: unset; cursor: pointer; font-size: .9rem; color: var(--accent); font-weight: 600; }
button.hbar-label:hover, a.hbar-label:hover { text-decoration: underline; }
a.hbar-label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
button.hbar-label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.hbars li.on .hbar-label { color: var(--text); text-decoration: underline; }
.hbars li.on .gbar { box-shadow: 0 0 0 2px var(--text); }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--muted); }
.hbars.prog li { grid-template-columns: minmax(12rem, 45%) minmax(0, 1fr) 3.5rem; }
.rec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2rem; }
.rec-help { margin: -.2rem 0 .4rem; color: var(--muted); font-size: .8rem; }
.rec-parts { display: block; font-size: .82rem; line-height: 1.4; }
.rec-parts a { font-weight: 400; }
.rec-list { margin: 0; padding-left: 1.3rem; }
.rec-list li { margin: 0 0 .35rem; }
.rec-list a { font-weight: 600; }
.rec-list small { display: block; color: var(--muted); font-size: .8rem; }
.rec-facts { margin: 0; display: grid; gap: .5rem; align-content: start; }
.rec-facts dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.rec-facts dd { margin: 0; font-weight: 600; }
.cal-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: .9rem 1.5rem; overflow-x: auto; padding-bottom: .3rem; }
.cal-row { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .1rem .6rem; min-width: max-content; }
.cal-row small { color: var(--muted); font-size: .75rem; }
.cal-row .cal-grid { grid-column: 1 / -1; }
.cal-year { all: unset; font-size: .85rem; font-weight: 600; color: var(--accent); cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-year:hover { text-decoration: underline; }
.cal-year[aria-pressed="true"] { color: var(--text); text-decoration: underline; }
.cal-year:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-grid { display: grid; grid-template-rows: repeat(7, 8px); grid-auto-flow: column; grid-auto-columns: 8px; gap: 2px; }
.cal-day, .cal-pad { width: 8px; height: 8px; border-radius: 2px; display: block; }
.cal-day.l0 { background: color-mix(in srgb, var(--border) 70%, transparent); }
.cal-day.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.cal-day.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.cal-day.l3 { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.cal-day.l4 { background: var(--accent); }
a.cal-day:hover, a.cal-day:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
.cal-key { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin: .5rem 0 0; color: var(--muted); font-size: .8rem; }
.cal-key .cal-day { display: inline-block; }
.marks-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.marks-actions button { padding: .5rem .9rem; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg);
                        color: var(--text); cursor: pointer; font-weight: 600; }
.marks-actions button:hover { border-color: var(--accent); }
@media (max-width: 900px) {
  .stats-cards { grid-template-columns: minmax(0, 1fr); }
  .rec-grid { grid-template-columns: minmax(0, 1fr); }
  .statspage .stats-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbars li, .hbars.prog li { grid-template-columns: minmax(0, 45%) minmax(0, 1fr) 3rem; }
}

/* ---- On This Day (home) ----------------------------------------------------------------- */
.otd-row { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .3rem; }
.otd-card { flex: 0 0 220px; display: flex; flex-direction: column; gap: .2rem; text-decoration: none; color: inherit; }
.otd-card .thumb { width: 100%; }
.otd-card:hover .strip-title, .otd-card:focus-visible .strip-title { text-decoration: underline; }
.otd-when { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; margin-top: .3rem; }
.otd-note { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }

/* ---- results line, Browse by Category ------------------------- */
.results-line { margin: .2rem 0 .8rem; color: var(--muted); font-size: .92rem; }
.results-line strong { color: var(--text); font-weight: 600; }
.results-filters { color: var(--text); }
.sub a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.sub a:hover { color: var(--accent); }
.cat-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-chip { padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
            color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.cat-chip small { color: var(--muted); font-weight: 400; margin-left: .2rem; }
.cat-chip:hover, .cat-chip:focus-visible { border-color: var(--accent); }

/* ---- stream to video ---------------------------------------------------------------------- */
.gap-head { margin-top: 1rem !important; }

/* ---- Encore (Jerma's Lava Lamp) -------------------------------------------------------- */
label.status-encore { color: var(--encore); }
.count-pill.status-encore { color: var(--encore); background: var(--encore-bg); border-color: var(--encore); }
.card.stream.status-encore { border-left-color: var(--encore); background: var(--encore-bg); }
.status-encore .credit { color: var(--encore); }
.chip.status-encore { border-color: var(--encore); }
.source-row.status-encore > * { background: var(--encore-bg); }
.source-row.status-encore > th { border-left-color: var(--encore); }
@media (max-width: 800px) { .source-row.status-encore > td { border-left-color: var(--encore); } }
.status-bar .status-encore { background: var(--encore); }
.hl + .credit { margin-left: .5rem; }

/* ---- Stats page controls (its own settings, apart from the browsing filters) -------------- */
.sp-controls { display: flex; flex-direction: column; gap: .55rem; margin: 0 0 1rem; padding: .85rem 1.1rem;
               background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.sp-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; }
.sp-field { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sp-field > span, .sp-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.sp-field select { font: inherit; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 8px;
                   background: var(--bg); color: var(--text); max-width: 100%; }
.sp-scope { flex: 1 1 260px; }
.sp-scope select { width: 100%; font-weight: 600; }
#sp-reset { margin-left: auto; padding: .45rem 1.1rem; font-weight: 600; border: 1px solid var(--border); border-radius: 8px;
            background: var(--bg); color: var(--text); cursor: pointer; }
#sp-reset:not(:disabled):hover { border-color: var(--accent); }
#sp-reset:disabled { opacity: .45; cursor: default; }
.sp-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.sp-row .sp-label { min-width: 4.8rem; }
.sp-chip { font: inherit; font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--border);
           background: var(--bg); color: var(--muted); cursor: pointer; }
.sp-chip:hover { border-color: var(--accent); }
.sp-chip[aria-pressed="true"] { color: var(--text); font-weight: 600; border-color: var(--accent);
                                background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.sp-chip.status-archive[aria-pressed="true"] { color: var(--archive); border-color: var(--archive); background: var(--archive-bg); }
.sp-chip.status-encore[aria-pressed="true"] { color: var(--encore); border-color: var(--encore); background: var(--encore-bg); }
.sp-chip.status-reupload[aria-pressed="true"] { color: var(--reupload); border-color: var(--reupload); background: var(--reupload-bg); }
.sp-chip.status-lost[aria-pressed="true"] { color: var(--lost); border-color: var(--lost); background: var(--lost-bg); }
@media (max-width: 800px) {
  .sp-controls { padding: .75rem; }
  .sp-row .sp-label { flex: 1 1 100%; }
  #sp-reset { margin-left: 0; }
}

/* ---- Compare (Stats page) and the home invite into Stats --------------------------------- */
.sp-compare { padding-top: .55rem; border-top: 1px dashed var(--border); }
.stats-card.compare { border-color: color-mix(in srgb, var(--cmp) 45%, var(--border)); }
.cmp-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: -.2rem 0 .7rem; font-weight: 600; }
.cmp-name { display: inline-flex; align-items: center; gap: .45rem; }
.cmp-key { width: .85rem; height: .85rem; border-radius: 3px; flex: none; }
.cmp-key.a, .cmp-a { background: var(--accent); }
.cmp-key.b, .cmp-b { background: var(--cmp); }
.cmp-table { border-collapse: collapse; margin-bottom: .9rem; max-width: 100%; font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { padding: .3rem .9rem .3rem 0; text-align: left; border-bottom: 1px solid var(--border); }
.cmp-table thead th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.cmp-table thead th:nth-child(2) { color: var(--accent); }
.cmp-table thead th:nth-child(3) { color: var(--cmp); }
.cmp-table tbody th { font-weight: 400; color: var(--muted); }
.cmp-table td { font-weight: 600; }
.cmp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.cmp-chart { min-width: 0; }
.cmp-bars { display: flex; align-items: flex-end; gap: .3rem; height: 120px; margin: 0; padding: 0; list-style: none;
            border-bottom: 1px solid var(--border); }
.cmp-bars li { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.cmp-pair { flex: 1; display: flex; align-items: flex-end; gap: 2px; }
.cmp-a, .cmp-b { flex: 1; min-height: 1px; border-radius: 3px 3px 0 0; }
.cmp-lbl { font-size: .7rem; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: .2rem; }
@media (max-width: 800px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } }

.stats-invite { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border);
                border-left: 4px solid var(--accent); border-radius: 10px; }
.stats-invite h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.stats-invite p { margin: 0 0 .4rem; color: var(--muted); }
.stats-invite ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
.stats-invite li { margin: .25rem 0; }
.stats-invite li a { color: var(--accent); font-weight: 600; }

/* ---- Home cards share the fact boxes (compact in the strip) ---------------------------- */
.fact.wide dd { white-space: normal; overflow-wrap: anywhere; }
.facts.compact { gap: .25rem; margin-top: .25rem; }
.facts.compact .fact { padding: .12rem .42rem .16rem; border-radius: 6px; }
.facts.compact dt { font-size: .58rem; }
.facts.compact dd { font-size: .8rem; }
/* in the strip every card keeps its facts on one row, so neighbours line up (a 10-hour stream used to wrap) */
.strip-viewport .facts.compact, .strip-grid .facts.compact { flex-wrap: nowrap; gap: .2rem; }
.strip-viewport .facts.compact .fact, .strip-grid .facts.compact .fact { padding-left: .36rem; padding-right: .36rem; }

/* ---- Home: Try This Series as a small tree ---------------------------------------------
   the series bar on top; under it its streams (left) and 2ndJerma videos (right). Each side starts as one stacked card,
   like a series in the strip, and opens into a scrolling list; a side with a single item is a plain card. */
.series-tree { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start;
               margin: .9rem 0 0 1.4rem; padding: 14px 0 0 18px; border-left: 2px solid var(--border); }
.series-col { min-width: 0; }
.series-col > .strip-card.single, .series-stack > summary { width: 248px; }
.series-stack > summary { list-style: none; cursor: pointer; }
.series-stack > summary::-webkit-details-marker { display: none; }
.stack-open, .stack-close { font-size: .8rem; font-weight: 700; color: var(--accent); margin-top: .15rem; }
.stack-close { display: none; }
.series-stack[open] > summary { width: auto; flex-direction: row; align-items: center; gap: .8rem; box-shadow: none; padding: .45rem .75rem; }
.series-stack[open] > summary > :not(.strip-kind):not(.stack-close) { display: none; }
.series-stack[open] > summary .strip-kind { margin: 0; }
.series-stack[open] > summary .stack-close { display: inline; margin: 0 0 0 auto; }
.series-list { display: none; }
.series-stack[open] > .series-list { display: flex; flex-direction: column; gap: 8px; max-height: 470px; overflow-y: auto;
                                     margin-top: 8px; padding: 2px 6px 2px 2px; overscroll-behavior: contain; }
.strip-card.mini { flex: none; width: auto; }
.series-list .strip-card.mini { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: .75rem; row-gap: .15rem; align-content: start; }
.series-list .strip-card.mini .thumb { grid-row: 1 / span 4; height: 84px; }
.series-list .strip-card.mini > :not(.thumb) { grid-column: 2; }
.series-none { margin: 0; padding: 1rem 1.1rem; color: var(--muted); font-style: italic; border: 1px dashed var(--border); border-radius: 10px; }
@media (max-width: 700px) {
  .series-tree { grid-template-columns: minmax(0, 1fr); margin-left: .4rem; padding-left: 12px; }
  .series-col > .strip-card.single, .series-stack > summary { width: auto; }
  .series-list .strip-card.mini { grid-template-columns: 112px minmax(0, 1fr); }
  .series-list .strip-card.mini .thumb { height: 63px; }
}

/* ---- Home: sections separated by a bold rule and space, one heading style throughout ---- */
.home > .picks, .home > .otd, .home > .stats-invite, .home > .cat-browse, .home-pair > .otd, .home-pair > .stats-invite {
  margin-top: 2.6rem; padding-top: 2rem; border-top: 3px solid color-mix(in srgb, var(--text) 22%, transparent); }
/* On This Day with only a few streams sits beside Dig Into the Numbers on a wide screen: one rule above the pair */
@media (min-width: 1000px) {
  .home-pair { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 3rem; margin-top: 2.6rem;
               padding-top: 2rem; border-top: 3px solid color-mix(in srgb, var(--text) 22%, transparent); }
  .home-pair > .otd, .home-pair > .stats-invite { margin-top: 0; padding-top: 0; border-top: 0; }
  .home-pair > .stats-invite { padding-left: 3rem; border-left: 1px solid var(--border); }
  .home-pair .otd-row { overflow-x: visible; }
}
.home h2 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 .35rem; }
.home-sub, .otd-note { margin: 0 0 .9rem; color: var(--muted); font-size: .9rem; }
.stats-invite { margin: 2.6rem 0 0; padding: 2rem 0 0; background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.stats-invite h2 { font-size: .8rem; margin: 0 0 .35rem; }
.stats-invite p { margin: 0 0 .6rem; font-size: .9rem; }
/* the series bar: one text-only row (name and tag, its facts, its buttons), clickable as a whole */
.series-pick .series-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.6rem; background: var(--surface);
                           border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem; }
.series-name { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; min-width: 0; margin-right: auto; }
.series-name .title { font-size: 1.35rem; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.series-name .title:hover { text-decoration: underline; }
.series-name .strip-kind { margin: 0; }
.series-pick .series-bar .facts { margin: 0; }
.series-pick .series-bar .pick-actions { margin: 0; }
@media (max-width: 700px) {
  .home > .picks, .home > .otd, .home > .stats-invite, .home > .cat-browse, .home-pair > .otd, .home-pair > .stats-invite { margin-top: 2rem; padding-top: 1.5rem; }
  .series-name { margin-right: 0; flex-basis: 100%; }
  .series-stack > summary { margin-right: 10px; }   /* room for the stacked edges */
}
.series-pick .series-bar[data-href] { cursor: pointer; transition: border-color .15s; }
.series-pick .series-bar[data-href]:hover { border-color: var(--accent); }
.card-actions > .chips { margin-top: 0; min-width: 0; max-width: 100%; }   /* long chips end in "…" on phones instead of running off the card */
/* "+ 44 Other Streams" on a compilation shown on one of the games it drew from: a text link like the timestamps
   (a dashed bubble would read as a short match or a lost stream) */
.more-sources { font-size: .76rem; color: var(--muted); }
a.more-sources:hover { color: var(--text); }
/* Compilation: an outlined pill like the Essential / Recommended tags, neutral, so the roundups stand apart in a column */
.hl-comp { color: var(--muted); border-color: var(--muted); }
.credit + .hl-comp { margin-left: .5rem; vertical-align: middle; }

/* Try This Series: while both sides are closed, the two cards are the same height (the taller one sets it);
   a single card shows its title, a stack doesn't, so the extra room goes above "Show All" / the facts */
.series-tree:not(:has(details[open])) { align-items: stretch; }
.series-col { display: flex; flex-direction: column; }
.series-col > .strip-card.single { flex: 1 1 auto; }
.series-col > details.series-stack:not([open]) { flex: 1 1 auto; display: flex; flex-direction: column; }
.series-stack:not([open]) > summary { flex: 1 1 auto; }
.series-stack:not([open]) > summary .stack-open { margin-top: auto; }
.series-col > .series-none { align-self: stretch; }
.series-col.videos:has(> .series-none) { align-self: start; }

/* ---- phones: a compact top bar that scrolls away (pinned, it took a third of the screen) -------------------- */
@media (max-width: 640px) {
  header.top { position: static; gap: .5rem; padding: .6rem .75rem; }
  .brand { font-size: 1.45rem; }
  .top-row-1, .top-tools { gap: .5rem; }
  .top-row-1 > .about-link { order: 1; }                              /* row 1: wordmark ... About · theme */
  .top-row-1 > #theme-btn { order: 1; }
  .top-views { order: 2; flex-basis: 100%; }                         /* row 2: Browse · Stats · Timeline */
  .top-tools > .search-wrap { flex: 1 1 calc(100% - 3.5rem); }      /* row 3: search · ? (nothing else fits beside it) */
  .top-tools > #filters-btn { order: 1; }                             /* row 4: Filters · Clear */
  .top-tools > #clear-btn { order: 1; }
  .top-tools > .quote-row { order: 2; flex-basis: 100%; gap: .5rem; } /* row 5: quotes */
  .top-tools > :is(#filters-panel, #filter-chips) { order: 3; }
  #search { padding: .6rem .8rem; font-size: 1rem; }
  :is(#search-help, #quote-help) code { white-space: normal; overflow-wrap: anywhere; }   /* the examples wrap on a phone */
  #clear-btn, #search-help-btn, #filters-btn, .about-link, .view-link, #theme-btn { padding: .45rem .7rem; font-size: .92rem; }
}

/* touch: the number of a tapped chart bar or calendar day (app.js "tap a chart to read it") */
.tap-tip { position: fixed; z-index: 40; max-width: min(320px, calc(100vw - 16px)); padding: .45rem .7rem; border-radius: 8px;
           background: var(--text); color: var(--surface); font-size: .85rem; line-height: 1.35; pointer-events: none;
           box-shadow: 0 6px 18px rgb(0 0 0 / .25); }
.tap-tip[hidden] { display: none; }
.tap-tip strong { display: block; font-weight: 700; }
.tap-tip span { display: block; opacity: .8; font-size: .8rem; }
@media (hover: none) { .ybar:hover::after { content: none; } }   /* the tap label replaces the sticky hover number */

/* A strip too short to loop sits still; where it is wider than the screen (phones), it scrolls sideways instead of
   cutting cards off */
.strip-viewport:has(.strip-track.static) { overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
                                           scrollbar-width: thin; }
.strip-track.static .strip-card { scroll-snap-align: start; }
