:root {
  --ink: #113c43;
  --deep: #063a43;
  --deepest: #032e35;
  --teal: #078994;
  --cyan: #62d3d2;
  --paper: #f3ead8;
  --paper-soft: #e9dfca;
  --gold: #c5a15b;
  --rust: #8f4d3c;
  --purple: #5d466f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--deepest);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: var(--paper);
  background: var(--deepest);
  font-family: var(--sans);
  font-size: 14px;
}

.skip-link:focus { transform: translateY(0); }

.reading-progress {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  height: 4px;
  background: rgb(3 46 53 / 25%);
}

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

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--deepest);
  width: 100vw;
  height: 100vh;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.begin {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid rgb(243 234 216 / 65%);
  color: var(--paper);
  background: rgb(3 46 53 / 86%);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.begin:hover,
.begin:focus-visible { background: var(--deepest); }

article { overflow: visible; }

main,
.cover,
footer {
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  padding: 112px max(24px, calc((100vw - 1180px) / 2));
}

section:nth-child(even) {
  color: var(--paper);
  background: var(--deep);
}

.framed::before,
.framed::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: 82px;
  height: 82px;
}

.framed::before {
  top: 30px;
  left: max(18px, calc((100vw - 1240px) / 2));
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}

.framed::after {
  right: max(18px, calc((100vw - 1240px) / 2));
  bottom: 30px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.opening {
  display: block;
  padding-top: 90px;
  background: var(--paper);
}

.opening-copy {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 16px;
}

.trade-visual {
  position: relative;
  margin: 56px 0 64px;
  overflow: hidden;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  background: var(--paper-soft);
}

.trade-visual > img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.trade-quote {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: min(440px, 44%);
  margin: 0;
  padding: 26px 30px;
  border: 1px solid rgb(197 161 91 / 70%);
  background: rgb(3 46 53 / 94%);
}

.trade-quote p {
  font-size: clamp(22px, 2.4vw, 34px);
}

.kicker,
.chapter {
  margin: 0 0 10px;
  color: var(--rust);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 { font-size: clamp(52px, 7vw, 96px); }
h2 { max-width: 900px; font-size: clamp(40px, 6vw, 76px); }

.section-heading {
  display: grid;
  gap: 4px;
  margin: 0 auto 64px;
  max-width: 1000px;
  text-align: center;
}

.section-heading .chapter { color: var(--gold); }

.story-art {
  width: min(100%, 1100px);
  margin: -12px auto 64px;
}

.story-art img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.story-art figcaption {
  max-width: 820px;
  margin: 13px auto 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  display: none;
}

.story-art-crop img,
.abby-crop img,
.closing-art img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Scroll scenes: the complete illustration remains pinned behind the copy,
   then returns uncropped at the end of each section. */
section.story-scene {
  isolation: isolate;
  padding-top: 0;
  color: var(--paper);
  background: transparent;
}

.page-story-backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-color: var(--deepest);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: opacity 220ms ease;
}

.page-story-backdrop.is-active {
  opacity: 1;
}

.story-scene > :not(.story-reveal),
.story-scene .opening-copy > :not(.story-reveal) {
  position: relative;
  z-index: 2;
}

.story-scene > .story-panel,
.story-scene .opening-copy > .story-panel {
  width: min(100%, 980px);
  margin: 34svh auto 0;
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid rgb(197 161 91 / 46%);
  color: var(--paper);
  background: rgb(3 46 53 / 84%);
  box-shadow: 0 18px 55px rgb(0 0 0 / 24%);
  backdrop-filter: blur(10px);
}

.story-scene > .story-panel:first-of-type,
.story-scene .opening-copy > .story-panel:first-child {
  margin-top: 18svh;
}

.story-scene .section-heading {
  display: grid;
  max-width: 980px;
  text-align: center;
}

.story-scene .section-heading h2,
.story-scene .section-heading .chapter {
  margin-inline: auto;
}

.story-scene .prose,
.story-scene .columns,
.story-scene .narrow,
.story-scene .compact {
  max-width: 900px;
}

.story-scene .story-panel.shout {
  border-color: rgb(243 234 216 / 36%);
  background: rgb(143 77 60 / 91%);
}

.story-scene .story-panel.abby-quote,
.story-scene .story-panel.message {
  color: var(--deepest);
  background: rgb(98 211 210 / 91%);
}

.story-scene .story-panel.beast-quote {
  background: rgb(93 70 111 / 92%);
}

.story-scene .story-panel.intel-grid,
.story-scene .story-panel.security-list,
.story-scene .story-panel.outcomes {
  width: min(100%, 1120px);
}

.story-scene .story-reveal {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100vw;
  min-height: 100svh;
  margin: 42svh auto 0;
  margin-left: calc(50% - 50vw);
  padding: clamp(24px, 5vw, 72px);
  border: 0;
  color: var(--paper);
  background: transparent;
  box-shadow: none;
}

.story-scene .story-reveal > img {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.story-scene .story-reveal figcaption {
  width: min(520px, 58vw);
  max-width: none;
  margin: 0;
  padding: 22px 26px;
  border: 1px solid rgb(197 161 91 / 64%);
  color: var(--paper);
  background: rgb(3 46 53 / 88%);
  box-shadow: 0 14px 40px rgb(0 0 0 / 28%);
  font-size: 15px;
  text-align: left;
}

.story-scene:nth-child(even) .story-reveal {
  justify-content: flex-start;
}

.story-scene.opening .opening-copy {
  max-width: 1100px;
  padding-top: 0;
}

.story-scene.opening .opening-copy > .story-panel {
  display: block;
}

.story-scene.opening .story-reveal {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100vw;
  min-height: 100svh;
  margin-top: 42svh;
  margin-left: calc(50% - 50vw);
  padding: clamp(24px, 5vw, 72px);
  overflow: visible;
  border: 0;
  background: transparent;
}

.story-scene.opening .trade-quote {
  position: relative;
  right: auto;
  bottom: auto;
  margin: 0;
}

.prose p { margin: 0 0 1.25em; }
.prose p:last-child { margin-bottom: 0; }

.lead { font-size: 1.15em; }

.thesis {
  margin: 30px 0;
  padding-left: 24px;
  border-left: 4px solid var(--teal);
  font-size: clamp(23px, 2.5vw, 33px);
  line-height: 1.35;
}

.aside {
  color: var(--rust);
  font-size: 1.25em;
  font-style: italic;
}

blockquote {
  margin: 44px auto;
  max-width: 900px;
  color: var(--paper);
  background: var(--deep);
  padding: 34px 42px;
}

blockquote p {
  margin: 0;
  font-size: clamp(24px, 3vw, 40px);
  font-style: italic;
  line-height: 1.35;
}

blockquote cite {
  display: block;
  margin-top: 18px;
  color: var(--cyan);
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.has-dialog-portrait {
  --portrait-gap: 28px;
  --portrait-inset: 32px;
  --portrait-size: 88px;
  position: relative;
}

blockquote.has-dialog-portrait {
  min-height: 142px;
  padding-left: calc(var(--portrait-inset) + var(--portrait-size) + var(--portrait-gap))!important;
}

.dialog-portrait {
  position: absolute;
  top: 50%;
  left: var(--portrait-inset);
  width: var(--portrait-size);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border: 2px solid rgb(197 161 91 / 85%);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 26px rgb(0 0 0 / 28%);
}

.script p.has-dialog-portrait {
  --portrait-gap: 20px;
  --portrait-inset: 0px;
  --portrait-size: 62px;
  display: flex;
  min-height: 68px;
  padding-left: calc(var(--portrait-size) + var(--portrait-gap));
  flex-direction: column;
  justify-content: center;
}

.script p.has-dialog-portrait .dialog-portrait {
  border-width: 1px;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto 64px;
  max-width: 1120px;
  border-top: 1px solid rgb(243 234 216 / 22%);
  border-bottom: 1px solid rgb(243 234 216 / 22%);
}

.intel-item {
  display: grid;
  align-content: center;
  min-height: 180px;
  padding: 24px;
  border-right: 1px solid rgb(243 234 216 / 22%);
  text-align: center;
}

.intel-item:last-child { border-right: 0; }

.intel-item strong {
  color: var(--cyan);
  font-family: var(--sans);
  font-size: 26px;
  line-height: 1.15;
}

.intel-item span {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.35;
}

.columns {
  column-count: 2;
  column-gap: 72px;
  max-width: 980px;
  margin: 0 auto;
}

.columns p { break-inside: avoid; }

.verdict,
.warning,
.headline,
.session-end,
.closing-line {
  max-width: 1000px;
  margin: 64px auto 0;
  font-family: var(--sans);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.verdict { color: var(--gold); }

.script {
  max-width: 780px;
  margin: 0 auto 56px;
  padding: 48px;
  border-left: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  font-size: clamp(20px, 2.5vw, 29px);
}

.script p { margin: 0 0 20px; }
.script p:last-child { margin-bottom: 0; }

.script span {
  display: block;
  color: var(--rust);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.script .stage {
  margin: 30px 0;
  color: var(--teal);
  font-style: italic;
  text-align: center;
}

.narrow { max-width: 760px; margin: 0 auto; }

.manifesto { background: var(--paper-soft); }

.shout {
  max-width: 1100px;
  padding: 52px;
  border-top: 8px solid var(--purple);
  background: var(--rust);
}

.shout p {
  font-family: var(--sans);
  font-size: clamp(25px, 3.6vw, 48px);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.nameplate {
  max-width: 920px;
  margin: 64px auto;
  padding: 28px 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  font-size: 27px;
  text-align: center;
}

.abby-quote {
  position: relative;
  color: var(--deepest);
  background: var(--cyan);
}

.abby-quote cite { color: var(--deepest); }
.headline { color: var(--gold); }

.exchange {
  max-width: 850px;
  margin: 0 auto 64px;
  text-align: center;
}

.exchange p {
  margin: 20px 0 8px;
  color: var(--cyan);
  font-size: clamp(28px, 4vw, 52px);
  font-style: italic;
  line-height: 1.2;
}

.exchange span { display: block; }

.exchange strong {
  display: block;
  margin-top: 42px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: clamp(38px, 7vw, 90px);
  text-transform: uppercase;
}

.warning { color: var(--cyan); }

.owl {
  margin: 0 auto 56px;
  max-width: 1000px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: clamp(46px, 8vw, 100px);
  font-weight: 900;
  line-height: .95;
  text-align: center;
  text-transform: uppercase;
}

.compact { max-width: 840px; }

.message {
  color: var(--deepest);
  background: var(--cyan);
}

.message cite { color: var(--deepest); }

.quiet-note,
.no-notes {
  max-width: 760px;
  margin: 48px auto 0;
  text-align: center;
}

.security-list {
  counter-reset: sec;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px;
  max-width: 920px;
  margin: 0 auto 72px;
  padding: 0;
  list-style: none;
}

.security-list li {
  counter-increment: sec;
  position: relative;
  padding: 22px 0 22px 54px;
  border-bottom: 1px solid rgb(17 60 67 / 22%);
}

.security-list li::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--rust);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}

.finale span { color: var(--gold); }
.session-end { color: var(--cyan); }

.beast-quote {
  padding: 60px 42px;
  background: var(--purple);
  text-align: center;
}

.beast-quote p { font-size: clamp(46px, 8vw, 100px); }

.lead-in {
  margin: 0 auto 46px;
  max-width: 900px;
  font-size: 23px;
  text-align: center;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1080px;
  margin: 0 auto;
  border-top: 1px solid rgb(17 60 67 / 25%);
  border-bottom: 1px solid rgb(17 60 67 / 25%);
}

.outcomes div {
  padding: 34px;
  border-right: 1px solid rgb(17 60 67 / 25%);
}

.outcomes div:last-child { border-right: 0; }

.outcomes span {
  color: var(--rust);
  font-family: var(--sans);
  font-size: 46px;
  font-weight: 900;
}

.outcomes p { margin: 12px 0 0; }
.closing-line { color: var(--rust); }

.back-to-top {
  display: block;
  width: max-content;
  margin: 72px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--deep);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--paper);
  background: var(--deep);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 26px max(24px, calc((100vw - 1180px) / 2));
  color: var(--paper);
  background: var(--deepest);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

footer p { margin: 0; }

@media (max-width: 900px) {
  body { font-size: 17px; }

  section { padding-block: 88px; }

  .opening {
    padding-top: 72px;
  }

  .trade-quote {
    right: 20px;
    bottom: 20px;
    width: min(430px, 52%);
  }

  .intel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intel-item:nth-child(2) { border-right: 0; }
  .intel-item:nth-child(-n + 2) { border-bottom: 1px solid rgb(243 234 216 / 22%); }

  .columns { column-count: 1; max-width: 760px; }
  .columns p + p { margin-top: 1.25em; }

  .security-list { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }

  .outcomes div {
    border-right: 0;
    border-bottom: 1px solid rgb(17 60 67 / 25%);
  }

  .outcomes div:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .begin {
    right: 12px;
    bottom: 12px;
    left: auto;
    transform: none;
    padding: 8px 11px;
    font-size: 10px;
    white-space: nowrap;
  }

  section {
    padding: 76px 22px;
  }

  .framed::before,
  .framed::after {
    width: 48px;
    height: 48px;
  }

  .framed::before { top: 18px; left: 12px; }
  .framed::after { right: 12px; bottom: 18px; }

  h1 { font-size: 54px; }
  h2 { font-size: 42px; }

  .trade-visual {
    margin: 44px 0 52px;
    overflow: visible;
    border-bottom: 0;
  }

  .trade-visual > img {
    height: auto;
    object-fit: contain;
    object-position: center;
    border-bottom: 2px solid var(--gold);
  }

  .trade-quote {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% - 24px);
    margin: -28px 12px 0;
    padding: 24px;
  }

  .trade-quote p {
    font-size: 25px;
  }

  .story-art {
    margin-bottom: 48px;
  }

  .story-art img,
  .story-art-crop img,
  .closing-art img {
    height: auto;
    object-fit: contain;
  }

  .story-art figcaption {
    font-size: 12px;
  }

  .story-scene .story-reveal,
  .story-scene.opening .story-reveal {
    padding: 22px;
  }

  .story-scene .story-reveal figcaption {
    width: min(100%, 340px);
    padding: 18px 20px;
    font-size: 13px;
  }

  .story-scene.opening .trade-quote {
    width: min(100%, 340px);
  }

  .story-scene.opening blockquote.trade-quote.has-dialog-portrait {
    --portrait-gap: 16px;
    --portrait-inset: 18px;
    --portrait-size: 62px;
    padding: 22px 20px 22px calc(var(--portrait-inset) + var(--portrait-size) + var(--portrait-gap));
  }

  blockquote,
  .shout,
  .script {
    padding: 28px 24px;
  }

  blockquote.has-dialog-portrait {
    --portrait-gap: 18px;
    --portrait-inset: 18px;
    --portrait-size: 72px;
    min-height: 118px;
    padding: 24px 22px 24px calc(var(--portrait-inset) + var(--portrait-size) + var(--portrait-gap));
  }

  .script p.has-dialog-portrait {
    --portrait-gap: 16px;
    --portrait-size: 52px;
    min-height: 58px;
    padding-left: calc(var(--portrait-size) + var(--portrait-gap));
  }

  .intel-grid { grid-template-columns: 1fr; }

  .intel-item {
    border-right: 0;
    border-bottom: 1px solid rgb(243 234 216 / 22%);
  }

  .intel-item:last-child { border-bottom: 0; }

  .security-list { gap: 0; }

  footer {
    display: grid;
    gap: 4px;
    text-align: center;
  }
}

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

@media print {
  .reading-progress,
  .page-story-backdrop,
  .begin,
  .skip-link,
  .back-to-top { display: none !important; }

  body { font-size: 11pt; }
  .cover { min-height: 0; break-after: page; }
  .cover img { height: auto; }
  section { padding: 18mm 14mm; break-inside: avoid; }
  .opening { display: block; }
  .trade-visual { break-inside: avoid; }
  .trade-quote { position: static; width: 100%; margin-top: 0; }
  blockquote { color: var(--ink); border: 1px solid var(--ink); background: transparent; }
  section:nth-child(even) { color: var(--ink); background: white; }
  footer { display: none; }
}
