/* Noullama site — paper, ink, one dark instrument. */

:root {
  --paper: #e8eae4;
  --paper-deep: #dfe2db;
  --ink: #121619;
  --ink-soft: #59615c;
  --rule: #bfc5bd;
  --rule-strong: #8e968f;
  --indigo: #2a2465;
  --lav: #b9a8f0;
  --lav-dim: #8f82bc;

  --body-copy: #303734;
  --code-ink: #262d2a;
  --code-str: #333f39;
  --type-out-mobile: #4c544f;
  --on-accent: #ffffff;
  --brand-plate: #1c2340;

  --console: #f3f4ee;
  --console-raise: #eaece4;
  --console-line: #cfd4cb;
  --console-text: #1a1f1c;
  --console-mute: #6a726c;
  --console-border: #b2b9b1;
  --console-tab-bg: #e3e6de;
  --console-tab-line: #b9c0b7;
  --console-soft: #39413b;
  --console-code: #2c3430;
  --console-chip: #c8cec5;
  --console-track: #d9ddd5;
  --console-track-fill: #8d958e;
  --console-accent: #38306f;
  --run-bg: #2a2465;
  --run-ink: #ffffff;
  --run-hover: #3a3178;
  --qtype-bg: #e8e4f8;
  --qtype-line: #c6bced;
  --water: #2a2465;
  --ground-wash: rgba(42, 36, 101, 0.05);

  --page: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

html { color-scheme: light; }

html[data-theme="dark"] {
  color-scheme: dark;

  --paper: #101419;
  --paper-deep: #171c23;
  --ink: #e7e9e3;
  --ink-soft: #99a29c;
  --rule: #2b333b;
  --rule-strong: #4d5862;
  --indigo: #b7a9f3;
  --lav: #c2b3f7;
  --lav-dim: #9187b8;

  --body-copy: #c3cac4;
  --code-ink: #d5dbd5;
  --code-str: #aeb8b0;
  --type-out-mobile: #b3bcb5;
  --on-accent: #141021;
  --brand-plate: #222a45;

  --console: #0a0e14;
  --console-raise: #101621;
  --console-line: #273142;
  --console-text: #e2e6ec;
  --console-mute: #8c97a8;
  --console-border: #232d3c;
  --console-tab-bg: #1d2635;
  --console-tab-line: #354155;
  --console-soft: #bcc5d2;
  --console-code: #b6c0ce;
  --console-chip: #3a4252;
  --console-track: #252d3c;
  --console-track-fill: #646c80;
  --console-accent: #b9a8f0;
  --run-bg: #b9a8f0;
  --run-ink: #141021;
  --run-hover: #c9bbf6;
  --qtype-bg: #1e1b33;
  --qtype-line: #3f3866;
  --water: #b9a8f0;
  --ground-wash: rgba(185, 168, 240, 0.055);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

img { display: block; max-width: 100%; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
b { font-weight: 600; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.console :focus-visible { outline-color: var(--console-accent); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
}

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

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--brand-plate);
  border-radius: 3px;
  overflow: hidden;
}

.brand-mark img { width: 34px; height: 34px; object-fit: contain; }

.brand-name {
  font-size: 20px;
  font-weight: 600;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a,
.head-source {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: -0.005em;
}

.site-nav a:hover,
.head-source:hover { color: var(--ink); }

.head-source {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 500;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
}

.head-actions.push { margin-left: auto; }

.theme-toggle {
  appearance: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
  transition: color 140ms linear, border-color 140ms linear, background-color 140ms linear;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--rule-strong);
  background: var(--paper-deep);
}

.theme-toggle svg { display: block; width: 15px; height: 15px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(36px, 5vw, 76px);
  padding-top: clamp(52px, 7vw, 88px);
  padding-bottom: clamp(48px, 6vw, 76px);
  scroll-margin-top: 88px;
}

.hero-copy { padding-top: 6px; }

h1 {
  font-size: clamp(2.5rem, 4.6vw, 4.05rem);
  font-weight: 560;
  font-variation-settings: "wdth" 114;
  line-height: 0.99;
  letter-spacing: -0.037em;
  text-wrap: balance;
  max-width: 12ch;
}

.lede {
  margin-top: 26px;
  max-width: 46ch;
  font-size: clamp(16px, 1.28vw, 17.5px);
  line-height: 1.62;
  color: var(--body-copy);
  text-wrap: pretty;
}

.release {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
}

.release-mark {
  width: 7px;
  height: 7px;
  background: var(--indigo);
  flex: none;
}

.actions {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background-color 140ms linear, color 140ms linear;
}

.button:hover { background: var(--indigo); border-color: var(--indigo); color: var(--on-accent); }

.quiet-link {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 3px;
}

.quiet-link:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- console ---------- */

.console-wrap { min-width: 0; position: relative; }

.preview-label {
  position: absolute;
  top: -8px;
  left: 18px;
  z-index: 2;
  padding: 0 7px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.01em;
}

.console {
  position: relative;
  background: var(--console);
  color: var(--console-text);
  border: 1px solid var(--console-border);
  border-radius: 3px;
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 47px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--console-line);
  background: var(--console-raise);
}

.console-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--console-mute);
  margin-right: auto;
}

.presets { display: flex; gap: 3px; flex-wrap: wrap; }

.presets button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--console-mute);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 120ms linear, background-color 120ms linear;
}

.presets button:hover { color: var(--console-text); }

.presets button[aria-pressed="true"] {
  color: var(--console-text);
  background: var(--console-tab-bg);
  border-color: var(--console-tab-line);
}

.console-state,
.console-questions { padding: 15px 20px 17px; }

.console-state { border-bottom: 1px solid var(--console-line); }

.field {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--console-mute);
  letter-spacing: 0.01em;
}

.console-state p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--console-text);
  max-width: 58ch;
}

.console-questions { border-bottom: 1px solid var(--console-line); }

.question-list { display: grid; gap: 13px; }

.question {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.q-key {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.q-key code {
  font-size: 11.5px;
  color: var(--console-text);
  overflow-wrap: anywhere;
}

.q-type {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  color: var(--console-accent);
  border: 1px solid var(--qtype-line);
  background: var(--qtype-bg);
  padding: 4px 4px 3px;
  border-radius: 2px;
}

.question p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--console-soft);
}

.console-run {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--console-line);
}

.run {
  appearance: none;
  border: 1px solid var(--run-bg);
  background: var(--run-bg);
  color: var(--run-ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 10px 16px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 132px;
  transition: background-color 130ms linear, border-color 130ms linear;
}

.run:hover { background: var(--run-hover); border-color: var(--run-hover); }

.run:disabled { cursor: progress; opacity: 0.72; }

.run-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--console-mute);
  text-align: right;
}

.console-answers {
  padding: 15px 20px 18px;
  min-height: 128px;
}

.console-answers.answers-ready { min-height: 218px; }

.answers-empty {
  font-size: 12.5px;
  color: var(--console-mute);
  max-width: 40ch;
}

.answer { margin-bottom: 15px; }
.answer:last-child { margin-bottom: 0; }

.answer-key {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--console-mute);
}

.answer-key code { color: var(--console-code); font-size: 10.5px; }

.answer-key span {
  font-size: 9px;
  color: var(--console-accent);
  border: 1px solid var(--console-chip);
  padding: 2px 4px;
  border-radius: 2px;
  line-height: 1;
}

.option {
  display: grid;
  grid-template-columns: minmax(58px, 0.62fr) minmax(80px, 2fr) 40px;
  gap: 10px;
  align-items: center;
  min-height: 24px;
}

.opt-label {
  font-size: 12px;
  color: var(--console-mute);
  overflow-wrap: anywhere;
}

.opt-track {
  height: 3px;
  background: var(--console-track);
  overflow: hidden;
}

.opt-track i {
  display: block;
  height: 100%;
  background: var(--console-track-fill);
  transition: width 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.opt-pct {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--console-mute);
  text-align: right;
}

.option.is-top .opt-label { color: var(--console-text); }
.option.is-top .opt-track i { background: var(--console-accent); }
.option.is-top .opt-pct { color: var(--console-accent); }

.answers-ready .answer {
  animation: answer-in 420ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes answer-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.console-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- facts ---------- */

.facts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-block: 34px 36px;
}

.fact { padding-right: 34px; }

.fact + .fact {
  padding-left: 34px;
  border-left: 1px solid var(--rule);
}

.fact h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 9px;
}

.fact p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38ch;
}

.fact code { color: var(--ink); }

/* ---------- sections ---------- */

.section {
  padding-top: clamp(58px, 7vw, 92px);
  scroll-margin-top: 88px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.9vw, 2.45rem);
  font-weight: 570;
  font-variation-settings: "wdth" 110;
  line-height: 1.03;
  letter-spacing: -0.032em;
  max-width: 16ch;
  text-wrap: balance;
}

.section-head p {
  font-size: 15px;
  line-height: 1.66;
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

.section-head code { color: var(--ink); }

/* ---------- question types ---------- */

.type-list { border-bottom: 1px solid var(--rule); }

.type-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.1fr) minmax(0, 0.85fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}

.type-row:first-child { border-top: 0; }

.type-name {
  font-size: 13px;
  color: var(--indigo);
}

.type-does {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.type-out {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.question-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  padding-top: 34px;
  align-items: start;
}

.detail-copy p {
  font-size: 15px;
  line-height: 1.68;
  color: var(--ink-soft);
  max-width: 50ch;
}

.detail-copy p + p { margin-top: 16px; }

.code-sample,
.code-block {
  position: relative;
  min-width: 0;
  max-width: 100%;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.code-sample figcaption,
.code-block figcaption {
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-soft);
}

.code-block figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px 5px 14px;
}

.code-sample pre,
.code-block pre {
  margin: 0;
  padding: 15px 16px 17px;
  overflow-x: auto;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--code-ink);
  tab-size: 2;
}

.code-sample .k { color: var(--indigo); }
.code-sample .s { color: var(--code-str); }

/* ---------- api ---------- */

.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(28px, 5vw, 64px);
  padding-top: 8px;
  align-items: start;
}

.api-grid > *,
.question-detail > *,
.install-grid > * { min-width: 0; }

.endpoints { border-top: 1px solid var(--rule); min-width: 0; }

.endpoint {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.method {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  padding: 3px 4px;
  border-radius: 2px;
  text-align: center;
  line-height: 1.2;
}

.endpoint > code {
  font-size: 12.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.endpoint p {
  grid-column: 2;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.api-grid + .fine { margin-top: 26px; }

.fine {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 88ch;
}

.fine code { color: var(--ink); }

/* ---------- code blocks with copy ---------- */

.code-block { margin-top: 10px; }

.code-block .copy {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  padding: 4px 7px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 120ms linear, border-color 120ms linear;
}

.code-block .copy:hover { color: var(--ink); border-color: var(--rule-strong); }

/* ---------- install ---------- */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.8fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.install-main .section-head { grid-template-columns: 1fr; gap: 16px; padding-bottom: 22px; }
.install-main .section-head h2 { max-width: none; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 24px 0 26px 44px;
  border-bottom: 1px solid var(--rule);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 25px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 1px;
}

.steps h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 7px;
}

.steps p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}

.steps .code-block { margin-top: 14px; max-width: 560px; }

.requirements {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
  position: sticky;
  top: 92px;
}

.requirements h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}

.requirements dl > div {
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}

.requirements dt {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--indigo);
  margin-bottom: 5px;
}

.requirements dd {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.requirements code { color: var(--ink); }

.install-main > .fine { margin-top: 24px; }

/* ---------- status ---------- */

.status {
  position: relative;
  overflow: hidden;
  margin-top: clamp(58px, 7vw, 92px);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  scroll-margin-top: 88px;
}

.status > .wrap {
  position: relative;
  z-index: 1;
}

.status-ground {
  position: absolute;
  inset: 0;
  color: var(--water);
  background: linear-gradient(to top, var(--ground-wash), transparent 56%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.55) 52%, #000 68%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.55) 52%, #000 68%);
}

.ground-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ground-svg path {
  fill: none;
  stroke-width: 1;
  shape-rendering: geometricPrecision;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: clamp(24px, 5vw, 72px);
  padding-block: 42px clamp(150px, 16vw, 196px);
}

.status h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  font-weight: 570;
  font-variation-settings: "wdth" 110;
  letter-spacing: -0.028em;
  line-height: 1.1;
  max-width: 14ch;
}

.status-copy p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body-copy);
  max-width: 66ch;
}

.status-copy p + p { margin-top: 15px; }

/* ---------- not found ---------- */

.not-found {
  min-height: calc(100svh - 69px - 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: clamp(64px, 10vw, 120px);
}

.not-found-code {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.not-found-rule {
  width: clamp(40px, 8vw, 96px);
  height: 1px;
  background: var(--rule);
}

.not-found h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  max-width: 14ch;
}

.not-found-lede {
  margin-top: 24px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.not-found-path {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-top: 30px;
  padding: 11px 15px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink-soft);
}

.not-found-method {
  color: var(--ink);
  letter-spacing: 0.08em;
}

.not-found-target {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(46ch, 58vw);
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.not-found-status {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  color: var(--indigo);
  letter-spacing: 0.07em;
}

.not-found .actions { margin-top: 34px; align-self: stretch; }

/* ---------- footer ---------- */
.site-foot { padding-block: 34px 42px; }

.foot-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.foot-brand { display: flex; align-items: center; gap: 10px; }

.foot-brand .brand-mark { width: 34px; height: 34px; }
.foot-brand .brand-mark img { width: 29px; height: 29px; }

.foot-brand .brand-name { font-size: 16px; }

.foot-links { display: flex; gap: 22px; }

.foot-links a {
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
}

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

.foot-fine {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 40ch;
  text-align: right;
}

/* ---------- entrance ---------- */

.hero-copy > *,
.console-wrap,
.facts-grid .fact,
.not-found > * {
  animation: rise-in 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-copy > :nth-child(1) { animation-delay: 30ms; }
.hero-copy > :nth-child(2) { animation-delay: 90ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }
.hero-copy > :nth-child(4) { animation-delay: 180ms; }

.console-wrap { animation-duration: 720ms; animation-delay: 130ms; }

.facts-grid .fact:nth-child(1) { animation-delay: 250ms; }
.facts-grid .fact:nth-child(2) { animation-delay: 290ms; }
.facts-grid .fact:nth-child(3) { animation-delay: 330ms; }

.not-found > :nth-child(1) { animation-delay: 30ms; }
.not-found > :nth-child(2) { animation-delay: 80ms; }
.not-found > :nth-child(3) { animation-delay: 130ms; }
.not-found > :nth-child(4) { animation-delay: 170ms; }
.not-found > :nth-child(5) { animation-delay: 210ms; }

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 40px; }
  h1 { font-size: clamp(2.4rem, 4.4vw, 3.3rem); }
  .head-inner { gap: 22px; }
  .site-nav { gap: 20px; }
  .head-source { padding-left: 20px; }
  .type-row { grid-template-columns: 120px minmax(0, 1.1fr) minmax(0, 0.8fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; }
  h1 { max-width: 18ch; font-size: clamp(2.5rem, 7vw, 3.5rem); }
  .lede { max-width: 56ch; }
  .console { max-width: 680px; }
  .facts-grid { grid-template-columns: 1fr; padding-block: 10px 18px; }
  .fact { padding: 18px 0; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .fact p { max-width: 58ch; }
  .section-head { grid-template-columns: 1fr; gap: 14px; align-items: start; }
  .section-head h2 { max-width: none; }
  .question-detail { grid-template-columns: 1fr; gap: 26px; }
  .api-grid { grid-template-columns: 1fr; gap: 28px; }
  .install-grid { grid-template-columns: 1fr; gap: 42px; }
  .requirements { position: static; max-width: 560px; }
  .status-grid { grid-template-columns: 1fr; gap: 20px; }
  .status h2 { max-width: none; }
  .foot-grid { grid-template-columns: 1fr auto; align-items: start; }
  .foot-fine { grid-column: 1 / -1; text-align: left; max-width: 56ch; }
  .install-main > .fine { margin-top: 20px; }
}

@media (max-width: 700px) {
  .head-inner { min-height: 60px; gap: 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark img { width: 29px; height: 29px; }
  .brand-name { font-size: 18px; }
  .site-nav { display: none; }
  .head-actions { margin-left: auto; gap: 10px; }
  .theme-toggle { width: 32px; height: 32px; }
  .head-source { padding-left: 0; border-left: 0; font-size: 13px; }
  .hero { padding-top: 40px; }
  .lede { margin-top: 20px; }
  .actions { gap: 18px; }
  .console-bar { gap: 8px; padding: 8px 12px; }
  .console-title { width: 100%; }
  .presets { margin-right: auto; }
  .presets button { padding: 7px 8px; font-size: 11.5px; }
  .console-state, .console-questions { padding: 14px 15px 15px; }
  .console-run { padding: 12px 15px; }
  .console-answers { padding: 14px 15px 16px; min-height: 250px; }
  .console-answers.answers-ready { min-height: 250px; }
  .run-note { display: none; }
  .question { grid-template-columns: 1fr; gap: 5px; }
  .q-key { gap: 6px; }
  .code-sample pre,
  .code-block pre { font-size: 10px; padding: 13px 13px 15px; }
  .question-detail .code-sample,
  .api-grid .code-block {
    margin-inline: calc(var(--pad) * -1);
    width: calc(100% + (var(--pad) * 2));
    max-width: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .type-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .type-out { color: var(--type-out-mobile); }
  .type-list { border-bottom: 0; }
  .type-row { border-bottom: 1px solid var(--rule); }
  .type-row:last-child { border-bottom: 0; }
  .foot-grid { gap: 16px; }
  .foot-links { gap: 16px; }
  .section { scroll-margin-top: 74px; }
  .not-found-code { gap: 10px; margin-bottom: 20px; font-size: 10px; }
  .not-found-lede { margin-top: 18px; }
  .not-found-path { width: 100%; padding: 10px 12px; gap: 9px; font-size: 11.5px; }
  .not-found-target { max-width: 100%; }
}

@media (max-width: 430px) {
  .console-answers { min-height: 286px; }
  .option { grid-template-columns: minmax(54px, 1fr) minmax(48px, 1.1fr) 38px; gap: 8px; }
  .steps > li { padding-left: 36px; }
  .steps > li::before { width: 20px; height: 20px; }
  .actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .button { width: 100%; }
  .foot-grid { grid-template-columns: 1fr; gap: 14px; }
  .foot-links { flex-wrap: wrap; gap: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
