/* Editorial pages share the build guides' palette, spacing and typography. */
:root {
  color-scheme: dark;
  --ground: #10110f;
  --ink: #eeeae1;
  --muted: #a4a69c;
  --line: #eeeecc26;
  --accent: #89c5af;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: Arial, Helvetica, sans-serif;
  --header: 76px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
a:hover {
  color: var(--accent);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--accent);
  color: var(--ground);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
h1,
h2,
h3 {
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 0 0 24px;
}
h1 {
  font-size: clamp(48px, 6.4vw, 90px);
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--accent);
}
h2 {
  font-size: clamp(30px, 3.2vw, 44px);
}
h3 {
  font-size: 24px;
  letter-spacing: -0.025em;
}
p {
  margin: 0 0 24px;
  color: #c3c5bc;
}
p a,
.section-body > a {
  color: var(--ink);
}
.eyebrow {
  font: 10px/1.7 var(--mono);
  letter-spacing: 0.16em;
  margin-bottom: 24px;
}
.accent {
  color: var(--accent);
}
.lede {
  font-size: 18px;
  line-height: 1.65;
  max-width: 58ch;
}
.note,
figcaption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.editorial {
  max-width: 1260px;
  margin: auto;
  padding: calc(var(--header) + 78px) 48px 96px;
}
.page-intro {
  padding-bottom: 72px;
  max-width: 900px;
}
.page-intro .lede {
  margin: 32px 0 0;
}
.home-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  min-height: 500px;
  padding-bottom: 64px;
}
.home-hero h1 {
  font-size: clamp(48px, 6vw, 84px);
}
.home-hero .lede {
  max-width: 47ch;
}
.hero-actions {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 38px;
  font-size: 13px;
}
.text-cta {
  display: flex;
  justify-content: space-between;
  gap: 45px;
  padding: 14px 0;
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
  min-width: 180px;
}
.system-figure {
  margin: 0;
}
.system-figure img {
  width: 100%;
  height: auto;
}
.system-figure figcaption {
  margin-left: 18%;
  font: 10px/1.8 var(--mono);
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.path-grid > a {
  padding: 28px 28px 24px;
  text-decoration: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 12px;
  transition: background 0.2s;
}
.path-grid > a:first-child {
  padding-left: 0;
}
.path-grid > a + a {
  border-left: 1px solid var(--line);
}
.path-grid .eyebrow {
  grid-column: 1/-1;
  color: var(--accent);
  margin-bottom: 18px;
}
.path-grid h2 {
  font-size: 24px;
  grid-column: 1/-1;
}
.path-grid p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.path-grid > a > span:last-child {
  color: var(--accent);
  align-self: end;
}
.path-grid > a:hover {
  background: #89c5af08;
}
.evidence-note {
  font: 10px/1.8 var(--mono);
  letter-spacing: 0.04em;
  margin: 28px 0 72px;
  max-width: 80ch;
}
.editorial-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.editorial-section h2 {
  max-width: 12ch;
}
.section-body {
  min-width: 0;
}
.section-body > :last-child {
  margin-bottom: 0;
}
.section-body p {
  max-width: 66ch;
}
.reading-list {
  display: grid;
  margin: 24px 0;
  gap: 0;
}
.reading-list a {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
}
.reading-list a:first-child {
  border-top: 1px solid var(--line);
}
.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.principle-grid p {
  font-size: 13px;
}
.principle-grid .eyebrow {
  display: block;
  color: var(--accent);
  margin-bottom: 16px;
}
.evidence-levels > div {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.evidence-levels > div:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border: 0;
}
.evidence-levels h3 {
  margin: 12px 0;
}
.evidence-levels p {
  font-size: 15px;
  margin: 0;
}
.evidence-levels .eyebrow {
  color: var(--accent);
}
.next-page {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--accent);
  padding: 32px 0;
  margin-top: 40px;
  text-decoration: none;
}
.next-page .eyebrow {
  margin: 0;
  color: var(--muted);
}
.next-page > span:last-child {
  font-size: 22px;
  letter-spacing: -0.03em;
}
.next-page > span:last-child > span {
  margin-left: 24px;
  color: var(--accent);
}
.workflow {
  padding: 0;
  list-style: none;
  margin: 0;
}
.workflow li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}
.workflow .eyebrow {
  color: var(--accent);
}
.workflow h2 {
  font-size: 32px;
}
.workflow p {
  max-width: 65ch;
  margin: 0;
}
.wide-figure {
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin: 0 0 32px;
}
.wide-figure img {
  max-width: 500px;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.wide-figure figcaption {
  margin-top: 20px;
}
.state-list {
  margin: 0 0 28px;
}
.state-list > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
dt {
  font: 12px var(--mono);
  color: var(--accent);
}
dd {
  margin: 0;
  color: #c3c5bc;
  font-size: 14px;
}
.media-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.media-gallery figure {
  margin: 0;
}
.media-gallery figure:first-child {
  grid-column: 1/-1;
}
.media-gallery img {
  width: 100%;
  height: auto;
}
.media-gallery figcaption {
  padding: 12px 0 32px;
}
video {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 16px;
}
pre {
  background: #181b16;
  border: 1px solid var(--line);
  padding: 22px;
  overflow: auto;
  font: 12px/1.8 var(--mono);
  margin: 0 0 24px;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
pre code {
  font-size: inherit;
  overflow-wrap: normal;
}
details {
  border-block: 1px solid var(--line);
  padding: 16px 0;
  font-size: 14px;
}
summary {
  cursor: pointer;
  color: var(--ink);
}
details p {
  margin-top: 20px;
}
.home > section[aria-labelledby] {
  border-top: 1px solid var(--line);
  padding: 64px 0;
}
.home > section[aria-labelledby] > p {
  max-width: 76ch;
}
.home > section[aria-labelledby] > h2 {
  max-width: 20ch;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 28px 0;
}
.controls label {
  font-size: 12px;
  color: var(--muted);
}
button,
input,
select {
  border: 1px solid #687166;
  border-radius: 0;
  background: #1a1e19;
  color: var(--ink);
  padding: 10px 14px;
  min-height: 44px;
  font-size: 12px;
}
button:hover {
  border-color: var(--accent);
}
input[type="number"] {
  width: 90px;
}
.bar-row {
  display: grid;
  grid-template-columns: 170px 1fr 110px;
  gap: 20px;
  align-items: center;
  margin: 22px 0;
  font-size: 13px;
}
.bar {
  height: 8px;
  background: #242920;
}
.bar > div {
  height: 100%;
  background: var(--accent);
}
.bar.private > div {
  background: #c4b99a;
}
.bar.scrambled > div {
  background: #cf987e;
}
.bar-row small {
  display: block;
  font: 10px var(--mono);
  color: var(--muted);
}
#bench-out {
  max-width: 850px;
  padding: 16px 0;
}
#bench-out > .note {
  font-size: 10px;
  margin-top: 28px;
}
.replay-layout {
  display: grid;
  grid-template-columns: minmax(0, 520px) 1fr;
  gap: 48px;
  margin-top: 32px;
}
.wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 520px;
}
.node {
  aspect-ratio: 1;
  background: #151a14;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-align: center;
  padding: 4px;
  min-width: 0;
}
.node img {
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1;
  image-rendering: pixelated;
}
.node.survivor {
  border-color: var(--accent);
}
.node.hazard,
.node.forged {
  border-color: #cf987e;
}
.node.abstain {
  opacity: 0.65;
}
#contact-label {
  font: 11px/1.6 var(--mono);
  color: var(--muted);
}
#verdict {
  font-size: 20px;
  color: var(--accent);
}
@media (max-width: 900px) {
  .editorial {
    padding-inline: 32px;
  }
  .home-hero {
    grid-template-columns: 1.3fr 1fr;
    gap: 0;
  }
  .home-hero h1 {
    font-size: 58px;
  }
  .editorial-section {
    gap: 32px;
  }
  .principle-grid {
    grid-template-columns: 1fr;
  }
  .principle-grid p {
    margin-bottom: 8px;
  }
  .replay-layout {
    gap: 24px;
  }
  .path-grid h2 {
    font-size: 22px;
  }
}
@media (max-width: 760px) {
  :root {
    --header: 60px;
  }
  .editorial {
    padding: calc(var(--header) + 44px) 24px 64px;
  }
  .page-intro {
    padding-bottom: 44px;
  }
  .page-intro .lede {
    font-size: 16px;
  }
  .home-hero {
    display: block;
    padding-bottom: 40px;
  }
  .home-hero h1 {
    font-size: clamp(44px, 9vw, 68px);
  }
  .home-hero .lede {
    font-size: 16px;
  }
  .system-figure {
    max-width: 420px;
    margin: 30px auto 0;
  }
  .system-figure figcaption {
    margin-left: 18%;
  }
  .path-grid {
    grid-template-columns: 1fr;
  }
  .path-grid > a {
    padding: 24px 0 !important;
  }
  .path-grid > a + a {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .path-grid h2 {
    margin-bottom: 12px;
  }
  .path-grid .eyebrow {
    margin-bottom: 12px;
  }
  .evidence-note {
    margin-bottom: 44px;
  }
  .editorial-section {
    display: block;
    padding: 36px 0;
  }
  .editorial-section h2 {
    max-width: 18ch;
    margin-bottom: 28px;
  }
  .principle-grid {
    grid-template-columns: 1fr;
  }
  .next-page {
    display: block;
  }
  .next-page > span {
    display: block;
  }
  .next-page > span:last-child {
    margin-top: 16px;
  }
  .next-page > span:last-child > span {
    margin-left: 8px;
  }
  .workflow li {
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 28px 0;
  }
  .workflow h2 {
    font-size: 28px;
  }
  .workflow p {
    font-size: 15px;
  }
  .media-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .media-gallery figure:first-child {
    grid-column: auto;
  }
  .bar-row {
    grid-template-columns: 110px 1fr 65px;
    gap: 12px;
    font-size: 11px;
  }
  .replay-layout {
    grid-template-columns: 1fr;
  }
  .node {
    font-size: 9px;
  }
  .home > section[aria-labelledby] {
    padding: 40px 0;
  }
  .hero-actions {
    gap: 24px;
  }
  pre {
    padding: 16px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .editorial {
    padding: 0;
  }
  .home-hero,
  .editorial-section {
    display: block;
  }
  p,
  figcaption {
    color: #333;
  }
  h1 em,
  .accent {
    color: #24604a;
  }
  .controls {
    display: none;
  }
  section {
    break-inside: avoid;
  }
}
