@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #e7e8ea;
  --ink: #172033;
  --blue: #2447d8;
  --red: #b92d2a;
  --trace: #6a7180;
  --white: #ffffff;
  --line: #b9bec8;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --reading: "Source Serif 4", Georgia, serif;
  --utility: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--reading);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--red);
}

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

::selection {
  background: var(--blue);
  color: var(--white);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--utility);
  font-size: 13px;
  transform: translateY(-180%);
}

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

.site-head {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  align-items: center;
  gap: 32px;
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

.wordmark {
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-head nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-head nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-head nav a:hover {
  color: var(--blue);
}

.hero {
  position: relative;
  min-height: min(830px, calc(100vh - 76px));
  padding: clamp(74px, 10vw, 150px) clamp(24px, 8vw, 128px) 76px;
  overflow: hidden;
  background: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  right: clamp(24px, 6vw, 92px);
  bottom: 46px;
  width: min(35vw, 420px);
  height: 1px;
  background: var(--red);
  box-shadow: 0 11px 0 var(--red), 0 22px 0 var(--red);
}

.capture-strip {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--red);
  color: var(--red);
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.65;
  transform: translateY(-5px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.capture-strip span:last-child {
  text-align: right;
}

.is-revealed .capture-strip {
  opacity: 1;
  transform: translateY(0);
}

.kicker,
.section-label {
  margin: 0 0 16px;
  color: var(--red);
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(92px, 15vw, 220px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.78;
  text-transform: uppercase;
}

.subtitle {
  max-width: 780px;
  margin: 38px 0 0;
  color: var(--blue);
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1;
}

.thesis {
  max-width: 680px;
  margin: 34px 0 0;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.42;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

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

.button:hover {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.proof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(48px, 8vw, 128px);
  padding: clamp(76px, 10vw, 140px) clamp(24px, 8vw, 128px);
  border-top: 1px solid var(--ink);
}

.proof-copy {
  max-width: 680px;
}

.proof-copy h2,
.service-band h2,
.evidence-note h2,
.index-sheet h1,
.about-sheet h1,
.downloads-sheet h1,
.error-sheet h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 94px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.94;
}

.proof-copy p:not(.section-label),
.service-band p:not(.section-label),
.evidence-note p:not(.section-label),
.about-sheet > p,
.downloads-sheet > p,
.error-sheet > p {
  max-width: 66ch;
}

.chapter-ledger,
.reading-index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.chapter-ledger li,
.reading-index li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.chapter-ledger span,
.reading-index > li > span {
  color: var(--red);
  font-family: var(--utility);
  font-size: 11px;
}

.chapter-ledger a,
.reading-index a {
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
}

.chapter-ledger a[aria-current="page"],
.reading-index a[aria-current="page"] {
  color: var(--blue);
}

.reading-index small {
  display: block;
  margin-bottom: 5px;
  color: var(--trace);
  font-family: var(--utility);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-band {
  padding: clamp(72px, 9vw, 128px) clamp(24px, 8vw, 128px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--blue);
  color: var(--white);
}

.service-band .section-label {
  color: var(--white);
}

.service-band h2 {
  max-width: 960px;
}

.service-band a {
  color: var(--white);
}

.text-link {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-note {
  padding: clamp(72px, 9vw, 128px) clamp(24px, 8vw, 128px);
  background: var(--white);
}

.reader-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 76px);
}

.reader-stamp {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--red);
  color: var(--red);
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.reader-stamp a {
  color: var(--blue);
}

.reading-sheet {
  position: relative;
  width: min(100%, 880px);
  padding: clamp(38px, 7vw, 96px);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(23, 32, 51, 0.12);
}

.reading-sheet::before,
.reading-sheet::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.reading-sheet::before {
  top: 14px;
  left: 14px;
  border-top: 1px solid var(--red);
  border-left: 1px solid var(--red);
}

.reading-sheet::after {
  right: 14px;
  bottom: 14px;
  border-right: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
}

.reading-sheet > h1 {
  max-width: 760px;
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.9;
}

.mirror-note {
  margin: 0 0 52px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--trace);
  font-family: var(--utility);
  font-size: 11px;
  line-height: 1.5;
}

.chapter-body {
  max-width: 68ch;
}

.chapter-body h2,
.chapter-body h3,
.chapter-body h4 {
  margin: 2.3em 0 0.7em;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
}

.chapter-body h2 {
  font-size: clamp(34px, 4vw, 54px);
}

.chapter-body h3 {
  font-size: clamp(27px, 3vw, 38px);
}

.chapter-body p,
.chapter-body li {
  font-size: clamp(18px, 1.45vw, 21px);
}

.chapter-body blockquote {
  margin: 2.2em 0;
  padding: 18px 0;
  border-top: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  color: var(--ink);
  font-size: 1.08em;
}

.chapter-body blockquote p {
  margin: 0.55em 0;
}

.chapter-body code {
  font-family: var(--utility);
  font-size: 0.82em;
}

.chapter-body pre {
  max-width: 100%;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

.chapter-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.chapter-body th,
.chapter-body td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.chapter-body img {
  max-width: 100%;
  height: auto;
}

.chapter-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 76px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
  font-family: var(--utility);
  font-size: 11px;
  line-height: 1.5;
}

.chapter-pager a:last-child {
  text-align: right;
}

.index-sheet,
.about-sheet,
.downloads-sheet,
.error-sheet {
  position: relative;
  width: min(100% - 40px, 1080px);
  min-height: 68vh;
  margin: clamp(36px, 7vw, 100px) auto;
  padding: clamp(36px, 7vw, 92px);
  border-top: 2px solid var(--ink);
  background: var(--white);
}

.index-sheet::before,
.about-sheet::before,
.downloads-sheet::before,
.error-sheet::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 68px;
  height: 2px;
  background: var(--red);
}

.reading-index {
  margin-top: 48px;
}

.publication-record {
  margin: 52px 0 0;
  border-top: 2px solid var(--ink);
}

.publication-record div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.publication-record dt {
  color: var(--trace);
  font-family: var(--utility);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-record dd {
  margin: 0;
}

.format-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.format {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.format b {
  color: var(--blue);
  font-family: var(--display);
  font-size: 62px;
  line-height: 1;
}

.format span {
  align-self: end;
  font-family: var(--utility);
  font-size: 11px;
}

.site-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-family: var(--utility);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-foot p {
  margin: 0;
}

.site-foot p:last-child {
  text-align: right;
}

.site-foot a {
  color: var(--white);
}

@media (max-width: 820px) {
  .site-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-head nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 0;
    padding-top: 104px;
  }

  .hero h1 {
    font-size: clamp(82px, 25vw, 150px);
  }

  .capture-strip {
    grid-template-columns: 1fr auto;
  }

  .capture-strip span:last-child {
    display: none;
  }

  .proof-layout,
  .reader-grid {
    grid-template-columns: 1fr;
  }

  .reader-stamp {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }

  .reading-sheet {
    width: 100%;
  }
}

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

  .site-head {
    padding: 14px 18px;
  }

  .site-head nav {
    gap: 8px 15px;
    font-size: 10px;
  }

  .site-head nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .hero {
    padding-right: 20px;
    padding-bottom: 92px;
    padding-left: 24px;
  }

  .hero h1 {
    font-size: clamp(68px, 22vw, 96px);
  }

  .subtitle {
    font-size: 30px;
  }

  .actions,
  .actions .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }

  .proof-layout,
  .service-band,
  .evidence-note {
    padding-right: 22px;
    padding-left: 22px;
  }

  .reader-grid {
    padding: 20px 0 0;
    gap: 18px;
  }

  .reader-stamp {
    grid-template-columns: 1fr;
    margin: 0 20px;
  }

  .reading-sheet {
    padding: 38px 22px 54px;
    box-shadow: none;
  }

  .reading-sheet > h1 {
    font-size: clamp(50px, 18vw, 82px);
  }

  .chapter-pager,
  .format-list,
  .site-foot {
    grid-template-columns: 1fr;
  }

  .chapter-pager a:last-child,
  .site-foot p:last-child {
    text-align: left;
  }

  .index-sheet,
  .about-sheet,
  .downloads-sheet,
  .error-sheet {
    width: 100%;
    margin: 0;
    padding: 52px 22px;
  }

  .publication-record div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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

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

  .capture-strip {
    opacity: 1;
    transform: none;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  .site-head,
  .site-foot,
  .reader-stamp,
  .mirror-note,
  .chapter-pager,
  .skip-link {
    display: none !important;
  }

  html,
  body,
  .reading-sheet {
    background: var(--white);
  }

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

  .reading-sheet {
    width: auto;
    padding: 0;
    box-shadow: none;
  }

  .chapter-body {
    max-width: none;
  }

  a {
    color: var(--ink);
  }
}
