:root {
  --ink: #f6efe2;
  --muted: #b9b2a6;
  --night: #090b0a;
  --panel: #111412;
  --panel-strong: #171b18;
  --ember: #f0a64b;
  --cyan: #20b7c7;
  --line: rgba(246, 239, 226, 0.17);
  --measure: 47rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 4%, rgba(32, 183, 199, 0.08), transparent 30rem),
    var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 5px;
}

.site-header,
.site-footer {
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-header {
  min-height: 7rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
}

.back-link,
.closing a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover,
.closing a:hover {
  color: var(--ink);
}

main {
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
}

article {
  padding-bottom: 7rem;
}

.hero,
article > section,
.closing {
  width: min(100%, var(--measure));
  margin-inline: auto;
}

.hero {
  padding: clamp(6rem, 13vw, 10rem) 0 clamp(5rem, 10vw, 8rem);
}

.eyebrow,
.section-index {
  color: var(--ember);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.eyebrow {
  margin: 0 0 1.6rem;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 68rem;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.97;
}

.protocol-name {
  margin: 2.8rem 0 0;
  color: var(--cyan);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
}

.deck {
  max-width: 39rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45;
}

article > section {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-index {
  margin: 0 0 1.5rem;
}

h2 {
  margin: 0 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h3 {
  margin: 3rem 0 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1.35rem;
}

.lead {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.45;
}

.highlight {
  margin: 3rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--ember);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3.8vw, 2.6rem);
  line-height: 1.25;
}

.highlight p,
.wedge p {
  margin: 0;
}

.lifecycle {
  margin: 3rem 0 4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  list-style: none;
  border: 1px solid var(--line);
  background: var(--panel);
}

.lifecycle li {
  position: relative;
  min-height: 8.5rem;
  padding: 1.2rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  border-right: 1px solid var(--line);
  font-size: 0.77rem;
  font-weight: 750;
  line-height: 1.25;
}

.lifecycle li:last-child {
  border-right: 0;
}

.lifecycle li:not(:last-child)::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: -0.45rem;
  z-index: 1;
  padding: 0.1rem;
  background: var(--panel);
  color: var(--cyan);
  font-size: 1.2rem;
  transform: translateY(-50%);
}

.lifecycle span {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.capability-grid,
.evidence-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  border-top: 1px solid var(--line);
}

.capability-grid li,
.evidence-list li {
  padding: 1rem 1.25rem 1rem 1.65rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.capability-grid li:nth-child(odd),
.evidence-list li:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.capability-grid li::before,
.evidence-list li::before {
  content: "";
  position: absolute;
  top: 1.78rem;
  left: 0.25rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--cyan);
}

.closing-line,
.note,
.emphasis {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

.wedge {
  margin: clamp(4rem, 9vw, 7rem) calc(50% - 50vw);
  padding: clamp(3.5rem, 8vw, 6rem) max(1.5rem, calc((100vw - 47rem) / 2));
  background: var(--ink);
  color: var(--night);
}

.wedge figcaption {
  margin-bottom: 1.6rem;
  color: #5d5a52;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wedge blockquote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.25;
}

.emphasis {
  border-left: 3px solid var(--cyan);
  font-weight: 750;
}

.closing {
  margin-top: 2rem;
  padding: clamp(3rem, 7vw, 5rem);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.closing p {
  max-width: 38rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  line-height: 1.25;
}

.closing a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--ember);
}

.site-footer {
  min-height: 8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 2rem, 76rem);
  }

  .site-header {
    min-height: 5.5rem;
  }

  .brand img {
    width: 1.7rem;
    height: 1.6rem;
  }

  .back-link {
    font-size: 0.64rem;
  }

  .hero {
    padding-top: 5rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

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

  .lifecycle li {
    min-height: auto;
    padding: 1rem;
    flex-direction: row;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }

  .lifecycle li:last-child {
    border-bottom: 0;
  }

  .lifecycle li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 1rem;
    bottom: -0.78rem;
    transform: none;
  }

  .capability-grid,
  .evidence-list {
    grid-template-columns: 1fr;
  }

  .capability-grid li:nth-child(odd),
  .evidence-list li:nth-child(odd) {
    border-right: 0;
  }

  .closing {
    padding: 2rem 1.5rem;
  }

  .site-footer {
    padding: 2rem 0;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media print {
  :root {
    --ink: #111;
    --muted: #444;
    --night: #fff;
    --panel: #fff;
    --panel-strong: #fff;
    --line: #bbb;
  }

  html {
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .site-header,
  .site-footer,
  .closing a {
    display: none;
  }

  main {
    width: 100%;
  }

  article {
    padding: 0;
  }

  .hero {
    padding: 0 0 2rem;
  }

  h1 {
    font-size: 38pt;
  }

  h2 {
    font-size: 25pt;
  }

  article > section {
    padding: 2rem 0;
    break-inside: auto;
  }

  h2,
  h3,
  .highlight,
  .lifecycle,
  .capability-grid li,
  .evidence-list li,
  .note,
  .closing {
    break-inside: avoid;
  }

  .lifecycle {
    grid-template-columns: repeat(7, 1fr);
  }

  .lifecycle li {
    min-height: 5.5rem;
    padding: 0.5rem;
    font-size: 7.5pt;
  }

  .wedge {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #eee;
    color: #111;
    border: 1px solid #999;
  }

  .wedge blockquote {
    font-size: 18pt;
  }

  .closing {
    margin-top: 2rem;
    padding: 1.5rem;
  }

  a {
    text-decoration: none;
  }
}
