/* ==========================================================================
   Refract — Meter
   An image API presented as a live operations console. Near-black floor, ONE
   voltage of acid lime, one alarm red that is a state. Figures in tabular
   monospace that resolve on connect and hold. No paper, no light band, no
   shadow, nothing rounds past 6px. Every figure traces to content.md.
   Shared across this bundle's three pages only.
   ========================================================================== */

/* ---- Fonts (self-hosted variable woff2, no CDN) ------------------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./assets/fonts/space-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("./assets/fonts/jetbrains-mono.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Near-black, one voltage, a three-step neutral ramp, white for figures,
     one alarm red. No light surface anywhere. */
  --canvas: #0a0b0e;
  --panel: #101216;
  --panel-raised: #191c22;
  --grid: #15181e;
  --hairline: #1e222a;
  --hairline-strong: #252a33;
  --ink: #f2f4f6;
  --metric-bright: #c9ced3;
  --metric-mid: #9aa0a6;
  --metric-dim: #6b7075;
  --volt: #c6f24e;
  --volt-deep: #a9d43a;
  --alert: #ff5c5c;

  --volt-glow: drop-shadow(0 0 6px rgba(198, 242, 78, 0.5));

  /* Spacing: 2 4 8 12 16 24 40 64 96 */
  --s-2: 2px;
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-40: 40px;
  --s-64: 64px;
  --s-96: 96px;

  --maxw: 1280px;
  --readw: 1040px;

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--metric-mid);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- Focus: 2px volt ring, never removed -------------------------------- */
:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Type roles --------------------------------------------------------- */
/* Words are Space Grotesk; every figure is JetBrains Mono. Split is absolute. */
.mono {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
}

.display-xxl {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -1.6px;
  color: var(--ink);
}
.display-xl {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--ink);
}
.display-l {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.display-m {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.body-l {
  font-size: 18px;
  line-height: 1.55;
  color: var(--metric-mid);
}
.body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--metric-mid);
}
.body-s {
  font-size: 14px;
  line-height: 1.5;
  color: var(--metric-mid);
}
.micro {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
  color: var(--metric-mid);
}

/* Readout roles — all mono, all with slashed zero. */
.readout-xxl {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 600;
  font-size: 72px;
  line-height: 0.95;
  letter-spacing: -1px;
  color: var(--ink);
}
.readout-xl {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.readout-l {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.05;
  color: var(--ink);
}
.value {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--metric-bright);
}
/* The unit stepped down beside a readout. */
.unit {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-weight: 500;
  color: var(--metric-dim);
  letter-spacing: 0;
}
.readout-xxl .unit {
  font-size: 26px;
}
.readout-xl .unit {
  font-size: 20px;
}
.volt-figure {
  color: var(--volt);
}

/* ---- Layout ------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--s-24);
  padding-right: var(--s-24);
}
.read {
  max-width: var(--readw);
  margin: 0 auto;
  padding-left: var(--s-24);
  padding-right: var(--s-24);
}
.band {
  padding-top: var(--s-96);
  padding-bottom: var(--s-96);
}
.band-dense {
  padding-top: var(--s-64);
  padding-bottom: var(--s-64);
}
/* The faint graph-paper grid rides the console bands. Texture, never a line
   that means anything (1.1:1). */
.gridbg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
}
.band-sep {
  border-top: 1px solid var(--hairline);
}

/* ---- Nav ---------------------------------------------------------------- */
.nav {
  height: 64px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--s-24);
  display: flex;
  align-items: center;
  gap: var(--s-24);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--volt);
  filter: var(--volt-glow);
  flex: none;
}
.nav-tabs {
  display: flex;
  gap: var(--s-24);
  margin-left: var(--s-16);
}
.nav-tab {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
  line-height: 1.4;
  color: var(--metric-mid);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease-out;
}
.nav-tab:hover {
  color: var(--metric-bright);
}
.nav-tab[aria-current="page"] {
  color: var(--metric-bright);
  border-bottom-color: var(--volt);
}
.nav-cta {
  margin-left: auto;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color 120ms ease-out, color 120ms ease-out,
    border-color 120ms ease-out;
}
.btn-primary {
  background: var(--volt);
  color: var(--canvas);
  border-color: var(--volt);
}
.btn-primary:hover {
  background: var(--volt);
}
.btn-primary:active {
  background: var(--volt-deep);
  border-color: var(--volt-deep);
}
.btn-outline {
  background: transparent;
  color: var(--metric-bright);
  border-color: var(--hairline-strong);
}
.btn-outline:hover {
  border-color: var(--metric-mid);
  color: var(--ink);
}
.btn-outline.full {
  width: 100%;
}
.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}
.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--volt);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
}
.btn-text:hover {
  text-decoration: underline;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
}
.eyebrow {
  color: var(--metric-mid);
  margin-bottom: var(--s-24);
}
.hero-title {
  margin: 0 0 var(--s-24);
  max-width: 16ch;
}
.hero-title .volt-figure {
  color: var(--volt);
}
.hero-lead {
  max-width: 62ch;
  margin: 0 0 var(--s-40);
  color: var(--metric-mid);
}

/* prompt-line: the request bar */
.prompt-line {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: var(--s-16) var(--s-16);
  display: flex;
  align-items: center;
  gap: var(--s-12);
  flex-wrap: wrap;
}
.prompt-go {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--volt);
  filter: var(--volt-glow);
  flex: none;
}
.prompt-url {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--metric-bright);
  word-break: break-all;
  flex: 1 1 auto;
  min-width: 0;
}
.prompt-url .k {
  color: var(--volt);
}
.prompt-url .p {
  color: var(--metric-dim);
}
.prompt-copy {
  margin-left: auto;
  flex: none;
}

/* the three resolving response readouts under the prompt line */
.response-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-top: none;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}
.response-cell {
  background: var(--panel);
  padding: var(--s-24);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.response-cell .micro {
  order: 2;
}
.response-value {
  order: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.response-value .num {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.05;
  color: var(--ink);
}
.response-value .num.volt-figure {
  color: var(--volt);
}
.response-value .unit {
  font-size: 16px;
}

/* ---- Capability trio ---------------------------------------------------- */
.trio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-24);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: var(--s-24);
}
.panel-wide {
  grid-column: 1 / -1;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-16);
  margin-bottom: var(--s-16);
}
.panel-title {
  margin: 0;
}
.panel-copy {
  color: var(--metric-mid);
  margin: 0 0 var(--s-24);
  font-size: 15px;
}
.panel-tag {
  color: var(--metric-mid);
}

/* live parameter strip (Transform panel) */
.param-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.param-cell {
  background: var(--panel-raised);
  padding: var(--s-12) var(--s-16);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-width: 84px;
}
.param-cell .pk {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  color: var(--volt);
}
.param-cell .pv {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 18px;
  color: var(--metric-bright);
}

/* optimize panel readout */
.opt-readouts {
  display: flex;
  gap: var(--s-24);
  flex-wrap: wrap;
}
.opt-readout {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

/* ---- Edge strip (41 nodes) --------------------------------------------- */
.edge-caption {
  color: var(--metric-mid);
  margin-bottom: var(--s-16);
}
.edge-caption .n {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  color: var(--metric-bright);
  font-weight: 500;
}
.edge-bands {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}
.edge-band {
  display: flex;
  align-items: center;
  gap: var(--s-16);
}
.edge-band-label {
  flex: 0 0 118px;
  color: var(--metric-mid);
}
.edge-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.node {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--volt);
  filter: var(--volt-glow);
  transition: transform 120ms ease-out;
}
.node:hover,
.node:focus-visible {
  transform: translateY(-3px);
}
.node .tip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 8px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
  z-index: 5;
}
.node:hover .tip,
.node:focus-visible .tip {
  opacity: 1;
}
.node .tip .tl {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--volt);
  display: block;
}
.node .tip .tv {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-size: 12px;
  color: var(--metric-bright);
  display: block;
  margin-top: 2px;
}

/* ---- Latency readout + sparkline --------------------------------------- */
.latency {
  margin-top: var(--s-40);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-40);
  align-items: center;
}
.latency-figs {
  display: flex;
  gap: var(--s-40);
}
.latency-fig {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.latency-fig .readout-xl {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.spark {
  width: 100%;
  height: 140px;
}
.spark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.spark-line {
  fill: none;
  stroke: var(--volt);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: var(--volt-glow);
}
.spark-area {
  fill: url(#sparkfill);
  stroke: none;
}
.spark-trace {
  animation: sparkbreath 24s ease-in-out infinite alternate;
}
@keyframes sparkbreath {
  from {
    transform: translateY(2px);
  }
  to {
    transform: translateY(-2px);
  }
}

/* ---- Stat band ---------------------------------------------------------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.stat-tile {
  background: var(--panel);
  padding: var(--s-24);
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.stat-fig {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stat-tile .micro {
  color: var(--metric-mid);
}

/* ---- CTA band ----------------------------------------------------------- */
.cta-band {
  text-align: center;
}
.cta-band .display-l {
  margin: 0 0 var(--s-24);
}
.cta-band .body-l {
  max-width: 52ch;
  margin: 0 auto var(--s-40);
}

/* ---- Before/after transform job ---------------------------------------- */
.job-head {
  margin-bottom: var(--s-40);
}
.job-head .display-l {
  margin: 0 0 var(--s-12);
}
.job {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-24);
}
.pane {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.pane-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12);
  padding: var(--s-12) var(--s-16);
  border-bottom: 1px solid var(--hairline);
}
.pane-figure {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--canvas);
  overflow: hidden;
  position: relative;
}
.pane-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* the AFTER pane delivers a reshaped 1:1 frame, so cover genuinely crops and
   the crop strategies (smart / center / edges) visibly disagree — smart keeps
   the off-center subject, edges drops it. JS drives the live object-position. */
.pane-figure.after {
  aspect-ratio: 1 / 1;
}
.pane-figure.after img {
  object-position: 78% center;
}
.pane-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-12);
  padding: var(--s-16);
  border-top: 1px solid var(--hairline);
}
.pane-bytes {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
}
.pane-bytes.after {
  color: var(--volt);
}
.job-note {
  margin-top: var(--s-16);
  color: var(--metric-dim);
  font-size: 13px;
}

/* the seven browser-honest params, wired to the after pane */
.job-controls {
  margin-top: var(--s-24);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: var(--s-24);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-16) var(--s-24);
}
.control {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-8);
}
.control-head .pk {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  color: var(--volt);
}
.control-head .pv {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-size: 14px;
  color: var(--metric-bright);
}
/* fader */
.fader {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--hairline-strong);
  outline-offset: 6px;
}
.fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 4px;
  height: 20px;
  background: var(--volt);
  border: none;
  border-radius: 0;
}
.fader::-moz-range-thumb {
  width: 4px;
  height: 20px;
  background: var(--volt);
  border: none;
  border-radius: 0;
}
/* selector */
.selector {
  display: inline-flex;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.selector button {
  background: var(--panel);
  border: none;
  color: var(--metric-mid);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  padding: 8px 12px;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.selector button:hover {
  color: var(--metric-bright);
}
.selector button[aria-checked="true"] {
  background: var(--panel-raised);
  color: var(--metric-bright);
  font-weight: 600;
}

/* ---- Docs: page opener -------------------------------------------------- */
.opener {
  padding-top: var(--s-64);
  padding-bottom: var(--s-40);
}
.opener .display-xl {
  margin: var(--s-16) 0 var(--s-16);
}
.opener .body-l {
  max-width: 60ch;
  margin: 0;
}

/* ---- Docs: quickstart run log ------------------------------------------ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.step {
  background: var(--panel);
  padding: var(--s-24);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--s-24);
  align-items: start;
}
.step-no {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--volt);
}
.step-body h3 {
  margin: 0 0 var(--s-8);
}
.step-body p {
  margin: 0;
  color: var(--metric-mid);
}

/* ---- Code block --------------------------------------------------------- */
.code {
  position: relative;
  background: var(--panel);
  border-radius: 6px;
  padding: var(--s-24);
  margin-top: var(--s-16);
}
.code pre {
  margin: 0;
  overflow-x: auto;
}
.code code {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--metric-bright);
  white-space: pre;
}
.code .k {
  color: var(--volt);
}
.code-copy {
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
}

/* ---- Config panel (parameter reference) -------------------------------- */
.config {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.config-head,
.config-row {
  display: grid;
  grid-template-columns: 120px 200px 1fr 128px;
  gap: var(--s-24);
  align-items: baseline;
  padding: var(--s-12) var(--s-16);
}
.config-head {
  background: var(--panel-raised);
}
.config-head span {
  color: var(--metric-mid);
}
.config-row {
  border-top: 1px solid var(--hairline);
}
.config-row:first-child {
  border-top: none;
}
.cfg-name {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  flex-wrap: wrap;
}
.cfg-name .pk {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-weight: 400;
  font-size: 14px;
  color: var(--volt);
}
.cfg-values {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-size: 13px;
  color: var(--metric-mid);
  word-break: break-word;
}
.cfg-desc {
  font-size: 14px;
  color: var(--metric-mid);
}
.cfg-live {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 16px;
  color: var(--metric-bright);
  text-align: right;
}

/* negotiated-tag: a square statement of fact */
.tag-negotiated {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-feature-settings: "case" 1;
  color: var(--metric-mid);
  border: 1px solid var(--hairline-strong);
  border-radius: 0;
  padding: 2px 8px;
}

/* ---- Caching & limits readout strip ------------------------------------ */
.limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.limit-cell {
  background: var(--panel);
  padding: var(--s-24);
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.limit-fig {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
/* rate meter */
.rate-meter {
  margin-top: var(--s-12);
  height: 6px;
  background: var(--panel-raised);
  border-radius: 3px;
  overflow: hidden;
}
.rate-fill {
  height: 100%;
  width: 0;
  background: var(--volt);
  filter: var(--volt-glow);
  transition: width 500ms var(--ease);
}

/* ---- Pricing: capacity gauges / tier blocks ---------------------------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-24);
  align-items: stretch;
}
.tier {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: var(--s-24);
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
}
.tier-name {
  margin: 0;
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tier-price .unit {
  font-size: 22px;
}

/* capacity-gauge */
.gauge {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.gauge-track {
  position: relative;
  height: 40px;
  background: var(--panel-raised);
  border-radius: 6px;
  overflow: hidden;
}
.gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--volt);
  filter: var(--volt-glow);
  transition: width 500ms var(--ease);
}
/* the overage zone past the cap line */
.gauge-over {
  position: absolute;
  top: 0;
  height: 100%;
  right: 0;
}
/* Free: past-cap is dark + unavailable, marked alert (paused) */
.gauge-over.paused {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 6px,
    rgba(255, 92, 92, 0.16) 6px 12px
  );
  border-left: 1px dashed var(--alert);
}
/* Pro/Scale: past-cap is a metered extension in alert */
.gauge-over.metered {
  background: rgba(255, 92, 92, 0.14);
  border-left: 1px solid var(--alert);
}
.gauge-scale {
  display: flex;
  justify-content: space-between;
  gap: var(--s-8);
}
.gauge-scale .cap {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 14px;
  color: var(--metric-bright);
}
.gauge-over-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--alert);
}
.gauge-inc-label {
  color: var(--metric-mid);
}

/* quota ledger */
.ledger {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-16);
  padding: var(--s-12) 0;
  border-bottom: 1px solid var(--hairline);
}
.ledger-row:last-child {
  border-bottom: none;
}
.ledger-label {
  font-size: 13px;
  color: var(--metric-mid);
}
.ledger-value {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 500;
  font-size: 14px;
  color: var(--metric-bright);
  text-align: right;
}
/* word-valued ledger cells stay in the sans voice — numbers are mono, words are not */
.ledger-word {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--metric-bright);
  text-align: right;
}
/* CTA sits directly under the gauge. Every tier's name/price/gauge block is the
   same height, so the three CTAs align across cards without pinning to the card
   bottom — pinning stranded the shorter Free card's button above a large gap. */
.tier-cta {
  margin-bottom: var(--s-8);
}

/* ---- Overage & billing semantics --------------------------------------- */
.overage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-24);
}
.overage .panel h3 {
  margin: 0 0 var(--s-12);
}
.overage-rate {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: var(--s-12);
}
.overage-rate .alert-figure {
  font-family: var(--mono);
  font-feature-settings: "zero" 1;
  font-variant-ligatures: none;
  font-weight: 600;
  font-size: 34px;
  color: var(--alert);
}

/* ---- FAQ incident log --------------------------------------------------- */
.incidents {
  border-top: 1px solid var(--hairline);
}
.incident {
  border-bottom: 1px solid var(--hairline);
}
.incident summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s-16);
  padding: var(--s-24) var(--s-8);
}
.incident summary::-webkit-details-marker {
  display: none;
}
.chip-resolved {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--canvas);
  background: var(--volt);
  border-radius: 4px;
  padding: 3px 8px;
}
.incident-q {
  margin: 0;
  flex: 1 1 auto;
}
.chevron {
  flex: none;
  color: var(--metric-mid);
  font-family: var(--mono);
  transition: transform 120ms ease-out;
}
.incident[open] .chevron {
  transform: rotate(90deg);
}
.incident-a {
  padding: 0 var(--s-8) var(--s-24) 56px;
  color: var(--metric-mid);
  max-width: 78ch;
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: var(--s-64) 0;
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-64);
}
.footer-brand {
  max-width: 30ch;
}
.footer-brand .wordmark {
  margin-bottom: var(--s-12);
}
.footer-brand p {
  color: var(--metric-mid);
  font-size: 14px;
  margin: 0;
}
.footer-col h4 {
  margin: 0 0 var(--s-16);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--metric-mid);
}
.footer-col a {
  display: block;
  color: var(--metric-mid);
  font-size: 14px;
  padding: 4px 0;
  transition: color 120ms ease-out;
}
.footer-col a:hover {
  color: var(--metric-bright);
}
.footer-legal {
  margin-top: var(--s-40);
  padding-top: var(--s-24);
  border-top: 1px solid var(--hairline);
  color: var(--metric-dim);
  font-size: 13px;
}

/* section heading helper */
.section-head {
  margin-bottom: var(--s-40);
}
.section-head .micro {
  color: var(--metric-mid);
  margin-bottom: var(--s-12);
}
.section-head .display-l {
  margin: 0;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .display-xxl {
    font-size: 40px;
    letter-spacing: -1px;
  }
  .readout-xxl {
    font-size: 56px;
  }
  .stat-band {
    grid-template-columns: 1fr 1fr;
  }
  .tiers {
    grid-template-columns: 1fr;
  }
  .trio {
    grid-template-columns: 1fr;
  }
  .latency {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .config-head {
    display: none;
  }
  .config-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name live"
      "values values"
      "desc desc";
    gap: var(--s-8) var(--s-16);
  }
  .cfg-name {
    grid-area: name;
  }
  .cfg-live {
    grid-area: live;
  }
  .cfg-values {
    grid-area: values;
  }
  .cfg-desc {
    grid-area: desc;
  }
  .overage {
    grid-template-columns: 1fr;
  }
  .job {
    grid-template-columns: 1fr;
  }
  .job-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .band {
    padding-top: var(--s-64);
    padding-bottom: var(--s-64);
  }
  .display-xxl {
    font-size: 34px;
  }
  .readout-xxl {
    font-size: 44px;
  }
  .readout-xxl .unit {
    font-size: 18px;
  }
  .response-grid {
    grid-template-columns: 1fr;
  }
  .stat-band {
    grid-template-columns: 1fr;
  }
  .limits {
    grid-template-columns: 1fr;
  }
  .nav-tabs {
    gap: var(--s-16);
    margin-left: var(--s-8);
  }
  .nav-cta {
    display: none;
  }
  .wordmark {
    font-size: 18px;
  }
  .latency-figs {
    gap: var(--s-24);
  }
  .edge-band {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-8);
  }
  .step {
    grid-template-columns: 1fr;
    gap: var(--s-12);
  }
  .footer-cols {
    gap: var(--s-40);
  }
}

/* ---- Reduced motion: readouts render already resolved ------------------ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .spark-trace {
    animation: none !important;
    transform: none !important;
  }
}
