:root {
  color-scheme: light;
  --ink: #111715;
  --ink-soft: #18201d;
  --paper: #edf0ed;
  --paper-2: #e5e9e5;
  --accent: #9cc9c2;
  --acid: var(--accent);
  --cyan: #a8c8d1;
  --coral: #b98b7a;
  --line: rgba(17, 23, 21, 0.16);
  --line-dark: rgba(237, 240, 237, 0.14);
  --surface: #f5f6f3;
  --surface-2: #ecefeb;
  --surface-3: #e2e6e1;
  --surface-text: #17201d;
  /* 0.66, not 0.57: blended over --surface (#f5f6f3) the old value measured 3.93:1 and over
     --surface-2 (#ecefeb) 3.83:1, both under the 4.5:1 AA floor this page gates on. The
     computed minimum across all four light surfaces is 0.64. `check a11y contrast` reported
     16 elements on this one token — it read clean for months only because the gate had a
     dedup defect that dropped every failure after the first. */
  --surface-muted: rgba(23, 32, 29, 0.66);
  --surface-muted-strong: rgba(23, 32, 29, 0.7);
  --chrome: #111715;
  --chrome-soft: #161d1a;
  --chrome-text: #edf0ed;
  --chrome-muted: rgba(237, 240, 237, 0.64);
  --chrome-line: rgba(237, 240, 237, 0.14);
  --green-text: #376c65;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-space: clamp(72px, 9vw, 118px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--ink);
  font-synthesis: none;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --line: rgba(237, 240, 237, 0.14);
  --surface: #131916;
  --surface-2: #171f1b;
  --surface-3: #202a25;
  --surface-text: #e8ede9;
  --surface-muted: rgba(232, 237, 233, 0.56);
  --surface-muted-strong: rgba(232, 237, 233, 0.7);
  --chrome: #0e1311;
  --chrome-soft: #111715;
  --green-text: #9cc9c2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--surface-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.dogfood-notice {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px var(--gutter);
  border-bottom: 1px solid var(--chrome-line);
  background: var(--chrome);
  color: var(--chrome-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.dogfood-kicker {
  padding: 2px 7px;
  border: 1px solid var(--chrome-line);
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

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

button {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  translate: 0 -160%;
  background: var(--acid);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  translate: 0;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.site-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-dark);
  background: var(--chrome);
  color: var(--chrome-text);
}

.header-actions,
.display-controls {
  display: flex;
  align-items: center;
}

.header-actions {
  justify-self: end;
  gap: clamp(8px, 1.4vw, 20px);
}

.display-controls {
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.preference-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: rgba(241, 240, 232, 0.56);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.04em;
}

.preference-toggle + .preference-toggle {
  border-left: 1px solid var(--line-dark);
}

.preference-toggle:hover {
  background: rgba(156, 201, 194, 0.08);
  color: var(--paper);
}

.locale-toggle i {
  color: rgba(241, 240, 232, 0.58);
  font-style: normal;
}

.locale-toggle[data-active-locale="ja"] [data-locale-option="ja"],
.locale-toggle[data-active-locale="en"] [data-locale-option="en"] {
  color: var(--acid);
  font-weight: 950;
}

.theme-symbol {
  color: var(--acid);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-self: start;
  gap: 11px;
  color: inherit;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 5px);
  align-items: end;
  gap: 3px;
  width: 21px;
  height: 21px;
  padding: 3px;
  border: 1px solid currentColor;
}

.brand-mark i {
  display: block;
  width: 4px;
  background: var(--acid);
}

.brand-mark i:nth-child(1) { height: 6px; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 9px; }

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 42px);
  font-size: 13px;
  font-weight: 620;
}

.site-nav a,
.header-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-right: 5px;
  padding-left: 5px;
  text-decoration: none;
}

.site-nav a:hover,
.header-link:hover {
  color: var(--acid);
}

.header-link {
  justify-self: end;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero {
  overflow: hidden;
  background: var(--chrome);
  color: var(--chrome-text);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  gap: clamp(44px, 6vw, 80px);
  align-items: center;
  max-width: var(--max);
  min-height: min(720px, calc(100svh - 102px));
  margin: 0 auto;
  padding: clamp(68px, 8vw, 104px) var(--gutter);
}

.eyebrow,
.section-number,
.terminal-kicker,
.loop-label,
.install-panel > p:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 30px;
  color: rgba(241, 240, 232, 0.64);
}

.eyebrow span:first-child {
  color: var(--acid);
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero h1::first-line {
  color: var(--paper);
}

.hero-lead {
  max-width: 620px;
  margin-top: 28px;
  color: rgba(241, 240, 232, 0.73);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.7;
}

.hero-skill-installers {
  max-width: 660px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
}

.hero-skill-installers > p:first-child {
  color: var(--paper);
  font-size: 13px;
  font-weight: 620;
}

.hero-install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.hero-install-grid article {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid var(--chrome-line);
  background: rgba(237, 240, 237, 0.025);
}

.hero-install-grid span,
.hero-bootstrap {
  /* 4.50:1 rounded, under the floor unrounded — the hero card adds 2.5% white over
     --chrome, which lifts the background just enough to matter. */
  color: rgba(241, 240, 232, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.hero-install-grid code,
.hero-bootstrap code {
  color: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.hero-bootstrap {
  margin-top: 10px;
}

.hero-bootstrap code {
  margin-left: 7px;
  color: rgba(241, 240, 232, 0.72);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px;
  border: 1px solid currentColor;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, translate 160ms ease;
}

.button:hover {
  translate: 0 -1px;
}

.button-primary {
  border-color: var(--acid);
  background: var(--acid);
  color: var(--ink);
}

.button-primary:hover {
  border-color: var(--paper);
  background: var(--paper);
}

.button-ghost {
  color: var(--paper);
}

.button-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  color: rgba(241, 240, 232, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.hero-status strong {
  color: var(--paper);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: none;
}

.hero-console {
  position: relative;
  min-width: 0;
  border: 1px solid var(--chrome-line);
  background: var(--chrome-soft);
}

.hero-console::before {
  position: absolute;
  top: 12px;
  right: 14px;
  width: auto;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--chrome-line);
  background: transparent;
  content: "LIVE PROBE";
  color: var(--chrome-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  line-height: 20px;
  text-align: center;
}

.hero-real-run::before {
  display: none;
  background: transparent;
  content: "RECORDED RUN";
}

.hero-console figcaption {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-dark);
  color: rgba(241, 240, 232, 0.54);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.console-command {
  overflow-wrap: anywhere;
  padding: 24px 22px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.hero-run-image {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
  background: #fff;
}

.hero-run-image img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-run-image span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(17, 23, 21, 0.22);
  background: rgba(245, 246, 243, 0.9);
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.console-command span {
  margin-right: 8px;
  color: var(--acid);
}

.viewport-map {
  display: flex;
  height: 170px;
  align-items: end;
  justify-content: center;
  gap: 14px;
  padding: 28px 22px 20px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 16px 16px;
}

.viewport {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  align-items: end;
  color: rgba(241, 240, 232, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  text-align: center;
}

.viewport i {
  display: block;
  border: 1px solid currentColor;
  background: rgba(216, 255, 69, 0.08);
}

.viewport-wide i { width: 126px; height: 82px; color: var(--acid); }
.viewport-mid i { width: 78px; height: 100px; color: var(--cyan); }
.viewport-small i { width: 44px; height: 116px; color: var(--coral); }

.console-results {
  padding: 10px 22px 14px;
}

.console-results div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.console-results dt {
  color: rgba(241, 240, 232, 0.52);
}

.console-results dd {
  color: var(--acid);
  font-weight: 650;
}

.console-verdict {
  padding: 16px 22px;
  border-top: 1px solid var(--chrome-line);
  background: transparent;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.console-verdict span {
  margin-right: 8px;
}

.measurement-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 28px;
  list-style: none;
}

.measurement-strip li {
  padding: 18px;
  border-top: 1px solid var(--line-dark);
  border-right: 1px solid var(--line-dark);
  color: rgba(241, 240, 232, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.measurement-strip li:first-child {
  border-left: 1px solid var(--line-dark);
}

.measurement-strip span {
  margin-right: 8px;
  color: var(--acid);
}

.section {
  padding: var(--section-space) var(--gutter);
}

.workflow,
.principle {
  background: var(--surface);
  color: var(--surface-text);
}

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(420px, 1.17fr);
  gap: clamp(50px, 10vw, 150px);
  max-width: var(--max);
  margin: 0 auto;
}

.section-number {
  margin-bottom: 28px;
  color: var(--surface-muted);
}

.section-number-light {
  color: var(--acid);
}

.section-number-dark {
  color: var(--surface-muted-strong);
}

.section-heading h2,
.proof h2,
.commands-intro h2,
.principle h2,
.skills h2,
.start h2 {
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.proof {
  background: var(--surface-2);
  color: var(--surface-text);
}

.proof > * {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.proof-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.proof-heading > div > p {
  max-width: 660px;
  margin-top: 28px;
  color: var(--surface-muted-strong);
  font-size: 16px;
}

.proof-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(58px, 8vw, 96px);
}

.proof-gallery figure {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.proof-shot {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.proof-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proof-shot-diff {
  background: #f7f7f7;
}

.proof-gallery figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 18px;
}

.proof-gallery figcaption > span {
  grid-row: 1 / 3;
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}

.proof-gallery figcaption strong {
  font-size: 14px;
}

.proof-gallery figcaption small {
  color: var(--surface-muted);
  font-size: 11px;
}

.proof-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.proof-metrics article {
  display: grid;
  min-height: 130px;
  align-content: center;
  gap: 4px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-metrics strong {
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.proof-metrics span {
  color: var(--surface-muted);
  font-size: 11px;
}

.case-studies {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.case-study {
  display: grid;
  grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1.25fr) minmax(220px, 0.7fr);
  column-gap: clamp(24px, 5vw, 64px);
  min-width: 0;
  min-height: 0;
  padding: 30px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.case-primary {
  background: transparent;
  color: var(--surface-text);
}

.case-kicker {
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.case-primary .case-kicker {
  color: var(--green-text);
}

.case-study h3 {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  font-size: clamp(19px, 1.8vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.case-study > p:not(.case-kicker) {
  grid-column: 2;
  grid-row: 2;
  margin-top: 10px;
  color: var(--surface-muted-strong);
  font-size: 13px;
}

.case-primary > p:not(.case-kicker) {
  color: var(--surface-muted-strong);
}

.case-study > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  margin-top: 0;
  padding-top: 0;
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 4px;
}

.case-terminal {
  display: grid;
  gap: 7px;
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  margin-top: 0;
  padding-top: 0;
}

.case-terminal code {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--surface-muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  overflow-wrap: anywhere;
}

/*
 * The playable-demo band. `--surface-3` rather than `--surface` or `--surface-2`, because it sits
 * between the two of them (`.proof` then `.workflow`) and would otherwise read as one long
 * section. It is the fourth light surface `--surface-muted` was tuned against, so the muted text
 * below still clears 4.5:1 here — see the token comment at the top of this file.
 */
.demo {
  background: var(--surface-3);
  color: var(--surface-text);
}

.demo > * {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.demo-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.demo-release {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 22px;
  color: var(--surface-muted-strong);
  font-size: 13px;
}

.demo-release > span:first-child {
  padding: 3px 8px;
  border: 1px solid var(--green-text);
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 28px, not 26: `check design` flagged the one-off as a scale outlier next to the 28px this page
   uses 17 times, which is exactly the kind of drift the gate exists to catch. */
.demo-heading > div > p:last-child {
  max-width: 660px;
  margin-top: 28px;
  color: var(--surface-muted-strong);
  font-size: 16px;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
  margin-top: clamp(48px, 7vw, 84px);
}

.demo-shot {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* The still is 1024x660 and scales by width, so there is no letterbox to fill — the wrapper is
   here for the border between image and caption, and to clip the image's own corners. */
.demo-frame {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.demo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.demo-shot figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 14px 18px;
}

.demo-shot figcaption span:first-child {
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.demo-shot figcaption span:last-child {
  color: var(--surface-muted);
  font-size: 11px;
}

.demo-facts {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  list-style: none;
}

.demo-metrics li {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 4px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-metrics strong {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.demo-metrics span {
  color: var(--surface-muted);
  font-size: 11px;
}

.demo-gates {
  display: grid;
  gap: 7px;
}

.demo-gate-label {
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.demo-gates code {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--surface-muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}

.demo-changelog {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 4px;
}

.section-heading > p:last-child,
.commands-intro > p:last-child {
  max-width: 540px;
  margin-top: 30px;
  color: var(--surface-muted-strong);
  font-size: 16px;
}

.section-heading em {
  color: var(--green-text);
  font-style: normal;
  font-weight: 800;
}

.loop-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.loop-list li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.loop-index {
  color: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.loop-label {
  margin-bottom: 5px;
  color: var(--green-text);
}

.loop-list h3 {
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.04em;
}

.loop-list p:last-child {
  max-width: 580px;
  margin-top: 9px;
  color: var(--surface-muted-strong);
  font-size: 14px;
}

.commands {
  background: var(--chrome-soft);
  color: var(--chrome-text);
}

.commands-intro,
.command-deck {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.commands-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 8vw, 120px);
  align-items: end;
}

.commands-intro .section-number {
  grid-column: 1 / -1;
}

.commands-intro > p:last-child {
  color: rgba(241, 240, 232, 0.63);
}

.command-deck {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  margin-top: 64px;
  border: 1px solid var(--line-dark);
}

.command-tabs {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line-dark);
}

.command-tabs button {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
  color: rgba(241, 240, 232, 0.56);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
}

.command-tabs button .tab-index {
  /* 0.52: 0.48 measured 4.48:1 on --chrome-soft. The floor is 0.50 across the dark
     backgrounds this sits on, including the 2.5%-white hero card. */
  color: rgba(241, 240, 232, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.command-tabs button[aria-selected="true"] {
  background: var(--acid);
  color: var(--ink);
}

.command-tabs button[aria-selected="true"] .tab-index {
  /* On --acid, so this one is dark-on-light and fails in BOTH themes: 0.55 measured 3.47:1.
     0.66 against the accent (#9cc9c2) is the floor plus a little. */
  color: rgba(16, 18, 15, 0.66);
}

.command-terminal {
  min-width: 0;
  min-height: 360px;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #121411;
  background-size: 24px 24px;
}

.terminal-kicker {
  color: var(--cyan);
}

.terminal-command {
  margin-top: 46px;
  overflow-wrap: anywhere;
  color: rgba(241, 240, 232, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(13px, 1.6vw, 18px);
}

.terminal-command > span {
  margin-right: 12px;
  color: var(--acid);
}

.terminal-output {
  display: grid;
  gap: 9px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  color: rgba(241, 240, 232, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.terminal-verdict {
  margin-top: 8px;
  color: var(--acid);
  font-weight: 900;
}

.principle {
  max-width: var(--max);
  margin: 0 auto;
}

.principle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(50px, 10vw, 150px);
  align-items: end;
}

.principle h2 > span:last-child {
  color: var(--green-text);
}

.principle-copy > p {
  max-width: 560px;
  color: var(--surface-muted-strong);
  font-size: clamp(17px, 1.7vw, 21px);
}

.principle blockquote {
  margin-top: 32px;
  padding: 22px 0 0 22px;
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--coral);
}

.principle blockquote p {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

.principle blockquote footer {
  margin-top: 4px;
  color: var(--surface-muted);
  font-size: 12px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(70px, 10vw, 130px);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.proof-grid article {
  min-height: 220px;
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--surface-text);
  font-size: 20px;
}

.proof-grid h3 {
  margin-top: 42px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.proof-grid p {
  margin-top: 10px;
  color: var(--surface-muted);
  font-size: 13px;
}

.skills {
  background: var(--surface-2);
  color: var(--surface-text);
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(50px, 9vw, 130px);
  max-width: var(--max);
  margin: 0 auto;
  align-items: start;
}

.skills-intro > p:not(.section-number, .skills-note) {
  max-width: 570px;
  margin-top: 28px;
  color: var(--surface-muted-strong);
  font-size: 16px;
}

.skills-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  color: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.skills-note span:first-child {
  color: var(--green-text);
  font-weight: 900;
}

.skills-directory {
  min-width: 0;
}

.skill-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.85fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--surface-text);
}

.skill-entry .skill-manager {
  color: var(--green-text);
}

.skill-entry h3 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.skill-entry h3 code {
  color: var(--surface-text);
}

.skill-entry div:first-child > p:last-child {
  margin-top: 10px;
  color: var(--surface-muted);
  font-size: 13px;
}

.routing-examples {
  display: grid;
  gap: 8px;
  align-content: center;
  list-style: none;
}

.routing-examples li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--surface-muted);
  font-size: 11px;
}

.routing-examples code {
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.skill-class-label {
  margin-top: 32px;
  color: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-classes {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.skill-category {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(190px, 0.8fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.skill-category h3 {
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.skill-category div > p:last-child {
  margin-top: 7px;
  color: var(--surface-muted);
  font-size: 12px;
}

.skill-names {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: center;
}

.skill-names code {
  padding: 6px 8px;
  background: var(--surface-3);
  color: var(--surface-muted-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.skill-catalog-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--surface-text);
  font-size: 12px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.skill-installers {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.skill-installer {
  padding: clamp(26px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}

.skill-manager {
  color: var(--green-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.skill-installer h3 {
  margin-top: 10px;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.04em;
}

.skill-installer > p:not(.skill-manager) {
  margin-top: 7px;
  color: var(--surface-muted);
  font-size: 13px;
}

.skill-command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--chrome);
  color: var(--chrome-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.skill-command + .skill-command {
  margin-top: 8px;
}

.skill-command span {
  color: var(--acid);
}

.skill-command code {
  overflow-wrap: anywhere;
}

.start {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(450px, 1.15fr);
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--surface-text);
}

.start > * {
  width: 100%;
  max-width: 650px;
}

.start > div:first-child {
  justify-self: end;
}

.start-note {
  margin-top: 24px;
  color: var(--surface-muted);
  font-size: 14px;
}

.install-panel {
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--surface-text);
  box-shadow: none;
}

.install-command {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 13px 13px 13px 16px;
  background: var(--ink);
  color: var(--paper);
}

.install-command code,
.install-next code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.install-command button {
  min-width: 66px;
  min-height: 44px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: var(--ink);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
}

.install-command button:hover {
  background: var(--paper);
}

.install-next {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 14px;
  color: var(--surface-muted-strong);
}

.install-next span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.copy-status {
  min-height: 28px;
  padding-top: 8px;
  color: var(--green-text);
  font-size: 12px;
  font-weight: 750;
}

.button-dark {
  border-color: var(--surface-text);
  background: var(--surface-text);
  color: var(--surface);
}

.button-dark:hover {
  background: transparent;
  color: var(--surface-text);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
  min-height: 120px;
  padding: 28px var(--gutter);
  background: var(--chrome);
  color: var(--chrome-text);
}

.site-footer p {
  /* 0.46 measured 4.25:1. Nine-pixel monospace is exactly the text that needs the floor
     most, not least. */
  color: rgba(241, 240, 232, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.site-footer p:last-child {
  justify-self: end;
}

.brand-footer {
  font-size: 18px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  /*
   * The scroll-spy anchors collapse; the cross-page link does not.
   *
   * `.site-nav { display: none }` used to take the demo link with it, which left the playable
   * demo with no route from a phone — the device most likely to want it.
   *
   * It gets its own full-width row rather than a third slot beside the brand and the controls.
   * Measured at 375px: brand ~90px + link ~100px + controls ~170px + 40px of gutter is 400px in
   * a 375px viewport, so the three cannot share a row, and leaving it to `flex-wrap` put the
   * controls on row 2 looking displaced. A row of its own is also the better tap target.
   */
  .site-nav a:not(.nav-demo) {
    display: none;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0;
    margin-top: -4px;
    padding-bottom: 8px;
    font-size: 12px;
  }

  .hero-grid,
  .proof-heading,
  .demo-heading,
  .demo-layout,
  .workflow,
  .principle-grid,
  .skills-layout,
  .start {
    grid-template-columns: 1fr;
  }

  /* The still leads on a narrow screen, so cap it rather than letting a 1024px-wide image set
     the column and stretch the facts beside it. */
  .demo-shot {
    width: min(100%, 620px);
  }

  .hero-grid {
    min-height: auto;
  }

  .hero-console {
    width: min(100%, 620px);
  }

  .proof-gallery,
  .case-studies {
    grid-template-columns: 1fr;
  }

  .case-study {
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  }

  .case-study > a,
  .case-terminal {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 18px;
  }

  .proof-gallery figure {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
  }

  .proof-shot {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .workflow {
    gap: 70px;
  }

  .commands-intro {
    grid-template-columns: 1fr;
  }

  .commands-intro > p:last-child {
    margin-top: 28px;
  }

  .principle-grid {
    gap: 44px;
  }

  .skills-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .skill-entry,
  .skill-category {
    grid-template-columns: 1fr;
  }

  .start > div:first-child {
    justify-self: start;
  }

  .start > * {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .dogfood-notice {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 9px;
  }

  .dogfood-kicker {
    font-size: 8px;
  }

  .site-header {
    min-height: 66px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    gap: 7px;
    font-size: 18px;
  }

  .header-actions {
    gap: 4px;
  }

  .preference-toggle {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 9px;
  }

  .header-link {
    padding-right: 3px;
    padding-left: 3px;
    font-size: 9px;
  }

  .hero-grid {
    gap: 70px;
    padding-top: 72px;
    padding-bottom: 82px;
  }

  .hero h1 {
    font-size: clamp(38px, 11.5vw, 52px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-install-grid,
  .proof-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .hero-status {
    align-items: flex-start;
  }

  .viewport-wide i { width: 98px; }
  .viewport-mid i { width: 62px; }

  .measurement-strip {
    grid-template-columns: 1fr 1fr;
  }

  .measurement-strip li:nth-child(3) {
    border-left: 1px solid var(--line-dark);
  }

  .workflow {
    min-width: 0;
  }

  .loop-list li {
    grid-template-columns: 38px 1fr;
    gap: 14px;
  }

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

  .command-tabs {
    border-right: 0;
  }

  .command-tabs button {
    min-height: 62px;
  }

  .command-terminal {
    min-height: 320px;
  }

  .proof-grid {
    grid-template-columns: 1fr;
  }

  .case-study {
    display: block;
    padding: 26px 0;
  }

  .case-study h3 {
    margin-top: 14px;
  }

  .case-study > a,
  .case-terminal {
    margin-top: 20px;
  }

  .proof-gallery figure {
    display: block;
  }

  .proof-shot {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-grid article {
    min-height: 230px;
  }

  .proof-grid h3 {
    margin-top: 42px;
  }

  .start {
    min-width: 0;
  }

  .install-panel {
    min-width: 0;
    box-shadow: none;
  }

  .install-command {
    align-items: stretch;
    flex-direction: column;
  }

  .install-command button {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer p:last-child {
    justify-self: start;
  }
}

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

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

/*
 * The one nav entry that changes page, marked as such.
 *
 * The `→` follows this page's own convention for it — the GitHub link carries `↗` in a real
 * `aria-hidden` span, so this does too rather than inventing a CSS `::after`, whose content some
 * screen readers announce as "right arrow". It is nested INSIDE the link beside the `data-i18n`
 * span, not on the link itself: `data-i18n` is applied with `textContent`, so an arrow placed as
 * a sibling of the translated text would be wiped the first time the locale was switched.
 */
.nav-demo {
  gap: 6px;
}

.nav-demo span[aria-hidden] {
  opacity: 0.7;
}
