/*
 * Healwright docs site (home and guide).
 *
 * Every accent colour is a state, never decoration:
 *   fracture = a locator that broke      scan = the model looking
 *   heal     = a verified, healed match  warn = report-only
 * The azure and teal come from the owl shield's own gradient.
 */

:root {
  --night: #0A1230;
  --deep: #101B42;
  --rim: #22325F;
  --rim-hi: #34487F;
  --text: #E9EEFF;
  --muted: #97A6CF;
  --faint: #5F6F9C;

  --fracture: #FF5C7A;
  --scan: #4C8DFF;
  --heal: #27E1B2;
  --warn: #FFB547;

  /* The app under test is a light page inside the dark workbench. */
  --paper: #F5F7FC;
  --ink: #18213F;

  --sans: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .25, 1);

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "SHRP" 0, "CRSV" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

p code,
h3 code {
  font-size: .86em;
  padding: .1em .35em;
  border-radius: 5px;
  background: var(--deep);
  border: 1px solid var(--rim);
}

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

::selection {
  background: color-mix(in srgb, var(--scan) 45%, transparent);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--night);
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.btn-solid {
  background: var(--text);
  color: var(--night);
}

.btn-solid:hover {
  background: #fff;
}

.btn-ghost {
  border-color: var(--rim-hi);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.btn-lg {
  height: 52px;
  padding: 0 22px;
  font-size: 16px;
}

.install {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 7px 0 20px;
  border-radius: 999px;
  border: 1px solid var(--rim-hi);
  background: var(--deep);
  color: var(--text);
  font: 14px var(--mono);
  cursor: pointer;
  transition: border-color .2s;
}

.install:hover {
  border-color: var(--muted);
}

.install code {
  font-size: 14px;
}

.install-prompt {
  color: var(--heal);
}

.install-state {
  min-width: 68px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--rim);
  font: 500 13px/1 var(--sans);
  text-align: center;
  transition: background-color .2s, color .2s;
}

.install.is-copied .install-state {
  background: var(--heal);
  color: var(--night);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--night) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--rim);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-right: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 440px) {
  .nav-actions .btn-ghost span {
    display: none;
  }

  .nav-actions .btn-ghost {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(36px, 6vw, 72px);
}

/* Headline across the full width; the explanation and actions share a row. */
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title title"
    "lede actions";
  gap: 28px 48px;
  align-items: end;
}

.hero-side {
  display: contents;
}

.hero-side .lede {
  grid-area: lede;
}

.hero-side .hero-actions {
  grid-area: actions;
}

@media (max-width: 1080px) {
  .hero-top {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "lede"
      "actions";
    row-gap: 22px;
  }
}

.title {
  position: relative;
  margin: 0;
  grid-area: title;
  font-size: clamp(40px, 6.4vw, 88px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.045em;
}

.title-real {
  display: block;
}

/*
 * The headline loads cracked: two clipped copies sit off-register along a
 * jagged seam, with sharp letterforms (Geologica's SHRP axis), then close and
 * soften. Once healed, the real text takes over and the copies are dropped.
 */
.title-half,
.title-seam {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.title-top {
  clip-path: polygon(0 0, 100% 0, 100% 64%, 89% 57%, 78% 63%, 66% 52%, 55% 57%, 43% 45%, 31% 51%, 20% 40%, 9% 46%, 0 37%);
}

.title-bottom {
  clip-path: polygon(0 37%, 9% 46%, 20% 40%, 31% 51%, 43% 45%, 55% 57%, 66% 52%, 78% 63%, 89% 57%, 100% 64%, 100% 100%, 0 100%);
}

.title-seam {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.title-seam polyline {
  fill: none;
  stroke: var(--fracture);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px var(--fracture));
}

.title.is-cracked .title-real {
  color: transparent;
}

.title.is-cracked .title-half,
.title.is-cracked .title-seam {
  display: block;
}

.title.is-cracked .title-half {
  font-variation-settings: "SHRP" 100;
}

.title.is-cracked .title-top {
  transform: translate(-.05em, -.035em) rotate(-.6deg);
}

.title.is-cracked .title-bottom {
  transform: translate(.06em, .03em) rotate(.4deg);
}

/* Declared after the cracked state so it wins at equal specificity. */
.title.is-healing .title-half {
  transform: none;
  font-variation-settings: "SHRP" 0;
  transition: transform .9s var(--ease-io), font-variation-settings 1s var(--ease-io);
}

.title.is-healing .title-seam polyline {
  stroke: var(--heal);
  opacity: 0;
  filter: drop-shadow(0 0 8px var(--heal));
  transition: stroke .4s, filter .4s, opacity .5s .55s;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 19px);
}

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

/* ---------- Stage: the heal, acted out ---------- */

.stage {
  --mood: var(--rim-hi);
  position: relative;
  margin: clamp(36px, 5vw, 64px) 0 0;
  border-radius: 22px;
  border: 1px solid var(--rim);
  /* A cutting-mat dot grid: the workbench the test runs on. */
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--muted) 16%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
    var(--deep);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mood) 35%, transparent),
    0 40px 90px -50px color-mix(in srgb, var(--mood) 70%, transparent);
  transition: box-shadow .7s var(--ease);
}

.stage[data-mood="broken"] {
  --mood: var(--fracture);
}

.stage[data-mood="scan"] {
  --mood: var(--scan);
}

.stage[data-mood="healed"] {
  --mood: var(--heal);
}

.scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 12fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "editor browser"
    "term browser";
  column-gap: clamp(48px, 7vw, 96px);
  row-gap: 16px;
  padding: clamp(14px, 2vw, 24px);
  transition: opacity .4s;
}

.scene.is-resetting {
  opacity: .35;
}

@media (max-width: 900px) {
  .app {
    min-height: 0;
  }

  .term-body {
    flex: none;
    height: 210px;
  }

  .scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "editor"
      "browser"
      "term";
    /* Room on the right for the thread to run between panes. */
    padding-right: 30px;
  }
}

.pane {
  position: relative;
  z-index: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--rim);
  background: var(--night);
  overflow: hidden;
}

.editor {
  grid-area: editor;
}

.browser {
  grid-area: browser;
  display: flex;
  flex-direction: column;
}

.term {
  grid-area: term;
  display: flex;
  flex-direction: column;
}

.pane-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--rim);
  color: var(--muted);
  font-size: 12.5px;
  flex: none;
}

.file-tab {
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 11.5px;
  color: var(--text);
}

/* Editor */

.code {
  padding: 14px 0 12px;
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.8;
  color: var(--muted);
  overflow-x: auto;
  counter-reset: ln;
  /* Room for the code lens, so inserting it never resizes the pane. */
  min-height: calc(12 * 1.8em + 26px);
}

.line,
.lens {
  display: block;
  white-space: pre;
  padding-right: 16px;
}

.line::before {
  counter-increment: ln;
  content: counter(ln);
  display: inline-block;
  width: 3.6em;
  padding-right: 1.4em;
  text-align: right;
  color: var(--faint);
}

.tk-k {
  color: #B4C2EE;
}

.tk-f {
  color: var(--text);
}

.tk-s {
  color: #FFCBA4;
}

.tk-c {
  color: var(--faint);
}

.sel {
  color: #FFCBA4;
  border-radius: 4px;
  transition: color .4s, background-color .4s;
}

.sel.is-broken {
  color: var(--fracture);
  background: color-mix(in srgb, var(--fracture) 14%, transparent);
  text-decoration: underline wavy var(--fracture);
  text-underline-offset: 5px;
}

.sel.is-healed {
  color: var(--faint);
  text-decoration: line-through;
}

.diag {
  margin-left: 2ch;
  color: var(--fracture);
  font-style: italic;
  opacity: 0;
  transition: opacity .3s;
}

.diag.is-on {
  opacity: 1;
}

/* A code lens above the call, the way editors annotate a line. */
.lens {
  padding-left: calc(3.6em + 2ch);
  font-size: .94em;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--heal);
  white-space: pre-wrap;
  transition: max-height .5s var(--ease), opacity .35s .15s;
}

.lens.is-on {
  max-height: 4em;
  opacity: 1;
}

.lens-mark {
  padding: 0 .45em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--heal) 16%, transparent);
}

.status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--rim);
  color: var(--faint);
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}

.status-cache {
  color: var(--muted);
  transition: color .4s;
}

.status-cache.is-bumped {
  color: var(--heal);
}

/* Browser */

.url {
  flex: 1;
  min-width: 0;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--deep);
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deploy {
  padding: 3px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
  font-size: 11.5px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s, transform .3s var(--ease);
}

.deploy.is-on {
  opacity: 1;
  transform: none;
}

/* The app under test */

.app {
  position: relative;
  flex: 1;
  /* Tallest column on desktop, so the stage never changes height mid-demo. */
  min-height: 560px;
  container-type: inline-size;
  padding: clamp(16px, 2.2vw, 28px);
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  overflow: hidden;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.app-logo {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.app-step {
  color: #5B6687;
  font-size: 12px;
}

.app-grid {
  display: grid;
  gap: 12px;
  align-items: center;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "email email email"
    "items items items"
    "cont coupon target"
    "confirm confirm confirm";
}

/* Three redesigns the test never saw coming. */
.app[data-variant="1"] .app-grid {
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "email email"
    "items items"
    "target target"
    "coupon cont"
    "confirm confirm";
}

.app[data-variant="2"] .app-grid {
  grid-template-columns: auto auto 1fr;
  grid-template-areas:
    "email email email"
    "items items items"
    "target coupon cont"
    "confirm confirm confirm";
}

.app[data-variant="3"] .app-grid {
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "email target"
    "items items"
    "coupon cont"
    "confirm confirm";
}

@container (max-width: 430px) {
  .app-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "email email"
      "items items"
      "coupon target"
      "cont cont"
      "confirm confirm";
  }

  .app[data-variant="2"] .app-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "email email"
      "items items"
      "target coupon"
      "cont cont"
      "confirm confirm";
  }

  .app[data-variant="3"] .app-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "target target"
      "email email"
      "items items"
      "coupon cont"
      "confirm confirm";
  }
}

.ui-email {
  grid-area: email;
}

.ui-items {
  grid-area: items;
}

.ui-cont {
  grid-area: cont;
}

.ui-coupon {
  grid-area: coupon;
}

.ui-target {
  grid-area: target;
}

.ui-confirm {
  grid-area: confirm;
}

.ui-label {
  display: block;
  margin-bottom: 4px;
  color: #5B6687;
  font-size: 12px;
}

.ui-input {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid #CDD5EA;
  background: #fff;
}

.ui-items {
  padding: 2px 12px;
  border-radius: 10px;
  border: 1px solid #DFE5F3;
  background: #fff;
}

.ui-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #E3E8F4;
}

.ui-row span:last-child {
  color: #4A5578;
}

.ui-total {
  border-bottom: 0;
  font-weight: 650;
}

.ui-total span:last-child {
  color: var(--ink);
}

.ui-cont {
  justify-self: start;
  color: #3552C8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app[data-variant="1"] .ui-cont,
.app[data-variant="2"] .ui-cont {
  justify-self: end;
}

.ui-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #CDD5EA;
  background: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.ui-target {
  border-color: #1C2752;
  background: #1C2752;
  color: #fff;
}

.app[data-variant="1"] .ui-target {
  border-color: #4B3BD6;
  background: #4B3BD6;
  border-radius: 999px;
  height: 42px;
}

.app[data-variant="2"] .ui-target {
  border-color: #0E6E86;
  background: #0E6E86;
}

.app[data-variant="3"] .ui-target {
  align-self: end;
  height: 36px;
}

.ui-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #E1F7EF;
  color: #0B6B52;
  font-weight: 600;
  visibility: hidden;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s, transform .35s var(--ease), visibility 0s .35s;
}

.ui-confirm::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #12A37F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2 6 9.2l4-4.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.ui-confirm.is-on {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

/* Overlays on the app: attribute chip, candidate brackets, scan, verdict */

.attr {
  position: absolute;
  z-index: 4;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--ink);
  color: #DCE4FF;
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 10.5px;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 9px));
  opacity: 0;
  transition: opacity .3s;
}

.attr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--ink);
  transform: rotate(45deg);
}

.attr.is-on {
  opacity: 1;
}

.attr s {
  color: var(--fracture);
  margin-right: 6px;
}

.cands {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.cand {
  --c: var(--scan);
  --b: 2px;
  --l: 10px;
  position: absolute;
  border-radius: 6px;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--l) var(--b),
    linear-gradient(var(--c) 0 0) 0 0 / var(--b) var(--l),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--l) var(--b),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--b) var(--l),
    linear-gradient(var(--c) 0 0) 0 100% / var(--l) var(--b),
    linear-gradient(var(--c) 0 0) 0 100% / var(--b) var(--l),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--l) var(--b),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--b) var(--l);
  background-repeat: no-repeat;
  opacity: 0;
  animation: cand-in .35s var(--ease) var(--d, 0ms) forwards;
}

.cand-score {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(30%, -60%);
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--c);
  color: #fff;
  font: 600 10.5px/1.3 var(--mono);
  font-stretch: 80%;
}

.cand.is-best {
  --c: var(--heal);
  --b: 2.5px;
  --l: 14px;
}

.cand.is-best .cand-score {
  color: var(--night);
}

.cand.is-dim {
  animation: none;
  opacity: .22;
  transition: opacity .35s;
}

@keyframes cand-in {
  from {
    opacity: 0;
    transform: scale(1.12);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  height: 72px;
  border-bottom: 2px solid var(--scan);
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--scan) 20%, transparent));
  pointer-events: none;
  opacity: 0;
  transform: translateY(-100%);
}

.scanline.is-on {
  animation: scan var(--dur, 1500ms) linear forwards;
}

@keyframes scan {
  0% {
    opacity: 1;
    transform: translateY(-100%);
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(calc(var(--h, 400px) - 100%));
  }
}

.verify {
  position: absolute;
  z-index: 5;
  width: max-content;
  max-width: min(290px, calc(100% - 16px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--rim-hi);
  background: var(--night);
  color: var(--text);
  font: 11px/1.65 var(--mono);
  font-stretch: 80%;
  box-shadow: 0 16px 36px -14px rgba(10, 18, 48, .65);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}

.verify.is-on {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.vrow {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: vrow .3s var(--ease) var(--d, 0ms) forwards;
}

.vrow+.vrow {
  margin-top: 2px;
}

.vrow-pick {
  color: var(--heal);
}

.vrow-no {
  color: var(--fracture);
}

.vrow i {
  flex: none;
  width: 1.2em;
  font-style: normal;
}

.vrow .ok {
  color: var(--heal);
}

@keyframes vrow {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid currentColor;
  pointer-events: none;
  animation: ripple .7s var(--ease) forwards;
}

@keyframes ripple {
  from {
    opacity: 1;
    transform: scale(.4);
  }

  to {
    opacity: 0;
    transform: scale(6);
  }
}

/* Terminal */

/* Size-contained so new lines scroll inside instead of growing the stage. */
.term-body {
  flex: 1 1 0;
  min-height: 160px;
  contain: size;
  padding: 10px 14px 12px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre;
}

.tl {
  animation: tl .2s ease-out;
}

@keyframes tl {
  from {
    opacity: 0;
  }
}

.t-dim {
  color: var(--faint);
}

.t-hi {
  color: var(--text);
}

.t-ok {
  color: var(--heal);
}

.t-bad {
  color: var(--fracture);
}

.t-scan {
  color: var(--scan);
}

.t-warn {
  color: var(--warn);
}

.t-badge {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--scan);
  color: #fff;
}

/* The thread: selector to element */

.thread {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}

.stage.is-live .thread {
  opacity: 1;
}

.th {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.th-main {
  stroke: var(--muted);
  transition: stroke .4s;
}

.thread[data-mode="healed"] .th-main {
  stroke: var(--heal);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--heal) 80%, transparent));
}

.th-half {
  stroke: var(--fracture);
  opacity: 0;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--fracture) 80%, transparent));
}

.th-stitches line {
  stroke: var(--heal);
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: stitch .28s var(--ease) var(--d, 0ms) forwards;
}

.th-stitches.is-static line {
  animation: none;
  opacity: 1;
}

@keyframes stitch {
  from {
    opacity: 0;
    transform: scale(.2);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.th-dot {
  fill: var(--night);
  stroke: var(--muted);
  stroke-width: 2;
  transition: stroke .4s, opacity .3s;
}

.thread[data-mode="healed"] .th-dot {
  stroke: var(--heal);
}

.thread[data-mode="torn"] .th-dot {
  stroke: var(--fracture);
}

.thread[data-mode="torn"] #th-end {
  opacity: 0;
}

/* Stage caption: phases and controls */

.stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 14px clamp(14px, 2vw, 24px) 18px;
  border-top: 1px solid var(--rim);
}

.phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase {
  --pc: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  transition: color .3s, border-color .3s, background-color .3s;
}

.phase[data-phase="break"] {
  --pc: var(--fracture);
}

.phase[data-phase="scan"],
.phase[data-phase="verify"] {
  --pc: var(--scan);
}

.phase[data-phase="heal"],
.phase[data-phase="cache"] {
  --pc: var(--heal);
}

.phase-n {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rim);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  transition: background-color .3s, color .3s;
}

.phase.is-current {
  color: var(--text);
  border-color: color-mix(in srgb, var(--pc) 55%, transparent);
  background: color-mix(in srgb, var(--pc) 10%, transparent);
}

.phase.is-current .phase-n,
.phase.is-done .phase-n {
  background: var(--pc);
  color: var(--night);
}

.stage-controls {
  display: flex;
  gap: 10px;
}

.ctl {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rim-hi);
  background: transparent;
  color: var(--text);
  font: 500 14px var(--sans);
  cursor: pointer;
  transition: border-color .2s;
}

.ctl:hover {
  border-color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
  padding-top: clamp(96px, 12vw, 160px);
}

.section-head {
  max-width: 640px;
}

.section-head h2,
.cta h2 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.section-head p {
  max-width: 54ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

/* Pipeline: a real sequence, so it's numbered. */

.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.pipeline-head {
  position: sticky;
  top: 120px;
}

@media (max-width: 900px) {
  .pipeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .pipeline-head {
    position: static;
  }
}

.spine {
  --fill: 0;
  position: relative;
  margin: 0;
  padding: 0 0 0 68px;
  list-style: none;
}

.spine::before,
.spine::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  border-radius: 2px;
}

.spine::before {
  background: var(--rim);
}

/* Fills as you read: broken at the top, healed at the bottom. */
.spine::after {
  background: linear-gradient(var(--fracture), var(--scan) 50%, var(--heal));
  clip-path: inset(0 0 calc((1 - var(--fill)) * 100%) 0);
}

.step {
  --step-c: var(--fracture);
  position: relative;
  padding-bottom: clamp(40px, 5vw, 60px);
}

.step:last-child {
  padding-bottom: 0;
}

.step:nth-child(3),
.step:nth-child(4) {
  --step-c: var(--scan);
}

.step:nth-child(5),
.step:nth-child(6) {
  --step-c: var(--heal);
}

.step-node {
  position: absolute;
  z-index: 1;
  left: -68px;
  top: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--rim);
  background: var(--night);
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  transition: border-color .4s, color .4s, box-shadow .4s;
}

.step.is-lit .step-node {
  border-color: var(--step-c);
  color: var(--text);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--step-c) 14%, transparent);
}

.step h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.step p {
  max-width: 56ch;
  margin: 0 0 14px;
  color: var(--muted);
}

.opt {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--rim);
  background: var(--deep);
  color: var(--text);
  font-size: 12px;
}

/* Guardrails playground */

.guard {
  --tone: var(--heal);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr;
  gap: 20px;
  margin-top: 48px;
}

.guard[data-tone="fracture"] {
  --tone: var(--fracture);
}

.guard[data-tone="warn"] {
  --tone: var(--warn);
}

.guard[data-tone="off"] {
  --tone: var(--muted);
}

@media (max-width: 900px) {
  .guard {
    grid-template-columns: minmax(0, 1fr);
  }
}

.guard-controls {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--rim);
  background: var(--deep);
}

@media (max-width: 900px) {
  .guard-controls {
    grid-row: auto;
  }
}

.seg {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.seg legend,
.range label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
}

.seg-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--rim);
  background: var(--night);
}

.seg-option {
  position: relative;
}

.seg-option input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg-option span {
  display: block;
  padding: 11px 6px 10px;
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  transition: background-color .25s, color .25s;
}

.seg-option b {
  display: block;
  font: 600 14px var(--mono);
  font-stretch: 80%;
}

.seg-option small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.seg-option input:checked+span {
  background: var(--rim-hi);
  color: var(--text);
}

.seg-option input:focus-visible+span {
  outline: 2px solid var(--scan);
  outline-offset: 2px;
}

.range label {
  font-family: var(--mono);
  font-stretch: 80%;
}

.range output {
  color: var(--text);
}

.range input {
  width: 100%;
  margin: 0;
  accent-color: var(--tone);
}

.range input:disabled {
  opacity: .4;
}

.range-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.range-note b {
  color: var(--text);
  font-weight: 600;
}

.guard-result {
  padding: 26px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--rim));
  background: color-mix(in srgb, var(--tone) 6%, var(--deep));
  transition: border-color .35s, background-color .35s;
}

.result-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 620;
  line-height: 1.3;
}

.result-title::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 12px var(--tone);
  transition: background-color .35s, box-shadow .35s;
}

.result-body {
  margin: 0 0 18px;
  color: var(--muted);
}

.result-log,
.guard-code,
.prov-env,
.tab-code {
  margin: 0;
  overflow-x: auto;
  color: var(--muted);
  line-height: 1.75;
}

.result-log {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--night);
  font-size: 11.5px;
}

.guard-code {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--rim);
  background: var(--night);
  font-size: 13px;
}

.hl {
  color: var(--tone);
}

/* API tabs */

.api {
  margin-top: 48px;
  border-radius: 18px;
  border: 1px solid var(--rim);
  background: var(--deep);
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--rim);
  overflow-x: auto;
}

.tab {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 13px var(--mono);
  font-stretch: 80%;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--night);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--rim-hi);
}

.tabpanel {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}

.tabpanel[hidden] {
  display: none;
}

.tab-note {
  padding: 28px;
  border-right: 1px solid var(--rim);
}

.tab-note h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -.01em;
}

.tab-note p {
  margin: 0;
  color: var(--muted);
}

.tab-code {
  padding: 28px;
  background: var(--night);
  font-size: 13px;
}

@media (max-width: 760px) {
  .tabpanel {
    grid-template-columns: minmax(0, 1fr);
  }

  .tab-note {
    border-right: 0;
    border-bottom: 1px solid var(--rim);
  }
}

/* Providers */

.prov {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  margin-top: 48px;
}

@media (max-width: 900px) {
  .prov {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .prov-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.prov-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.prov-opt {
  position: relative;
}

.prov-opt input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.prov-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--rim);
  background: var(--deep);
  transition: border-color .25s, background-color .25s;
}

.prov-card svg {
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  color: var(--text);
}

.prov-name {
  font-weight: 620;
}

.prov-meta {
  color: var(--muted);
  font-size: 13.5px;
}

.prov-opt input:hover+.prov-card {
  border-color: var(--rim-hi);
}

.prov-opt input:checked+.prov-card {
  border-color: var(--heal);
  background: color-mix(in srgb, var(--heal) 7%, var(--deep));
}

.prov-opt input:focus-visible+.prov-card {
  outline: 2px solid var(--scan);
  outline-offset: 2px;
}

.prov-env {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--rim);
  background: var(--night);
  font-size: 13px;
}

.e-k {
  color: var(--text);
}

.e-v {
  color: #FFCBA4;
}

.prov-foot {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Video, loaded on request */

.video {
  position: relative;
  margin-top: 48px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--rim);
  background: var(--deep);
  overflow: hidden;
}

.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .62;
  transition: opacity .3s;
}

.video-play:hover img {
  opacity: .8;
}

.video-play:focus-visible {
  outline-offset: -4px;
}

.video-badge {
  position: absolute;
  left: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--night);
  font: 600 16px var(--sans);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Closing call to action */

.cta {
  padding: clamp(112px, 13vw, 176px) 0 clamp(64px, 8vw, 96px);
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--rim);
}

.cta h2 {
  max-width: 17ch;
}

/* Footer */

.foot {
  padding: 28px 0 40px;
  border-top: 1px solid var(--rim);
  color: var(--muted);
  font-size: 14px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}

.foot .brand {
  color: var(--text);
  font-size: 16px;
}

.foot .brand img {
  width: 22px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-right: auto;
}

.foot-links a {
  text-decoration: none;
  transition: color .2s;
}

.foot-links a:hover {
  color: var(--text);
}

.foot-copy {
  margin: 0;
}

/* ---------- Guide page ---------- */

.guide-hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px);
}

.title-guide {
  font-size: clamp(48px, 8vw, 104px);
  width: max-content;
  max-width: 100%;
}

.guide-hero .lede {
  margin-top: 22px;
}

.lede code {
  font-size: .86em;
  padding: .1em .35em;
  border-radius: 5px;
  background: var(--deep);
  border: 1px solid var(--rim);
  color: var(--text);
}

.guide {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding-bottom: clamp(64px, 8vw, 112px);
}

@media (max-width: 900px) {
  .guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

/* The table of contents is the same thread as the home page's pipeline. */
.toc {
  position: sticky;
  top: 104px;
}

.toc-list {
  --fill: 0;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list::before,
.toc-list::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
}

.toc-list::before {
  background: var(--rim);
}

.toc-list::after {
  background: linear-gradient(var(--fracture), var(--scan) 50%, var(--heal));
  clip-path: inset(0 0 calc((1 - var(--fill)) * 100%) 0);
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color .25s;
}

.toc-list a:hover,
.toc-list a.is-current {
  color: var(--text);
}

.toc-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--rim);
  background: var(--night);
  font-size: 11px;
  font-weight: 650;
  transition: border-color .3s, background-color .3s, color .3s;
}

.toc-n-ref {
  width: 12px;
  height: 12px;
  margin: 0 6px;
}

.toc-list a.is-done .toc-n {
  border-color: var(--heal);
  color: var(--text);
}

.toc-list a.is-current .toc-n {
  border-color: var(--heal);
  background: var(--heal);
  color: var(--night);
}

.gstep {
  scroll-margin-top: 96px;
  padding-bottom: clamp(56px, 7vw, 88px);
}

.gstep h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.gstep-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--rim-hi);
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.gstep h3 {
  margin: 40px 0 10px;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -.01em;
}

.gstep-ref h2 {
  font-size: clamp(30px, 3.6vw, 42px);
}

.gstep>p {
  max-width: 64ch;
  margin: 0 0 18px;
  color: var(--muted);
}

.gstep a {
  color: var(--text);
  text-underline-offset: 3px;
}

.gstep .note {
  font-size: 15px;
}

.gstep .install+.note {
  margin-top: 16px;
}

.codeblock {
  margin: 0 0 18px;
  border-radius: 14px;
  border: 1px solid var(--rim);
  background: var(--night);
  overflow: hidden;
}

.codeblock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--rim);
  background: var(--deep);
}

.codeblock-file {
  color: var(--text);
  font-family: var(--mono);
  font-stretch: 80%;
  font-size: 12px;
}

.codeblock-copy {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--rim-hi);
  background: transparent;
  color: var(--muted);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}

.codeblock-copy:hover {
  border-color: var(--muted);
  color: var(--text);
}

.codeblock-copy.is-copied {
  border-color: var(--heal);
  background: var(--heal);
  color: var(--night);
}

.codeblock-pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.tabs-bar {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin-left: -10px;
  border-bottom: 0;
}

@media (max-width: 480px) {
  .tabs-bar .tab {
    padding: 0 7px;
    font-size: 12px;
  }

  /* More tabs than fit: fade the edge so the row reads as scrollable. */
  .tabs-bar {
    padding-right: 24px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }

  /* Icon-only on small screens; the word stays for screen readers. */
  .codeblock-copy {
    display: grid;
    place-items: center;
    width: 30px;
    padding: 0;
    font-size: 0;
  }

  .codeblock-copy::before {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

.tabs-bar .tab {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
}

.codeblock-term .codeblock-pre {
  font-size: 12px;
}

.knobs {
  margin: 0 0 22px;
}

.knob {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
  gap: 8px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--rim);
}

.knob:last-child {
  border-bottom: 1px solid var(--rim);
}

.knob dt code,
.ref-table code {
  font-size: .86em;
  color: var(--text);
}

.knob dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .knob {
    grid-template-columns: minmax(0, 1fr);
  }
}

.table-scroll {
  margin: 0 0 22px;
  overflow-x: auto;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ref-table th {
  padding: 10px 18px 10px 0;
  border-bottom: 1px solid var(--rim-hi);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.ref-table td {
  padding: 12px 18px 12px 0;
  border-bottom: 1px solid var(--rim);
  color: var(--muted);
  vertical-align: top;
}

.ref-table td:first-child code {
  white-space: nowrap;
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}
