:root {
  --ink: #101112;
  --muted: #64635f;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --surface-muted: #ebe7dc;
  --line: #d8d2c3;
  --line-strong: #151515;
  --accent: #a31632;
  --header: #050505;
  --header-text: #f7f4ec;
  --code: #111315;
  --code-text: #f4f0e7;
  --gutter: clamp(1rem, 4vw, 3rem);
  --shell: 1180px;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body {
  margin: 0;
  min-width: 320px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.shell {
  margin-inline: auto;
  max-width: var(--shell);
  width: calc(100% - var(--gutter) - var(--gutter));
}

.site-header {
  background: var(--header);
  color: var(--header-text);
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.8rem;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  height: 2.65rem;
  object-fit: cover;
  width: 2.65rem;
}

.brand span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.dateline,
.eyebrow,
.sample-label,
.block-index,
code,
pre {
  font-family:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  font-feature-settings:
    "liga" 0,
    "calt" 0;
  font-variant-ligatures: none;
}

.dateline {
  color: #d6d0c0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

main {
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}

.release {
  display: grid;
  gap: clamp(2.2rem, 5vw, 4rem);
}

.hero {
  align-items: start;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.hero-heading {
  grid-column: 1 / -1;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 7.2vw, 6rem);
  max-width: none;
  white-space: nowrap;
}

.standfirst {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.18;
  margin: 1rem 0 0;
  max-width: none;
}

.lede {
  color: #33312d;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.68;
  margin: clamp(1.15rem, 2.5vw, 1.75rem) 0 0;
  max-width: 68ch;
}

strong {
  font-weight: 700;
}

.sample,
.letter,
.protocol-block {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.sample {
  box-shadow: 0.8rem 0.8rem 0 var(--muted);
}

.sample-label {
  align-items: center;
  background: var(--line-strong);
  color: var(--header-text);
  display: flex;
  font-size: 0.78rem;
  justify-content: space-between;
  margin: 0;
  padding: 0.7rem 0.9rem;
}

.sample pre,
.protocol-block pre {
  background: var(--code);
  color: var(--code-text);
}

pre {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: #171717;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  padding: 0.05em 0.28em;
}

pre code {
  background: transparent;
  border: 0;
  color: inherit;
  display: block;
  font-size: 1em;
  padding: 0;
}

.letter-section,
.protocol-section,
.finale-section {
  display: grid;
  gap: 1.4rem;
}

.section-heading {
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: 0.3rem;
  padding-top: 1.1rem;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3.4vw, 3rem);
}

.letter {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.letter-meta {
  background: var(--line-strong);
  color: var(--header-text);
  padding: 1.2rem;
}

.letter-meta p {
  border-bottom: 1px solid #3a3a3a;
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0;
  padding: 0 0 1rem;
}

.letter-meta p + p {
  padding-top: 1rem;
}

.letter-meta p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.letter-meta span {
  color: #beb8aa;
  display: block;
  font-family:
    "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.letter-body {
  font-size: clamp(1rem, 1.22vw, 1.1rem);
  line-height: 1.7;
  padding: clamp(1.4rem, 3.5vw, 3rem);
}

.letter-body > :first-child,
.protocol-block > :first-child {
  margin-top: 0;
}

.letter-body p,
.protocol-block p {
  margin: 1rem 0 0;
}

.letter-body h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  margin: 2rem 0 0.75rem;
}

.signature {
  margin-top: 1rem;
}

.signature p {
  margin: 0;
}

.signature p + p {
  margin-top: 0.2rem;
}

ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.45rem;
}

.protocol-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.protocol-block {
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
}

.protocol-block pre {
  margin-top: 1rem;
  padding: 1rem;
}

.block-index {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.protocol-block h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
}

.finale {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  padding: clamp(1.5rem, 4vw, 3.2rem);
}

.finale .eyebrow {
  color: var(--accent);
  margin-bottom: 0;
}

.finale h2 {
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  max-width: 18ch;
}

.finale-copy {
  border-top: 1px solid var(--line);
  display: grid;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  gap: 1rem;
  grid-template-columns: 1fr;
  line-height: 1.65;
  padding-top: 1.1rem;
}

.finale-copy p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero,
  .letter,
  .finale,
  .protocol-grid,
  .finale-copy {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .lede {
    max-width: none;
  }

  h1 {
    max-width: none;
    white-space: normal;
  }

  .standfirst {
    max-width: none;
  }

  .finale h2 {
    max-width: none;
  }

  .sample {
    box-shadow: 0.45rem 0.45rem 0 var(--line-strong);
  }
}

@media (max-width: 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .brand-mark {
    height: 2.35rem;
    width: 2.35rem;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  .letter-meta {
    padding: 1rem;
  }
}
