:root {
  --ink: #171717;
  --muted: #4c453f;
  --paper: #f8f5ef;
  --white: #fff;
  --line: #d2cbc1;
  --soft-line: #e5dfd6;
  --accent: #e3120b;
  --deep-accent: #a80d08;
  --black: #171717;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
button, audio { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.reading-progress {
  position: fixed; inset: 0 auto auto 0; width: 0; height: 4px;
  background: var(--accent); z-index: 100;
}
.site-header {
  background: var(--paper);
  border-top: 6px solid var(--accent);
  border-bottom: 1px solid var(--ink);
}
.masthead-row, .section-nav, .hero-shell, .page-grid, footer {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}
.masthead-row {
  min-height: 92px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 32px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.8rem);
  letter-spacing: -.045em;
}
.mark {
  display: grid; place-items: center; width: 43px; height: 43px;
  color: white; background: var(--accent); font-family: var(--serif);
  font-size: 2rem; line-height: 1;
}
.strapline {
  margin: 0; color: var(--muted); font-family: var(--serif);
  font-style: italic; font-size: 1rem;
}
.header-actions { justify-self: end; display: flex; gap: 12px; }
.text-button, .solid-button {
  border: 0; cursor: pointer; font-weight: 800; font-size: .78rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.text-button { background: transparent; padding: 9px 0; border-bottom: 2px solid var(--ink); }
.solid-button { background: var(--ink); color: white; padding: 11px 16px; }
.solid-button:hover { background: var(--accent); }
.edition-actions { position: relative; }
.edition-actions summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.edition-actions summary::-webkit-details-marker { display: none; }
.edition-actions-menu {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0;
  width: 190px; padding: 7px; background: var(--white);
  border: 1px solid var(--ink); box-shadow: 8px 8px 0 #0002;
}
.edition-actions-menu button, .edition-actions-menu a {
  display: block; width: 100%; padding: 10px 11px; border: 0;
  color: var(--ink); background: transparent; cursor: pointer; text-align: left;
  text-decoration: none; font-size: .75rem; font-weight: 800;
}
.edition-actions-menu button:hover, .edition-actions-menu a:hover {
  color: white; background: var(--ink);
}
.section-nav {
  display: flex; gap: 28px; min-height: 42px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .065em;
}
.section-nav a { text-decoration: none; white-space: nowrap; }
.section-nav a:hover { color: var(--accent); }
.hero-shell { padding: 38px 0 24px; }
.edition-kicker { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: .85rem; }
.edition-pill {
  color: white; background: var(--accent); padding: 5px 9px;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero-shell > h1 {
  max-width: 1080px; margin: 18px 0 12px; font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6.5rem); line-height: .93; letter-spacing: -.055em;
}
.hero-deck {
  max-width: 920px; margin-bottom: 0; font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.24; color: #2f2a26;
}
.audio-dock {
  width: min(100%, 920px); margin-top: 16px; padding: 7px 9px;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
}
.eyebrow {
  display: block; margin-bottom: 7px; color: var(--accent); font-size: .72rem;
  font-weight: 900; text-transform: uppercase; letter-spacing: .12em;
}
.audio-controls {
  display: grid; grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 10px; align-items: center;
}
.audio-tabs { display: flex; gap: 4px; }
.audio-tab {
  padding: 5px 8px; color: var(--muted); border: 1px solid transparent; background: transparent;
  cursor: pointer; font-size: .64rem; font-weight: 800; text-transform: uppercase;
}
.audio-tab.active { color: var(--deep-accent); border-color: #efaaa7; background: #fff1f0; }
.audio-tab:disabled, .audio-tab.unavailable {
  color: #8b8179; border-color: transparent; cursor: not-allowed;
  text-decoration: line-through; text-decoration-thickness: 1px;
}
#audio-player { width: 100%; height: 34px; }
.audio-more { position: relative; }
.audio-more > summary {
  list-style: none; cursor: pointer; color: var(--muted); font-size: .68rem;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.audio-more > summary::-webkit-details-marker { display: none; }
.audio-meta {
  position: absolute; z-index: 20; top: calc(100% + 8px); right: 0;
  display: grid; gap: 8px; min-width: 145px; padding: 11px;
  white-space: nowrap; font-size: .72rem; background: var(--white);
  border: 1px solid var(--ink); box-shadow: 6px 6px 0 #0002;
}
.audio-meta a { color: var(--ink); text-underline-offset: 4px; }
.page-grid {
  display: grid; grid-template-columns: 190px minmax(0, 860px);
  justify-content: center; gap: clamp(30px, 4vw, 64px); align-items: start;
  padding: 32px 0 68px;
}
.article-rail { position: sticky; top: 24px; }
.rail-label {
  border-top: 5px solid var(--ink); padding-top: 12px; margin-bottom: 8px;
  font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em;
}
#article-toc { display: flex; flex-direction: column; }
#article-toc a {
  padding: 8px 0; border-bottom: 1px solid var(--soft-line); text-decoration: none;
  color: var(--muted); font-family: var(--serif); font-size: .88rem; line-height: 1.25;
}
#article-toc a:hover, #article-toc a.active { color: var(--accent); }
.article { min-height: 600px; }
.article-section { scroll-margin-top: 20px; margin-bottom: 38px; }
.article-section > h2 {
  margin-bottom: 16px; font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.08; letter-spacing: -.025em;
}
.article p, .article li {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.72;
}
.article ul { margin: 0 0 24px; padding-left: 22px; }
.article li { padding-left: 5px; margin-bottom: 9px; }
.article blockquote {
  margin: 30px 0; padding: 3px 0 3px 22px; border-left: 5px solid var(--accent);
  font-family: var(--serif); font-size: 1.4rem; line-height: 1.4;
}
.article table {
  width: 100%; margin: 28px 0; border-collapse: collapse; background: white;
  font-size: .83rem; line-height: 1.45;
}
.article th, .article td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article th { background: var(--ink); color: white; text-transform: uppercase; letter-spacing: .035em; }
.tape-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px; margin: 0 0 18px; border-top: 1px solid var(--ink);
}
.tape-item {
  display: grid; grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.tape-symbol {
  padding-top: 2px; font-size: .92rem; font-weight: 900; line-height: 1;
}
.tape-up .tape-symbol { color: #17633a; }
.tape-down .tape-symbol { color: var(--deep-accent); }
.tape-flat .tape-symbol { color: var(--muted); }
.tape-reading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.tape-label {
  color: var(--ink); font-size: .67rem; font-weight: 850;
  letter-spacing: .055em; text-transform: uppercase;
}
.tape-value {
  font-family: var(--serif); font-size: .98rem; line-height: 1.2; text-align: right;
}
.tape-detail {
  grid-column: 2; margin-top: 3px; color: var(--muted);
  font-size: .72rem; line-height: 1.3;
}
.inline-chart {
  margin: 24px 0 30px; padding: 10px 10px 8px;
  background: white; border: 1px solid var(--line);
  break-inside: avoid;
}
.inline-chart img { display: block; width: 100%; height: auto; }
.inline-chart figcaption {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 11px 4px 2px;
}
.inline-chart strong { font-family: var(--serif); font-size: 1.03rem; }
.inline-chart span { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.loading-state { display: grid; place-items: center; min-height: 360px; color: var(--muted); }
.loader { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.archive-dialog {
  width: min(760px, calc(100% - 32px)); max-height: 80vh; padding: 0;
  border: 0; box-shadow: 0 24px 80px #0007; background: var(--paper);
}
.archive-dialog::backdrop { background: #0009; }
.dialog-header { position: sticky; top: 0; display: flex; justify-content: space-between; padding: 24px; background: var(--paper); border-bottom: 1px solid var(--ink); }
.dialog-header h2 { margin: 0; font-family: var(--serif); font-size: 2.2rem; }
.dialog-close { border: 0; background: transparent; cursor: pointer; font-size: 2rem; }
.archive-list { padding: 0 24px 24px; }
.archive-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.archive-item button { border: 0; background: transparent; text-align: left; cursor: pointer; font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.archive-item button:hover { color: var(--accent); }
footer {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 30px; padding: 38px 0 60px;
  border-top: 10px solid var(--accent); color: var(--muted); font-size: .8rem;
}
footer a { color: var(--ink); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-wordmark { color: var(--ink); font-family: var(--serif); font-size: 1.55rem; font-weight: 700; }

/* Transcript reader */
.transcript-header .transcript-back { display: inline-block; text-decoration: none; }
.transcript-shell {
  width: min(calc(100% - 48px), 940px); margin: 0 auto; padding: 38px 0 72px;
}
.transcript-hero {
  padding-bottom: 24px; border-bottom: 1px solid var(--ink);
}
.transcript-hero h1 {
  max-width: 860px; margin: 16px 0 10px; font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.8rem); line-height: .96; letter-spacing: -.045em;
}
.transcript-hero .hero-deck { max-width: 760px; font-size: 1.05rem; }
.transcript-player {
  margin-top: 18px; padding: 9px 12px; background: var(--black);
  border-left: 4px solid var(--accent);
}
.transcript-player audio { display: block; width: 100%; height: 34px; }
.transcript-unavailable { margin: 0; color: #ddd; }
.transcript-actions {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px;
  font-size: .68rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase;
}
.transcript-actions a { text-underline-offset: 4px; }
.transcript-actions a:hover { color: var(--accent); }
.transcript-body { width: min(100%, 760px); margin: 0 auto; padding-top: 28px; }
.transcript-intro {
  display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding-bottom: 9px; border-bottom: 3px solid var(--ink);
}
.transcript-intro .eyebrow { margin: 0; }
.transcript-intro p { margin: 0; color: var(--muted); font-size: .78rem; }
.transcript-scene {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 5px;
  color: var(--accent); font-size: .68rem; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase;
}
.transcript-scene::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.transcript-turn {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--soft-line);
}
.transcript-turn header {
  display: block; align-content: start; padding-top: 3px;
  font-size: .72rem; line-height: 1.2;
}
.speaker-sam header strong { color: var(--accent); }
.speaker-maya header strong { color: #0f766e; }
.turn-delivery {
  display: block; margin-top: 3px; color: var(--muted);
  font-size: .56rem; letter-spacing: .05em; text-transform: uppercase;
}
.transcript-turn p {
  margin: 0; font-family: var(--serif); font-size: 1.02rem; line-height: 1.48;
}

@media (max-width: 1080px) {
  .page-grid { grid-template-columns: 180px minmax(0, 820px); }
  .masthead-row { grid-template-columns: 1fr auto; }
  .strapline { display: none; }
}
@media (max-width: 760px) {
  .masthead-row, .section-nav, .hero-shell, .page-grid, footer {
    width: min(calc(100% - 28px), var(--max));
  }
  .header-actions .text-button { display: none; }
  .masthead-row { min-height: 76px; gap: 8px; }
  .wordmark { gap: 8px; min-width: 0; font-size: 1.35rem; }
  .mark { flex: 0 0 auto; width: 34px; height: 34px; font-size: 1.5rem; }
  .solid-button { padding: 8px 9px; font-size: .6rem; white-space: nowrap; }
  .hero-shell { padding-top: 38px; }
  .hero-shell > h1 {
    font-size: clamp(2.65rem, 12vw, 3.3rem);
    line-height: .96; letter-spacing: -.04em;
  }
  .audio-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .audio-tabs { grid-column: 1 / -1; }
  #audio-player { grid-column: 1; min-width: 0; }
  .audio-more { grid-column: 2; }
  .page-grid { display: block; padding-block: 44px; }
  .article-rail { display: none; }
  .article-section > h2 { font-size: 1.9rem; }
  .article p, .article li { font-size: 1.05rem; }
  .tape-list { grid-template-columns: 1fr; }
  .archive-item { grid-template-columns: 90px 1fr; }
  .archive-item span:last-child { display: none; }
  .transcript-shell { width: min(calc(100% - 28px), 1120px); padding-top: 40px; }
  .transcript-turn { grid-template-columns: 58px 1fr; gap: 11px; padding: 10px 0; }
  .transcript-intro { display: block; }
  .transcript-intro p { margin-top: 6px; }
  footer { grid-template-columns: 1fr; }
}
@media print {
  @page { size: A4; margin: 17mm 16mm 18mm; }
  .site-header, .audio-dock, .article-rail, footer, .reading-progress {
    display: none !important;
  }
  body { background: white; color: #111; font-size: 10pt; }
  .hero-shell, .page-grid { width: 100%; padding: 0; }
  .hero-shell { padding-bottom: 9mm; border-bottom: 1.5pt solid var(--accent); }
  .edition-kicker { font-size: 8pt; }
  .hero-shell > h1 { margin: 5mm 0 3mm; font-size: 34pt; line-height: 1; }
  .hero-deck { max-width: none; font-size: 14pt; line-height: 1.25; }
  .page-grid { display: block; }
  .article-section { margin: 9mm 0 0; }
  .article-section > h2 {
    margin: 0 0 3mm;
    font-size: 20pt; break-after: avoid;
  }
  .article p, .article li { font-size: 10pt; line-height: 1.5; }
  .tape-list { gap: 0 5mm; }
  .tape-item { padding: 2mm 0; }
  .inline-chart { margin: 6mm 0; padding: 2mm; border: .5pt solid #bbb; break-inside: avoid; }
  .inline-chart figcaption { padding: 2mm 1mm 0; }
  .article table { font-size: 7.5pt; }
  .article th, .article td { padding: 2mm; border-color: #aaa; }
}
