/* History Snips website: sepia archive look, matched to the channel banner */
:root {
  --bg: #f5eee1;
  --paper: #fbf7ef;
  --ink: #2a2219;
  --muted: #6f604c;
  --line: rgba(42, 34, 25, 0.14);
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --gold: #a07a3c;
  --chip: #ebe0cc;
  --shadow: 0 1px 2px rgba(42, 34, 25, .08), 0 6px 20px rgba(42, 34, 25, .08);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120e;
    --paper: #1e1a15;
    --ink: #efe6d6;
    --muted: #b3a58f;
    --line: rgba(239, 230, 214, 0.12);
    --accent: #d2453b;
    --gold: #cfa862;
    --chip: #2b251e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120e; --paper: #1e1a15; --ink: #efe6d6; --muted: #b3a58f;
  --line: rgba(239, 230, 214, 0.12); --accent: #d2453b; --gold: #cfa862; --chip: #2b251e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { font: 600 22px/1 var(--serif); letter-spacing: .06em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }
.nav a.sub { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 560px) {
  .nav a.hide-sm { display: none; }
  .brand { font-size: 17px; letter-spacing: .04em; }
  .top .wrap { gap: 8px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  font: 600 15px/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn.red { background: var(--accent); color: var(--accent-ink); }
.btn.red:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn.ghost:hover { border-color: var(--gold); }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; }

/* Hero */
.hero { position: relative; color: #f6ecd9; background: #1b1610; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; filter: sepia(.3) blur(9px); transform: scale(1.08); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(20,15,10,.25), rgba(20,15,10,.75)); }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; text-align: center; }
.hero h1 { font: 600 clamp(40px, 8vw, 76px)/1 var(--serif); letter-spacing: .06em; margin: 0 0 14px; text-transform: uppercase; }
.hero .rule { width: min(420px, 70%); height: 1px; background: rgba(246,236,217,.6); margin: 0 auto 16px; }
.hero p { font: 400 clamp(18px, 2.6vw, 24px)/1.35 var(--serif); margin: 0 auto 26px; max-width: 640px; }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn.ghost { background: rgba(255,255,255,.08); color: #f6ecd9; border-color: rgba(246,236,217,.35); }

/* Sections */
section { padding: 48px 0; }
h2 { font: 600 clamp(28px, 4vw, 36px)/1.15 var(--serif); margin: 0 0 6px; }
.sub-h { color: var(--muted); margin: 0 0 24px; }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }

/* Latest */
.latest { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.latest h3 { font: 600 clamp(26px, 3.4vw, 34px)/1.15 var(--serif); margin: 0 0 12px; }
.latest h3 a { text-decoration: none; }
.latest p { color: var(--muted); margin: 0 0 20px; }
@media (max-width: 820px) { .latest { grid-template-columns: 1fr; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.chip { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 7px 14px; border-radius: 999px; font: 500 14px/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { margin-left: auto; min-width: 200px; flex: 0 1 260px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: 15px var(--sans); }
@media (max-width: 640px) { .search { margin-left: 0; flex: 1 1 100%; } }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #2a2219; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 10px; top: 10px; background: rgba(20,15,10,.78); color: #f6ecd9; font: 600 11px/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; }
.badge.feature { background: var(--accent); color: #fff; }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font: 600 21px/1.2 var(--serif); margin: 0; }
.meta { color: var(--muted); font-size: 14px; }
.cat { color: var(--gold); font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.empty { color: var(--muted); padding: 24px 0; display: none; }

/* Coming soon */
.soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.soon .item { border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; background: color-mix(in srgb, var(--paper) 60%, transparent); }
.soon .when { color: var(--accent); font: 600 13px/1 var(--sans); letter-spacing: .04em; margin-bottom: 8px; }
.soon .t { font: 600 18px/1.25 var(--serif); }

/* Join box */
.join { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center; box-shadow: var(--shadow); }
.join h2 { margin-bottom: 8px; }
.join p { color: var(--muted); margin: 0; }
.join .acts { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.join .acts .btn { justify-content: center; }
.join small { color: var(--muted); text-align: center; }
@media (max-width: 760px) { .join { grid-template-columns: 1fr; padding: 24px; } }

/* Player (loads YouTube only when pressed) */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.player.short { aspect-ratio: 9 / 16; max-width: 360px; margin: 0 auto; }
.player button { all: unset; position: absolute; inset: 0; cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player .play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.4); transition: transform .15s; }
.player button:hover .play, .player button:focus-visible .play { transform: scale(1.08); }
.player .play::before { content: ""; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Story page */
.story-head { padding: 36px 0 20px; }
.crumb { color: var(--muted); text-decoration: none; font-size: 15px; }
.crumb:hover { color: var(--ink); }
.story-head h1 { font: 600 clamp(32px, 5.4vw, 52px)/1.08 var(--serif); margin: 14px 0 12px; }
.story-head .meta { font-size: 16px; display: flex; gap: 4px 10px; flex-wrap: wrap; }
.story-head .meta span + span::before { content: "·"; margin-right: 10px; color: var(--gold); }
.prose { font: 400 21px/1.6 var(--serif); }
.prose p { margin: 0 0 1em; }
.prose .lede::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: 6px 8px 0 0; color: var(--accent); font-weight: 600; }
details.narration { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 28px 0; }
details.narration summary { cursor: pointer; font: 600 18px/1.3 var(--sans); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.narration summary::-webkit-details-marker { display: none; }
details.narration summary::after { content: "+"; font-size: 24px; color: var(--gold); }
details.narration[open] summary::after { content: "–"; }
details.narration .prose { margin-top: 18px; }
.also { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.also a { display: flex; gap: 10px; align-items: center; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.also a:hover { border-color: var(--gold); }
.also img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.also span { font-size: 14px; line-height: 1.3; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 36px; }
.pager a { text-decoration: none; max-width: 48%; }
.pager small { display: block; color: var(--muted); font-size: 13px; }
.pager b { font: 600 18px/1.25 var(--serif); }
.made { color: var(--muted); font-size: 14px; font-style: italic; }

/* Map */
#map { height: min(72vh, 680px); border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 1; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.dot.live { background: var(--accent); }
.dot.soon { border: 3px solid #7a5a1e; background: #fff; width: 14px; height: 14px; }
.pop { font: 14px/1.4 var(--sans); width: 220px; }
.pop img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.pop b { font: 600 17px/1.2 var(--serif); display: block; margin-bottom: 4px; }
.pop a { color: #b3261e; font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; gap: 16px 32px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }
footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
