:root {
  --font-serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 38rem;
  --top: 3.2rem;
  --radius: 0.7rem;
}

html[data-scheme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0f;
  --bg-2: #14161c;
  --ink: #ece8e0;
  --muted: #8f8a80;
  --line: #2a2d36;
  --a: #7eb0d4;
  --b: #d4a0b4;
  --signal: #6dcfb0;
  --warn: #d4a574;
  --bad: #d98980;
  --ok: #6dcfb0;
  --quiet: #3a3d46;
  --shadow: 0 20px 50px rgb(0 0 0 / 0.4);
}

html[data-scheme="light"] {
  color-scheme: light;
  --bg: #eef0eb;
  --bg-2: #fbfcfa;
  --ink: #14161a;
  --muted: #5c6158;
  --line: #d3d6ce;
  --a: #245a82;
  --b: #8a3d5c;
  --signal: #17684e;
  --warn: #8a5a22;
  --bad: #9a3b32;
  --ok: #17684e;
  --quiet: #c9cdc4;
  --shadow: 0 16px 40px rgb(20 24 18 / 0.08);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in oklab, var(--a) 12%, transparent), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: clip;
  max-width: 100%;
}

h1,
h2,
h3,
.wordmark,
.kicker,
.badge,
.lede {
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.2rem, 6.4vw, 4.4rem);
  margin: 0.4em 0 0.35em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  margin: 0 0 0.65em;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

code,
.eq,
.tree,
.lab-scope,
.c6-steps,
.frame-fields,
.session-flow,
.stat,
.label {
  font-family: var(--font-mono);
}

code {
  font-size: 0.86em;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--bg-2);
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand theme"
    "nav nav";
  align-items: center;
  gap: 0.35rem 0.75rem;
  min-height: var(--top);
  padding: 0.45rem 1rem 0.55rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  grid-area: brand;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.85rem 1.05rem;
  font-size: 0.86rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.4rem), transparent);
}

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

.nav a {
  color: var(--muted);
  text-decoration: none;
  flex: none;
  padding: 0.35rem 0;
}

.nav a:hover,
.foot a:hover,
.build a:hover {
  color: var(--ink);
}

.theme {
  grid-area: theme;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.theme-icon {
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  position: relative;
}

html[data-theme="light"] .theme-icon {
  background: transparent;
  box-shadow: 3px -3px 0 -1px currentColor inset;
}

html[data-theme="dark"] .theme-icon {
  background: currentColor;
}

html[data-theme="system"] .theme-icon::after {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: currentColor;
}

.hero,
.section,
.foot {
  padding: 4.6rem 1.25rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  scroll-margin-top: 6.4rem;
}

.hero,
.section {
  max-width: 72rem;
  margin: 0 auto;
}

.hero {
  max-width: 68rem;
  padding-top: 1.35rem;
  padding-bottom: 2.2rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.05rem);
  margin: 0.28em 0 0.4em;
}

.hero .lede {
  margin-bottom: 0;
  font-size: 1.12rem;
  line-height: 1.5;
  max-width: 40rem;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  overflow-wrap: break-word;
  max-width: 22rem;
}

.section {
  border-top: 1px solid var(--line);
}

.choice-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid color-mix(in oklab, var(--warn) 45%, var(--line));
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  vertical-align: 0.12em;
  margin-right: 0.35rem;
}

.slot-tree {
  max-width: 36rem;
  margin: 1.4rem 0 1.8rem;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.28rem 0.55rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 36rem;
  color: var(--muted);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.measure {
  max-width: var(--measure);
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-stage {
  margin: 1.7rem 0 1.45rem;
}

.hero-carry {
  margin-top: 1rem;
}

.bubble {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.7rem;
  max-width: 36rem;
  padding: 0.72rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 0.5rem;
}

.bubble.is-b {
  margin-left: 1.6rem;
}

.bubble p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  overflow-wrap: anywhere;
}

.who {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding-top: 0.2rem;
}

.who.a {
  color: var(--a);
}

.who.b {
  color: var(--b);
}

.hero-arrow,
.dual-split .quiet {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-arrow {
  margin: 0 0 0.7rem;
}

.hero-arrow.is-down {
  margin: 0.75rem 0 0.4rem;
}

.hero-fields {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  max-width: 22rem;
}

.hero-fields div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
}

.hero-fields dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-fields dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--signal);
}

.hero-caption {
  max-width: 22rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.hero-object {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--signal);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.hero-object.compact {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
}

.hero-actions,
.example-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn,
.example-nav button,
.chips button,
.switch button {
  font: inherit;
  cursor: pointer;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.58rem 0.95rem;
  font-size: 0.92rem;
  background: var(--bg-2);
  border-radius: 999px;
}

.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.duals {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 48rem;
}

.dual {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
}

.dual.is-data {
  border-color: color-mix(in oklab, var(--signal) 45%, var(--line));
}

.dual-said {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.dual-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.dual-split p {
  margin: 0.15rem 0;
}

.dual-proto {
  color: var(--signal);
}

.label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.lab-section {
  max-width: 84rem;
}

.lab-section .measure.note {
  margin-top: 1.1rem;
}

.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "scope"
    "talk";
  gap: 1rem;
  margin-top: 1.6rem;
  align-items: start;
}

.lab:focus {
  outline: none;
}

.lab:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.lab-talk {
  grid-area: talk;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 22rem;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
}

.lab-talk::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.turn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 0.95rem 1.1rem;
  scroll-snap-align: start;
  cursor: pointer;
  opacity: 0.42;
}

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

.turn.is-skip {
  opacity: 0.34;
}

.turn.is-on,
.turn:hover {
  opacity: 1;
  background: color-mix(in oklab, var(--bg) 55%, var(--bg-2));
}

.turn.is-data.is-on {
  box-shadow: inset 3px 0 0 var(--signal);
}

.turn .said {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.4;
  margin: 0.18rem 0 0;
  overflow-wrap: anywhere;
}

.turn .meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.lab-scope {
  grid-area: scope;
  display: grid;
  grid-template-rows: 1fr auto;
  height: auto;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

#example-body {
  min-height: 0;
  overflow: hidden;
}

.lab-msg {
  min-height: 0;
}

.lab-state {
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.said-now {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lab-scope h3,
.example-panel h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.scope-block {
  margin: 0 0 0.95rem;
}

.scope-row {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.4rem;
  font-size: 0.82rem;
  padding: 0.22rem 0;
}

.scope-row .k {
  color: var(--muted);
}

.bits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0.35rem 0 0.4rem;
}

.bit {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px dashed var(--quiet);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  border-radius: 0.2rem;
}

.bit.is-on {
  border-style: solid;
  border-color: var(--signal);
  color: var(--signal);
}

.bit.is-new {
  background: color-mix(in oklab, var(--signal) 16%, transparent);
}

.wire-key {
  display: grid;
  grid-template-columns: 3.4rem 3.4rem 1fr;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.wire-key.is-10 {
  grid-template-columns: 1.83rem 1.83rem 1fr;
}

.arg-bits {
  margin: 0.2rem 0 0 7.6rem;
  min-height: 1.1em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.app-object {
  margin: 0.4rem 0 0;
  min-height: 1.35em;
  color: var(--signal);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.example-nav {
  margin-top: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.example-nav button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
}

.example-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.eq {
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.subhead {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin: 2.2rem 0 0.7rem;
}

.flow {
  max-width: 36rem;
  margin: 1.5rem 0 1.6rem;
  text-align: center;
}

.flow p {
  margin: 0;
}

.flow-said {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.flow-arrow,
.flow-step {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin: 0.45rem 0;
}

.flow-arrow {
  text-transform: uppercase;
}

.flow-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-step .choice-badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flow-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--signal);
}

.flow.is-calc {
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.letters-run {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--signal);
  word-break: break-all;
  line-height: 1.5;
}

.v-fork {
  max-width: 28rem;
  margin: 1.4rem 0 1.2rem;
  text-align: center;
}

.v-fork-arms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.v-fork-arms > div {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.v-fork-arms p:last-child {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--signal);
}

.use-v {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.2rem;
  max-width: 48rem;
}

.use-v article {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.use-v p {
  margin: 0.2rem 0;
}

.neq {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  max-width: 32rem;
  margin: 1.6rem 0 1rem;
}

.neq > div {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 1rem;
  border-radius: var(--radius);
}

.neq > span {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--muted);
}

.neq p:last-child {
  margin: 0;
  font-size: 1.15rem;
}

.profiles,
.wire-examples,
.stats,
.build,
.arch {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.profiles,
.wire-examples,
.arch,
.build {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.profiles article,
.wire-examples article,
.rule,
.stats article,
.arch article,
.build a,
.playground,
.tree {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.build a {
  text-decoration: none;
}

.tree {
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  max-width: none;
}

#session .tree {
  margin: 1.15rem 0 0;
}

.codebooks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.85rem 0 1rem;
}

.codebooks table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.codebooks caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.codebooks th {
  width: 2.6rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 0.18rem 0.4rem 0.18rem 0;
}

.codebooks td {
  padding: 0.18rem 0;
}

.codebooks tr.is-reserved {
  color: var(--muted);
}

.widths {
  margin: 0;
}

.widths div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  padding: 0.28rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.widths dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.widths dd {
  margin: 0;
}

.rule {
  margin-top: 1rem;
}

.rule .tree {
  background: transparent;
  border: 0;
  padding: 0;
}

.rule p {
  margin: 0.9rem 0 0;
}

.profiles a,
.wire-examples a {
  color: inherit;
}

.stat {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--signal);
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}

.stats article.is-not .stat {
  color: var(--bad);
}

.stats h3,
.profiles h3 {
  margin-bottom: 0.4rem;
}

.stats p,
.build p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.split-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 42rem;
}

.split-lists ul {
  list-style: none;
  padding: 0;
}

.split-lists li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.yes li::before {
  content: "✓ ";
  color: var(--ok);
}

.no li::before {
  content: "× ";
  color: var(--bad);
}

.arch-profile dl {
  margin: 0.7rem 0 0;
}

.arch-profile div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.arch-profile dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.arch-profile dd {
  margin: 0;
}

.playground-wrap {
  margin: 2rem 0 1.6rem;
  max-width: 42rem;
}

.playground {
  margin-top: 0.55rem;
}

.playground label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.playground textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.6rem;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.7rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0.9rem;
}

.chips button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.c6-steps {
  font-size: 0.82rem;
  line-height: 1.55;
}

.c6-steps .letters {
  word-break: break-all;
  color: var(--signal);
}

.c6-steps .dim {
  color: var(--muted);
}

.switch {
  display: inline-flex;
  border: 1px solid var(--line);
  margin: 0.4rem 0 1.2rem;
  border-radius: 999px;
  overflow: hidden;
}

.switch button {
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.switch button.is-on {
  background: var(--bg-2);
  color: var(--ink);
}

.road {
  list-style: none;
  padding: 0;
  max-width: 32rem;
  margin: 1.6rem 0 0;
  counter-reset: road;
}

.road li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2.1rem;
  border-bottom: 1px solid var(--line);
  counter-increment: road;
}

.road li::before {
  content: counter(road);
  position: absolute;
  left: 0;
  top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.two-machines,
.machine-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 1.6rem;
  max-width: 48rem;
}

.two-machines article,
.machine-split article {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.two-machines .eq,
.machine-split .eq {
  margin: 0 0 0.35rem;
}

.two-machines p {
  margin: 0.15rem 0;
}

.machine-fig {
  max-width: 42rem;
  margin: 0.45rem 0 1.4rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.machine-rule {
  max-width: 40rem;
  margin: 0.4rem 0 1.6rem;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid color-mix(in oklab, var(--signal) 40%, var(--line));
  border-radius: var(--radius);
  font-size: 1.08rem;
  line-height: 1.45;
}

.controls {
  margin: 0.4rem 0 0;
}

.controls div {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.controls dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.controls dd {
  margin: 0;
}

.machine-split .frame-fields {
  max-width: none;
}

.session-flow {
  list-style: none;
  padding: 0;
  max-width: 22rem;
}

.session-flow li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.session-flow span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.frame-fields {
  display: grid;
  gap: 0.7rem;
  max-width: 28rem;
}

.frame-fields div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.frame-fields dt {
  color: var(--muted);
}

.frame-fields dd {
  margin: 0;
}

.foot {
  border-top: 1px solid var(--line);
  display: block;
  max-width: 72rem;
  margin: 0 auto;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 2rem;
  flex-wrap: wrap;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.foot nav {
  display: grid;
  gap: 0.4rem;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

.credit {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1100px) {
  .codebooks {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .lab {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 28rem);
    grid-template-areas: "talk scope";
    min-height: 48rem;
    align-items: stretch;
  }

  .lab-talk {
    height: 48rem;
    max-height: 48rem;
    overflow: hidden;
  }

  .lab-scope {
    height: 48rem;
    min-height: 48rem;
    overflow: hidden;
    position: sticky;
    top: 4.2rem;
  }
}

@media (min-width: 860px) {
  .hero-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 20rem);
    gap: 0.5rem 3.4rem;
    align-items: start;
  }

  .hero-stage .bubble {
    grid-column: 1;
  }

  .hero-carry {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
    align-self: start;
    padding: 0.15rem 0 0 1.6rem;
    border-left: 1px solid var(--line);
  }
}

@media (min-width: 960px) {
  .top {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.4rem 1.1rem;
  }

  .nav {
    margin-left: auto;
    flex-wrap: wrap;
    overflow: visible;
    mask-image: none;
  }

  .hero,
  .section,
  .foot {
    scroll-margin-top: calc(var(--top) + 0.4rem);
  }
}

@media (max-width: 639px) {
  .profiles,
  .wire-examples,
  .stats,
  .arch,
  .build,
  .use-v,
  .two-machines,
  .machine-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 859px) {
  .dual-split,
  .split-lists,
  .neq {
    grid-template-columns: 1fr;
  }

  .bubble.is-b {
    margin-left: 0.6rem;
  }

  .frame-fields div,
  .arch-profile div {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .hero,
  .section,
  .foot {
    padding: 3.1rem 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .hero {
    padding-top: 0.85rem;
    padding-bottom: 1.6rem;
  }

  .codebooks,
  .hero-fields div,
  .widths div {
    grid-template-columns: 1fr;
  }

  .arg-bits {
    margin-left: 0;
  }

  h1 {
    font-size: clamp(1.7rem, 10vw, 2.6rem);
  }

  .hero-name {
    letter-spacing: 0.04em;
    font-size: 0.72rem;
  }

  .theme {
    width: 2.75rem;
    height: 2.75rem;
  }

  .nav a,
  .example-nav button,
  .chips button {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }

  .foot {
    padding-bottom: max(3.1rem, env(safe-area-inset-bottom));
  }
}
