:root {
  --night: #11120f;
  --juniper: #29403a;
  --juniper-deep: #172923;
  --paper: #f2eee6;
  --cotton: #f5f1e9;
  --ink: #202320;
  --graphite: #3c3f39;
  --stone: #9c9589;
  --walnut: #5a4636;
  --clay: #9e4a3e;
  --terracotta: #bc6a47;
  --brass: #a8874c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--night); font-family: "Source Serif 4", Georgia, serif; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: -6rem; left: 1rem; padding: .75rem 1rem; color: var(--paper); background: var(--clay); font-family: Poppins, sans-serif; }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 72px; padding: 0 clamp(1rem, 4vw, 4rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; color: var(--paper); background: var(--juniper-deep); border-bottom: 1px solid rgba(232, 220, 196, .33); font-family: Poppins, sans-serif; }
.site-header a { text-decoration: none; }
.site-header__gallery, .site-header__edition { font-family: "IBM Plex Mono", monospace; font-size: .63rem; letter-spacing: .13em; text-transform: uppercase; }
.site-header__gallery { width: fit-content; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: .35rem; }
.site-header__edition { justify-self: end; }
.wordmark { font-size: 1.12rem; font-weight: 500; letter-spacing: .2em; }

.hero { min-height: calc(100vh - 72px); padding: 1px 0; background-color: #171712; background-image: url("workbench-background.png"); background-position: center top; background-size: cover; }
.proof-sheet { position: relative; width: min(760px, 52vw); min-height: 635px; margin: clamp(5rem, 10vh, 7rem) auto 2rem; padding: 1.8rem 7.2rem 4.7rem 2.7rem; }
.proof-copy { max-width: 570px; text-align: center; }
.hero-kicker, .edition-label, .build-states, .hero-provenance, .manuscript__receipt, .reading-rail, .site-footer { font-family: "IBM Plex Mono", monospace; }
.hero-kicker { margin: 0 0 1.3rem; color: #5e5b54; font-size: .61rem; text-transform: uppercase; letter-spacing: .17em; }
.edition-label { display: inline-block; margin: 0 0 1.25rem; padding: .5rem .85rem; color: var(--paper); background: var(--terracotta); font-size: .63rem; text-transform: uppercase; letter-spacing: .14em; }
.proof-copy h1 { margin: 0; color: #181915; font-size: clamp(3.2rem, 5.8vw, 5.6rem); font-weight: 500; line-height: .84; letter-spacing: -.045em; }
.hero-subtitle { margin: 1rem 0 1.2rem; font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.2; }
.proof-copy blockquote { max-width: 30rem; margin: 1.2rem auto 1.55rem; padding: 1.1rem 0 0; color: #34362f; border-top: 1px solid rgba(76, 67, 54, .35); font-size: clamp(1rem, 1.6vw, 1.24rem); line-height: 1.45; font-style: italic; }
.primary-action { display: inline-block; padding: .78rem 1.1rem .7rem; color: var(--paper); background: var(--clay); border: 1px solid var(--clay); text-decoration: none; font-family: "IBM Plex Mono", monospace; font-size: .66rem; text-transform: uppercase; letter-spacing: .13em; transition: color .2s ease, background .2s ease, transform .2s ease; }
.primary-action:hover, .primary-action:focus-visible { color: var(--clay); background: transparent; transform: translateY(-2px); }
.build-states { position: absolute; top: 14.5rem; right: 1.25rem; margin: 0; padding: 0 0 0 1rem; border-left: 1px solid rgba(57, 53, 45, .35); list-style: none; color: #4a4b45; font-size: .56rem; text-transform: uppercase; letter-spacing: .12em; }
.build-states li { padding: .65rem 0; }
.build-states li + li { border-top: 1px solid rgba(57, 53, 45, .24); }
.hero-provenance { position: absolute; bottom: 4.3rem; left: 2.7rem; right: 2.7rem; margin: 0; padding-top: .7rem; color: #5b574f; border-top: 1px solid rgba(57, 53, 45, .3); text-align: center; font-size: .55rem; line-height: 1.4; letter-spacing: .04em; }

.reading-shell { max-width: 1240px; margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3.5rem); display: grid; grid-template-columns: 270px minmax(0, 780px); justify-content: center; gap: clamp(2rem, 6vw, 5rem); }
.reading-rail { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow: auto; padding: 1.6rem 1.4rem; color: #ddd5c4; background: var(--juniper-deep); border-top: 4px solid var(--brass); }
.rail-kicker { margin: 0 0 .55rem; color: #b9aa8c; font-size: .59rem; text-transform: uppercase; letter-spacing: .13em; }
.reading-rail h2 { margin: 0 0 1.5rem; font-family: "Source Serif 4", Georgia, serif; font-size: 2rem; font-weight: 500; }
.contents { padding: .85rem 0; border-top: 1px solid rgba(232, 220, 196, .22); border-bottom: 1px solid rgba(232, 220, 196, .22); }
.contents a { display: block; padding: .42rem 0; font-size: .67rem; line-height: 1.3; text-decoration-color: rgba(221, 213, 196, .35); text-underline-offset: .22rem; }
.to-top { display: block; margin-top: 1rem; color: #d9c9a9; font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; }

.manuscript { min-width: 0; padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 7vw, 6rem); background: var(--paper); border: 1px solid rgba(183, 156, 119, .45); box-shadow: 0 28px 70px rgba(0, 0, 0, .28); }
.manuscript__receipt { margin-bottom: 4rem; padding: .75rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .55rem 1rem; color: #6b665d; border-top: 1px solid rgba(80, 70, 57, .32); border-bottom: 1px solid rgba(80, 70, 57, .32); font-size: .57rem; text-transform: uppercase; letter-spacing: .1em; }
.manuscript h1, .manuscript h2, .manuscript h3 { color: var(--juniper-deep); scroll-margin-top: 2rem; }
.manuscript h1 { margin: 5.3rem 0 1.3rem; padding-top: 1.7rem; border-top: 1px solid var(--terracotta); font-size: clamp(2.45rem, 5vw, 4rem); line-height: .98; font-weight: 500; letter-spacing: -.035em; }
.manuscript h1:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; font-size: clamp(3rem, 6vw, 5.3rem); }
.manuscript h2 { margin: 2.6rem 0 1rem; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.08; font-weight: 500; }
.manuscript h3 { margin: 1.2rem 0 2.2rem; color: var(--clay); font-family: Poppins, sans-serif; font-size: .76rem; line-height: 1.5; text-transform: uppercase; letter-spacing: .12em; }
.manuscript p, .manuscript li { font-size: 1.075rem; line-height: 1.78; }
.manuscript p { margin: 0 0 1.15rem; }
.manuscript ul { margin: .8rem 0 1.7rem; padding-left: 1.2rem; }
.manuscript li + li { margin-top: .36rem; }
.manuscript blockquote { margin: 2.4rem 0; padding: 1.2rem 1.4rem; color: #39453f; background: #e8dfce; border-left: 4px solid var(--clay); font-size: 1.28rem; line-height: 1.55; font-style: italic; }
.manuscript code { padding: .08em .28em; color: #6b3026; background: #e7dbc6; font-family: "IBM Plex Mono", monospace; font-size: .84em; }
.manuscript hr { width: 5rem; margin: 3.6rem auto; border: 0; border-top: 1px solid var(--brass); }

.site-footer { padding: 1.5rem clamp(1rem, 4vw, 4rem); display: flex; justify-content: space-between; gap: 2rem; color: #cfc5b3; background: var(--juniper-deep); font-size: .59rem; line-height: 1.5; }
.site-footer p { margin: 0; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header__gallery { display: none; }
  .wordmark { justify-self: start; }
  .site-header__edition { grid-column: 2; }
  .proof-sheet { width: min(760px, 72vw); }
  .reading-shell { grid-template-columns: minmax(0, 780px); }
  .reading-rail { position: relative; top: auto; max-height: none; }
  .contents { columns: 2; column-gap: 1.5rem; }
}

@media (max-width: 560px) {
  .site-header { min-height: 64px; padding-inline: 1rem; }
  .wordmark { font-size: .85rem; letter-spacing: .12em; }
  .site-header__edition { font-size: .5rem; }
  .hero { min-height: 790px; background-position: center top; }
  .proof-sheet { width: 100%; min-height: 700px; margin: 4.1rem auto 0; padding: 2rem 2.2rem 5.3rem; }
  .proof-copy { max-width: 100%; }
  .hero-kicker { font-size: .53rem; }
  .edition-label { font-size: .54rem; }
  .proof-copy h1 { font-size: clamp(3rem, 15vw, 4.1rem); }
  .hero-subtitle { font-size: 1.16rem; }
  .proof-copy blockquote { font-size: 1rem; }
  .build-states { display: none; }
  .hero-provenance { left: 2.2rem; right: 2.2rem; bottom: 1.4rem; }
  .reading-shell { padding: 2rem 1rem 4rem; gap: 1rem; }
  .reading-rail { padding: 1.35rem 1.2rem; }
  .contents { display: none; }
  .manuscript { padding: 2.3rem 1.3rem; }
  .manuscript__receipt { margin-bottom: 3rem; flex-direction: column; }
  .manuscript p, .manuscript li { font-size: 1rem; line-height: 1.72; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .primary-action { transition: none; }
}

@media print {
  .site-header, .hero, .reading-rail, .site-footer, .skip-link { display: none !important; }
  .reading-shell { display: block; max-width: none; padding: 0; }
  .manuscript { border: 0; box-shadow: none; }
}
