:root {
  --paper: #f8f6f1;
  --paper-deep: #e7edef;
  --ink: #202b31;
  --muted: #5f7078;
  --ice: #8fc9dd;
  --ice-deep: #356477;
  --line: #cbdce3;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, "Segoe UI", Arial, sans-serif;
  --measure: 68ch;
  --page-edge: clamp(1.25rem, 4vw, 4.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.68;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  background:
    linear-gradient(90deg, transparent 0 71%, rgba(143, 201, 221, 0.12) 71% 71.12%, transparent 71.12%),
    var(--paper);
}

a {
  color: var(--ice-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--ice-deep);
  outline-offset: 4px;
}

:target,
:focus {
  scroll-margin-top: 2rem;
  scroll-margin-bottom: 2rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

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

.masthead {
  position: relative;
  min-height: min(46rem, 88vh);
  padding: 1.5rem var(--page-edge) 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}

.masthead::after {
  position: absolute;
  right: -8rem;
  bottom: -15rem;
  width: min(46rem, 68vw);
  aspect-ratio: 1;
  border: clamp(2.5rem, 7vw, 7rem) solid rgba(143, 201, 221, 0.48);
  border-radius: 50%;
  content: "";
}

.masthead__line {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(53, 100, 119, 0.34);
  color: var(--ice-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark {
  color: var(--ink);
  letter-spacing: 0.3em;
}

.masthead__title {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: min(66rem, 88%);
  margin-top: clamp(6rem, 15vh, 10rem);
}

.kicker,
.release-note,
.chapter-index__label {
  color: var(--ice-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.masthead h1 {
  max-width: 12ch;
  margin: 0.18em 0 0;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 9vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.subtitle {
  width: 100%;
  max-width: 42ch;
  margin: 2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.35;
}

.promo-gallery {
  width: min(100% - 2rem, 80rem);
  margin: 2.5rem auto 3rem;
  padding: clamp(1.25rem, 3vw, 2.75rem);
  border: 1px solid rgba(31, 47, 55, 0.14);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(247, 239, 226, 0.92), rgba(232, 240, 239, 0.82));
  box-shadow: 0 1.25rem 3rem rgba(31, 47, 55, 0.08);
}

.promo-gallery__intro {
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

.promo-gallery__intro h2 {
  margin: 0.25rem 0 0.65rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.promo-gallery__intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.promo-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.promo-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #ded8ce;
}

.promo-gallery__feature {
  grid-column: span 2;
  grid-row: span 2;
}

.promo-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.promo-gallery__feature img {
  height: 100%;
  min-height: 22rem;
}

.promo-gallery figcaption {
  padding: 0.7rem 0.85rem 0.85rem;
  color: var(--ink);
  background: rgba(255, 252, 247, 0.9);
  font-size: 0.82rem;
  line-height: 1.35;
}

.release-note {
  margin-top: 2rem;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 8rem);
  max-width: 96rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 8rem) var(--page-edge);
}

.chapter-index nav {
  position: sticky;
  top: 2rem;
  border-top: 4px solid var(--ice-deep);
  padding-top: 1rem;
}

.chapter-index ol {
  margin: 1rem 0 1.4rem;
  padding: 0;
  list-style: none;
  counter-reset: chapters;
}

.chapter-index li {
  position: relative;
  counter-increment: chapters;
  border-top: 1px solid var(--line);
}

.chapter-index li::before {
  position: absolute;
  top: 0.72rem;
  left: 0;
  content: "0" counter(chapters);
  color: var(--ice-deep);
  font-size: 0.68rem;
  font-weight: 700;
}

.chapter-index a {
  display: block;
  min-height: 24px;
  padding: 0.62rem 0 0.62rem 2.1rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.chapter-index a:hover,
.chapter-index a:focus-visible {
  color: var(--ice-deep);
}

.chapter-index .download-link {
  min-height: 44px;
  margin-top: 1.5rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ice-deep);
  color: var(--ice-deep);
  text-align: center;
}

main {
  min-width: 0;
}

.masthead__title,
.subtitle,
.reading-layout > *,
.prose,
.prose * {
  min-width: 0;
  max-width: 100%;
}

.subtitle,
.chapter-index a,
.prose h2,
.prose h3,
.prose p,
.prose li,
.prose a {
  overflow-wrap: anywhere;
}

.review-watermark {
  display: block;
  max-width: var(--measure);
  margin-bottom: 2rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--ice-deep);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.prose {
  max-width: var(--measure);
}

.prose > section,
.prose > p,
.prose > figure,
.prose > blockquote,
.prose > div,
.prose > ol,
.prose > ul {
  max-width: 68ch;
}

.prose h2 {
  margin: 5.5rem 0 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.prose h2.chapter-heading::before {
  display: block;
  margin-bottom: 1.2rem;
  content: "ORION / CHAPTER";
  color: var(--ice-deep);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.prose h3 {
  margin: 3.2rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.15;
}

.prose h4 {
  margin: 2.2rem 0 0.6rem;
  color: var(--ice-deep);
  font-size: 1rem;
  letter-spacing: 0.035em;
}

.prose p,
.prose li {
  font-size: 1.05rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose figure,
.figure {
  width: min(100%, 56rem);
  margin: 3rem 0;
  padding: clamp(1rem, 2vw, 1.6rem);
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
}

.prose figcaption,
.figure-caption {
  margin-top: 1rem;
  color: var(--ice-deep);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.evidence-claim,
.capability-status,
.pull-quote {
  margin: 2.2rem 0;
  padding: 1.35rem 1.5rem;
  border-left: 5px solid var(--ice-deep);
  background: var(--paper-deep);
}

.capability-status {
  border: 2px solid var(--ice-deep);
  border-left-width: 8px;
  background: var(--paper);
}

.capability-status strong {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ice);
  text-decoration-thickness: 0.26em;
  text-underline-offset: 0.12em;
}

.pull-quote {
  border: 0;
  border-block: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.25;
}

.footnotes,
.endnotes {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
}

.footnotes p,
.footnotes li {
  font-size: inherit;
}

.footnote-back {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem var(--page-edge);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .masthead {
    min-height: 39rem;
  }

  .reading-layout {
    grid-template-columns: 1fr;
  }

  .chapter-index nav {
    position: static;
  }

  .chapter-index ol {
    columns: 2;
    column-gap: 2rem;
  }
}

@media (max-width: 640px) {
  body {
    background: var(--paper);
  }

  .masthead {
    min-height: 34rem;
    padding-top: 1rem;
  }

  .masthead__line,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead__title {
    width: 100%;
    max-width: 100%;
    margin-top: 5rem;
  }

  .promo-gallery {
    width: min(100% - 1rem, 42rem);
    margin: 1.25rem auto 2rem;
    padding: 1rem;
    border-radius: 1rem;
  }

  .promo-gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-gallery__feature {
    grid-column: span 2;
    grid-row: auto;
  }

  .promo-gallery__feature img {
    min-height: 0;
  }

  .subtitle {
    max-width: 100%;
  }

  .chapter-index ol {
    columns: 1;
  }

  .reading-layout {
    padding-top: 2.5rem;
  }

  .prose h2 {
    margin-top: 4rem;
  }

  .evidence-claim,
  .capability-status,
  .pull-quote {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .capability-status,
  .evidence-claim,
  .chapter-index .download-link {
    border-color: CanvasText;
  }
}

@media print {
  .skip-link,
  .chapter-index {
    display: none;
  }

  .masthead {
    min-height: auto;
  }

  .reading-layout {
    display: block;
  }
}
