/* Ash and ember. Dark first: most frames are fire and night. */
:root {
  --bg: #13100e;
  --surface: #1c1815;
  --line: #2f2823;
  --text: #e8e1d6;
  --muted: #a1968a;
  --dim: #74695f;
  --ember: #ee8a3c;
  --ember-soft: rgba(238, 138, 60, .14);
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --measure: 40rem;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3eee7;
    --surface: #e9e2d8;
    --line: #d6ccbf;
    --text: #221c17;
    --muted: #665c52;
    --dim: #8c8176;
    --ember: #b24e17;
    --ember-soft: rgba(178, 78, 23, .1);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--ember); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ember); }
a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
.mono { font: 400 .78rem/1.5 var(--mono); letter-spacing: .02em; color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0 0 1.1em; }

.top, main, .foot, .ep-top { width: min(100% - 2rem, 62rem); margin-inline: auto; }

/* ---------- index: top ---------- */
.top { padding: clamp(3rem, 9vw, 7rem) 0 2.5rem; }
.eyebrow { margin: 0 0 1.4rem; text-transform: lowercase; }
.eyebrow a { text-decoration: none; }
.top h1 { font-size: clamp(3.2rem, 11vw, 7rem); letter-spacing: -.025em; margin-bottom: 2rem; }
.lede { max-width: var(--measure); font: 400 1.2rem/1.6 var(--serif); }
.lede p:first-child { font-size: 1.32rem; }
.stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.75rem; margin: 2.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); }
.stats div { min-width: 6.5rem; }
.stats dt { font: 600 2rem/1.1 var(--serif); color: var(--ember); font-variant-numeric: tabular-nums; }
.stats dd { margin: .3rem 0 0; font: 400 .78rem/1.4 var(--mono); color: var(--muted); max-width: 11rem; }
.jump { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 2.25rem 0 0; }
.jump a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: .15rem; }
.jump a::before { content: '↓ '; color: var(--ember); }

/* ---------- sections ---------- */
section { padding: 3.5rem 0 1rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
section > h2 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: .75rem; }
.section-lede { color: var(--muted); max-width: var(--measure); margin-bottom: 2.5rem; }
.prose { max-width: none; }
.prose > * { max-width: var(--measure); }
section.prose > p { font-size: 1.08rem; }
section.prose > h2 { margin-bottom: 1.5rem; }
.prose strong { font-weight: 600; color: var(--text); }

/* ---------- index: moments ---------- */
.moment {
  display: grid;
  grid-template-columns: minmax(0, 384px) minmax(0, 1fr);
  gap: 1.25rem 2.5rem;
  align-items: start;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.moment:first-of-type { border-top: 0; padding-top: 0; }
.moment-frame { display: block; background: var(--surface); border-radius: 3px; overflow: hidden; }
.moment-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.moment:hover .moment-frame img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .moment-frame img { transition: none; } .moment:hover .moment-frame img { transform: none; } }
.moment-meta { margin: 0 0 .9rem; }
.moment-meta .n { color: var(--ember); margin-right: .6rem; }
.pull { margin: 0 0 1rem; padding: 0; }
.pull p { font: italic 400 clamp(1.3rem, 2.6vw, 1.7rem)/1.32 var(--serif); margin: 0 0 .45rem; text-wrap: pretty; }
.pull p::before { content: '“'; } .pull p::after { content: '”'; }
.pull footer { font: 400 .75rem/1.4 var(--mono); color: var(--dim); }
.gap { color: var(--muted); max-width: 34rem; margin-bottom: 1rem; padding-left: .9rem; border-left: 2px solid var(--ember); }
.moment h3 { font: 500 .95rem/1.4 var(--sans); }
.moment h3 a { text-decoration: none; border-bottom: 1px solid var(--ember); padding-bottom: .1rem; }
@media (max-width: 760px) {
  .moment { grid-template-columns: 1fr; }
  .moment-frame { max-width: 384px; }
}

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .top { padding: 2.25rem 0 2rem; }
  .top h1 { margin-bottom: 1.25rem; }
  .lede { font-size: 1.06rem; line-height: 1.55; }
  .lede p:first-child { font-size: 1.16rem; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.25rem; margin-top: 2rem; }
  .stats div { min-width: 0; }
  .stats dt { font-size: 1.7rem; }
  /* fingers, not cursors: every link at least 44px tall */
  .jump { gap: 0 1.25rem; }
  .jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .jump a::before { margin-right: .45em; content: '↓'; }
  .moment h3 a { display: inline-block; padding: .6rem 0 .35rem; }
  .foot a, .eyebrow a { display: inline-block; padding: .55rem 0; }
  section { padding-top: 2.5rem; }
  .moment { padding: 1.75rem 0; }
  .ep-nav { gap: 1rem; }
  .ep-nav a { font-size: 1.02rem; padding: .25rem 0; }
}

/* ---------- episode ---------- */
.ep-top { padding: clamp(2rem, 6vw, 4rem) 0 1.75rem; }
.ep-top h1 { font-size: clamp(2.2rem, 7vw, 4rem); letter-spacing: -.015em; max-width: 18ch; margin-bottom: 1.25rem; }
.ep-meta { margin: 0; }
.ep-meta.dim { color: var(--dim); }
main.ep { padding-bottom: 2rem; }
.frame { margin: 2rem 0; max-width: 576px; }
.frame img { width: 100%; background: var(--surface); border-radius: 3px; }
.frame figcaption { font: 400 .75rem/1.5 var(--mono); color: var(--dim); margin-top: .6rem; }
.frame.hero { max-width: 768px; margin-top: 0; }
article.prose h2 {
  font: 500 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ember);
  margin: 3rem 0 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
article.prose > p { font-size: 1.1rem; }
article.prose em { font-family: var(--serif); font-size: 1.04em; }
article.prose blockquote {
  margin: 1.5rem 0; padding: .1rem 0 .1rem 1.25rem; border-left: 2px solid var(--ember);
  font: italic 400 1.22rem/1.5 var(--serif);
}
article.prose blockquote p { margin: 0 0 .6em; }
article.prose blockquote p:last-child { margin-bottom: 0; }
article.prose code { font: .88em var(--mono); background: var(--surface); padding: .1em .35em; border-radius: 2px; }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ep-nav a { text-decoration: none; font: 600 1.15rem/1.3 var(--serif); }
.ep-nav a .mono { display: block; margin-bottom: .35rem; color: var(--ember); }
.ep-nav .next { text-align: right; }

/* ---------- foot ---------- */
.foot { padding: 3rem 0 4rem; margin-top: 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot p { max-width: var(--measure); margin-bottom: .5rem; }
