/* What They Missed — site styles
   Palette from the cover art: ink, newsprint, one signal (acid), one strike (red, used once). */

:root {
  --ink: #000;
  --card: #0f0f0f;          /* the cover's own black, so the art reads as a printed card */
  --rule: #262626;
  --rule-strong: #3a3a3a;
  --paper: #ededE8;
  --muted: #8f8f8a;
  --signal: #d5ff3b;
  --strike: #da2955;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 48px);
  --player-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.55 var(--sans);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--player-h);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
button { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--signal); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Type */
.display {
  font-family: var(--sans);
  font-weight: 800;
  font-variation-settings: "wdth" 66;
  line-height: .92;
  letter-spacing: -.01em;
  margin: 0;
  font-size: clamp(52px, 7.2vw, 92px);
}
.display--md { font-size: clamp(36px, 5vw, 56px); }
.display--sm { font-size: 32px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.bar__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font-weight: 800; font-variation-settings: "wdth" 70; font-size: 20px; text-decoration: none; letter-spacing: .005em; }
.wordmark span { color: var(--signal); }
.bar nav { display: flex; gap: 24px; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--paper); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(56px, 8vw, 104px);
}
.viewfinder { margin: 0; }
.frame { position: relative; padding: 14px; }
.frame img { width: 100%; aspect-ratio: 1; background: var(--card); }
.crop { position: absolute; width: 22px; height: 22px; border-color: var(--paper); border-style: solid; border-width: 0; opacity: .9; }
.crop--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.crop--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.crop--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.crop--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.viewfinder figcaption { margin: 6px 14px 0; color: var(--muted); }

.hero__copy { max-width: 620px; padding-top: 6px; }
.lede { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.35; margin: 28px 0 0; font-weight: 500; }
.about { color: #c6c6c1; margin: 20px 0 0; max-width: 62ch; }

/* The one orchestrated moment: a redaction bar lifts off the key line on load. */
.redact { position: relative; display: inline; background: linear-gradient(var(--signal), var(--signal)) no-repeat; background-size: 0% 100%; }
.js .redact { animation: unredact 1.1s .25s var(--ease) both; background-image: linear-gradient(var(--signal), var(--signal)); }
@keyframes unredact {
  0%   { background-size: 100% 100%; background-position: right; color: var(--signal); }
  35%  { background-size: 100% 100%; background-position: right; color: var(--signal); }
  100% { background-size: 0% 100%; background-position: right; color: inherit; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { background: #e6ff7a; color: var(--ink); }
.btn--ghost { border-color: var(--rule-strong); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn .icon { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn__label { display: block; line-height: 1.2; }
.btn__sub { display: block; font-weight: 400; font-size: 13px; line-height: 1.25; opacity: .72; max-width: 30ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#play-latest { text-align: left; padding-left: 16px; border-radius: 28px; }

.listen { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--rule); }
.listen__label { margin: 0 0 10px; font-weight: 400; color: var(--muted); }
.listen__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.listen__list a, .listen__list .linklike {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  font-size: 14px; text-decoration: none; background: none; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.listen__list a:hover, .listen__list .linklike:hover { border-color: var(--signal); color: var(--signal); }

/* Sections */
.episodes, .suggest { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 104px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head p { margin: 0; }

.episodes::before, .suggest::before, .foot::before { content: ""; display: block; height: 1px; background: var(--rule); margin-bottom: clamp(48px, 7vw, 88px); grid-column: 1 / -1; }
.foot::before { margin-bottom: 0; flex-basis: 100%; }
.episodes, .suggest { padding-top: 0; }

/* Episode list */
.ep-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ep { border-bottom: 1px solid var(--rule); }
.ep__row {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 8px 24px;
  align-items: start;
  padding: 24px 0;
}
.ep__file { padding-top: 6px; color: var(--muted); }
.ep__file b { display: block; font-weight: 500; color: var(--paper); font-size: 15px; }
.ep__title { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.12; font-weight: 700; font-variation-settings: "wdth" 80; letter-spacing: -.005em; }
.ep__summary { margin: 8px 0 0; color: #bdbdb8; max-width: 64ch; }
.ep__meta { margin: 10px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ep__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ep__play {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px 8px 12px;
  border-radius: 999px; border: 1px solid var(--rule-strong); background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.ep__play svg { width: 16px; height: 16px; fill: currentColor; }
.ep__play .i-pause { display: none; }
.ep__play:hover { border-color: var(--signal); color: var(--signal); }
.ep.is-current .ep__play { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.ep.is-playing .ep__play .i-play { display: none; }
.ep.is-playing .ep__play .i-pause { display: block; }
.ep__toggle { background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.ep__toggle:hover { color: var(--paper); }
.ep__toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s var(--ease); }
.ep__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ep__resume { color: var(--signal); }

.ep__notes { grid-column: 2 / 4; padding: 0 0 28px; max-width: 68ch; }
.ep__notes[hidden] { display: none; }
.notes { color: #d3d3ce; }
.notes p { margin: 0 0 14px; }
.notes ul, .notes ol { margin: 0 0 16px; padding-left: 20px; }
.notes li { margin: 4px 0; }
.notes li p { margin: 0; }
.notes a { color: var(--paper); }
.notes a:hover { color: var(--signal); }
.notes strong, .notes b { font-weight: 600; }
.ep__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--rule-strong); font-size: 14px; }
.ep__links a, .ep__links button { color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ep__links a:hover, .ep__links button:hover { color: var(--paper); }

.ep--skeleton div { height: 116px; margin: 1px 0; background: linear-gradient(90deg, #0b0b0b 0%, #151515 50%, #0b0b0b 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ep-error { padding: 24px 0; color: #c6c6c1; }
.ep-error p { margin: 0 0 16px; max-width: 60ch; }

.ep:target, .ep.is-linked { background: linear-gradient(90deg, rgba(213,255,59,.06), transparent 60%); }

/* Suggest */
.suggest { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); }
.suggest__intro p { color: #c6c6c1; max-width: 42ch; margin: 18px 0 0; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field label { font-weight: 600; font-size: 15px; }
.opt { font-weight: 400; color: var(--muted); }
.help { margin: 0; font-size: 14px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--paper);
  background: var(--card); border: 1px solid var(--rule-strong); border-radius: 6px;
  padding: 12px 14px; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field textarea:hover { border-color: #555; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--strike); }
.err { margin: 0; font-size: 14px; color: #ff6b86; min-height: 0; }
.err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--signal); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form__status { margin: 0; font-size: 14px; color: var(--muted); }
.form__status.is-error { color: #ff6b86; }
.sent { border: 1px solid var(--rule-strong); border-radius: 8px; padding: 32px; align-self: start; }
.sent p { margin: 0 0 12px; }
.sent .display { color: var(--signal); margin-bottom: 8px; }
.sent:focus { outline: none; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 24px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }

/* Player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(10,10,10,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule-strong);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(0); transition: transform .3s var(--ease);
}
.player[hidden] { display: block; transform: translateY(110%); visibility: hidden; }
.player__inner { display: grid; grid-template-columns: 48px minmax(120px, 1fr) auto minmax(220px, 1.4fr) auto; align-items: center; gap: 16px; min-height: 76px; }
.player__art { width: 48px; height: 48px; }
.player__meta { min-width: 0; }
.player__meta p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__ep { color: var(--muted); font-size: 12px; }
.player__title { font-weight: 600; font-size: 15px; }
.player__controls { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; cursor: pointer; color: var(--paper); }
.icon-btn:hover { background: #1c1c1c; }
.icon-btn svg { width: 26px; height: 26px; fill: currentColor; }
.icon-btn svg text { font: 600 7px var(--sans); fill: currentColor; }
.icon-btn--main { width: 48px; height: 48px; background: var(--signal); color: var(--ink); }
.icon-btn--main:hover { background: #e6ff7a; }
.icon-btn--main svg { width: 20px; height: 20px; }
.icon-btn--main .i-pause, .icon-btn--main .spinner { display: none; }
.player.is-playing .icon-btn--main .i-play { display: none; }
.player.is-playing .icon-btn--main .i-pause { display: block; }
.player.is-loading .icon-btn--main svg { display: none; }
.player.is-loading .icon-btn--main .spinner { display: block; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__scrub { display: flex; align-items: center; gap: 12px; min-width: 0; }
.time { font-size: 12px; color: var(--muted); min-width: 42px; font-variant-numeric: tabular-nums; }
.time:last-child { text-align: right; }

/* Scrubber as a redaction bar: played portion is filled signal. */
#p-seek { --pct: 0%; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#p-seek::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(var(--signal), var(--signal)) 0 0 / var(--pct) 100% no-repeat, #2b2b2b; }
#p-seek::-moz-range-track { height: 6px; background: #2b2b2b; }
#p-seek::-moz-range-progress { height: 6px; background: var(--signal); }
#p-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 18px; margin-top: -6px; background: var(--paper); border: 0; border-radius: 0; }
#p-seek::-moz-range-thumb { width: 4px; height: 18px; background: var(--paper); border: 0; border-radius: 0; }
#p-seek:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.speed { min-width: 52px; height: 36px; border: 1px solid var(--rule-strong); border-radius: 999px; background: none; cursor: pointer; }
.speed:hover { border-color: var(--paper); }
.player__error { margin: 0; padding: 0 var(--gut) 10px; font-size: 14px; color: #ff6b86; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); z-index: 40;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: opacity .2s, transform .2s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .viewfinder { max-width: 360px; }
  .suggest { grid-template-columns: 1fr; }
  .player__inner { grid-template-columns: 44px 1fr auto; grid-template-areas: "art meta controls" "scrub scrub speed"; gap: 4px 12px; padding-top: 10px; padding-bottom: 8px; }
  .player__art { grid-area: art; width: 44px; height: 44px; }
  .player__meta { grid-area: meta; }
  .player__controls { grid-area: controls; }
  .player__scrub { grid-area: scrub; }
  .speed { grid-area: speed; height: 32px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bar nav { gap: 16px; font-size: 14px; }
  .bar nav a:first-child { display: none; }
  .ep__row { grid-template-columns: 1fr auto; padding: 20px 0; }
  .ep__file { grid-column: 1 / -1; padding-top: 0; display: flex; gap: 10px; align-items: baseline; }
  .ep__file b { display: inline; }
  .ep__notes { grid-column: 1 / -1; }
  .ep__aside { grid-column: 2; grid-row: 2; }
  .ep__play .ep__play-label { display: none; }
  .ep__play { padding: 0; width: 44px; justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  #p-back { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .redact { background-size: 0% 100%; }
}
.ep:last-child { border-bottom: 0; }
