@font-face {
  font-family: "Inter";
  src: url("./fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src: url("./fonts/CrimsonPro-Variable.woff2") format("woff2-variations"),
    url("./fonts/CrimsonPro-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src: url("./fonts/CrimsonPro-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #edf2f9;
  --ink: #121722;
  --ink-soft: #333b49;
  --muted: #667080;
  --line: #dbe1ea;
  --line-strong: #bfc8d5;
  --blue: #3881f6;
  --blue-deep: #1e5fca;
  --blue-soft: #eaf2ff;
  --green: #247a60;
  --green-soft: #e8f5ef;
  --amber: #8b5308;
  --amber-soft: #fff3dc;
  --red: #b63f45;
  --red-soft: #fdecef;
  --code: #101722;
  --code-ink: #e8eef8;
  --shadow: 0 18px 48px rgba(28, 42, 66, 0.09);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1180px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b1018;
  --surface: #111823;
  --surface-raised: #151e2b;
  --surface-soft: #182230;
  --ink: #f3f6fa;
  --ink-soft: #d4dae3;
  --muted: #98a3b2;
  --line: #273345;
  --line-strong: #3a485d;
  --blue: #6aa2ff;
  --blue-deep: #91b8ff;
  --blue-soft: #14294b;
  --green: #77c9a8;
  --green-soft: #12382d;
  --amber: #e1ae63;
  --amber-soft: #3c2c15;
  --red: #ef8d93;
  --red-soft: #411f25;
  --code: #070b11;
  --code-ink: #e6edf7;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.32);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), color-mix(in srgb, var(--line) 35%, transparent) 50%, transparent calc(50% + 0.5px)),
    var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
pre {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.16;
}

h1,
h2 {
  font-family: "Crimson Pro", Georgia, serif;
  letter-spacing: -0.035em;
}

h3,
h4 {
  letter-spacing: -0.018em;
}

code,
pre,
.mono,
.eyebrow,
.chapter-number,
.status-badge,
.utility {
  font-family: "Geist Mono", ui-monospace, monospace;
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 0.08em 0.36em;
  color: var(--ink-soft);
  font-size: max(0.88em, 11px);
  overflow-wrap: anywhere;
}

pre code {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 50%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  padding: 10px 14px;
  color: var(--paper);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.guidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.guidebar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(var(--max), calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 780;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.brand-mark::before {
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  background: var(--blue);
}

.brand-mark::after {
  top: -4px;
  right: 1px;
  width: 5px;
  height: 5px;
  border: 2px solid var(--paper);
  background: var(--green);
}

.doc-switcher {
  display: flex;
  justify-self: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px;
}

.doc-switcher a {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.doc-switcher a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.theme-icon {
  font-size: 17px;
  line-height: 1;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  align-items: center;
  min-height: 660px;
  padding: 88px 0 70px;
  gap: clamp(48px, 8vw, 110px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 26px;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 400;
}

.hero h1 em {
  color: var(--blue-deep);
  font-weight: 400;
}

.hero-lede {
  max-width: 660px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 9px 17px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: #ffffff;
}

.button.small {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 12px;
}

.microcopy {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.orbit-field {
  position: relative;
  min-height: 430px;
  isolation: isolate;
}

.orbit-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%) rotate(-17deg);
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  content: "";
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
  border-radius: 50%;
}

.orbit-ring::before {
  inset: 39px;
}

.orbit-ring::after {
  inset: 93px;
}

.provenance-spine {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(300px, 100%);
  margin: 0 auto;
  padding: 28px 0;
  gap: 17px;
  list-style: none;
}

.provenance-spine::before {
  position: absolute;
  top: 49px;
  bottom: 49px;
  left: 27px;
  z-index: -1;
  width: 2px;
  background: linear-gradient(var(--blue), var(--green), var(--amber), var(--blue));
  content: "";
}

.provenance-spine li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 28px rgba(27, 40, 64, 0.06);
  backdrop-filter: blur(8px);
}

.provenance-spine .node {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  justify-self: center;
  border: 5px solid var(--paper);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.provenance-spine li:nth-child(3) .node {
  background: var(--amber);
  box-shadow: 0 0 0 1px var(--amber);
}

.provenance-spine li:nth-child(4) .node {
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.provenance-spine strong,
.provenance-spine span {
  display: block;
}

.provenance-spine strong {
  font-size: 14px;
}

.provenance-spine span:not(.node) {
  color: var(--muted);
  font-size: 12px;
}

.section-nav {
  position: sticky;
  top: 62px;
  z-index: 40;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

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

.section-nav-inner {
  display: flex;
  width: min(var(--max), calc(100% - 40px));
  min-width: max-content;
  margin: 0 auto;
  gap: 24px;
}

.section-nav a {
  position: relative;
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

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

.section-nav a[aria-current="location"] {
  color: var(--ink);
}

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

.chapter {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 122px;
}

.chapter-rail {
  padding-right: 30px;
}

.chapter-number {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.chapter-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.chapter-body {
  min-width: 0;
}

.chapter-body > h2 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 400;
}

.chapter-intro {
  max-width: 780px;
  margin-bottom: 42px;
  color: var(--ink-soft);
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.card,
.panel,
.callout,
.qa,
.destination {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card,
.panel,
.destination {
  padding: 24px;
}

.card h3,
.panel h3,
.destination h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.card p,
.panel p,
.destination p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.card .eyebrow,
.destination .eyebrow {
  margin-bottom: 11px;
  font-size: 11px;
}

.destination {
  position: relative;
  display: flex;
  min-height: 230px;
  flex-direction: column;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.destination:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
  box-shadow: var(--shadow);
}

.destination .destination-link {
  margin-top: auto;
  padding-top: 24px;
  font-weight: 720;
}

.choice-layout,
.tour-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.38fr) minmax(0, 0.62fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: clip;
}

.tab-list {
  display: flex;
  gap: 8px;
}

.choice-layout .tab-list,
.tour-layout .tab-list {
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 16px;
}

.tab-button {
  display: flex;
  width: 100%;
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 13px 14px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.tab-button:hover {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--ink);
}

.tab-button[aria-selected="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(25, 39, 65, 0.05);
}

.tab-button strong,
.tab-button small {
  display: block;
}

.tab-button strong {
  font-size: 14px;
}

.tab-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.tab-panels {
  min-width: 0;
}

.tab-panel {
  padding: clamp(25px, 5vw, 52px);
}

.tab-panel h3 {
  margin-bottom: 13px;
  font-size: clamp(24px, 3vw, 34px);
}

.tab-panel > p {
  max-width: 690px;
  color: var(--ink-soft);
}

.tab-panel[hidden] {
  display: none;
}

.path-steps,
.compact-list,
.checklist,
.flow-list {
  padding: 0;
  list-style: none;
}

.path-steps {
  display: grid;
  margin: 25px 0;
  gap: 10px;
  counter-reset: path;
}

.path-steps li {
  position: relative;
  min-height: 42px;
  padding: 7px 0 7px 48px;
  color: var(--ink-soft);
  counter-increment: path;
}

.path-steps li::before {
  position: absolute;
  top: 5px;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--blue-deep);
  content: counter(path, decimal-leading-zero);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 750;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  gap: 14px;
}

.role-card {
  border-top: 3px solid var(--blue);
}

.role-card.agent {
  border-top-color: var(--green);
}

.role-card.human {
  border-top-color: var(--amber);
}

.model-flow,
.lineage {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  align-items: stretch;
  gap: 11px;
}

.model-node,
.lineage-node {
  position: relative;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.model-node:not(:last-child)::after,
.lineage-node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -12px;
  z-index: 2;
  color: var(--blue);
  content: "→";
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 800;
}

.model-node .node-index,
.lineage-node .node-index {
  display: block;
  margin-bottom: 22px;
  color: var(--blue-deep);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 750;
}

.model-node:nth-child(4),
.lineage-node:nth-child(4) {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
}

.model-node:nth-child(5),
.lineage-node:nth-child(5) {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
}

.model-node strong,
.lineage-node strong {
  display: block;
  margin-bottom: 7px;
}

.model-node p,
.lineage-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 30px 0;
  padding: 20px 22px;
  gap: 15px;
}

.callout-mark {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
}

.callout.warning .callout-mark {
  background: var(--amber-soft);
  color: var(--amber);
}

.callout.success .callout-mark {
  background: var(--green-soft);
  color: var(--green);
}

.callout strong {
  display: block;
  margin-bottom: 3px;
}

.callout p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.semantic,
.status-badge.ready {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.fallback,
.status-badge.review {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: var(--amber-soft);
  color: var(--amber);
}

.surface-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  gap: 8px;
}

.surface-route {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.timeline {
  position: relative;
  display: grid;
  margin: 30px 0 0;
  gap: 0;
  counter-reset: step;
}

.timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 0 0 34px;
  gap: 20px;
  counter-increment: step;
}

.timeline-step::before {
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  color: var(--blue-deep);
  content: counter(step, decimal-leading-zero);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 750;
}

.timeline-step h3 {
  margin: 4px 0 7px;
  font-size: 19px;
}

.timeline-step p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.code-shell {
  position: relative;
  margin: 20px 0;
  border: 1px solid #273243;
  border-radius: 12px;
  background: var(--code);
  overflow: hidden;
}

.code-head {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #273243;
  padding: 7px 9px 7px 15px;
  color: #97a5b8;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.code-shell pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px;
  color: var(--code-ink);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
}

.copy-button {
  border: 1px solid #3a4658;
  border-radius: 7px;
  background: #172131;
  padding: 5px 9px;
  color: #dbe6f5;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  cursor: pointer;
}

.copy-button:hover {
  border-color: #607086;
  background: #202c3d;
}

.config-tabs .tab-list {
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  gap: 0;
}

.config-tabs .tab-button {
  width: auto;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 16px;
}

.config-tabs .tab-button[aria-selected="true"] {
  border-bottom-color: var(--blue);
  background: transparent;
  box-shadow: none;
  color: var(--blue-deep);
}

.config-tabs .tab-panel {
  padding: 24px 0 0;
}

.qa-list {
  display: grid;
  gap: 10px;
}

.qa {
  overflow: clip;
}

.qa summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  color: var(--ink);
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  position: absolute;
  top: 17px;
  right: 20px;
  color: var(--blue-deep);
  content: "+";
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 20px;
}

.qa[open] summary::after {
  content: "−";
}

.qa > div {
  border-top: 1px solid var(--line);
  padding: 18px 20px;
  color: var(--muted);
}

.qa > div p:last-child {
  margin-bottom: 0;
}

.terminal {
  border: 1px solid #273243;
  border-radius: var(--radius-lg);
  background: var(--code);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #273243;
  padding: 9px 16px;
  color: #9aa8ba;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.terminal-lights {
  display: flex;
  gap: 6px;
}

.terminal-lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #59677a;
}

.terminal-lights i:nth-child(2) {
  background: #c58a34;
}

.terminal-lights i:nth-child(3) {
  background: #4da27f;
}

.terminal-presets {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #273243;
  padding: 9px;
  gap: 6px;
}

.terminal-presets button {
  border: 1px solid #354155;
  border-radius: 7px;
  background: #151e2c;
  padding: 6px 9px;
  color: #c9d4e3;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  cursor: pointer;
}

.terminal-presets button:hover,
.terminal-presets button[aria-pressed="true"] {
  border-color: #5d8bd4;
  background: #1a3155;
  color: #ffffff;
}

.terminal-output {
  min-height: 250px;
  margin: 0;
  overflow: auto;
  padding: 22px;
  color: #d9e4f2;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.simulation-note {
  color: #f2bf69;
  font-weight: 700;
}

.checklist-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.checklist-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
  gap: 15px;
}

.checklist-head h3,
.checklist-head p {
  margin: 0;
}

.checklist-head p {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-soft);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 200ms ease;
}

.checklist {
  display: grid;
  margin: 0;
}

.check-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 17px 24px;
  gap: 12px;
  cursor: pointer;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-item:hover {
  background: var(--surface-soft);
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.check-item strong,
.check-item small {
  display: block;
}

.check-item strong {
  font-size: 14px;
}

.check-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
}

.search-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 9px 13px;
  color: var(--ink);
}

.search-field::placeholder {
  color: var(--muted);
}

.catalog-count {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.tool-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 17px;
}

.tool-card[hidden] {
  display: none;
}

.tool-card h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.tool-card h3 code {
  color: var(--blue-deep);
}

.tool-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tool-args {
  color: var(--ink-soft);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  background: var(--surface-soft);
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

td {
  color: var(--ink-soft);
}

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

.manifest-tree {
  display: grid;
  grid-template-columns: minmax(260px, 0.43fr) minmax(0, 0.57fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.manifest-tree pre {
  min-height: 100%;
  margin: 0;
  border-right: 1px solid #273243;
  background: var(--code);
  padding: 25px;
  color: var(--code-ink);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.manifest-copy {
  padding: 28px;
}

.manifest-copy h3 {
  font-size: 22px;
}

.manifest-copy li {
  margin-bottom: 9px;
  color: var(--muted);
}

.trust-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.trust-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.trust-step:nth-child(3) {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 38%, var(--surface));
}

.trust-step:nth-child(4) {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
}

.trust-step .eyebrow {
  margin-bottom: 10px;
  font-size: 11px;
}

.trust-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.doc-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 70px 0 90px;
  gap: 30px;
}

.doc-footer h2 {
  max-width: 600px;
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 400;
}

.doc-footer p {
  margin-bottom: 0;
  color: var(--muted);
}

.utility {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.no-js-note {
  border-bottom: 1px solid var(--line);
  background: var(--amber-soft);
  padding: 9px 20px;
  color: var(--amber);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
  }

  .card-grid,
  .tool-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-flow,
  .lineage {
    grid-template-columns: 1fr;
  }

  .model-node,
  .lineage-node {
    min-height: auto;
  }

  .model-node:not(:last-child)::after,
  .lineage-node:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -18px;
    left: 50%;
    transform: rotate(90deg);
  }

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

@media (max-width: 760px) {
  body {
    background: var(--paper);
  }

  .guidebar-inner,
  .shell,
  .section-nav-inner {
    width: min(100% - 28px, var(--max));
  }

  .guidebar-inner {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    gap: 10px;
  }

  .brand {
    font-size: 14px;
  }

  .doc-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
    margin-bottom: 9px;
  }

  .doc-switcher a {
    flex: 1;
    padding-right: 6px;
    padding-left: 6px;
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 64px 0 40px;
  }

  .hero h1 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .orbit-field {
    min-height: 390px;
  }

  .section-nav {
    top: 105px;
  }

  .chapter {
    grid-template-columns: 1fr;
    padding: 70px 0;
    scroll-margin-top: 164px;
  }

  .chapter-rail {
    display: flex;
    align-items: baseline;
    margin-bottom: 25px;
    padding: 0;
    gap: 9px;
  }

  .chapter-number {
    margin: 0;
  }

  .choice-layout,
  .tour-layout,
  .manifest-tree {
    grid-template-columns: 1fr;
  }

  .choice-layout .tab-list,
  .tour-layout .tab-list {
    overflow-x: auto;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .choice-layout .tab-button,
  .tour-layout .tab-button {
    min-width: 210px;
  }

  .manifest-tree pre {
    border-right: 0;
    border-bottom: 1px solid #273243;
  }

  .role-grid,
  .card-grid,
  .card-grid.two,
  .tool-catalog,
  .trust-flow {
    grid-template-columns: 1fr;
  }

  .destination {
    min-height: 190px;
  }

  .doc-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 480px) {
  .hero-actions .button,
  .button-row .button {
    width: 100%;
  }

  .orbit-ring {
    width: 290px;
    height: 290px;
  }

  .provenance-spine {
    width: calc(100% - 18px);
  }

  .chapter-body > h2 {
    font-size: 34px;
  }

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

  .checklist-head {
    grid-template-columns: 1fr;
  }

  .terminal-output {
    min-height: 300px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
