/* Blockchain Engineering Atlas — "State & Settlement".
   Block-height lanes, state diffs, Merkle paths, and finality checkpoints make
   execution visible without turning the reading surface into an exchange UI. */
:root {
  color-scheme: light dark;
  /* Light mode is an engineering ledger: mineral paper, graphite ink,
     oxidized copper, state teal, and execution blue. */
  --bg: #F3EEE3;
  --bg-2: #EAE2D4;
  --panel: #FFFBF3;
  --panel-2: #F7F0E4;
  --panel-3: #EDE3D2;
  --border: #CFC0AA;
  --border-2: #DED2C0;
  --border-strong: #A99478;
  --fg: #211E19;
  --fg-soft: #403A31;
  --muted: #6D6559;
  --muted-2: #857A6A;
  --accent: #955717;
  --accent-2: #17786F;
  --accent-3: #2367A2;
  --accent-soft: rgba(149, 87, 23, .10);
  --accent-line: rgba(149, 87, 23, .30);
  --cyan: #2367A2;
  --sky: #2367A2;
  --blue: #2367A2;
  --indigo: #4F5DA5;
  --violet: #6C4B96;
  --fuchsia: #913E78;
  --teal: #17786F;
  --emerald: #27754D;
  --amber: #8C5B0B;
  --orange: #A94A2B;
  --rose: #9C3E5B;
  --red: #AE303C;
  --slate: #6D6559;
  --verified: #24734A;
  --warning: #855408;
  --error: #AE303C;
  --shadow-card: 0 1px 2px rgba(65, 49, 27, .08), 0 10px 26px rgba(65, 49, 27, .07);
  --shadow-hover: 0 7px 20px rgba(65, 49, 27, .14);
  --topbar-h: 62px;
  --sidebar-w: 272px;
  --rightrail-w: 250px;
  --radius: 8px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
}

html[data-theme="dark"] {
  --bg: #090D12;
  --bg-2: #0D131A;
  --panel: #111821;
  --panel-2: #101720;
  --panel-3: #17212C;
  --border: #293746;
  --border-2: #22303D;
  --border-strong: #3B4C5D;
  --fg: #E7EDF4;
  --fg-soft: #B8C2CC;
  --muted: #8B99A8;
  --muted-2: #687788;
  --accent: #D8A84E;
  --accent-2: #42C7B9;
  --accent-3: #5DA9FF;
  --accent-soft: rgba(216, 168, 78, .11);
  --accent-line: rgba(216, 168, 78, .30);
  --cyan: #5DA9FF;
  --sky: #5DA9FF;
  --blue: #5DA9FF;
  --indigo: #7E8EFF;
  --violet: #8B7CF6;
  --fuchsia: #C481E8;
  --teal: #42C7B9;
  --emerald: #4CD28A;
  --amber: #E8B75B;
  --orange: #E8905B;
  --rose: #E77A9D;
  --red: #F06D78;
  --slate: #8B99A8;
  --verified: #4CD28A;
  --warning: #E8B75B;
  --error: #F06D78;
  --shadow-card: 0 1px 1px rgba(0, 0, 0, .30), 0 12px 32px rgba(0, 0, 0, .26);
  --shadow-hover: 0 10px 32px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; max-width: 100vw; overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 18px); }
body {
  min-height: 100vh;
  color: var(--fg);
  /* Faint storage-slot columns and block-height rows remain at page edges. */
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--border) 34%, transparent) 1px, transparent 1px) 0 0/64px 100%,
    linear-gradient(color-mix(in srgb, var(--border) 28%, transparent) 1px, transparent 1px) 0 0/100% 32px,
    var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html:not([data-theme="dark"]) body {
  background:
    linear-gradient(90deg, rgba(35, 103, 162, .035) 1px, transparent 1px) 0 0/72px 100%,
    linear-gradient(rgba(149, 87, 23, .045) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(135deg, transparent 0 73%, rgba(23, 120, 111, .025) 73% 73.2%, transparent 73.2%) 0 0/220px 220px,
    radial-gradient(1050px 520px at 14% -8%, rgba(149, 87, 23, .09), transparent 60%),
    var(--bg);
}
html[data-theme="dark"] body {
  background:
    linear-gradient(90deg, rgba(66, 199, 185, .027) 1px, transparent 1px) 0 0/72px 100%,
    linear-gradient(rgba(93, 169, 255, .024) 1px, transparent 1px) 0 0/100% 34px,
    linear-gradient(135deg, transparent 0 73%, rgba(139, 124, 246, .025) 73% 73.2%, transparent 73.2%) 0 0/220px 220px,
    radial-gradient(1100px 560px at 14% -8%, rgba(216, 168, 78, .055), transparent 60%),
    var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 9px 15px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #090D12;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); text-decoration: none; outline: 2px solid var(--fg); }
.content:focus { outline: none; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.main-col { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rightrail-w);
  align-items: start;
}
.app.no-toc .main-row { grid-template-columns: minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 14px 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  z-index: 90;
}
html[data-theme="dark"] .sidebar { background: rgba(19, 27, 36, .97); }
html:not([data-theme="dark"]) .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 251, 243, .98), rgba(247, 240, 228, .97)),
    var(--panel);
}
.sidebar summary { display: flex; list-style: none; cursor: pointer; }
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar-head { display: flex; flex-direction: column; gap: 12px; }
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--fg);
  padding: 4px 5px;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand-title { font-size: 15px; font-weight: 800; color: var(--fg); letter-spacing: 0; }
.brand-sub { margin-top: 2px; font-size: 11px; color: var(--muted); }

.theme-toggle {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}
.theme-toggle:hover { background: var(--panel-3); }
.theme-toggle .label-light,
.theme-toggle .label-dark { display: inline-flex; align-items: center; gap: 7px; }
html[data-theme="dark"] .theme-toggle .label-light { display: none; }
html:not([data-theme="dark"]) .theme-toggle .label-dark { display: none; }
.toggle-pill {
  width: 31px;
  height: 18px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
}
.toggle-pill::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .16s;
}
html[data-theme="dark"] .toggle-pill { background: var(--accent); }
html[data-theme="dark"] .toggle-pill::after { transform: translateX(13px); background: #090D12; }

.sidebar-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sidebar-home,
.sidebar-link,
.nav-child,
.nav-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}
.sidebar-home {
  margin-bottom: 4px;
  color: var(--fg-soft);
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-weight: 750;
}
.sidebar-home:hover,
.sidebar-link:hover,
.nav-child:hover,
.nav-leaf:hover {
  background: var(--panel-3);
  color: var(--fg);
  text-decoration: none;
}
.sidebar-link.active,
.nav-child.active,
.nav-leaf.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section h3 {
  margin: 8px 0 5px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.nav-group,
.nav-branch { border-radius: var(--radius); }
.nav-group > summary,
.nav-branch > summary {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--fg-soft);
  user-select: none;
  font-size: 12.5px;
  font-weight: 720;
}
.nav-group > summary:hover,
.nav-branch > summary:hover { background: var(--panel-3); }
.nav-summary-left,
.nav-summary-right { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.nav-summary-left span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-num {
  display: inline-block;
  min-width: 20px;
  margin-right: 7px;
  font-family: var(--font-mono);
  color: var(--accent);
}
.count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}
.chev { width: 14px; height: 14px; color: var(--muted-2); transition: transform .15s; }
details[open] > summary .chev { transform: rotate(180deg); }
.sec-ico,
.branch-ico { width: 16px; height: 16px; color: var(--muted-2); }
.nav-children,
.nav-leaves {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--border-2);
}
.nav-leaf {
  display: block;
  min-height: 0;
  padding: 5px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.nav-leaf-overview {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
}
.sidebar-footer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 13px 8px 15px;
  border-top: 1px solid var(--border-2);
  background: inherit;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(360px, 620px) auto;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  justify-content: space-between;
}
html[data-theme="dark"] .topbar { background: rgba(22, 24, 29, .92); }
html:not([data-theme="dark"]) .topbar {
  background: color-mix(in srgb, var(--panel) 91%, transparent);
  box-shadow: 0 1px 0 rgba(149, 87, 23, .04);
}
.menu-toggle { display: none !important; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-soft);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--border); background: var(--panel-3); color: var(--fg); }
.search-shell { position: relative; min-width: 0; max-width: 620px; justify-self: center; width: 100%; }
.search-shell input {
  width: 100%;
  height: 39px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
  padding: 0 44px 0 39px;
  outline: 0;
  font: inherit;
  font-size: 13.5px;
}
.search-shell input:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-shell input::placeholder { color: var(--muted-2); }
.search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.search-shell kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.lang-link {
  min-width: 35px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.lang-link:hover { background: var(--panel-3); color: var(--fg); text-decoration: none; }
.lang-link.active { background: var(--accent-soft); color: var(--accent); }
.github-link {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-soft);
  background: var(--panel);
  font-size: 13px;
  font-weight: 700;
}
.github-link:hover { background: var(--panel-3); color: var(--fg); text-decoration: none; }

#search-results {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  left: calc(var(--sidebar-w) + ((100vw - var(--sidebar-w)) / 2));
  transform: translateX(-50%);
  z-index: 120;
  width: min(620px, calc(100vw - var(--sidebar-w) - 48px));
  max-height: 68vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-hover);
}
#search-results[hidden] { display: none; }
#search-results .results-meta,
#search-results .empty {
  padding: 8px 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
#search-results .hit {
  display: block;
  padding: 10px;
  border-radius: 7px;
  color: var(--fg);
}
#search-results .hit:hover,
#search-results .hit.active { background: var(--panel-3); text-decoration: none; }
#search-results .hit strong { display: block; font-size: 13.5px; }
#search-results .hit span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
#search-results .hit p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
#search-results mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }

.content {
  width: 100%;
  max-width: 1220px;
  min-width: 0;
  margin: 0 auto;
  padding: 34px clamp(22px, 4vw, 42px) 58px;
}
.article-home { max-width: 1160px; }
.article-note,
.page-hero,
.breadcrumbs { max-width: 78ch; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-bottom: 12px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs .sep { color: var(--muted-2); }
.page-hero { margin-bottom: 14px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: capitalize;
}
.meta-chip.tag,
.meta-chip[class*="accent-"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.meta-chip.status-fallback { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 42%, var(--border)); }

.home-hero {
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.compiled-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
  gap: 24px 30px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-crumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.home-hero h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}
.hero-subtitle {
  margin: 8px 0 0;
  color: var(--accent-2);
  font-size: 1rem;
  font-weight: 750;
}
.home-hero .lede {
  max-width: 760px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 800;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--sky); border-color: var(--sky); color: var(--bg); }
.btn-ghost { color: var(--fg-soft); background: var(--panel); }
.btn-ghost:hover { background: var(--panel-3); color: var(--fg); }
.btn-atlas-i { color: var(--orange); background: transparent; border-color: var(--border-strong); }
.btn-atlas-i:hover { color: var(--bg); background: var(--orange); border-color: var(--orange); }
.btn-atlas-ii { color: var(--sky); background: transparent; border-color: var(--border-strong); }
.btn-atlas-ii:hover { color: var(--bg); background: var(--sky); border-color: var(--sky); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 860px;
}
.compiled-hero .hero-stats { grid-column: 1 / -1; max-width: none; }
.hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.hero-stat svg { color: var(--accent); }
.hero-stat div { min-width: 0; display: flex; flex-direction: column; }
.hero-stat strong { font-size: 1.2rem; line-height: 1; color: var(--fg); }
.hero-stat span { color: var(--muted); font-size: 12px; font-weight: 650; }

.execution-map {
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  font-family: var(--font-mono);
}
html:not([data-theme="dark"]) .execution-map {
  background:
    linear-gradient(90deg, rgba(35, 103, 162, .035) 1px, transparent 1px) 0 0/38px 100%,
    linear-gradient(rgba(149, 87, 23, .035) 1px, transparent 1px) 0 0/100% 28px,
    var(--panel);
  box-shadow: 0 1px 2px rgba(65, 49, 27, .08), 0 14px 30px rgba(65, 49, 27, .09);
}
.execution-map::before,
.execution-map::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.state-transition-map::after {
  top: 18px;
  bottom: 56px;
  left: auto;
  right: 22px;
  border-color: color-mix(in srgb, var(--violet) 36%, transparent);
}
.trace-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
}
.trace-row strong { color: var(--fg); font-size: 12px; }
.trace-row small { grid-column: 3; color: var(--muted); font-size: 10px; }
.trace-row.finalized { color: var(--accent); }
.trace-index { color: var(--muted-2); font-size: 9px; }
.trace-connector {
  position: relative;
  z-index: 1;
  margin-left: 26px;
  padding-left: 13px;
  border-left: 1px solid var(--accent-3);
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.state-diff {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 16px 12px 46px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 9.5px;
}
.state-diff del { color: var(--error); text-decoration: line-through; }
.state-diff ins { color: var(--verified); text-decoration: none; }
.execution-map::before {
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 4px;
}
.execution-map::after {
  top: 16px;
  bottom: 16px;
  left: 50%;
  border-left: 1px dashed color-mix(in srgb, var(--accent-3) 34%, transparent);
}
.lane {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 16px;
}
.lane-host { color: var(--accent-3); }
.lane-guest { color: var(--accent); }
.lane-label {
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.lane strong { color: var(--fg); font-size: 12px; }
.lane small { color: var(--muted); font-size: 10.5px; }
.boundary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.boundary::before,
.boundary::after { content: ""; height: 1px; flex: 1; background: var(--accent-2); opacity: .5; }
.accelerator-rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px 10px;
  border-top: 1px solid var(--border);
}
.tech-badge,
.roadmap-status,
.bc-status {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tech-badge.gpu,
.tech-badge.npu { color: var(--accent-3); border-color: color-mix(in srgb, var(--accent-3) 50%, var(--border)); }
.tech-badge.host,
.tech-badge.cpu { color: var(--accent-3); border-color: color-mix(in srgb, var(--accent-3) 50%, var(--border)); }
.tech-badge.wasm { color: var(--accent); border-color: var(--accent-line); }
.tech-badge.fallback { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 50%, var(--border)); }
.tech-badge.verified { color: var(--verified); border-color: color-mix(in srgb, var(--verified) 50%, var(--border)); }
.tech-badge.experimental { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 50%, var(--border)); }
.tech-badge.tx,
.tech-badge.evm,
.tech-badge.l2 { color: var(--accent-3); border-color: color-mix(in srgb, var(--accent-3) 50%, var(--border)); }
.tech-badge.l1 { color: var(--accent); border-color: var(--accent-line); }
.tech-badge.testnet,
.tech-badge.local { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 50%, var(--border)); }
.tech-badge.risk { color: var(--error); border-color: color-mix(in srgb, var(--error) 55%, var(--border)); }

.section-eyebrow {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.path-intro,
.reference-panel,
.featured-card,
.branch-card,
.related-card,
.branch-nav-link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.path-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  margin-bottom: 24px;
  border-left: 3px solid var(--accent);
}
.path-intro h2,
.phase-section h2,
.reference-panel h2,
.featured-card h2 {
  margin: 0 0 7px;
  color: var(--fg);
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0;
}
.path-intro p,
.phase-section-head p,
.reference-panel p,
.featured-card p {
  margin: 0;
  color: var(--muted);
}
.path-intro .path-prereq { margin-top: 10px; font-size: 12.5px; }
.path-prereq strong { color: var(--fg-soft); }
.path-intro-cta,
.phs-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}
.path-intro-cta:hover,
.phs-open:hover { color: var(--accent-2); text-decoration: none; }

.branch-card:hover,
.featured-card:hover,
.related-card:hover,
.branch-nav-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  text-decoration: none;
}
.phase-section { margin-bottom: 42px; scroll-margin-top: calc(var(--topbar-h) + 14px); }
.phase-section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.phs-num {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 850;
}
.phs-eyebrow {
  margin-bottom: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.branch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
/* Address-corner brackets hint at bounded memory regions without adding motion. */
.branch-card::before,
.branch-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: color-mix(in srgb, var(--branch) 70%, transparent);
  border-style: solid;
  opacity: 0;
  transition: opacity .15s;
}
.branch-card::before {
  top: -1px;
  left: -1px;
  border-width: 1.5px 0 0 1.5px;
  border-top-left-radius: 3px;
}
.branch-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1.5px 1.5px 0;
  border-bottom-right-radius: 3px;
}
.branch-card:hover::before,
.branch-card:hover::after { opacity: 1; }
.bc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bc-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--branch) 12%, transparent);
  color: var(--branch);
  border: 1px solid color-mix(in srgb, var(--branch) 25%, transparent);
}
.bc-count {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}
.branch-card h3 { margin: 0; color: var(--fg); font-size: 1rem; line-height: 1.25; }
.branch-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.bc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.branch-card.accent-cyan { --branch: var(--cyan); }
.branch-card.accent-sky { --branch: var(--sky); }
.branch-card.accent-blue { --branch: var(--blue); }
.branch-card.accent-indigo { --branch: var(--indigo); }
.branch-card.accent-violet { --branch: var(--violet); }
.branch-card.accent-fuchsia { --branch: var(--fuchsia); }
.branch-card.accent-teal { --branch: var(--teal); }
.branch-card.accent-emerald { --branch: var(--emerald); }
.branch-card.accent-amber { --branch: var(--amber); }
.branch-card.accent-orange { --branch: var(--orange); }
.branch-card.accent-rose { --branch: var(--rose); }
.branch-card.accent-red { --branch: var(--red); }
.branch-card.accent-slate { --branch: var(--slate); }
.branch-card.accent-gold { --branch: var(--accent); }
.branch-card.accent-state { --branch: var(--accent-2); }
.branch-card.accent-execution { --branch: var(--accent-3); }
.branch-card.accent-proof { --branch: var(--violet); }
.branch-card.accent-verified { --branch: var(--verified); }
.branch-card.accent-warning { --branch: var(--warning); }
.branch-card.accent-risk { --branch: var(--error); }

.featured-section { margin-bottom: 36px; }
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  color: inherit;
  border-left: 3px solid var(--violet);
}
.pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--violet) 12%, transparent);
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-row span {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.featured-arrow { color: var(--accent); width: 24px; height: 24px; }
.reference-panel { padding: 22px; margin-bottom: 32px; }
.reference-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.reference-list a {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}
.reference-list a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.continuity-banner {
  padding: 20px 22px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.continuity-banner h2 { margin: 0 0 7px; color: var(--fg); font-size: 1.2rem; }
.continuity-banner p { margin: 0 0 14px; max-width: 70ch; color: var(--muted); }
.atlas-continuity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.atlas-card {
  --atlas-color: var(--muted);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--atlas-color);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.atlas-card.atlas-copper { --atlas-color: var(--orange); }
.atlas-card.atlas-blueprint { --atlas-color: var(--accent-3); }
.atlas-card.atlas-signal { --atlas-color: var(--violet); }
.atlas-card.atlas-ai { --atlas-color: var(--accent-2); }
.atlas-card.atlas-wasm { --atlas-color: var(--verified); }
.atlas-sequence {
  color: var(--atlas-color);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.atlas-card h3 { margin: 6px 0 4px; color: var(--fg); font-size: .98rem; }
.atlas-card p { flex: 1; margin: 0 0 12px; font-size: 12.5px; }
.atlas-card > div { display: flex; flex-wrap: wrap; gap: 14px; }
.atlas-card a { display: inline-flex; align-items: center; gap: 5px; color: var(--atlas-color); font-size: 12px; font-weight: 800; }
.atlas-card a:last-child { color: var(--muted); }
.continuity-cta-row { display: flex; flex-wrap: wrap; gap: 20px; }
.continuity-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--orange);
  font-weight: 800;
}
.continuity-cta:hover { color: var(--accent); text-decoration: none; }
.continuity-cta-ii { color: var(--sky); }
.continuity-cta-ii:hover { color: var(--accent); text-decoration: none; }

.spine-section {
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.spine-section h2 { margin: 0 0 7px; color: var(--fg); font-size: 1.35rem; }
.spine-section > p { margin: 0 0 18px; max-width: 70ch; color: var(--muted); }
.spine-roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.spine-step {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.spine-step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--violet);
}
.spine-step-head svg { width: 18px; height: 18px; }
.spine-version {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}
.roadmap-status { margin-left: auto; color: var(--accent); border-color: var(--accent-line); }
.spine-step h3 { margin: 0 0 4px; color: var(--fg); font-size: .9rem; }
.spine-step dl { display: grid; gap: 9px; margin: 9px 0 12px; }
.spine-step dl div { display: grid; gap: 2px; }
.spine-step dt,
.roadmap-branches > span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.spine-step dd { margin: 0; color: var(--fg-soft); font-size: 12px; line-height: 1.45; }
.roadmap-branches { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: auto; }
.roadmap-branches > span { flex-basis: 100%; }
.roadmap-branches a {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
}
.roadmap-branches a:hover { color: var(--accent); border-color: var(--accent-line); text-decoration: none; }
.spine-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--violet);
  font-weight: 800;
}
.spine-cta:hover { color: var(--accent); text-decoration: none; }

.stability-section,
.platform-section,
.trust-section,
.project-lab-section,
.scope-banner {
  margin-bottom: 34px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.stability-section h2,
.platform-section h2,
.trust-section h2,
.project-lab-section h2 { margin: 0 0 7px; color: var(--fg); font-size: 1.35rem; }
.stability-section > p,
.platform-section > p,
.trust-section > p,
.project-lab-section > p { margin: 0 0 18px; max-width: 72ch; color: var(--muted); }
.scope-banner { padding: 0; overflow: hidden; }
.scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scope-grid article { min-width: 0; padding: 18px; }
.scope-grid article + article { border-left: 1px solid var(--border); }
.scope-grid h2 { margin: 0 0 7px; font-size: .95rem; color: var(--fg); }
.scope-grid p { margin: 0; color: var(--muted); font-size: 12px; }
.safety-ribbon { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--error) 7%, var(--bg-2)); color: var(--fg-soft); font-size: 12px; }
.project-chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.project-chip-grid > span { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-2); color: var(--fg-soft); font-size: 12px; }
.project-chip-grid b { color: var(--accent); font-family: var(--font-mono); font-size: 9px; }
.trust-section { border-left: 3px solid var(--accent-2); }
.stability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stability-card {
  --status-color: var(--muted);
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--status-color);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.stability-card.status-stable { --status-color: var(--verified); }
.stability-card.status-conditional { --status-color: var(--accent-3); }
.stability-card.status-experimental { --status-color: var(--accent-2); }
.stability-card.status-fallback { --status-color: var(--warning); }
.stability-card > span { color: var(--status-color); font-family: var(--font-mono); font-size: 9.5px; font-weight: 900; letter-spacing: .07em; }
.stability-card h3 { margin: 7px 0 5px; color: var(--fg); font-size: .9rem; }
.stability-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.platform-table { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); }
.platform-row { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); }
.platform-row + .platform-row { border-top: 1px solid var(--border); }
.platform-row > * { min-width: 0; padding: 10px 12px; }
.platform-row > :first-child { border-right: 1px solid var(--border); color: var(--fg); }
.platform-row > span { color: var(--muted); }
.platform-head { background: var(--panel-3); color: var(--muted); font-family: var(--font-mono); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }

.bc-status { color: var(--muted); }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.home-footer strong { color: var(--fg); }
.home-footer p { margin: 5px 0 0; max-width: 56ch; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 750; }

.article-note h1 {
  margin: 8px 0 14px;
  color: var(--fg);
  font-size: 2.15rem;
  line-height: 1.12;
  letter-spacing: 0;
}
.article-note h2 {
  margin-top: 2rem;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-size: 1.36rem;
  letter-spacing: 0;
}
.article-note h3 { margin-top: 1.5rem; color: var(--fg); font-size: 1.06rem; }
.article-note p,
.article-note li { color: var(--fg-soft); }
.article-note p { margin: 1rem 0; }
.article-note ul,
.article-note ol { padding-left: 1.35rem; }
.article-note blockquote {
  margin: 1.1rem 0;
  padding: 10px 13px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}
.article-note code {
  padding: 1px 5px;
  border: 1px solid var(--border-2);
  border-radius: 5px;
  background: var(--bg-2);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: .92em;
}
.article-note pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.article-note pre code { padding: 0; border: 0; background: transparent; }
.article-note pre:has(code.language-wat) { border-top: 2px solid var(--accent); }
.article-note pre:has(code.language-rust) { border-top: 2px solid var(--orange); }
.article-note pre:has(code.language-c),
.article-note pre:has(code.language-cpp) { border-top: 2px solid var(--accent-3); }
.article-note pre:has(code.language-typescript),
.article-note pre:has(code.language-ts) { border-top: 2px solid var(--amber); }
.article-note pre:has(code.language-wgsl) { border-top: 2px solid var(--violet); }
.article-note pre:has(code.language-wit) { border-top: 2px solid var(--verified); }
.article-note code[class*="language-"]::before {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-note code.language-wat::before { content: "WAT"; }
.article-note code.language-rust::before { content: "RUST"; }
.article-note code.language-c::before { content: "C"; }
.article-note code.language-cpp::before { content: "C++"; }
.article-note code.language-typescript::before,
.article-note code.language-ts::before { content: "TYPESCRIPT"; }
.article-note code.language-wgsl::before { content: "WGSL"; }
.article-note code.language-wit::before { content: "WIT"; }
.article-note table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  font-size: .93rem;
}
.article-note th,
.article-note td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.article-note th { background: var(--panel-2); color: var(--fg); }
.unresolved-link { color: var(--red); border-bottom: 1px dashed var(--red); }
.translation-pending {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
}

.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--topbar-h) - 24px);
  overflow-y: auto;
  padding: 24px 20px;
  border-left: 1px solid var(--border);
  color: var(--muted);
}
.toc h2 {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.toc a {
  display: block;
  padding: 5px 0 5px 10px;
  border-left: 1px solid var(--border-2);
  color: var(--muted);
  font-size: 12.5px;
}
.toc a:hover { border-left-color: var(--accent); color: var(--accent); text-decoration: none; }
.toc-level-3 { padding-left: 22px !important; font-size: 12px !important; }
.back-to-top { margin-top: 10px; font-family: var(--font-mono); }
.branch-nav,
.related-notes {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.branch-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.branch-nav-link,
.related-card {
  display: block;
  padding: 13px;
  color: inherit;
}
.branch-nav-link span,
.related-card span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 4px;
}
.branch-nav-link strong,
.related-card strong { color: var(--fg); }
.branch-nav-link.next { text-align: right; }
.related-notes h2 {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 1.15rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.related-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1180px) {
  :root { --sidebar-w: 248px; }
  .branch-grid,
  .spine-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-row { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 780px) {
  :root { --topbar-h: 105px; }
  .app { display: block; }
  .main-col { display: block; }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    height: var(--topbar-h);
    padding: 9px 12px 11px;
    gap: 8px;
  }
  .menu-toggle { display: grid !important; grid-column: 1; grid-row: 1; }
  .topbar-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .topbar-actions { grid-column: 3; grid-row: 1; }
  .github-link { width: 36px; padding: 0; justify-content: center; }
  .gh-label { display: none; }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 330px);
    height: 100dvh;
    max-height: 100dvh;
    z-index: 140;
    box-shadow: 18px 0 42px rgba(0,0,0,.28);
  }
  body.nav-open .sidebar { display: flex; }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(4, 9, 18, .48);
    backdrop-filter: blur(2px);
  }
  #search-results {
    left: 12px;
    right: 12px;
    top: calc(var(--topbar-h) + 8px);
    transform: none;
    width: auto;
  }
  .content { padding: 24px 16px 46px; max-width: 100vw; }
  .article-home,
  .article-note,
  .page-hero,
  .breadcrumbs { max-width: none; }
  .home-hero h1 { font-size: 2.25rem; }
  .home-hero .lede { font-size: 1rem; }
  .compiled-hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-intro { grid-template-columns: 1fr; padding: 18px; }
  .phase-section-head { grid-template-columns: auto minmax(0, 1fr); }
  .phs-open { grid-column: 1 / -1; justify-self: start; }
  .branch-grid,
  .spine-roadmap,
  .project-chip-grid,
  .related-grid,
  .branch-nav { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }
  .scope-grid article + article { border-left: 0; border-top: 1px solid var(--border); }
  .branch-nav-link.next { text-align: left; }
}

@media (max-width: 520px) {
  .content { padding: 20px 13px 42px; }
  .search-shell kbd { display: none; }
  .search-shell input { padding-right: 14px; }
  .home-hero h1 { font-size: 1.9rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .atlas-continuity-grid,
  .stability-grid { grid-template-columns: 1fr; }
  .execution-map { padding: 10px; }
  .platform-row { grid-template-columns: 1fr; }
  .platform-row > :first-child { border-right: 0; border-bottom: 1px solid var(--border); }
  .platform-head { display: none; }
  .stability-section,
  .platform-section,
  .trust-section,
  .project-lab-section,
  .spine-section { padding: 18px; }
  .cta-row { flex-direction: column; }
  .btn { width: 100%; }
  .phase-section-head { gap: 10px; }
  .phs-num { width: 42px; height: 42px; }
  .featured-card { grid-template-columns: 1fr; }
}
