/* Plus Jakarta Sans, self-hosted (SIL OFL, see fonts/OFL.txt). Latin subset, variable weight. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Italic-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* The navy look is the default. The light mode is below. */
  color-scheme: dark;
  --bg: #030b15;
  --ink: #f3f7ff;
  --muted: #9fb2c8;
  --rule: #213041;
  --accent: #7aa7ff;
  --accent-ink: #061627;
  --atlas: #2563eb;
  --brand-atlas: #4f8bff;
  --eyebrow: #9dbdff;
  --icon: #9dbdff;
  --icon-bg: rgba(37, 99, 235, 0.14);
  --icon-rule: #24405f;
  --ghost-ink: #d7e5f5;
  --ghost-rule: #294458;
  --nav-button-ink: #e2f2ff;
  --nav-button-rule: #3e6a83;
  --cta-bg: #0a1a2f;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  overflow-x: clip;
}

main, .site-header, .site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* A warm off-white light mode for every page. A page gets it from the system
   setting or from data-theme="light". assets/theme.js sets data-theme. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5ef;
  --ink: #1b2333;
  --muted: #545c6b;
  --rule: #e2ded3;
  --accent: #1f4fbf;
  --accent-ink: #ffffff;
  --atlas: #2563eb;
  --brand-atlas: #2563eb;
  --eyebrow: #1f4fbf;
  --icon: #1f4fbf;
  --icon-bg: rgba(37, 99, 235, 0.08);
  --icon-rule: #c9d3e6;
  --ghost-ink: #1b2333;
  --ghost-rule: #cfcabd;
  --nav-button-ink: #1b2333;
  --nav-button-rule: #cfcabd;
  --cta-bg: #efece3;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f7f5ef;
    --ink: #1b2333;
    --muted: #545c6b;
    --rule: #e2ded3;
    --accent: #1f4fbf;
    --accent-ink: #ffffff;
    --atlas: #2563eb;
    --brand-atlas: #2563eb;
    --eyebrow: #1f4fbf;
    --icon: #1f4fbf;
    --icon-bg: rgba(37, 99, 235, 0.08);
    --icon-rule: #c9d3e6;
    --ghost-ink: #1b2333;
    --ghost-rule: #cfcabd;
    --nav-button-ink: #1b2333;
    --nav-button-rule: #cfcabd;
    --cta-bg: #efece3;
  }
}

/* The hero animation always draws on navy. In light mode the canvas sits
   in a navy panel, so it looks the same in the two modes. */
:root.home .visual { background: #030b15; }
@media (min-width: 760px) {
  :root.home[data-theme="light"] .visual { border-radius: 14px 0 0 14px; }
}
@media (min-width: 760px) and (prefers-color-scheme: light) {
  :root.home:not([data-theme="dark"]) .visual { border-radius: 14px 0 0 14px; }
}

/* One page width for every page, so the header and the content do not
   move between pages. Each side gutter is about 6.5% of the viewport on
   desktop and about 19px on a 390px phone. */
:root.home, :root.method-page { --gutter: max(16px, calc(7vw - 8px)); }
:root.home main, :root.home .site-header, :root.home .site-footer,
:root.method-page main, :root.method-page .site-header, :root.method-page .site-footer {
  max-width: 1920px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
:root.home .visual { width: calc(100% + var(--gutter)); }
:root.home .env-rows p { max-width: 60rem; }
/* Less space between the hero and the first section. */
:root.home .hero-network + .band { padding-top: 2rem; }

/* Home CTA: a panel from edge to edge. Text on the left, button on the right. */
:root.home .cta-band {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  background: var(--cta-bg);
}
/* The panel edge separates the sections, so the rules next to it go. */
:root.home .band:has(+ .cta-band) { border-bottom: none; }
:root.home main:has(> .cta-band:last-child) + .site-footer { border-top: none; }
:root.home .cta-band p { max-width: 58rem; }
:root.home .cta-band > :nth-last-child(2) { margin-bottom: 0; }
@media (min-width: 760px) {
  :root.home .cta-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
    align-items: center;
  }
  :root.home .cta-band .cta-row { grid-column: 2; grid-row: 1 / span 2; }
}
/* Other pages use the same pilot panel. The panel fills the window width
   while its text stays in line with the page column. */
:root:not(.home) .cta-band {
  background: var(--cta-bg);
  box-shadow: 0 0 0 100vmax var(--cta-bg);
  clip-path: inset(0 -100vmax);
}
:root:not(.home) .band:has(+ .cta-band) { border-bottom: none; }
:root:not(.home) main:has(> .cta-band:last-child) + .site-footer { border-top: none; }
:root:not(.home) .cta-band p { max-width: 58rem; }
:root:not(.home) .cta-band > :nth-last-child(2) { margin-bottom: 0; }
@media (min-width: 760px) {
  :root:not(.home) .cta-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
    align-items: center;
  }
  :root:not(.home) .cta-band .cta-row { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 759px) {
  :root:not(.home) .cta-band > :nth-last-child(2) { margin-bottom: 1.5rem; }
}
@media (max-width: 759px) {
  :root.home .cta-band > :nth-last-child(2) { margin-bottom: 1.5rem; }
  :root.home .visual { width: calc(100% + 2 * var(--gutter)); margin: 12px calc(-1 * var(--gutter)) 0; }
}

/* Theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .to-dark { display: none; }
.theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root[data-theme="light"] .theme-toggle .to-dark { display: block; }
:root[data-theme="light"] .theme-toggle .to-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .to-dark { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .to-light { display: none; }
}

/* Type */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Page title sizes. */
h1 {
  font-size: clamp(2.6rem, 3.2vw, 3rem);
  line-height: 1.12;
  margin: 0 0 1.25rem;
}
@media (max-width: 759px) {
  h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.lede {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 56rem;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark { width: 1.75rem; height: auto; flex: none; }
.brand-mark .peak { fill: currentColor; }
.brand-mark .arc { fill: var(--atlas); }
.brand-atlas { color: var(--brand-atlas); }

.brand:hover { text-decoration: underline; }

#site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

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

#site-nav a:not(.button):hover { text-decoration: underline; }
#site-nav a:not(.button)[aria-current="page"] { text-decoration: underline; }

.menu-toggle {
  display: none;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

/* Sections */

section, article { margin: 0; }

.band {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.band:last-child { border-bottom: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--eyebrow);
  margin: 0 0 0.75rem;
}

.hero { padding-top: clamp(3rem, 8vw, 5.5rem); }
.hero .lede { margin-bottom: 1.75rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Home hero: copy on the left, the network canvas on the right */

.hero-network {
  position: relative;
  display: grid;
  grid-template-columns: 52% 48%;
  align-items: center;
  padding: 42px 0 48px;
  border-bottom: none;
  min-height: 540px;
}
.hero-copy { position: relative; z-index: 1; padding-right: 20px; }
.hero-network h1 { font-size: clamp(2.6rem, 3.2vw, 3rem); line-height: 1.12; }
.hero-network .lede { font-size: 1.12rem; line-height: 1.6; }
.visual { position: relative; height: 480px; width: calc(100% + max(40px, (100vw - 1040px) / 2)); margin-left: -12px; }
#network { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#network.dragging { cursor: grabbing; touch-action: none; }
.action-line { position: absolute; bottom: 18px; left: 0; width: 100%; margin: 0; text-align: center;
  color: #bcd9eb; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; pointer-events: none; }
.action-line .reward { color: #91e0ff; }

@media (max-width: 759px) {
  .hero-network { grid-template-columns: minmax(0, 1fr); padding: 32px 0 24px; min-height: 0; }
  .hero-copy { padding-right: 0; }
  .hero-network h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
  .hero-network .lede { font-size: 1rem; }
  .hero-network .button { font-size: 0.9rem; padding: 0.65rem 1rem; }
  .visual { height: 320px; width: calc(100% + 32px); margin: 12px -16px 0; }
  .action-line { font-size: 9px; bottom: 8px; }
}

/* Environment icons */

.env-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  color: var(--icon);
  background: var(--icon-bg);
  border: 1px solid var(--icon-rule);
  border-radius: 10px;
}
.env-icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.section-head { max-width: 52rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

/* Cards */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.cards > li {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.cards h3 a { color: var(--ink); text-decoration: none; }
.cards h3 a:hover { text-decoration: underline; }
.cards p { color: var(--muted); font-size: 0.98rem; }

/* Home: one row per environment, icon and name left, description right */

.cards.env-rows { grid-template-columns: 1fr; gap: 0; }
.env-rows > li { display: grid; gap: 0.75rem 3rem; padding: 1.5rem 0; }
.env-rows > li:last-child { border-bottom: 1px solid var(--rule); }
.env-rows .env-name { display: flex; align-items: center; gap: 1rem; }
.env-rows .env-icon { margin-bottom: 0; flex: none; }
.env-rows h3 { margin: 0; }
.env-rows p { margin: 0; }
@media (min-width: 760px) {
  .env-rows > li { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); align-items: center; }
}

/* Methodology: contents list on the left, numbered sections on the right */

.method { display: grid; gap: 2.5rem; }
.method-toc p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.method-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); counter-reset: toc; }
.method-toc li { counter-increment: toc; }
.method-toc a { display: block; padding: 0.35rem 0 0.35rem 1rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.method-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--accent); margin-right: 0.6rem; font-variant-numeric: tabular-nums; }
.method-toc a:hover { color: var(--ink); }
.method-body { max-width: 44rem; }
.method-body section { padding: 2.25rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.method-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: 1rem; }
.method-num { display: inline-block; min-width: 2.6rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.method-body p { color: var(--muted); }
.method-body p:last-child { margin-bottom: 0; }
.method-body ul { margin: 0; padding: 0; list-style: none; }
.method-body li { position: relative; margin: 0 0 1rem; padding-left: 1.25rem; color: var(--muted); }
.method-body li:last-child { margin-bottom: 0; }
.method-body li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.4rem; height: 1px; background: var(--accent); }
.method-body li strong { color: var(--ink); font-weight: 600; }
.method-body > section > p + ul, .method-body ul + p { margin-top: 1rem; }
.about-body > section:first-child { border-top: none; padding-top: 0; }
.about-body { max-width: none; }
.about-body h2 { margin-bottom: 1rem; }
@media (min-width: 760px) {
  .about-body > section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 3rem; }
  .about-body h2 { margin: 0; }
}
.method-bench { margin-top: 1.75rem; }
.method-bench h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.method-bench .method-facts { margin-bottom: 0; }
.method-facts { margin: 0 0 2.5rem; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.method-facts div { display: grid; gap: 0.25rem 1.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--rule); }
.method-facts div:first-child { border-top: none; }
.method-facts dt { color: var(--eyebrow); font-size: 0.9rem; font-weight: 500; }
.method-facts dd { margin: 0; color: var(--ink); }
@media (min-width: 600px) {
  .method-facts div { grid-template-columns: 9rem minmax(0, 1fr); }
}
@media (min-width: 960px) {
  .method { grid-template-columns: 13rem minmax(0, 1fr); gap: 4rem; }
  .method-toc { position: sticky; top: 1.5rem; align-self: start; }
}

/* Methodology page: a document layout. The <html class="method-page">
   element scopes these rules, so other pages do not change. */
:root.method-page .doc-head { border-bottom: none; padding-top: clamp(1.5rem, 4vw, 2.75rem); padding-bottom: 0; }
:root.method-page .doc-head .lede { margin-bottom: 2.5rem; }
:root.method-page .doc-contents { padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
:root.method-page .doc-contents h2 { font-size: 0.9rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.75rem; }
:root.method-page .doc-contents ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-size: 0.9rem; }
:root.method-page .doc-contents a, .doc-bar-menu a { color: var(--muted); text-decoration: none; }
:root.method-page .doc-contents a:hover, .doc-bar-menu a:hover { color: var(--ink); text-decoration: underline; }
:root.method-page .doc-contents a[aria-current="true"], .doc-bar-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }
:root.method-page .doc-toc-title { display: none; }
:root.method-page .doc-body { padding-top: 0; }
:root.method-page .doc-main > section { padding: 2.25rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 3rem; }
:root.method-page .doc-main > section > * { max-width: 52rem; }
:root.method-page .doc-main > section:last-child { border-bottom: none; padding-bottom: 0; }
:root.method-page .doc-main h2 { font-size: clamp(1.45rem, 2.6vw, 1.75rem); margin: 0 0 1rem; }
:root.method-page .doc-main h3 { font-size: 1.15rem; margin: 1.75rem 0 0.6rem; }
:root.method-page .doc-main p, :root.method-page .doc-main li { color: var(--muted); }
:root.method-page .doc-main p:last-child { margin-bottom: 0; }
:root.method-page .doc-main strong { color: var(--ink); font-weight: 600; }
:root.method-page .doc-main .section-lead { color: var(--ink); font-size: 1.15rem; font-weight: 500; margin: -0.35rem 0 1rem; }
:root.method-page .doc-main ol, :root.method-page .doc-main ul { margin: 0 0 1rem; padding-left: 1.5rem; }
:root.method-page .doc-main li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
:root.method-page .doc-main li::marker { color: var(--accent); }
@media (max-width: 480px) {
  :root.method-page .doc-contents ol { display: block; }
  :root.method-page .doc-contents li { margin-bottom: 0.35rem; }
}
/* Phones: the Contents list is a card of rows that are easy to tap. */
@media (max-width: 620px) {
  :root.method-page .doc-contents { margin: 0.25rem 0 0.5rem; padding: 0.9rem 1.1rem 0.25rem; border: 1px solid var(--panel-rule, var(--rule)); border-radius: 14px; background: var(--panel, var(--cta-bg)); }
  :root.method-page .doc-contents h2 { font-size: 0.95rem; color: var(--ink); margin: 0 0 0.2rem; }
  :root.method-page .doc-contents ol { display: block; font-size: 1rem; }
  :root.method-page .doc-contents li { margin: 0; border-top: 1px solid var(--panel-rule, var(--rule)); }
  :root.method-page .doc-contents li:first-child { border-top: none; }
  :root.method-page .doc-contents ol a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; color: var(--ink); }
  :root.method-page .doc-contents ol a::after { content: "\2192"; margin-left: auto; color: var(--muted); }
}

/* Wide windows: the Contents list is a column at the left. It stays in view
   and marks the current section. The section bar is not necessary. */
@media (min-width: 1000px) {
  :root.method-page .doc-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 3rem; }
  :root.method-page .doc-contents {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2.25rem 0 1.5rem;
    border: none;
  }
  :root.method-page .doc-toc-title { display: block; margin: 0 0 1rem; font-size: 0.95rem; font-weight: 600; }
  :root.method-page .doc-toc-title a { color: var(--ink); text-decoration: none; }
  :root.method-page .doc-toc-title a:hover { text-decoration: underline; }
  :root.method-page .doc-contents h2 { display: none; }
  :root.method-page .doc-contents ol { display: block; }
  :root.method-page .doc-contents ol a { display: block; padding: 0.4rem 0 0.4rem 0.9rem; border-left: 2px solid var(--rule); line-height: 1.35; }
  :root.method-page .doc-contents ol a[aria-current="true"] { border-left-color: var(--accent); }
  :root.method-page .doc-contents ol a:focus-visible { outline-offset: 0; }
  :root.method-page .doc-main > section { scroll-margin-top: 0.5rem; }
  :root.method-page .doc-bar { display: none; }
}

/* Methodology section bar, for narrow windows. It stays at the top of the
   window and names the current section. The section name is a button that
   opens the Contents list. assets/methodology.js sets the section and the menu. */
.doc-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.doc-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 1120px;
  height: 3rem;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  font-size: 0.95rem;
  white-space: nowrap;
}
.doc-bar-inner a { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc-bar-inner a:hover { text-decoration: underline; }
.doc-bar-dot { color: var(--muted); }
.doc-bar-section {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.doc-bar-section:hover, .doc-bar-section[aria-expanded="true"] { color: var(--ink); }
.doc-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.doc-bar-section svg { flex: none; width: 0.75rem; height: 0.75rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.doc-bar-section[aria-expanded="true"] svg { transform: rotate(180deg); }
.doc-bar-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}
.doc-bar-menu[hidden] { display: none; }
.doc-bar-menu ol { list-style: none; max-width: 1120px; margin: 0 auto; padding: 0.5rem clamp(16px, 4vw, 40px) 0.75rem; font-size: 0.95rem; }
.doc-bar-menu a { display: block; padding: 0.6rem 0 0.6rem 0.9rem; border-left: 2px solid var(--rule); }
.doc-bar-menu a[aria-current="true"] { border-left-color: var(--accent); }
.doc-bar-menu a:focus-visible { outline-offset: 0; }
@media print { .doc-bar { display: none; } }
/* The scroll reveal fades each section in place. A rise would move a
   section after a Contents link has placed it under the bar. */
:root.method-page.motion .doc-body [data-reveal] { transform: none; }

/* Numbered steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.steps > li {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--atlas);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--atlas);
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.button:hover { text-decoration: underline; }

.button.ghost {
  background: transparent;
  color: var(--ghost-ink);
  border-color: var(--ghost-rule);
}

#site-nav .button { padding: 0.5rem 1rem; color: var(--nav-button-ink); background: transparent; border-color: var(--nav-button-rule); }

/* Status pill */

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* Post list */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
}
.post-list h2, .post-list h3 { font-size: 1.5rem; }
.post-list h2 a, .post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover, .post-list h3 a:hover { text-decoration: underline; }
.post-list time, .post-meta time { color: var(--muted); font-size: 0.95rem; }
.post-list p { color: var(--muted); margin: 0.5rem 0 0; }

.post { max-width: 44rem; }
.post-meta { color: var(--muted); margin-bottom: 2rem; }

/* Environments page */

.jump { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.jump a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }

.env { display: grid; gap: 1.5rem 3rem; scroll-margin-top: 1rem; }
@media (min-width: 900px) {
  .env { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
}
.env h2 { margin-bottom: 0.5rem; font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.env-head { display: flex; align-items: center; gap: 1rem; }
.env-head .env-icon { margin-bottom: 0; flex: none; }
.env-head h2 { margin: 0; }

.env-steps { list-style: none; margin: 0; padding: 0; counter-reset: env; }
.env-steps li { counter-increment: env; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem;
  padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.env-steps li:last-child { border-bottom: 1px solid var(--rule); }
.env-steps li::before { content: counter(env, decimal-leading-zero); font-family: var(--display); font-weight: 600; color: var(--accent); }

/* Definition rows (decisions) */

.decisions {
  border-top: 1px solid var(--rule);
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  font-size: 0.98rem;
}
.decisions strong { font-weight: 600; }

/* CTA band */

.cta-band p { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.3; max-width: 40rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-bottom: 1rem; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 0.4rem; }

/* Mobile nav: hiding is scoped to .js so content works without JS */

@media (max-width: 759px) {
  .menu-toggle { display: block; }

  .js .site-header { flex-wrap: wrap; }
  .js #site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.5rem;
  }
  .js #site-nav a { padding: 0.6rem 0; }
  .js #site-nav a.button { padding: 0.5rem 1rem; }
  .js .site-header.open #site-nav { display: flex; }
  .js .site-header.open #site-nav .button { margin-top: 0.5rem; }
  .js #site-nav .theme-toggle { display: inline-flex; gap: 0.5rem; width: auto; height: auto; margin-top: 0.75rem; padding: 0.45rem 0.9rem; border-radius: 4px; }
  .js #site-nav .theme-toggle-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; }
}

/* Load and scroll motion. The .motion class is set in the head only when
   motion is allowed, so without it (no JavaScript, reduced motion, ?t= frames)
   nothing is ever hidden. Opacity and transform only. */
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 26px, 0); } }
@keyframes settle-in { from { opacity: 0; transform: scale(.955); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes recede { to { opacity: .3; transform: translate3d(0, 56px, 0) scale(.975); } }
.motion .site-header { animation: fade-in .9s ease-out both; }
.motion .hero-copy > *, .motion .hero:not(.hero-network) > *, .motion .post > * {
  animation: rise-in 1.1s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 95ms + 60ms);
}
.motion :is(.hero-copy, .hero, .post) > :nth-child(2) { --i: 1; }
.motion :is(.hero-copy, .hero, .post) > :nth-child(n+3) { --i: 2; }
.motion .hero-copy > :nth-child(4) { --i: 3; }
.motion #network { animation: settle-in 1.6s var(--ease-out) .15s both; }
.motion [data-reveal] { opacity: 0; transform: translate3d(0, 30px, 0); will-change: opacity, transform; }
.motion [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform 1.15s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 85ms);
}
@media (max-width: 759px) {
  .motion [data-reveal].is-in { transition-delay: 0ms; }
}
@supports (animation-timeline: view()) {
  .motion .hero-network .hero-copy, .motion .hero-network .visual {
    animation: recede linear both;
    animation-timeline: view();
    animation-range: exit 5% exit 95%;
  }
}

.note { margin-top: 2rem; color: var(--muted); max-width: 44rem; }

main section > p, main article > p, main section > div > p { max-width: 52rem; }
