@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/NotoSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/NotoSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/NotoSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #101114;
  --bg-2: #181b20;
  --bg-3: #22262d;
  --line: #343942;
  --text: #ece7dc;
  --muted: #a8a194;
  --faint: #746e64;
  --red: #e24b3b;
  --red-dim: #3a221f;
  --gold: #e0b15a;
  --reddit: #e08a5a;
  --x: #8eb4d6;
  --youtube: #e0b15a;
  --green: #8fbf9f;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(226, 75, 59, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #f0d7a0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  z-index: 5;
}
.skip:focus { top: 0.5rem; }

.banner {
  background: var(--red-dim);
  color: #f3d2cc;
  border-bottom: 1px solid rgba(226, 75, 59, 0.45);
}
.banner p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(16, 17, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}
.mark {
  width: 0.7rem;
  height: 1.35rem;
  background: var(--red);
  display: inline-block;
}
.nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  max-width: 100%;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.7rem 0.65rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a[aria-current="page"], .nav a:hover { color: var(--text); border-bottom-color: var(--red); }

.hero { padding: 2.4rem 0 0.4rem; }
.kicker {
  display: inline-block;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 0.7rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 68ch; margin: 0; }
.counts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.counts li, .chip, .tag {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--text);
  font-size: 0.85rem;
}
.tabs { display: flex; gap: 0.5rem; margin: 1.4rem 0 0; flex-wrap: wrap; }
.tabs a {
  text-decoration: none;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.tabs a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

section { padding: 1.6rem 0; }
.panel {
  background: rgba(24, 27, 32, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem 1.2rem;
}
.editorial {
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding-left: 0.8rem;
  margin: 0 0 1rem;
}
.editorial .kicker { display: block; }
.grid-2, .grid-3 { display: grid; gap: 0.9rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}
.card h3 { font-size: 1.15rem; }
.card p { margin: 0.35rem 0; }
.meta { color: var(--faint); font-size: 0.82rem; }
.quote { font-family: var(--serif); font-style: italic; color: var(--text); }
.missing { color: var(--faint); font-style: italic; }
.source-reddit { color: var(--reddit); }
.source-x { color: var(--x); }
.source-youtube { color: var(--youtube); }
.metric-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.metric-row span { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.82rem; }

.filters { display: grid; gap: 0.7rem; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.filters label, .search-label { display: flex; flex-direction: column; gap: 0.28rem; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
input, select, button {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.45rem 0.7rem;
}
button { cursor: pointer; background: var(--bg-3); }
button:hover { border-color: var(--gold); }
.results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.result {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.85rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
}
.result:hover { border-color: #5c5348; }
.result img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; background: var(--bg-3); }
.thumb-fallback {
  width: 92px; height: 92px; border-radius: 8px; background: var(--bg-3);
  display: grid; place-items: center; color: var(--faint); font-size: 0.75rem; text-align: center; padding: 0.3rem;
}
.result h3 { margin: 0.15rem 0; font-size: 1.05rem; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.tag { color: var(--muted); text-decoration: none; }
mark { background: #5a4320; color: var(--text); padding: 0 0.1em; border-radius: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.month { margin: 1.4rem 0 0.4rem; font-family: var(--serif); }
.tl-item {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.heat { overflow-x: auto; }
.heat table { border-collapse: separate; border-spacing: 3px; min-width: 760px; }
.heat th, .heat td { font-size: 0.72rem; font-weight: 500; color: var(--muted); text-align: center; }
.heat-cell {
  width: 22px; height: 22px; border-radius: 4px;
  background: color-mix(in srgb, var(--red) calc(var(--n) / var(--max) * 100%), #24282f);
}
.bars { display: grid; gap: 0.45rem; }
.bar-row { display: grid; grid-template-columns: 9rem 1fr auto; gap: 0.6rem; align-items: center; }
.bar { display: flex; height: 0.7rem; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar i.reddit { background: var(--reddit); }
.bar i.x { background: var(--x); }
.bar i.youtube { background: var(--youtube); }
.bar i.one { background: var(--gold); }
.legend { display: flex; gap: 1rem; color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0.8rem; }
.swatch { width: 0.7rem; height: 0.7rem; display: inline-block; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }

table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 0.5rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.delta-pos { color: var(--green); }
.delta-neg { color: #e08a80; }

.article-head { padding-top: 2rem; }
.prose { white-space: pre-wrap; font-size: 1.05rem; max-width: 72ch; }
.embed {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.embed iframe { width: 100%; min-height: 360px; border: 0; display: block; }
.shot { margin: 0.6rem 0 0; }
.shot img { border-radius: 12px; border: 1px solid var(--line); max-height: 720px; width: auto; }
.dl { display: grid; grid-template-columns: 11rem 1fr; gap: 0.35rem 0.8rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.refs { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.refs li { border-top: 1px solid var(--line); padding-top: 0.55rem; }
.conf { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.methods .prose, .methods-doc { white-space: normal; }
.methods-doc h2, .methods-doc h3 { margin-top: 1.4rem; }
.methods-doc ul, .methods-doc ol { padding-left: 1.2rem; }
.methods-doc code { background: var(--bg-3); padding: 0.05em 0.3em; border-radius: 4px; }
.methods-doc pre { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); padding: 0.8rem; border-radius: 10px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.4rem 0 2rem; color: var(--muted); font-size: 0.9rem; }
.site-footer p { max-width: 80ch; }
.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  color: var(--muted);
}
.pager { margin-top: 0.8rem; }

@media (max-width: 800px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .result, .tl-item, .dl, .bar-row { grid-template-columns: 1fr; }
  .result img, .thumb-fallback { width: 100%; height: 160px; }
  .header-row { align-items: flex-start; flex-direction: column; padding: 0.4rem 0 0.2rem; }
}
@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

.transcript-panel { margin-top: 0.4rem; }
.transcript-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: baseline;
  margin: 0.7rem 0;
}
.transcript-tools label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.transcript-tools input[type="search"] {
  min-width: 16rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
}
.transcript-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 28rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.transcript-list li {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: 0.7rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.transcript-list li:last-child { border-bottom: 0; }
.transcript-list li.is-hidden { display: none; }
.transcript-list li.is-active { background: var(--bg-3); }
.transcript-list .tc {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.transcript-list .tc:hover, .transcript-list .tc:focus-visible { color: var(--text, inherit); }
@media (max-width: 560px) {
  .transcript-tools input[type="search"] { min-width: 0; width: 100%; }
}
