:root {
  color-scheme: dark;
  --page: #101812;
  --surface: #17231a;
  --scene: #111c15;
  --line: #3b4b3d;
  --ink: #f2f5ea;
  --muted: #bbc9b9;
  --mint: #c7f57b;
  --lilac: #d6c7ff;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.62 system-ui, sans-serif; }
::selection { background: var(--mint); color: var(--page); }
a { color: inherit; text-underline-offset: .28em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 56px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: 12px; padding: 8px 14px; background: var(--page); transform: translateY(-150%); }
.skip:focus { transform: none; }
header, footer { border-block-end: 1px solid var(--line); }
.site-nav, .footer-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font: 750 1.12rem var(--mono); text-decoration: none; }
.brand span { width: 26px; height: 26px; border-radius: 6px; background: var(--mint); display: grid; place-items: center; }
.brand span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #132016; }
.nav-links, .actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nav-links a { font-size: .94rem; color: var(--muted); }
.nav-links a:hover, .source:hover { color: var(--ink); }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 760; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
h1 { font-size: clamp(3rem, 6.25vw, 5.8rem); }
h1 em { color: var(--mint); font-style: normal; }
h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
.hero { display: grid; grid-template-columns: .91fr 1.09fr; align-items: center; gap: clamp(25px, 5vw, 76px); padding-block: clamp(60px, 8vw, 113px); }
.hero > *, .chapter-inner > *, .setup-inner > * { min-width: 0; }
.hero-copy p, .chapter-copy p, .setup p { color: var(--muted); margin-top: 17px; max-width: 52ch; }
.hero-copy p { font-size: clamp(1rem, 1.4vw, 1.17rem); }
.actions { margin-top: 25px; }
.primary { display: inline-flex; align-items: center; min-height: 46px; padding-inline: 17px; border-radius: 7px; background: var(--mint); color: var(--page); font-weight: 750; text-decoration: none; }
.primary:hover { background: #ddffa6; }
.source { display: inline-block; color: var(--mint); font-weight: 650; }
.chapter-copy .source, .setup .source { margin-top: 17px; }
.chapter { border-top: 1px solid var(--line); }
.chapter:nth-of-type(odd) { background: var(--surface); }
.chapter-inner { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(30px, 6vw, 96px); padding-block: clamp(51px, 7vw, 90px); }
.chapter:nth-of-type(odd) .chapter-copy { order: 2; }
.chapter:nth-of-type(odd) .chapter-inner { grid-template-columns: 1.15fr .85fr; }
.scene { margin: 0; overflow: hidden; background-color: var(--scene); background-image: radial-gradient(#364736 1px, transparent 1px); background-size: 17px 17px; border: 1px solid #455a43; border-radius: 13px; }
.scene-hero { border-color: #6c8554; box-shadow: 0 17px 40px #050d0860; }
.scene figcaption, .command-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 54px; padding: 6px 14px; gap: 6px 12px; background: #1c291d; border-bottom: 1px solid var(--line); color: var(--muted); font: .89rem/1.3 var(--mono); }
.motion-control, .copy { min-height: 34px; border: 1px solid #62765d; border-radius: 6px; padding: 5px 9px; color: var(--ink); background: #243524; font-size: .85rem; }
.motion-control:hover, .copy:hover { border-color: var(--mint); color: var(--mint); }
.scene svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
.scene svg text { fill: var(--ink); }
.scene svg .axis { fill: var(--muted); font-size: 15px; letter-spacing: .035em; }
.scene svg .note, .scene svg .node-sub { fill: var(--muted); font-size: 15px; }
.scene svg .node-label { font-size: 17px; font-weight: 700; }
.scene svg .tool-label { font-size: 15px; }
.diagram-node rect, .editor { fill: #1d2d22; stroke: #546c55; stroke-width: 1.5; }
.diagram-node.mint rect { fill: #26381f; stroke: #98c16b; }
.diagram-node.lilac rect { fill: #2b273a; stroke: #8d7eb1; }
.route, .trail { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route { stroke: #688264; stroke-width: 2; }
.route.soft { stroke: #526451; stroke-dasharray: 4 6; }
.trail { stroke: currentColor; stroke-width: 3.5; stroke-dasharray: 1; stroke-dashoffset: 1; visibility: hidden; }
.packet { fill: currentColor; visibility: hidden; }
.scene[data-motion] .trail, .scene[data-motion] .packet { visibility: visible; }
.mint { color: var(--mint); }
.lilac { color: var(--lilac); }
.packet-halo { fill: none; stroke: currentColor; opacity: .45; }
.packet-paper { stroke: #172114; stroke-width: 1.3; paint-order: fill stroke; }
.scene svg .removed { fill: #ffc1bd; font-size: 17px; }
.scene svg .added { fill: var(--mint); font-size: 17px; }
.insert { fill: #2d4829; }
.setup { border-block: 1px solid var(--line); }
.setup-inner { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(26px, 5vw, 72px); padding-block: 67px; }
.commands { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0e1611; }
.commands pre { margin: 0; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: .88rem/1.8 var(--mono); }
footer { border-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 800px) {
  .hero, .chapter-inner, .chapter:nth-of-type(odd) .chapter-inner, .setup-inner { grid-template-columns: 1fr; }
  .chapter:nth-of-type(odd) .chapter-copy { order: 0; }
  .hero { padding-block: 45px; }
  .chapter-inner, .setup-inner { padding-block: 49px; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 34px); }
  .site-nav, .footer-inner { gap: 12px; min-height: 61px; }
  .nav-links, .actions { gap: 11px; }
  .nav-links a { font-size: .82rem; }
  .site-nav a[href="#sync"] { display: none; }
  .footer-inner { flex-wrap: wrap; padding-block: 12px; }
  .scene figcaption { font-size: .8rem; padding-inline: 9px; }
  .motion-control { font-size: .78rem; }
  .chapter-inner { gap: 22px; }
}

