/* ============================================================================
   Node — Refract image API. The toy: bright, round, pressable.
   Shared stylesheet for index.html, docs.html, pricing.html.
   Depth is the LIP (a darker bottom border that collapses on press), never a
   drop-shadow. Text is Eel, never #000. Nothing is 0px. Five mechanic-coded
   accents, each meaning exactly one thing.
   ============================================================================ */

/* ---------- Self-hosted fonts (no CDN, no @import) ---------- */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/nunito-500.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/nunito-700.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./assets/fonts/nunito-800.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/jetbrains-mono-700.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  /* surfaces & text */
  --snow: #ffffff;
  --polar: #f7f7f7;
  --swan: #e5e5e5;
  --hare: #afafaf;
  --wolf: #777777;
  --eel: #4b4b4b;
  --eel-strong: #3c3c3c;
  --on-color: #ffffff;

  /* Meadow (go / Deliver / edge nodes / success) */
  --meadow-bright: #58cc02;
  --meadow-deep: #3a7d00;
  --meadow-lip: #2e6200;
  --meadow-sub: #d7ffb8;

  /* Macaw (Transform / secondary / links / selected choice-tile) */
  --macaw-bright: #1cb0f6;
  --macaw-deep: #0e6fa8;
  --macaw-lip: #0f86c4;
  --macaw-sub: #ddf4ff;

  /* Bee (Optimize / value) — never carries a word or a white glyph */
  --bee-bright: #ffc800;
  --bee-lip: #e5a100;
  --bee-sub: #fff4c8;

  /* Fox (uptime — the streak that never breaks) */
  --fox-bright: #ff9600;
  --fox-deep: #c96a00;
  --fox-lip: #e58500;
  --fox-sub: #ffe7cc;

  /* Cardinal (limits / caps / errors) */
  --cardinal-bright: #ff4b4b;
  --cardinal-deep: #c81e1e;
  --cardinal-lip: #ea2b2b;
  --cardinal-sub: #ffdfdf;

  /* Beetle (the premium Scale tier) */
  --beetle-bright: #ce82ff;
  --beetle-deep: #8a44c7;
  --beetle-lip: #a560e8;
  --beetle-sub: #f1e1ff;

  /* type */
  --font-ui: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* spacing scale */
  --s4: 4px;
  --s8: 8px;
  --s12: 12px;
  --s16: 16px;
  --s24: 24px;
  --s32: 32px;
  --s48: 48px;
  --s80: 80px;

  /* radii */
  --r-chip: 12px;
  --r-tile: 16px;
  --r-card: 20px;
  --r-shell: 24px;
  --r-round: 9999px;

  /* overlay shadow — modals/toasts ONLY */
  --shadow-overlay: 0 8px 24px rgba(75, 75, 75, 0.15);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--snow);
  color: var(--eel);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--macaw-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font-family: inherit;
}
h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Typography utilities ---------- */
.t-display-xxl {
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--eel-strong);
}
.t-display-xl {
  font-weight: 800;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.4px;
  color: var(--eel-strong);
}
.t-display-l {
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.2px;
  color: var(--eel-strong);
}
.t-heading-l {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--eel);
}
.t-heading-m {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: var(--eel);
}
.t-heading-s {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--eel);
}
.t-body-l {
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
}
.t-body {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
}
.t-body-s {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.45;
}
.t-caption {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
}
.t-eyebrow {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.t-param,
.t-url,
.t-code {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1; /* slashed zero — the ONLY declared feature */
}
.t-param {
  font-size: 14px;
  line-height: 1.6;
}
.t-url {
  font-size: 15px;
  line-height: 1.5;
}
.t-code {
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--s24);
}
.container--docs {
  max-width: 1040px;
}
.band {
  padding-block: var(--s80);
}
.band--polar {
  background: var(--polar);
}
.band-head {
  display: flex;
  flex-direction: column;
  gap: var(--s12);
  margin-bottom: var(--s48);
  max-width: 720px;
}
.eyebrow-meadow {
  color: var(--meadow-deep);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--snow);
  color: var(--eel);
  padding: var(--s12) var(--s16);
  border-radius: var(--r-tile);
  z-index: 200;
}
.skip-link:focus {
  left: var(--s16);
  top: var(--s16);
}

/* ============================================================================
   Buttons — the 3D push-button + lip
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 14px 24px;
  min-height: 50px;
  border-radius: var(--r-tile);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}

/* Level 3 — solid 3D primary */
.btn-primary {
  background: var(--meadow-deep);
  color: var(--on-color);
  box-shadow: 0 4px 0 0 var(--meadow-lip);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--meadow-lip);
}

/* Level 2 — ghost, still presses */
.btn-secondary {
  background: var(--snow);
  color: var(--macaw-deep);
  border: 2px solid var(--swan);
  box-shadow: 0 4px 0 0 var(--swan);
}
.btn-secondary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--swan);
}

/* Level 3 — danger (limit/destructive tone only) */
.btn-danger {
  background: var(--cardinal-deep);
  color: var(--on-color);
  box-shadow: 0 4px 0 0 var(--cardinal-lip);
}
.btn-danger:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--cardinal-lip);
}

/* disabled = flat (no lip). Flatness is the "not pressable" cue. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--swan);
  color: var(--hare);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn-block {
  display: flex;
  width: 100%;
}
.btn-sm {
  font-size: 15px;
  min-height: 40px;
  padding: 10px 18px;
}

/* ---------- pill tags ---------- */
.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  padding: 6px 14px;
  border-radius: var(--r-round);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--eel);
}
.pill-meadow {
  background: var(--meadow-sub);
  color: var(--meadow-deep);
}
.pill-macaw {
  background: var(--macaw-sub);
  color: var(--macaw-deep);
}
.pill-bee {
  background: var(--bee-sub);
  color: var(--eel);
}
.pill-fox {
  background: var(--fox-sub);
  color: var(--fox-deep);
}
.pill-cardinal {
  background: var(--cardinal-sub);
  color: var(--cardinal-deep);
}
.pill-beetle {
  background: var(--beetle-sub);
  color: var(--beetle-deep);
}
/* the one neutral pill — statement of fact, never an accent */
.negotiated-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-round);
  background: var(--polar);
  color: var(--wolf);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================================
   Nav — sticky, 72px, Snow with a 1px Swan divider
   ============================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--snow);
  border-bottom: 1px solid var(--swan);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s16);
  min-height: 72px;
}
.wordmark {
  font-weight: 800;
  font-size: 22px;
  color: var(--eel-strong);
  letter-spacing: -0.2px;
  margin-right: auto;
}
.wordmark:hover {
  text-decoration: none;
}
.nav-toggle {
  display: none;
}
.nav-tabs {
  display: flex;
  align-items: center;
  gap: var(--s8);
}
.nav-tab {
  color: var(--eel);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  padding: 8px 12px;
  border-radius: var(--r-chip);
  border-bottom: 3px solid transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.nav-tab:hover {
  text-decoration: none;
  color: var(--eel-strong);
}
.nav-tab[aria-current="page"] {
  border-bottom-color: var(--meadow-bright);
  color: var(--eel-strong);
}
.nav-cta {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 15px;
}
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-chip);
  border: 2px solid var(--swan);
  background: var(--snow);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--eel);
}
.nav-burger svg {
  width: 22px;
  height: 22px;
}

/* ============================================================================
   Hero (index)
   ============================================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s48);
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s24);
  min-width: 0;
}
.hero-title {
  margin: 0;
}
.hero-lead {
  color: var(--eel);
  max-width: 44ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s16);
  align-items: center;
}
.url-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s12);
  background: var(--polar);
  border: 2px solid var(--swan);
  border-radius: var(--r-chip);
  padding: 10px 12px 10px 16px;
  max-width: 100%;
  min-width: 0;
}
.url-badge .t-url {
  color: var(--eel);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  font-size: 13px;
  scrollbar-width: none;
}
.url-badge .t-url::-webkit-scrollbar {
  display: none;
}

/* inset photo frame — the one place a real photograph lives */
.photo-frame {
  border-radius: var(--r-card);
  overflow: hidden;
  border: 2px solid var(--swan);
  background: var(--polar);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: var(--s12);
  min-width: 0;
}
.hero-visual .photo-frame {
  aspect-ratio: 4 / 3;
}
.hero-cap {
  display: flex;
  align-items: center;
  gap: var(--s8);
  color: var(--wolf);
}

/* ============================================================================
   Capability trio
   ============================================================================ */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s24);
}
.feature-card {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-radius: var(--r-card);
  border-top-width: 6px;
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s16);
  min-width: 0;
}
.feature-card.key-macaw {
  border-top-color: var(--macaw-bright);
}
.feature-card.key-bee {
  border-top-color: var(--bee-bright);
}
.feature-card.key-meadow {
  border-top-color: var(--meadow-bright);
}
.card-photo {
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--polar);
  border: 2px solid var(--swan);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-head {
  display: flex;
  align-items: center;
  gap: var(--s12);
}
.icon-chip {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eel); /* glyph is Eel on a bright fill — never white */
}
.icon-chip svg {
  width: 24px;
  height: 24px;
}
.chip-macaw {
  background: var(--macaw-bright);
}
.chip-bee {
  background: var(--bee-bright);
}
.chip-meadow {
  background: var(--meadow-bright);
}
.chip-fox {
  background: var(--fox-bright);
}
.card-body {
  color: var(--eel);
}
.mono-inline {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  background: var(--polar);
  border-radius: var(--r-chip);
  padding: 2px 8px;
  color: var(--eel);
  white-space: nowrap;
}

/* ============================================================================
   Live-transform demo
   ============================================================================ */
.demo-shell {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-radius: var(--r-shell);
  padding: var(--s32);
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s24);
}
.frame-block {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  min-width: 0;
}
.frame-label {
  display: flex;
  align-items: center;
  gap: var(--s8);
  color: var(--wolf);
}
.demo-frame {
  border-radius: var(--r-card);
  border: 2px solid var(--swan);
  background: var(--polar);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--s16);
}
.demo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-chip);
}
/* result canvas — represents the requested w x h box */
#resultCanvas {
  overflow: hidden;
  border-radius: var(--r-chip);
  background: var(--polar);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
#resultImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.demo-controls {
  margin-top: var(--s32);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s24);
}
.control-group {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.control-legend {
  display: flex;
  align-items: baseline;
  gap: var(--s8);
  padding: 0;
  margin-bottom: var(--s12);
}
.control-legend .t-param {
  color: var(--eel);
  font-weight: 700;
}
.control-hint {
  color: var(--wolf);
  font-size: 13px;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
}

/* choice-tile */
.choice-tile {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-radius: var(--r-tile);
  box-shadow: 0 4px 0 0 var(--swan);
  padding: 10px 16px;
  color: var(--eel);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.choice-tile:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--swan);
}
.choice-tile[aria-pressed="true"] {
  background: var(--macaw-sub);
  border-color: var(--macaw-deep);
  box-shadow: 0 4px 0 0 var(--macaw-deep);
  font-weight: 700;
  color: var(--eel);
}
.choice-tile[aria-pressed="true"]:active {
  box-shadow: 0 0 0 0 var(--macaw-deep);
}
.choice-tile:disabled {
  background: var(--polar);
  border-color: var(--swan);
  box-shadow: none;
  color: var(--hare);
  cursor: not-allowed;
}

/* stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--s12);
}
.step-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-round);
  background: var(--meadow-deep);
  color: var(--on-color);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 0 var(--meadow-lip);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.step-btn svg {
  width: 20px;
  height: 20px;
}
.step-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--meadow-lip);
}
.step-btn:disabled {
  background: var(--swan);
  color: var(--hare);
  box-shadow: none;
  cursor: not-allowed;
}
.step-value {
  min-width: 96px;
  text-align: center;
}
.step-value .num {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
  font-weight: 700;
  font-size: 17px;
  color: var(--eel);
}
.step-value .unit {
  color: var(--wolf);
  font-size: 13px;
}

/* slider */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: var(--s16);
}
input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: var(--r-round);
  background: var(--swan);
  accent-color: var(--meadow-bright);
  cursor: pointer;
  min-width: 0;
}
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: var(--r-round);
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -7px;
  border-radius: var(--r-round);
  background: var(--snow);
  border: 3px solid var(--meadow-deep);
  cursor: pointer;
}
input[type="range"].slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: var(--r-round);
  background: var(--snow);
  border: 3px solid var(--meadow-deep);
  cursor: pointer;
}
input[type="range"].slider::-moz-range-progress {
  background: var(--meadow-bright);
  height: 12px;
  border-radius: var(--r-round);
}
.slider-val {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
  font-weight: 700;
  color: var(--eel);
  min-width: 40px;
  text-align: right;
}

/* bg swatch grid + hex field */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  align-items: center;
}
.swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--r-chip);
  border: 2px solid var(--swan);
  box-shadow: 0 4px 0 0 var(--swan);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  padding: 0;
}
.swatch:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--swan);
}
.swatch[aria-pressed="true"] {
  border-color: var(--macaw-deep);
  box-shadow: 0 4px 0 0 var(--macaw-deep);
}
.hex-field {
  background: var(--polar);
  border: 2px solid var(--swan);
  border-radius: var(--r-chip);
  padding: 10px 14px;
  color: var(--eel);
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  width: 120px;
  min-width: 0;
}
.hex-field::placeholder {
  color: var(--hare);
}
.hex-field:focus {
  outline: none;
  background: var(--snow);
  border-color: var(--macaw-deep);
}
.control-group[data-inert="true"] {
  opacity: 0.55;
}
.control-group[data-inert="true"] .control-legend .t-param {
  color: var(--hare);
}

.demo-url {
  margin-top: var(--s32);
  display: flex;
  flex-direction: column;
  gap: var(--s12);
}
.url-line {
  display: flex;
  align-items: center;
  gap: var(--s12);
  background: var(--polar);
  border: 2px solid var(--swan);
  border-radius: var(--r-tile);
  padding: var(--s16);
  min-width: 0;
}
.url-line code {
  color: var(--eel);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  scrollbar-width: none;
}
.url-line code::-webkit-scrollbar {
  display: none;
}
.url-line code .neg {
  color: var(--wolf);
}
.negotiated-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s8);
  color: var(--wolf);
  font-size: 13px;
}

/* ============================================================================
   Stat tiles
   ============================================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s24);
}
.stat-tile {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-top-width: 6px;
  border-radius: var(--r-tile);
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  min-width: 0;
}
.stat-tile.key-bee {
  border-top-color: var(--bee-bright);
}
.stat-tile.key-macaw {
  border-top-color: var(--macaw-bright);
}
.stat-tile.key-meadow {
  border-top-color: var(--meadow-bright);
}
.stat-tile.key-fox {
  border-top-color: var(--fox-bright);
}
.stat-chip {
  width: 36px;
  height: 36px;
  border-radius: var(--r-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eel);
}
.stat-chip svg {
  width: 20px;
  height: 20px;
}
.stat-figure {
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--eel); /* the figure is always Eel */
}
.stat-label {
  color: var(--eel);
  font-size: 13px;
}

/* ============================================================================
   CTA band
   ============================================================================ */
.cta-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s24);
}
.cta-band .cta-copy {
  max-width: 46ch;
  color: var(--eel);
}

/* ============================================================================
   Footer — Polar, never inverts
   ============================================================================ */
.footer {
  background: var(--polar);
  padding: var(--s48) var(--s24);
  border-top: 1px solid var(--swan);
}
.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s48);
  justify-content: space-between;
}
.footer-brand {
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s48);
}
.footer-col h4 {
  color: var(--eel);
  margin-bottom: var(--s12);
}
.footer-col a {
  color: var(--eel);
  font-size: 13px;
  display: block;
  padding: 4px 0;
}
.footer-legal {
  max-width: 1200px;
  margin: var(--s32) auto 0;
  color: var(--wolf);
  font-size: 13px;
}

/* ============================================================================
   Docs — lesson path
   ============================================================================ */
.lesson-path {
  display: flex;
  flex-direction: column;
  gap: var(--s48);
  position: relative;
}
.lesson-step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s24);
  align-items: stretch;
}
.node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s8);
}
.path-node {
  width: 76px;
  height: 76px;
  border-radius: var(--r-round);
  background: var(--meadow-deep);
  color: var(--on-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 0 var(--meadow-lip);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-weight: 700;
  font-size: 28px;
}
.path-node:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 0 var(--meadow-lip);
}
.node-connector {
  width: 0;
  flex: 1;
  min-height: 40px;
  border-left: 3px dashed var(--swan);
}
.lesson-step:last-child .node-connector {
  display: none;
}
.step-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s16);
  padding-top: var(--s4);
}
.step-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s16);
}
.step-origin {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--s24);
  align-items: center;
}
.step-origin .photo-frame {
  aspect-ratio: 1 / 1;
}
.request-line {
  display: flex;
  align-items: center;
  gap: var(--s12);
  background: var(--polar);
  border: 2px solid var(--swan);
  border-radius: var(--r-tile);
  padding: var(--s16);
  min-width: 0;
}
.request-line code {
  color: var(--eel);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  scrollbar-width: none;
}
.request-line code::-webkit-scrollbar {
  display: none;
}

/* code block */
.code-block {
  background: var(--polar);
  border-radius: var(--r-tile);
  padding: var(--s24);
  position: relative;
  min-width: 0;
}
.code-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s12);
}
.code-block pre {
  margin: 0;
  overflow-x: auto;
  min-width: 0;
}
.code-block code {
  color: var(--eel);
  white-space: pre;
}
.code-block code .kw {
  font-weight: 700;
  color: var(--eel);
}
.code-block code .cmt {
  color: var(--wolf);
}

/* parameter reference table (detail rows) */
.param-list {
  border-top: 1px solid var(--swan);
}
.param-row {
  display: grid;
  grid-template-columns: 160px 220px 1fr;
  gap: var(--s24);
  padding: var(--s24) 0;
  border-bottom: 1px solid var(--swan);
  align-items: baseline;
}
.param-name {
  display: flex;
  align-items: center;
  gap: var(--s8);
  flex-wrap: wrap;
}
.param-name .t-param {
  color: var(--eel);
  font-weight: 700;
}
.param-values {
  color: var(--eel);
  min-width: 0;
}
.param-values .val {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  background: var(--polar);
  border-radius: 8px;
  padding: 1px 6px;
  margin: 0 2px 2px 0;
  display: inline-block;
  color: var(--eel);
}
.param-desc {
  color: var(--eel);
  min-width: 0;
}

/* caching & limits rows */
.limit-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s16);
}
.limit-row {
  display: flex;
  align-items: center;
  gap: var(--s16);
  background: var(--snow);
  border: 2px solid var(--swan);
  border-radius: var(--r-tile);
  padding: var(--s24);
  min-width: 0;
}
.limit-row .icon-chip {
  flex: none;
}
.limit-figure {
  font-weight: 800;
  font-size: 22px;
  color: var(--eel);
  white-space: nowrap;
}

/* ============================================================================
   Pricing
   ============================================================================ */
.pricing-head {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: var(--s48);
  align-items: center;
}
.pricing-head .photo-frame {
  aspect-ratio: 4 / 3;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s24);
  align-items: stretch;
}
.plan-card {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-top-width: 6px;
  border-radius: var(--r-card);
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s16);
  min-width: 0;
}
.plan-card.key-neutral {
  border-top-color: var(--hare);
}
.plan-card.key-meadow {
  border-top-color: var(--meadow-bright);
}
.plan-card.key-beetle {
  border-top-color: var(--beetle-bright);
}
.plan-top {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.price-cell {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--s8);
  width: 140px;
  margin-left: auto;
  text-align: right;
}
.price-figure {
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--eel);
  font-variant-numeric: tabular-nums; /* progressive no-harm; layout does not depend on it */
}
.price-per {
  color: var(--wolf);
  font-size: 13px;
}
.quota-list {
  display: flex;
  flex-direction: column;
  gap: var(--s12);
  margin-top: var(--s8);
}
.quota-list li {
  display: flex;
  gap: var(--s12);
  align-items: flex-start;
  color: var(--eel);
  font-size: 15px;
}
.quota-list .tick {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--meadow-deep);
}

/* overage & billing */
.overage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s24);
}
.info-card {
  background: var(--snow);
  border: 2px solid var(--swan);
  border-radius: var(--r-card);
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s12);
  min-width: 0;
}
.info-card.key-cardinal {
  border-top: 6px solid var(--cardinal-bright);
}
.info-card.key-bee {
  border-top: 6px solid var(--bee-bright);
}

/* FAQ */
.faq-list {
  border-top: 1px solid var(--swan);
}
.faq-item {
  border-bottom: 1px solid var(--swan);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  padding: var(--s24) 0;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-q {
  font-weight: 700;
  font-size: 22px;
  color: var(--eel);
}
.faq-chevron {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-round);
  background: var(--polar);
  border: 2px solid var(--swan);
  box-shadow: 0 4px 0 0 var(--swan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eel);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.faq-chevron svg {
  width: 22px;
  height: 22px;
  transition: transform 0.18s ease;
}
.faq-item[open] .faq-chevron svg {
  transform: rotate(180deg);
}
.faq-item summary:active .faq-chevron {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--swan);
}
.faq-a {
  padding: 0 0 var(--s24);
  color: var(--eel);
  max-width: 68ch;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--eel);
  outline-offset: 2px;
}
.choice-tile:focus-visible,
.btn:focus-visible,
.step-btn:focus-visible,
.path-node:focus-visible,
.swatch:focus-visible,
.faq-item summary:focus-visible,
.nav-tab:focus-visible {
  outline: 3px solid var(--eel);
  outline-offset: 2px;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plan-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
  .container {
    max-width: 720px;
  }
  .container--wide {
    max-width: 960px;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .pricing-head {
    grid-template-columns: 1fr;
  }
  .demo-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .t-display-xxl {
    font-size: 36px;
  }
  .t-display-xl {
    font-size: 30px;
  }
  .t-display-l {
    font-size: 26px;
  }
  .band {
    padding-block: var(--s48);
  }
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .demo-shell {
    padding: var(--s16);
  }
  .overage-grid {
    grid-template-columns: 1fr;
  }
  .param-row {
    grid-template-columns: 1fr;
    gap: var(--s8);
  }
  .step-origin {
    grid-template-columns: 1fr;
  }
  .lesson-step {
    grid-template-columns: 64px 1fr;
    gap: var(--s16);
  }
  .path-node {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }
  .faq-q {
    font-size: 18px;
  }

  /* nav collapses to wordmark + burger; green CTA persists */
  .nav-burger {
    display: inline-flex;
    order: 3;
  }
  .nav-cta {
    order: 2;
  }
  .nav-tabs {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s4);
    padding-top: var(--s12);
  }
  .nav-toggle:checked ~ .nav-tabs {
    display: flex;
  }
  .nav-inner {
    flex-wrap: wrap;
    padding-block: var(--s12);
  }
  .nav-tab {
    padding: 12px;
    border-radius: var(--r-chip);
    border-bottom: none;
  }
  .nav-tab[aria-current="page"] {
    background: var(--meadow-sub);
    color: var(--meadow-deep);
  }
  .btn {
    width: 100%;
  }
  .btn.nav-cta,
  .btn.btn-sm,
  .btn-secondary.copy-btn {
    width: auto;
  }
  .footer-inner {
    flex-direction: column;
    gap: var(--s32);
  }
}

/* ---------- Reduced motion — turn off the spring, keep the compression ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
