:root {
  --ink: #18212b;
  --muted: #64707d;
  --paper: #fffdfa;
  --canvas: #f1eee7;
  --line: #ddd7ca;
  --accent: #a52232;
  --accent-dark: #741421;
  --accent-soft: #f7e9e9;
  --blue: #215b8f;
  --navy: #141d27;
  --shadow: 0 22px 70px rgba(38, 31, 24, 0.09);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
}

body[data-theme="dark"] {
  --ink: #edf0f2;
  --muted: #aeb7c0;
  --paper: #18212a;
  --canvas: #10171e;
  --line: #33404b;
  --accent: #ef7380;
  --accent-dark: #ff9aa4;
  --accent-soft: #352329;
  --blue: #78b8ed;
  --navy: #0b1117;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

a {
  color: var(--accent-dark);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #eaa431;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.9rem;
  color: white;
  background: var(--accent);
  border-radius: 0.3rem;
  font: 700 0.85rem/1 var(--sans);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.reading-progress {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0.65rem clamp(1rem, 4vw, 4rem);
  color: #f7f5f0;
  background: color-mix(in srgb, var(--navy) 94%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font: 750 0.98rem/1 var(--sans);
  letter-spacing: -0.01em;
}

.wordmark:hover {
  color: white;
}

.wordmark-mark {
  display: inline-grid;
  width: 2.55rem;
  height: 2.15rem;
  place-items: center;
  color: white;
  background: var(--accent);
  border-radius: 0.25rem;
  font: 850 0.76rem/1 var(--sans);
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  font: 650 0.78rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-actions a,
.header-actions button {
  padding: 0.65rem 0.75rem;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  text-decoration: none;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.header-actions a:hover,
.header-actions button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.94fr);
  min-height: min(770px, calc(100vh - 68px));
  color: #f9f7f2;
  background: var(--navy);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 850px;
  padding: clamp(3.5rem, 7vw, 7.5rem) clamp(1.25rem, 6vw, 7.5rem);
}

.eyebrow,
.toc-label {
  margin: 0 0 1.2rem;
  color: var(--accent);
  font: 800 0.72rem/1.3 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #f08b96;
}

.hero-copy h1 {
  max-width: 19ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.55rem, 5.2vw, 5.65rem);
  font-weight: 700;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.dek {
  max-width: 40ch;
  margin: 2rem 0 0;
  color: #e4e7e9;
  font: 650 clamp(1.18rem, 2vw, 1.65rem)/1.38 var(--sans);
  letter-spacing: -0.02em;
}

.supporting {
  max-width: 52ch;
  margin: 0.7rem 0 0;
  color: #b9c1c8;
  font: 450 0.98rem/1.6 var(--sans);
}

.hero-question {
  max-width: 40rem;
  margin-top: 2.1rem;
  padding: 1rem 1.2rem;
  color: #f0f1f2;
  background: rgba(255, 255, 255, 0.07);
  border-left: 4px solid var(--accent);
  font: 600 1rem/1.5 var(--sans);
}

.hero-question strong {
  color: #ff8994;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.7rem;
  color: #9da8b1;
  font: 600 0.74rem/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  font: 750 0.78rem/1 var(--sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary {
  color: white;
  background: var(--accent);
}

.button-primary:hover {
  color: white;
  background: #bd2a3b;
}

.button-secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

.button-secondary:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
  position: relative;
  min-height: 460px;
  margin: 0;
  overflow: hidden;
  background: #27313a;
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--navy), transparent 38%), linear-gradient(0deg, rgba(10, 15, 20, 0.65), transparent 45%);
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.04);
}

.hero-visual figcaption {
  position: absolute;
  z-index: 2;
  right: 1.25rem;
  bottom: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font: 500 0.68rem/1 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reader-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 820px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  justify-content: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 7rem) clamp(1rem, 4vw, 3rem);
}

.table-of-contents {
  position: sticky;
  top: 6.5rem;
  max-height: calc(100vh - 8rem);
  padding-right: 1.25rem;
  overflow: auto;
  font-family: var(--sans);
  scrollbar-width: thin;
}

.table-of-contents ol,
.mobile-contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.table-of-contents li {
  border-top: 1px solid var(--line);
}

.table-of-contents li:last-child {
  border-bottom: 1px solid var(--line);
}

.table-of-contents li a {
  display: block;
  padding: 0.58rem 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.table-of-contents li a:hover,
.table-of-contents li a.is-active {
  color: var(--accent);
}

.toc-pdf {
  display: inline-block;
  margin-top: 1.2rem;
  font: 750 0.73rem/1.3 var(--sans);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-contents {
  display: none;
}

.story {
  min-width: 0;
  padding: clamp(1.6rem, 4.5vw, 4.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.story-section {
  display: flow-root;
  padding: 4.8rem 0 0;
  scroll-margin-top: 4.5rem;
}

.story-section:first-child {
  padding-top: 0;
}

.section-title {
  margin: 0 0 1.5rem;
  padding-top: 1rem;
  border-top: 5px solid var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3.7vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.story p {
  margin: 1.25rem 0;
}

.story strong,
.story b {
  font-weight: 750;
}

.story ul {
  margin: 1.6rem 0;
  padding: 0;
  list-style: none;
}

.story li {
  position: relative;
  margin: 0.85rem 0;
  padding-left: 1.5rem;
}

.story ul > li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  content: "";
  background: var(--accent);
  border-radius: 50%;
}

.story ul ul {
  margin: 0.8rem 0 0;
  padding-left: 0.5rem;
}

.tone-red {
  color: var(--accent-dark);
}

.tone-blue {
  color: var(--blue);
}

.callout {
  clear: both;
  margin: 2rem 0;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  color: var(--ink);
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  font: 750 clamp(1.08rem, 2.5vw, 1.35rem)/1.5 var(--sans);
  text-align: center;
}

.section-divider {
  clear: both;
  margin: 3rem 0;
  color: var(--muted);
  font: 700 0.85rem/1 var(--sans);
  text-align: center;
  letter-spacing: 0.5em;
}

.media-link,
.article-image {
  display: block;
  margin-top: 0.45rem;
  margin-bottom: 1.1rem;
  background: var(--canvas);
  border-radius: 0.25rem;
  box-shadow: 0 12px 32px rgba(28, 24, 20, 0.12);
  overflow: hidden;
}

.media-link img,
.article-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 220ms ease;
}

.media-link:hover img {
  transform: scale(1.015);
}

.media-left {
  float: left;
  margin-right: 1.5rem;
}

.media-right {
  float: right;
  margin-left: 1.5rem;
}

.media-xs {
  width: clamp(95px, 16%, 130px);
}

.media-sm {
  width: clamp(120px, 21%, 165px);
}

.media-md {
  width: clamp(155px, 29%, 225px);
}

.media-lg {
  width: clamp(190px, 38%, 300px);
}

.notes {
  clear: both;
  margin-top: 4.5rem;
  padding: 1.4rem 1.5rem;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--line);
  font: 500 0.82rem/1.65 var(--sans);
}

.notes p {
  margin: 0.45rem 0;
}

.references {
  clear: both;
  padding-top: 5.5rem;
  scroll-margin-top: 4.5rem;
}

.references-heading {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-top: 5px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.references-heading h2 {
  margin: 0;
  font: 750 clamp(2rem, 4vw, 3rem)/1 var(--sans);
  letter-spacing: -0.04em;
}

.references-heading p:last-child {
  max-width: 56ch;
  margin-bottom: 0;
  color: var(--muted);
  font: 500 0.9rem/1.6 var(--sans);
}

.reference-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 0.82rem/1.65 var(--sans);
}

.reference-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.6rem;
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.reference-list li::before {
  display: none;
}

.ref-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem clamp(1.25rem, 5vw, 5rem);
  color: #c7ced4;
  background: var(--navy);
  font: 550 0.82rem/1.5 var(--sans);
}

.site-footer > div {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: white;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  padding: 0.8rem 1rem;
  color: white;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.35rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  font: 650 0.8rem/1 var(--sans);
  opacity: 0;
  transform: translateY(0.8rem);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .story-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-bottom: 3.5rem;
  }

  .hero-visual {
    min-height: min(60vw, 520px);
  }

  .hero-visual::after {
    background: linear-gradient(0deg, rgba(10, 15, 20, 0.65), transparent 55%);
  }

  .reader-layout {
    display: block;
    max-width: 900px;
  }

  .table-of-contents {
    display: none;
  }

  .mobile-contents {
    display: block;
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    font-family: var(--sans);
  }

  .mobile-contents summary {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
  }

  .mobile-contents ol {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.9rem;
  }

  .mobile-contents a {
    font-size: 0.82rem;
    text-decoration: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16.5px;
    line-height: 1.7;
  }

  .site-header {
    min-height: 62px;
  }

  .wordmark > span:last-child,
  .header-actions a:first-child {
    display: none;
  }

  .header-actions a,
  .header-actions button {
    padding: 0.6rem 0.55rem;
    font-size: 0.69rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.35rem);
  }

  .reader-layout {
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }

  .story {
    padding: 1.4rem;
  }

  .story-section {
    padding-top: 3.8rem;
  }

  .media-left,
  .media-right {
    float: none;
    width: 100%;
    max-width: 420px;
    margin: 1.2rem auto;
  }

  .reference-list li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.35rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --ink: #000;
    --paper: #fff;
    --canvas: #fff;
    --line: #bbb;
    --accent: #000;
    --accent-dark: #000;
    --blue: #000;
  }

  body {
    background: white;
    font-size: 11pt;
  }

  .reading-progress,
  .site-header,
  .hero-actions,
  .table-of-contents,
  .mobile-contents,
  .site-footer,
  .toast {
    display: none !important;
  }

  .story-hero {
    display: block;
    min-height: 0;
    color: black;
    background: white;
  }

  .hero-copy {
    max-width: none;
    padding: 0 0 2rem;
  }

  .hero-copy h1,
  .hero-copy .dek,
  .hero-copy .supporting,
  .hero-copy .story-meta,
  .hero-question,
  .hero-copy .eyebrow {
    color: black;
  }

  .hero-visual {
    display: none;
  }

  .reader-layout {
    display: block;
    max-width: none;
    padding: 0;
  }

  .story {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .story-section,
  .references {
    break-inside: auto;
  }

  .section-title {
    break-after: avoid;
  }

  a {
    color: black;
  }
}
