:root {
  color-scheme: light dark;
  --canvas: #e9edeb;
  --surface: #f4f6f3;
  --surface-strong: #dfe5e1;
  --ink: #171918;
  --body: #303633;
  --muted: #626b66;
  --line: #c2cac5;
  --line-strong: #7f8b85;
  --ember: #d94714;
  --ember-solid: #ae340d;
  --accent-on-inverse: #ff9b70;
  --ember-soft: #f3d5c8;
  --aqua: #167b81;
  --success: #187344;
  --warning: #9a5a08;
  --danger: #a9342a;
  --inverse: #171918;
  --inverse-text: #edf1ee;
  --radius: 3px;
  --radius-small: 2px;
  --container: 1320px;
  --reading: 920px;
  --gutter: clamp(18px, 3vw, 48px);
  --font: "Avenir Next", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Arial Narrow", "Avenir Next Condensed", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111312;
    --surface: #191c1a;
    --surface-strong: #242925;
    --ink: #edf1ee;
    --body: #cbd2cd;
    --muted: #8f9a94;
    --line: #343b37;
    --line-strong: #69736d;
    --ember: #f15a24;
    --ember-solid: #ae340d;
    --accent-on-inverse: #992d0c;
    --ember-soft: #4b281c;
    --aqua: #55aeb1;
    --success: #55af7c;
    --warning: #d6a353;
    --danger: #e77b71;
    --inverse: #edf1ee;
    --inverse-text: #171918;
  }
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

.reading-progress {
  display: none;
}

@keyframes reading-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@supports (animation-timeline: scroll()) {
  .reading-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: block;
    height: 3px;
    background: var(--ember);
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
    animation: reading-progress linear both;
    animation-timeline: scroll(root block);
  }
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--ember) 54%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ember);
}

button,
input {
  font: inherit;
}

code,
pre {
  font-family: var(--mono);
}

code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ember) 70%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -70px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-small);
  background: var(--inverse);
  color: var(--inverse-text);
}

.skip-link:focus {
  top: 18px;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 70px;
  padding: 10px max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.visual-capture .topbar,
.visual-capture .toc {
  position: static;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.08;
  text-decoration: none;
}

.brand-mark::before {
  content: "";
  flex: 0 0 auto;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 9px;
  background: url("zhulong-icon.png") center / cover no-repeat;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.button,
.copy-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.copy-control:hover {
  border-color: var(--ember);
  background: var(--ember-soft);
  color: var(--ink);
}

.button:active,
.copy-control:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--ember-solid);
  background: var(--ember-solid);
  color: #f7f4ef;
}

.button.primary:hover {
  background: color-mix(in srgb, var(--ember) 86%, var(--ink));
  color: #f7f4ef;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  min-height: min(700px, calc(100dvh - 118px));
  padding: clamp(54px, 7vw, 92px) max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.hero h1,
.page-title h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(46px, 6.5vw, 88px);
  font-weight: 820;
  line-height: .98;
}

.hero p,
.page-title > p:last-child {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-emblem {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shift-x: 0px;
  --shift-y: 0px;
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 500px);
}

.hero-emblem::before {
  content: "";
  position: absolute;
  left: -22px;
  bottom: -22px;
  width: 44%;
  height: 44%;
  background: var(--ember);
  z-index: 0;
}

.hero-emblem img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18%;
  box-shadow: 22px 26px 0 color-mix(in srgb, var(--ink) 12%, transparent);
  transform: perspective(900px) translate3d(var(--shift-x), var(--shift-y), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 420ms cubic-bezier(.16, 1, .3, 1), box-shadow 420ms ease;
  will-change: transform;
}

.hero-emblem:hover img {
  box-shadow: 26px 30px 0 color-mix(in srgb, var(--ink) 15%, transparent);
}

.proof-strip {
  padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: var(--container);
  margin: 0 auto;
}

.metric {
  min-width: 0;
  min-height: 126px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
}

.metric:first-child {
  border-left: 1px solid var(--line);
}

.metric strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.page-title {
  position: relative;
  min-height: 390px;
  padding: clamp(58px, 8vw, 110px) max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.page-title::after {
  content: "";
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--container)) / 2));
  top: 50%;
  width: min(26vw, 280px);
  aspect-ratio: 1;
  border-radius: 18%;
  background: url("zhulong-icon.png") center / cover no-repeat;
  opacity: .24;
  transform: translateY(-50%) rotate(4deg);
}

.page-title > * {
  position: relative;
  z-index: 1;
  max-width: 840px;
}

.page-title h1 {
  max-width: 760px;
  font-size: clamp(44px, 6vw, 76px);
}

.section {
  padding: clamp(64px, 8vw, 112px) max(var(--gutter), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
}

.section.alt {
  background: var(--surface);
}

.section-header {
  max-width: 780px;
  margin-bottom: clamp(30px, 5vw, 54px);
}

.section-header h2,
.page-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 790;
  line-height: 1.05;
}

.section-header p,
.page-section p {
  max-width: 68ch;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.grid,
.visual-grid,
.signal-board,
.artifact-grid,
.command-catalog,
.tutorial-steps,
.control-bento,
.story-stack {
  display: grid;
  gap: 14px;
}

.grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.grid > * {
  grid-column: span 4;
}

.grid:not(.two):not(.four) > :nth-child(3n + 1) {
  grid-column: span 5;
}

.grid:not(.two):not(.four) > :nth-child(3n + 2) {
  grid-column: span 4;
}

.grid:not(.two):not(.four) > :nth-child(3n) {
  grid-column: span 3;
}

.grid:not(.two):not(.four) > :last-child:nth-child(3n + 1) {
  grid-column: span 12;
}

.grid.two > * {
  grid-column: span 6;
}

.grid.four > :nth-child(4n + 1),
.grid.four > :nth-child(4n) {
  grid-column: span 7;
}

.grid.four > :nth-child(4n + 2),
.grid.four > :nth-child(4n + 3) {
  grid-column: span 5;
}

.visual-grid,
.signal-board,
.artifact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
  gap: 28px;
  align-items: start;
}

.panel,
.visual-card,
.command-card,
.tutorial-step,
.artifact,
.signal,
.story-row,
.callout,
.comparison {
  min-width: 0;
  border-top: 2px solid var(--line-strong);
  background: transparent;
}

.panel,
.command-card,
.visual-card {
  overflow: hidden;
}

.panel-pad,
.signal,
.artifact {
  padding: 20px 2px 4px;
}

.panel h3,
.command-card h3,
.tutorial-step h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 720;
}

.panel p,
.panel li,
.signal span,
.visual-card figcaption,
td,
.detail-list dd {
  color: var(--muted);
}

.panel:hover,
.command-card:hover,
.visual-card:hover {
  border-top-color: var(--ember);
}

.visual-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-strong);
}

.visual-card figcaption {
  padding: 14px 2px;
}

.visual-card.wide {
  grid-column: 1 / -1;
}

.control-bento {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.control-card {
  position: relative;
  grid-column: span 6;
  min-height: 190px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.control-card.wide {
  grid-column: 1 / -1;
  min-height: 210px;
  background: var(--inverse);
  color: var(--inverse-text);
}

.control-card:nth-child(3n + 2) {
  grid-column: span 5;
  border-color: color-mix(in srgb, var(--ember) 45%, var(--line));
}

.control-card:nth-child(3n) {
  grid-column: span 7;
  background: color-mix(in srgb, var(--ember-soft) 55%, var(--surface));
}

.control-card h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 760;
}

.control-card.wide h3,
.control-card.wide p,
.control-card.wide code,
.control-card.wide .pane-label {
  color: var(--inverse-text);
}

.control-card p {
  margin: 0;
  color: var(--muted);
}

.control-card code {
  color: var(--ink);
  font-size: 12px;
}

.command-bento,
.architecture-bento {
  margin-top: 14px;
}

.story-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
}

.story-row strong,
.artifact code,
.signal strong {
  color: var(--ember);
  overflow-wrap: anywhere;
}

.story-row p {
  margin: 0;
}

.comparison {
  border-top-color: var(--ink);
}

.comparison-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.1fr);
  border-bottom: 1px solid var(--line);
}

.comparison-row > * {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.comparison-row > *:last-child {
  border-right: 0;
}

.comparison-row:first-child {
  background: var(--inverse);
  color: var(--inverse-text);
}

.comparison-row:first-child > * {
  color: var(--inverse-text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.diagram {
  display: grid;
  gap: 0;
}

.node {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.node:last-child {
  border-bottom: 0;
}

.node strong {
  color: var(--ink);
}

.route-map {
  max-width: var(--container);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.route-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.status-pill,
.tag,
.command-card .tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.stage-flow {
  --columns: 5;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.command-flow {
  --columns: 9;
}

.architecture-flow {
  --columns: 5;
}

.product-flow {
  --columns: 6;
}

.stage-flow code {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 66px;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  text-align: center;
}

.stage-flow code:first-child {
  border-left: 1px solid var(--line);
}

@keyframes flow-node-in {
  0% {
    opacity: .42;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stage-flow.is-running code {
  animation: flow-node-in 480ms cubic-bezier(.16, 1, .3, 1) both;
}

.stage-flow.is-running code:nth-child(2) { animation-delay: 70ms; }
.stage-flow.is-running code:nth-child(3) { animation-delay: 140ms; }
.stage-flow.is-running code:nth-child(4) { animation-delay: 210ms; }
.stage-flow.is-running code:nth-child(5) { animation-delay: 280ms; }
.stage-flow.is-running code:nth-child(6) { animation-delay: 350ms; }
.stage-flow.is-running code:nth-child(7) { animation-delay: 420ms; }
.stage-flow.is-running code:nth-child(8) { animation-delay: 490ms; }
.stage-flow.is-running code:nth-child(9) { animation-delay: 560ms; }

.stage-flow code.active,
.stage-flow code:first-child {
  background: var(--ember-solid);
  color: #f7f4ef;
}

.pane-label {
  color: var(--aqua);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.file-tree {
  display: grid;
  gap: 5px;
  padding: 20px;
  border-left: 3px solid var(--ember);
  background: color-mix(in srgb, var(--inverse) 96%, var(--ember));
}

.file-tree code {
  display: block;
  color: var(--inverse-text);
}

.file-tree code.accent {
  color: var(--accent-on-inverse);
}

.file-tree code.indent {
  padding-left: 18px;
  color: color-mix(in srgb, var(--inverse-text) 66%, transparent);
}

.code-block,
.terminal-card {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--inverse) 80%, transparent);
  border-left: 4px solid var(--ember);
  border-radius: var(--radius-small);
  background: var(--inverse);
  padding: 18px 50px 18px 18px;
  color: var(--inverse-text);
  font-size: 12px;
  line-height: 1.65;
}

.copy-control {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: color-mix(in srgb, var(--inverse-text) 28%, transparent);
  color: var(--inverse-text);
}

.copy-control:hover {
  background: var(--ember-solid);
  color: #f7f4ef;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: transparent;
  contain: inline-size;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--ink);
  background: var(--surface-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px var(--gutter) 100px;
}

.doc-layout > *,
.page-section,
.panel,
.command-body > *,
.detail-list,
.detail-list dd,
.artifact {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100dvh - 116px);
  overflow-y: auto;
  padding: 0 20px 0 0;
  border-right: 1px solid var(--line);
}

.toc::before {
  content: "目录";
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.toc a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover,
.toc a.is-active {
  border-left-color: var(--ember);
  color: var(--ink);
}

.page-section {
  margin: 0;
  padding: 34px 0 52px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.page-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.page-section h2 {
  font-size: clamp(28px, 3.5vw, 44px);
}

.page-section h3 {
  margin: 28px 0 12px;
  color: var(--ink);
  font-size: 18px;
}

.command-catalog {
  grid-template-columns: 1fr;
}

.command-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.command-card:target {
  border-left-color: var(--ember);
}

.command-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.command-card h3 {
  margin: 0;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 15px;
}

.command-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.tutorial-step {
  position: relative;
  padding: 20px 0 20px 48px;
  counter-increment: tutorial;
}

.tutorial-steps {
  counter-reset: tutorial;
}

.tutorial-step::before {
  content: counter(tutorial);
  position: absolute;
  left: 0;
  top: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--ember);
  color: #f7f4ef;
  font-family: var(--mono);
}

.tutorial-step p {
  margin: 0 0 12px;
}

.callout {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--warning) 50%, var(--line));
  border-left: 4px solid var(--warning);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  color: var(--body);
}

.signal-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal {
  display: grid;
  grid-template-columns: minmax(160px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.dashboard-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.footer {
  padding: 28px max(var(--gutter), calc((100vw - var(--container)) / 2)) 40px;
  border-top: 3px solid var(--ember);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms cubic-bezier(.16, 1, .3, 1), transform 520ms cubic-bezier(.16, 1, .3, 1);
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 56px;
  }

  .hero-emblem {
    justify-self: start;
    width: min(82vw, 460px);
  }

  .page-title {
    min-height: 340px;
  }

  .page-title::after {
    right: -24px;
    width: 230px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .metric:last-child {
    grid-column: 1 / -1;
    border-left: 1px solid var(--line);
  }

  .grid,
  .grid.two,
  .grid.four,
  .control-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid > *,
  .grid.two > *,
  .grid.four > *,
  .grid:not(.two):not(.four) > :nth-child(n),
  .control-card,
  .control-card:nth-child(n) {
    grid-column: span 1;
  }

  .control-card.wide,
  .control-card.wide:nth-child(n),
  .grid:not(.two):not(.four) > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .doc-layout {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .toc {
    position: static;
    display: flex;
    gap: 6px;
    max-height: none;
    padding: 0 0 16px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .toc::before {
    display: none;
  }

  .toc a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
  }

  .toc a:hover,
  .toc a.is-active {
    border-color: var(--ember);
  }

  .split-feature,
  .artifact-grid,
  .signal-board,
  .visual-grid {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr);
  }

  .command-flow {
    --columns: 3;
  }

  .architecture-flow,
  .product-flow {
    --columns: 3;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .brand-mark {
    font-size: 15px;
  }

  .brand-mark::before {
    width: 34px;
  }

  .hero h1,
  .page-title h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero-emblem {
    width: calc(100% - 18px);
  }

  .hero-emblem img {
    box-shadow: 14px 16px 0 color-mix(in srgb, var(--ink) 12%, transparent);
  }

  .metric-strip,
  .grid,
  .grid.two,
  .grid.four,
  .control-bento {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric:first-child,
  .metric:last-child {
    grid-column: auto;
    min-height: 96px;
    border-left: 1px solid var(--line);
  }

  .grid > *,
  .grid.two > *,
  .grid.four > *,
  .grid:not(.two):not(.four) > :nth-child(n),
  .control-card,
  .control-card:nth-child(n),
  .control-card.wide,
  .control-card.wide:nth-child(n) {
    grid-column: 1;
  }

  .control-card {
    min-height: 0;
    padding: 22px;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-row > * {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .comparison-row > *:last-child {
    border-bottom: 0;
  }

  .story-row,
  .detail-list div,
  .signal {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .route-map-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-flow,
  .architecture-flow,
  .product-flow {
    --columns: 1;
  }

  .stage-flow code,
  .stage-flow code:first-child {
    min-height: 52px;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .page-title::after {
    opacity: .09;
  }

  .page-section {
    padding-bottom: 40px;
  }
}

.build-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .76rem;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal-ready {
    opacity: 1;
    transform: none;
  }

  .reading-progress {
    display: none;
  }

  .hero-emblem img,
  .stage-flow code {
    transform: none;
  }
}
