/* ==========================================================================
   APIShore — design system
   Marketing pages, shared primitives, code panes, docs layout.
   Link order in HTML: fonts.css -> site.css -> portal.css. Nothing here reaches the network.
   Style: hairlines and whitespace do the work; one accent per view; no gradient text, no
   looping animation, nothing that floats unless it is actually floating.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  --navy: #101B35;
  --navy-700: #1B2947;
  --navy-500: #2B3B5E;
  --royal: #3478F6;
  --royal-600: #2A63D8;
  --royal-tint: #EDF3FE;
  --cyan: #35C5E8;
  --ink: #16233C;
  --muted: #4F6180;
  --mist: #F5F8FD;
  --mist-2: #EEF3FA;
  --line: #E4EAF2;
  --line-strong: #CFD9E8;
  --white: #fff;
  --warn: #B45309;
  --warn-bg: #FDF6E9;
  --danger: #B3261E;
  --danger-bg: #FDF0EF;
  --ok: #1F7A4C;
  --ok-bg: #EDF8F1;

  --font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-section: 96px;
  /* Two relationships that were not named before, so each component guessed: --flow is the
     space between text blocks inside one group, --group is the space between whole groups. */
  --flow: 20px; --group: 48px;
  --shadow-1: 0 1px 2px rgba(16, 27, 53, .05);
  --shadow-2: 0 10px 30px -16px rgba(16, 27, 53, .18);
  --container: 1160px;
  --reading: 74ch;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 64px;
  --t: 160ms cubic-bezier(.2, .6, .3, 1);
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--royal-600); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
::selection { background: var(--royal-tint); color: var(--navy); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 22px; height: 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-4); top: -48px; z-index: 60;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  font: 600 .875rem/1 var(--font-body); transition: top var(--t);
}
.skip-link:focus { top: 12px; color: #fff; text-decoration: none; }

/* --------------------------------------------------------------- type */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); margin: 0 0 .5rem; }
h1, .display { font-size: clamp(2.2rem, 1.55rem + 2.7vw, 3.5rem); line-height: 1.05; letter-spacing: -.022em; font-weight: 800; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.35vw, 2.15rem); line-height: 1.18; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.01em; font-weight: 700; }
h4 { font-size: 1rem; line-height: 1.4; font-weight: 600; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: .3rem 0; }
strong { font-weight: 600; color: var(--navy); }
small { font-size: .875rem; }
code, kbd, pre, .mono, .path { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code {
  background: var(--mist-2); border: 1px solid var(--line); border-radius: 6px;
  padding: .1em .35em; font-size: .8125em; color: var(--navy); word-break: break-word;
}
.lede { font-size: 1.0625rem; line-height: 1.65; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 var(--sp-4);
  font: 500 .75rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--royal-600);
}
.eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--cyan); border-radius: 2px; }
.eyebrow-light { color: #9FC0FF; }
.section-head { max-width: 64ch; margin: 0 0 var(--sp-7); }
.section-head p { color: var(--muted); margin-bottom: 0; }

/* --------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.wide { max-width: 1320px; }
main { display: block; }
.section { padding-block: var(--sp-section); border-top: 1px solid transparent; scroll-margin-top: calc(var(--nav-h) + 12px); }
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
.section-tight { padding-block: var(--sp-8); }
.section-alt { background: var(--mist); border-block-color: var(--line); }
.section-navy { background: var(--navy); color: #C8D4EA; }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: #fff; }
.section-navy .lede, .section-navy p { color: #A9BAD8; }
.stack-3 > * + * { margin-top: var(--sp-3); }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-6 > * + * { margin-top: var(--sp-6); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-3 { display: grid; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; grid-template-columns: 1fr; }
.cards-3 li { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); }
.cards-3 h3 { font-size: 1rem; }
.cards-3 p { margin: 0; font-size: .9375rem; color: var(--muted); }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(10px); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-1); background: rgba(255, 255, 255, .96); }
.bar { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; letter-spacing: -.02em; text-decoration: none; padding: .25rem 0; }
.brand:hover { color: var(--navy); text-decoration: none; }
/* The logo is a single image now, so the header only sizes it and the artwork owns every
   proportion inside it. Height is the only decision: at 26px the tile reads and the wordmark stays
   legible; below about 22px the tide line in the mark closes up into a blob. */
/* 30px of canvas, 7% of which the artwork keeps as clearspace: the tile itself still
   measures 26px, which is the size the header was tuned against, and it is no longer cut. */
.brand-logo { display: block; height: 30px; width: auto; flex: none; }
/* 18px rather than 17: braces carry two curves and a joint each, and the last pixel of margin a
   mark gets is the pixel at which small counters turn into noise. The tile is 28px either way. */
.brand-tag { font: 500 .6875rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px; }
.site-nav { margin-left: auto; position: relative; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { margin: 0; }
.nav-list a { display: inline-block; padding: 8px 11px; border-radius: var(--r-sm); color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.nav-list a:hover { color: var(--navy); background: var(--mist); }
.nav-list a[aria-current="page"] { color: var(--royal-600); background: var(--royal-tint); }
.nav-signin a { color: #fff; background: var(--royal); font-weight: 600; padding: 8px 14px; }
.nav-signin a:hover { background: var(--royal-600); color: #fff; }
.nav-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.nav-toggle-btn { display: none; align-items: center; gap: 6px; font: 600 .875rem/1 var(--font-body); color: var(--navy); background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 9px 11px; cursor: pointer; }
.nav-toggle-btn .ico { width: 15px; height: 15px; }
.nav-toggle:focus-visible + .nav-toggle-btn { outline: 2px solid var(--royal); outline-offset: 2px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 600 .9375rem/1.1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
}
.btn:hover { text-decoration: none; }
.btn[disabled], .btn.is-off { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary, .js-subscribe { background: var(--royal); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover, .js-subscribe:hover { background: var(--royal-600); color: #fff; }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy-500); background: var(--mist); color: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-700); color: #fff; }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--navy); background: var(--mist-2); }
.btn-danger { background: var(--white); color: var(--danger); border-color: #EFC9C6; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: .8125rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
a.js-subscribe:not([href]) { pointer-events: none; opacity: .5; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; }
.link-arrow .ico { transition: transform var(--t); }
.link-arrow:hover .ico { transform: translateX(2px); }

/* --------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 9px; border-radius: var(--pill); border: 1px solid var(--line);
  background: var(--mist); color: var(--muted);
}
.badge-accent { background: var(--royal-tint); border-color: #CBDFFB; color: var(--royal-600); }
.badge-ok { background: var(--ok-bg); border-color: #C7E6D5; color: var(--ok); }
.badge-warn { background: var(--warn-bg); border-color: #EFD9AE; color: var(--warn); }
.badge-err { background: var(--danger-bg); border-color: #F0C7C3; color: var(--danger); }
.m { display: inline-block; font: 700 .6875rem/1 var(--font-mono); letter-spacing: .04em; padding: 4px 7px; border-radius: 5px; white-space: nowrap; }
.m-post { color: var(--royal-600); background: var(--royal-tint); border: 1px solid #CBDFFB; }
.m-get { color: var(--ok); background: var(--ok-bg); border: 1px solid #C7E6D5; }
.m-del { color: var(--danger); background: var(--danger-bg); border: 1px solid #F0C7C3; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); display: inline-block; flex: none; }
.flag { font: 500 .75rem/1 var(--font-mono); color: var(--muted); }

/* --------------------------------------------------------------- hero */
.hero { padding-block: clamp(40px, 7vw, 84px) var(--sp-section); }
.hero-inner { display: grid; gap: clamp(28px, 5vw, 60px); grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: center; }
.hero-copy { max-width: 60ch; }
.hero-copy h1 { margin-bottom: var(--sp-4); }
.hero-copy h1 .accent { color: var(--royal); }
.hero-copy .lede { font-size: 1.125rem; margin-bottom: var(--sp-6); }
.hero-actions { margin-bottom: var(--sp-6); }
.trust, .trust-chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; }
.trust li, .chip {
  display: inline-flex; align-items: center; gap: 7px; margin: 0;
  font: 400 .75rem/1 var(--font-mono); color: var(--muted);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--pill); padding: 7px 11px;
}
.trust .dot, .chip .ico { width: 13px; height: 13px; color: var(--royal); }
.chip b { font-weight: 500; color: var(--navy); }
.js-base-url { display: inline-block; min-height: 1.2em; font-family: var(--font-mono); font-size: .82em; color: var(--royal-600); background: var(--royal-tint); border-radius: 4px; padding: .05rem .3rem; word-break: break-all; }
.js-base-url:empty { background: transparent; border-bottom: 1px dashed var(--line-strong); min-width: 9ch; }
.noscript-note { display: inline-block; font-size: .8125rem; color: var(--warn); background: var(--warn-bg); border: 1px solid #EFD9AE; border-radius: 6px; padding: .2rem .5rem; }

/* --------------------------------------------------------------- product mock
   A demonstration of one response, not a screenshot: rows, sparklines, JSON.
   The figures are invented for the mock and the caption says so. */
.demo { background: var(--navy); border: 1px solid #22314F; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); color: #C8D4EA; }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0C1630; border-bottom: 1px solid #22314F; }
.demo-title { font: 500 .75rem/1 var(--font-mono); letter-spacing: .04em; color: #8FA3C6; }
.demo-badge { margin-left: auto; font: 500 .6875rem/1 var(--font-mono); color: #9FC0FF; background: rgba(52, 120, 246, .16); border: 1px solid rgba(122, 168, 245, .35); padding: 4px 8px; border-radius: 5px; }
.demo-body { padding: 16px; }
.demo-search { display: flex; align-items: center; gap: 8px; background: #0C1630; border: 1px solid #2A3A5C; border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 14px; }
.demo-search .ico { width: 15px; height: 15px; color: #7E93B8; }
.demo-search span { font: 400 .8125rem/1 var(--font-mono); color: #DCE6F7; }
.demo-search em { margin-left: auto; font-style: normal; font: 500 .6875rem/1 var(--font-mono); color: #6F84A8; }
.demo-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.demo-table th { text-align: left; font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #6F84A8; padding: 0 8px 8px 0; border-bottom: 1px solid #22314F; white-space: nowrap; }
.demo-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid #1C2A47; color: #D5E0F2; }
.demo-table td.name { color: #fff; font-weight: 500; }
.demo-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.demo-table tr:last-child td { border-bottom: 0; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.spark i { width: 4px; border-radius: 1px; background: #2F4573; display: block; }
.spark i.hi { background: var(--cyan); }
.demo-json { margin-top: 14px; background: #0C1630; border: 1px solid #22314F; border-radius: var(--r-sm); padding: 12px 14px; }
.demo-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #0C1630; border-top: 1px solid #22314F; }
.demo-foot p { margin: 0; font: 400 .6875rem/1.4 var(--font-mono); color: #6F84A8; }
.j-key { color: #86B7FE; } .j-str { color: #9AE6C9; } .j-num { color: #FFD9A0; }
.j-bool { color: #C6B4FB; } .j-null { color: #7E93B8; } .j-punct { color: #63799C; }

/* --------------------------------------------------------------- features */
.feat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); transition: border-color var(--t), box-shadow var(--t); }
.feat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.feat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--mist); border: 1px solid var(--line); color: var(--royal-600); margin-bottom: var(--sp-4); }
.feat h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; }

/* --------------------------------------------------------------- steps */
.steps { list-style: none; display: grid; gap: var(--sp-4); margin: 0; padding: 0; }
.step { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font: 700 .8125rem/1 var(--font-mono); color: #fff; background: var(--navy); border-radius: 50%; margin-bottom: var(--sp-3); }
.step h3 { font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .9375rem; }
.step-arrow { display: none; width: 24px; height: 24px; color: var(--line-strong); align-self: center; }
@media (min-width: 940px) {
  .steps { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
  .step-arrow { display: block; }
}

/* --------------------------------------------------------------- code panes */
.code { margin: 0 0 1.25rem; background: var(--navy); color: #D5E0F2; border: 1px solid #22314F; border-radius: var(--r); overflow: hidden; }
.code > figcaption, .code-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0C1630; border-bottom: 1px solid #22314F; }
.code-lang, .code > figcaption { font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #7E93B8; }
.code-file { font: 400 .75rem/1 var(--font-mono); color: #8FA3C6; }
.code > pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code pre code { font-family: var(--font-mono); font-size: .8125rem; line-height: 1.7; color: inherit; background: none; border: 0; padding: 0; white-space: pre; }
.copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid #2A3A5C; color: #A9BAD8;
  font: 500 .6875rem/1 var(--font-mono); padding: 6px 9px; border-radius: 6px; cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.copy-btn:hover { color: #fff; border-color: #46618F; background: #16233C; }
.copy-btn.is-done { color: #9AE6C9; border-color: #2F6B54; }
.copy-btn .ico { width: 13px; height: 13px; }
.code--light { background: var(--mist); border-color: var(--line); color: var(--ink); }
.code--light > figcaption, .code--light .code-head { background: var(--mist-2); border-bottom-color: var(--line); }
.code--light .code-lang { color: var(--muted); }
.code--light .copy-btn { border-color: var(--line-strong); color: var(--muted); }
.code--light .copy-btn:hover { background: var(--white); color: var(--navy); }
.code--light pre code { color: var(--ink); }
.code-tabs { display: flex; gap: 2px; padding: 0 10px; background: #0C1630; border-bottom: 1px solid #22314F; }
.code-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: #7E93B8; font: 500 .75rem/1 var(--font-mono); padding: 11px 10px 9px; cursor: pointer; }
.code-tab:hover { color: #D5E0F2; }
.code-tab.is-active { color: #fff; border-bottom-color: var(--cyan); }
.t-k { color: #86B7FE; } .t-s { color: #9AE6C9; } .t-n { color: #FFD9A0; }
.t-b { color: #C6B4FB; } .t-c { color: #63799C; } .t-p { color: #63799C; }

/* --------------------------------------------------------------- pricing */
.plans-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; list-style: none; margin: 0 0 var(--sp-5); padding: 0; align-items: start; }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--sp-4); margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); transition: border-color var(--t), box-shadow var(--t); }
.plan:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.plan-recommended { border-color: #B9D0F8; }
.plan-flag { position: absolute; top: -11px; left: var(--sp-5); background: var(--navy); color: #fff; font: 500 .6875rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 5px; }
.plan-name { display: flex; align-items: center; gap: 8px; font: 700 1rem/1.2 var(--font-display); color: var(--navy); margin: 0; }
.plan-price { font: 800 2.125rem/1 var(--font-display); letter-spacing: -.03em; color: var(--navy); margin: 0; }
.plan-price .per { font: 400 .75rem/1 var(--font-mono); color: var(--muted); letter-spacing: 0; }
.plan-billing { font-size: .8125rem; color: var(--muted); margin: -6px 0 0; }
.plan-permo { font: 400 .8125rem/1.4 var(--font-body); color: var(--muted); margin: 0; }
.plan-save { display: inline-block; min-height: 1.15rem; font: 500 .75rem/1 var(--font-mono); color: var(--ok); background: var(--ok-bg); border: 1px solid #C7E6D5; border-radius: var(--pill); padding: .15rem .55rem; align-self: flex-start; }
.plan-save:empty { visibility: hidden; }
.plan-feats { list-style: none; margin: 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink); display: flex; flex-direction: column; gap: 9px; }
.plan-feats li { display: flex; gap: 9px; margin: 0; align-items: flex-start; line-height: 1.5; }
.plan-feats .ico { width: 15px; height: 15px; margin-top: 3px; color: var(--royal); flex: none; }
.plan-feats li.off { color: var(--muted); }
.plan-feats li.off .ico { color: var(--line-strong); }
.plans-note { font-size: .875rem; color: var(--muted); background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4) var(--sp-5); margin: 0 0 .75rem; }
.plans-note p { margin: 0 0 6px; }
.plans-note p:last-child { margin-bottom: 0; }
@media (min-width: 640px) { .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .plans-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --------------------------------------------------------------- callouts */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--royal); background: var(--mist); border-radius: 0 var(--r) var(--r) 0; padding: var(--sp-4) var(--sp-5); font-size: .9375rem; margin: 0 0 1.5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.callout-plain { background: var(--white); border-left-color: var(--line-strong); color: var(--muted); }
.callout-title { display: flex; align-items: center; gap: 8px; font: 600 .8125rem/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--navy); margin-bottom: 8px; }
.banner { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); border: 1px solid #CBDFFB; background: var(--royal-tint); color: #1E4FAF; border-radius: var(--r); padding: 12px 14px; font-size: .875rem; }
.banner .ico { width: 16px; height: 16px; }
.banner.error { border-color: #F0C7C3; background: var(--danger-bg); color: var(--danger); }

/* --------------------------------------------------------------- tables */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: auto; background: var(--white); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
/* Captions sit above their table. `caption-side: bottom` is what we had, and it does not survive
   Safari: WebKit gives a bottom caption a box the width of the *first column* rather than the
   table, so a one-line note about sustained throughput rendered as a bordered fragment under the
   row labels. Top is the one placement every engine agrees on, and a note above the matrix is read
   before the numbers either way. */
caption { caption-side: top; padding: .7rem 1rem; font-size: .8125rem; color: var(--muted);
  text-align: left; background: var(--mist); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--mist); font: 500 .6875rem/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--mist); }
td .path { color: var(--ink); font-size: .8125rem; white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--font-mono); }
.table-compact th, .table-compact td { padding: 9px 12px; }

/* --------------------------------------------------------------- prose, faq, footer */
.prose { max-width: var(--reading); }
.prose h2 { margin: var(--sp-7) 0 var(--sp-3); }
.prose h3 { margin: var(--sp-6) 0 var(--sp-2); }
.prose li { margin: .35rem 0; }
.faqs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); margin: 0; }
.faq-q { display: flex; align-items: flex-start; gap: var(--sp-4); width: 100%; text-align: left; background: none; border: 0; padding: 18px 0; cursor: pointer; font: 700 1rem/1.45 var(--font-display); color: var(--navy); list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--royal-600); }
.faq-q .chev { margin-left: auto; color: var(--muted); flex: none; transition: transform var(--t); }
details[open] > .faq-q .chev { transform: rotate(90deg); }
.faq-a { padding: 0 0 20px; margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.65; max-width: 80ch; }
.cta-band { background: var(--mist); border-top: 1px solid var(--line); padding-block: var(--sp-8); }
.cta-inner { display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
.cta-inner h2 { font-size: 1.5rem; margin: 0; }
.cta-inner p { color: var(--muted); margin: 6px 0 0; max-width: 60ch; }
.cta-actions { margin-left: auto; display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.site-footer { background: var(--navy); color: #A9BAD8; padding-block: var(--sp-8) var(--sp-5); font-size: .875rem; border-top: 0; }
.site-footer a { color: #C8D4EA; }
.site-footer a:hover { color: #fff; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-6); }
/* The footer carries the inverse artwork, so it needs no colour override; it is a hair taller
   than the header's because it sits in a wide dark column where 26px looks small. */
.foot-brand .brand-logo { height: 34px; }
.foot-brand p { margin: var(--sp-4) 0 0; max-width: 34ch; color: #8FA3C6; }
.foot-col h4 { color: #fff; font: 600 .75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin: 0 0 10px; }
.foot-legal { margin-top: var(--sp-7); padding-top: var(--sp-4); border-top: 1px solid #22314F; display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; color: #7E93B8; font-size: .8125rem; }
.foot-legal p { margin: 0; max-width: 92ch; }
.fine { font-size: .8125rem; color: var(--muted); }

/* --------------------------------------------------------------- docs layout */
.doc-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: var(--sp-6) var(--sp-section); }
.doc-nav { position: sticky; top: calc(var(--nav-h) + 20px); max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; padding-right: 8px; }
.doc-nav h2 { font: 600 .75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--sp-3); }
.doc-nav ul { list-style: none; margin: 0 0 var(--sp-5); padding: 0; border-left: 1px solid var(--line); }
.doc-nav li { margin: 0; }
.doc-nav a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: .875rem; text-decoration: none; }
.doc-nav a:hover { color: var(--navy); border-left-color: var(--line-strong); }
.doc-nav a.is-active { color: var(--royal-600); border-left-color: var(--royal); background: linear-gradient(90deg, var(--royal-tint), transparent 60%); font-weight: 500; }
.doc-main { min-width: 0; max-width: 54rem; }
.doc-section { padding-top: var(--sp-5); margin-bottom: var(--sp-7); }
.doc-section > h2 { font-size: 1.5rem; }
.doc-intro { color: var(--muted); max-width: 68ch; }
.endpoint { border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4) var(--sp-5); margin: 0 0 var(--sp-4); background: var(--white); }
.endpoint-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.endpoint h3 { font-size: 1.0625rem; margin: 0; }
.params { margin: 0; display: grid; gap: 8px; }
table.params { min-width: 44rem; }
table.params td:nth-child(2), table.params td:nth-child(3) { white-space: nowrap; }
.doc-mobile-only { display: none; }
@media (max-width: 1000px) {
  .doc-shell { grid-template-columns: 1fr; }
  .doc-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4); background: var(--mist); }
  .doc-nav.is-open { display: block; }
  .doc-mobile-only { display: inline-flex; }
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
}
@media (max-width: 980px) {
  :root { --sp-section: 68px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle-btn { display: inline-flex; }
  .site-nav { display: block; }
  .nav-list { position: absolute; right: 0; top: calc(100% + 10px); display: none; flex-direction: column; align-items: stretch; gap: 2px; width: min(18rem, calc(100vw - 32px)); background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: var(--sp-2); }
  .nav-list a { display: block; padding: 11px 12px; font-size: 1rem; }
  .nav-list > li + li { border-top: 1px solid var(--line); }
  .nav-signin { margin-top: var(--sp-2); }
  .nav-signin a { display: block; text-align: center; }
  .nav-toggle:checked ~ .nav-list { display: flex; }
  .nav-toggle:checked ~ .nav-toggle-btn { color: var(--royal-600); border-color: #CBDFFB; background: var(--royal-tint); }
  .cta-actions { margin-left: 0; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .plans-grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section-head { margin-bottom: var(--sp-6); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .copy-btn, .nav-toggle-btn, .doc-nav { display: none !important; }
  body { color: #000; }
  .section, .hero { padding-block: 12px; }
  a::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}

/* ==========================================================================
   Homepage additions and compatibility rules.
   The pricing cards and the FAQ are under a test contract (test_site.py reads
   data-package cards, [data-limit] sentences and the details/summary FAQ), so the
   markup keeps its old hook names and these rules give them the new look instead of
   the pages being rewritten around the CSS.
   ========================================================================== */

/* Site-wide status banner. site.js replaces this element's whole class list when the
   portal is unreachable, so the styling is anchored to the id, not to a class. */
#status-banner:not([hidden]) {
  display: flex; align-items: flex-start; gap: 10px; margin: var(--sp-4) 0 0;
  border: 1px solid #EFD9AE; background: var(--warn-bg); color: var(--warn);
  border-radius: var(--r); padding: 12px 14px; font-size: .875rem; line-height: 1.5;
}

/* Nested nav panel: some pages wrap .nav-list in a .nav-panel element. */
.nav-panel { display: contents; }
@media (max-width: 980px) {
  .nav-panel { display: block; }
  .nav-toggle:checked ~ .nav-panel .nav-list { display: flex; }
}

/* Sub-heading between two blocks of one section. */
.subhead { font: 700 1.125rem/1.3 var(--font-display); letter-spacing: -.01em;
  color: var(--navy); margin: 0 0 var(--sp-4); }

/* Two-column navy demo block, kept readable at one column before 900px. */
.api-grid { align-items: start; }
.api-grid h2 { font-size: 1.5rem; }
.api-grid .lede { font-size: 1rem; }
.api-grid .code { background: #0C1630; }
.api-grid .code pre code { color: #D5E0F2; }
@media (max-width: 900px) { .api-grid { grid-template-columns: 1fr; } }
.api-list { list-style: none; margin: 24px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.api-list li { display: flex; gap: 10px; align-items: baseline; color: #D5E0F2;
  border-bottom: 1px solid #22314F; padding-bottom: 10px; }
.api-list li:last-child { border-bottom: 0; }
.api-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); flex: none; transform: translateY(-2px); }
.api-list .num { font-family: var(--font-mono); font-size: .8125rem; }
.section-navy .params { display: flex; flex-wrap: wrap; gap: 8px; }
.section-navy .badge { background: rgba(255, 255, 255, .04); border-color: #2A3A5C; color: #A9BAD8; }
.section-navy .code-tabs { background: #09122A; border-bottom-color: #22314F; }
.section-navy .copy-btn { margin-left: 0; }

/* Hero mock internals */
.demo-json pre { margin: 0; overflow-x: auto; }
.demo-json code { font-family: var(--font-mono); font-size: .78rem; line-height: 1.65; color: #C8D4EA; }
.demo-table th[scope="col"] { white-space: nowrap; }
.spark i { min-height: 3px; }
.step-arrow-cell { display: flex; align-items: center; justify-content: center; width: 24px; }
.step-arrow-cell .step-arrow { color: var(--line-strong); width: 22px; height: 22px; }
.step .path { display: inline-block; margin-bottom: 8px; }

/* Pricing cards: the feature list is plain <li data-limit> markup, so the tick is drawn here. */
.plan-feats li { padding-left: 24px; position: relative; }
.plan-feats li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 13px; height: 7px;
  border-left: 2px solid var(--royal); border-bottom: 2px solid var(--royal);
  transform: rotate(-45deg);
}
.plan-price .per { font: 400 .75rem/1 var(--font-mono); color: var(--muted); }
.plan-flag[hidden] { display: none; }

/* FAQ: details/summary markup, chevron optional. */
.faqs summary { list-style: none; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs details > summary {
  display: flex; align-items: flex-start; gap: var(--sp-4); width: 100%; text-align: left;
  padding: 18px 0; cursor: pointer; font: 700 1rem/1.45 var(--font-display); color: var(--navy);
}
.faqs details > summary:hover { color: var(--royal-600); }
.faqs details > summary::after {
  content: ""; margin-left: auto; flex: none; width: 9px; height: 9px; margin-top: .5em;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform var(--t);
}
.faqs details[open] > summary::after { transform: rotate(225deg); }
.faqs details > summary .chev { display: none; }
.faq-a, .faq-body { padding: 0 0 20px; color: var(--muted); font-size: .9375rem; line-height: 1.65; max-width: 80ch; }
.faq-body p { margin: 0 0 .75rem; }
.faq-body p:last-child { margin-bottom: 0; }

/* The design system's thead rule is meant for light data tables: a mist background and a sticky
   header. Inside the navy hero mock both are wrong - the grey strip reads as a rendering fault
   and the header detaches as the page scrolls. Opt out here rather than raising specificity at
   every mock in the site. */
.demo-table th { background: transparent; position: static; z-index: auto; }
.section-navy .table-wrap thead th { background: #0C1630; color: #6F84A8; position: static; }

/* Compatibility rules for markup the restyle has not reached yet.
   `pillars` is the #how summary row; `doc-grid`/`toc` are docs.html's current frame, which the
   docs work is moving to .doc-shell/.doc-nav; c/k/s/n are the hand-coloured code spans already in
   docs.html, which predate the t-* token names. Each of these would otherwise render as an
   unstyled list of dark text on a dark pane, so they are defined here and deleted once the page
   that needs them no longer does. */
.pillars { list-style: none; display: grid; gap: var(--sp-4); margin: var(--sp-6) 0 0; padding: 0; }
.pillars li { margin: 0; background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--royal); border-radius: var(--r); padding: var(--sp-4) var(--sp-5); }
.pillars h3 { font-size: 1rem; margin-bottom: 6px; }
.pillars p { margin: 0; font-size: .9375rem; color: var(--muted); }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.doc-grid { display: grid; grid-template-columns: 252px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px); align-items: start; padding-block: var(--sp-6) var(--sp-section); }
/* Contents lists on this site sit in the article column, above the sections they list - docs.html,
   features.html and api-reference.html all introduce themselves that way. The rule below used to
   carry `position: sticky`, which is correct for a 252px sidebar and wrong for a full-width block:
   the list detached from the flow, hovered under the header for the whole page, and covered the
   very text it was a list of. So stickiness now belongs to `.doc-nav`, the class that means an
   actual sidebar, and `.toc` stays where it was written. */
.toc { font-size: .875rem; }
.toc ul { list-style: none; margin: 0; padding: 0;
  display: grid; gap: 2px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0; color: var(--royal-600); text-decoration: none;
  border-bottom: 1px solid transparent; }
.toc a:hover { color: var(--navy); border-bottom-color: var(--line-strong); }

.doc-nav { position: sticky; top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; font-size: .875rem; }
.doc-nav .toc ul { grid-template-columns: 1fr; border-left: 1px solid var(--line); }
.doc-nav .toc a { padding: 6px 12px; margin-left: -1px; border-left: 2px solid transparent;
  border-bottom: 0; color: var(--muted); }
.doc-nav .toc a:hover { color: var(--navy); border-left-color: var(--line-strong); }
@media (max-width: 1000px) { .doc-grid { grid-template-columns: 1fr; }
  .doc-nav { position: static; max-height: none; } }


/* The comparison matrix on pricing.html and the plan preview on the homepage.
   With `table-layout: auto` the browser sized columns to their content, so the label column took
   37% of the width, "Monthly" came out at 257px and "Annual" at 139px for the same two-digit
   numbers, and the values drifted right away from the row they describe. Four plans carry equal
   weight, so they get equal columns, and the figures are centred under their headers because in a
   matrix the column header - not the row's right edge - is what a value belongs to.
   The min-width keeps the row labels readable instead of hyphenating "Savings against paying
   month by month" to pieces on a phone; .table-wrap scrolls, which is the honest answer there. */
table.compare { table-layout: fixed; min-width: 640px; }
table.compare th:first-child, table.compare td:first-child { width: 34%; }
table.compare th:not(:first-child), table.compare td:not(:first-child) { width: 16.5%; }
table.compare thead th { text-align: center; }
table.compare td, table.compare th { text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare th[scope="row"] { font-weight: 600; color: var(--navy); }
table.compare td.num { font-variant-numeric: tabular-nums; }

/* The homepage preview has seven columns, so the label column is narrower and the six value
   columns split what is left; it is the same table with a different profile, not a new design. */
table.compare.plans-preview { min-width: 700px; }
table.compare.plans-preview th:first-child, table.compare.plans-preview td:first-child { width: 19%; }
table.compare.plans-preview th:not(:first-child),
table.compare.plans-preview td:not(:first-child) { width: 13.5%; }
.code .c, .t-c { color: #63799C; }
.code .k, .t-k { color: #86B7FE; }
.code .s, .t-s { color: #9AE6C9; }
.code .n, .t-n { color: #FFD9A0; }
.code .t-b { color: #C6B4FB; }
.code--light .c { color: var(--muted); }
.code--light .k { color: var(--royal-600); }
.code--light .s { color: var(--ok); }
.code--light .n { color: var(--warn); }

/* The mock table's last column sat flush against the card edge, so the trend bars looked cut
   off. Fixed layout with named widths keeps the channel name readable and the bars inside the
   pane; the bars themselves were a navy barely lighter than the card, which read as a rendering
   fault rather than a quiet series. */
.demo-table { table-layout: fixed; }
.demo-table th:first-child, .demo-table td:first-child { width: auto; }
.demo-table th:nth-child(2), .demo-table td:nth-child(2) { width: 78px; }
.demo-table th:nth-child(3), .demo-table td:nth-child(3) { width: 62px; }
.demo-table th:last-child, .demo-table td:last-child { width: 60px; padding-right: 0; }
.demo-table td.num { text-align: right; }
.spark { justify-content: flex-end; }
.spark i { background: #3D547F; }
.spark i.hi { background: var(--cyan); }

/* site.js removes the href from a subscribe link when the operator has not set a payment URL yet,
   and swaps the label to "Tell me when this is open". Halving the opacity of a solid blue button
   makes it look like a broken control rather than an honest one, so the unconfigured state gets
   its own neutral treatment: same size, quieter colour, no shadow, and a dashed edge that reads
   as "not set yet" at any contrast level. */
a.js-subscribe:not([href]) {
  background: var(--mist-2); color: var(--muted); border: 1px dashed var(--line-strong);
  box-shadow: none; opacity: 1; cursor: not-allowed;
}
a.js-subscribe:not([href]):hover { background: var(--mist-2); color: var(--muted); }

/* docs.html, as shipped, uses `nav.toc > ol` for a contents list and `.doc-grid` for a row of
   small definition cards - not for the page frame the class name suggests. Two consequences:
   the marker box for list items 10 and 11 clipped to their last digit, and the definition cards
   inherited a 252px-first-column layout meant for a sidebar. Both are fixed by describing the
   markup that actually exists, rather than editing a page that a test contract already covers. */
.toc ol {
  list-style: none; counter-reset: toc; margin: 0; padding: 0;
  display: grid; gap: 2px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.toc ol li { counter-increment: toc; margin: 0; }
.toc ol li::before {
  content: counter(toc) "."; display: inline-block; width: 2.5ch; margin-right: 6px;
  font: 500 .75rem/1.9 var(--font-mono); color: var(--muted); text-align: right;
}
.toc ol li a { color: var(--royal-600); text-decoration: none; border-bottom: 1px solid transparent; }
.toc ol li a:hover { border-bottom-color: var(--line-strong); }

ul.doc-grid, .doc-grid {
  display: grid; gap: var(--sp-4); padding: 0; margin: var(--sp-5) 0 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
ul.doc-grid > li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5); }
ul.doc-grid > li strong { display: block; font-family: var(--font-display); font-size: .9375rem;
  color: var(--navy); margin-bottom: 4px; }
ul.doc-grid > li p { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.55; }
.doc-section + .doc-section { margin-top: var(--sp-8); padding-top: var(--sp-6);
  border-top: 1px solid var(--line); }

/* The marketing sheet has never had a form in it - the app pages own .field and .input in
   portal.css. contact.html is a public page and must not import the application stylesheet just
   to line up a label, so the two primitives are defined here against the same tokens. */
.form { padding: var(--sp-6); }
.container.narrow { max-width: 58rem; }
.field { margin-bottom: var(--sp-5); }
.field > label { display: block; font: 600 .8125rem/1.4 var(--font-display); color: var(--navy);
  margin-bottom: 6px; }
.input { width: 100%; font: 400 .9375rem/1.5 var(--font-body); color: var(--ink);
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 12px; }
.input:focus-visible { outline: 2px solid var(--royal); outline-offset: 1px; border-color: var(--royal); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input.mono { font-family: var(--font-mono); font-size: .875rem; }
.hint { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); line-height: 1.5; }
/* contact.html: the enquiry form. The honeypot must be invisible to a person and still present
   in the DOM, which is what makes a filled-in value meaningful as a bot signal. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .field textarea { resize: vertical; min-height: 9rem; font-family: inherit; }
.form-actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  margin-top: var(--sp-5); }
.two-col { display: grid; gap: var(--sp-6); align-items: start;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 60rem) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.tick-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tick-list li { position: relative; padding-left: 24px; font-size: .9375rem; color: var(--muted); }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .42rem; width: 8px;
  height: 8px; border-radius: 50%; background: var(--royal); opacity: .55; }
.link-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.link-rows li { border-bottom: 1px solid var(--line); }
.link-rows a { display: flex; gap: var(--sp-4); align-items: baseline; padding: 14px 4px;
  color: var(--ink); text-decoration: none; }
.link-rows a:hover { background: var(--mist); }
.link-rows .num { font: 600 .75rem/1.5 var(--font-mono); color: var(--royal);
  min-width: 3ch; }
.cta-band { margin-top: var(--sp-7); }
.status-error { color: var(--danger); }
/* The notification capture, opened in place under the plan card it belongs to. */
.notify { margin-top: var(--sp-4); padding: var(--sp-4); background: var(--mist);
  border: 1px solid var(--line); border-radius: var(--r-sm); }
.notify-label { display: block; font-size: .8125rem; color: var(--navy); margin-bottom: 8px; }
.notify-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notify-row .input { flex: 1 1 12rem; min-width: 0; }
.notify-status { margin: 8px 0 0; }
.notify-status:not(:empty) { color: var(--navy-700); }

/* ------------------------------------------------------------------ 390px pass (measured)
   A real 390px audit (each page loaded in a narrow same-origin iframe) measured document
   scrollWidth above the viewport on three pages: index.html 407, api-reference.html 415,
   docs.html 506. Two causes, both fixable only by outranking rules higher up in this file:

     - `.code pre code { white-space: pre }` beats a plain `pre { white-space: pre-wrap }`, so long
       sample values and curl lines kept their unbreakable width.
     - Grid tracks (`doc-shell`, `doc-grid`, `params`) default to `min-width: auto`, so a wide table
       widens the track instead of scrolling inside `.table-wrap`, which is why a page with every
       table correctly wrapped still overflowed.

   The phone gets to wrap and scroll; nothing here changes the desktop layout.
*/
@media (max-width: 620px) {
  /* 1. Wide content becomes its own scroller instead of pushing the page sideways. */
  main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* 2. Sample code and long IDs may break. Selector specificity is deliberate: `.code pre code`
        above sets white-space: pre, and this has to beat it on a phone. */
  .code pre,
  .code pre code,
  main pre,
  main pre code,
  main code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  figure.code figcaption {
    overflow-wrap: anywhere;
  }

  /* 3. Let the tracks shrink to the viewport so the scrollers above actually scroll. */
  .doc-shell,
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }
  .doc-shell > *,
  .doc-grid > *,
  .params > *,
  .hero-inner > *,
  .plans-grid > *,
  .grid-2 > *,
  .grid-3 > *,
  .grid-4 > *,
  .table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  /* 4. Cells that were pinned nowrap for tabular alignment may wrap on a phone. */
  thead th,
  td .path,
  .num,
  table.params td:nth-child(2),
  table.params td:nth-child(3) {
    white-space: normal;
  }

  .pill-row,
  .cta-row,
  .chips,
  .endpoint-strip {
    flex-wrap: wrap;
  }

  /* Measured after that pass: a `<table class="params">` is styled `display: grid`, which beats
     `main table {display: block}`, so it needs naming directly - it was the 704px object on
     docs.html and the 504px one on api-reference.html. Buttons with nowrap labels are the other
     real overflow (contact.html measured 451px at a 390px viewport). */
  table.params,
  .params {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    /* The desktop layout pins these at 704px so the columns stay readable on a wide screen. On a
       phone the pin is the reason the page can be panned sideways, so it goes: the scroller above
       keeps the table usable, and nothing is allowed to be wider than the viewport. */
    min-width: 0;
  }
  main table {
    min-width: 0;
  }
  .btn,
  a.btn,
  .btn-row {
    max-width: 100%;
    white-space: normal;
    flex-wrap: wrap;
  }

  /* The reference page's container measured 415px inside a 390px viewport: a wrapper whose own
     track list still reserves desktop widths, one level above the tables that were fixed above.
     Everything inside main is therefore capped to the parent width on a phone, which is the point
     at which "no sideways panning" stops depending on each page's markup being perfect. */
  main .container {
    max-width: 100%;
    padding-inline: 16px;
  }
  main .container > *,
  main section > *,
  main div {
    max-width: 100%;
    min-width: 0;
  }


  /* A sticky header cell inside a horizontally scrolling block still contributes to the ancestor's
     scroll width in Chrome, which is the last 40px of sideways pan on the endpoint reference page.
     Sticky headers earn their keep on a wide table at desktop width; at 390px the table is a
     scroller showing two columns, so they are switched off and nothing is lost. */
  main thead th {
    position: static;
  }


  /* Last 40px: the endpoint reference holds full curl URLs, which are single 45-character tokens
     with no break opportunity. `overflow-wrap: anywhere` was applied to pre/code, but the URL is a
     <span> token inside them, so the phone block now names the inline elements too. Break-word is
     the belt to anywhere's braces; neither affects desktop, where these lines have room. */
  main pre,
  main code,
  main pre span,
  main a,
  main .s,
  main .path,
  main .flag {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

}

/* ============================================================== polish layer (launch review)
   One pass over spacing, alignment and rhythm. No colour, brand or component redesign: the tokens
   below already existed, and what changes is where they are applied. Every rule here is a response
   to something measured in the rendered page, and the measurement is written next to the fix.
*/

/* --- 1. Header. At 64px the 28px logo tile left 18px of air above it, which reads as pressed
       against the browser edge, and the brand's own .25rem padding pushed it 2px off the menu's
       optical centre. 80px gives the tile 26px above and below, matching what the nav links get. */
:root { --nav-h: 80px; }
.bar { padding-block: 18px; min-height: var(--nav-h); }
.bar .brand { padding: 0; }
.nav-list a { padding: 10px 12px; }
.nav-signin a { padding: 10px 16px; }
.site-header .nav-toggle-btn { margin-block: -1px; }
.brand { flex: none; }
/* A nav label that breaks onto two lines made the whole bar 16px taller at 1024px, and the
   descriptor beside the logo is the thing that can go first when the bar runs out of room: the
   artwork already spells APIShore, and the navigation is the part that has to survive. */
.brand-tag { white-space: nowrap; }
.nav-list a, .nav-list a.btn { white-space: nowrap; }
@media (max-width: 1180px) { .brand-tag { display: none; } }

/* --- 2. Section rhythm. Adjacent sections each carried 96px, so a section break cost 192px of
       white while the hero's own bottom padding stacked a third band on top of it. One smaller
       step on a single scale keeps breaks deliberate instead of empty. */
:root { --sp-section: 84px; }
.hero { padding-block: clamp(28px, 3.5vw, 48px) clamp(52px, 6vw, 72px); }
.hero-copy .lede { max-width: 46ch; text-wrap: pretty; }
.hero-actions { margin-bottom: var(--sp-5); }
.section-head { margin-bottom: var(--sp-6); }
.section-head p { max-width: 68ch; text-wrap: pretty; }

/* The closing band sat 48px above the footer with its own 64px of padding, which made the navy
   footer look like a separate page glued underneath. */
.cta-band { margin-top: 0; padding-block: var(--sp-8); }
.site-footer { padding-block: var(--sp-8) var(--sp-6); }

/* --- 3. How it works. The ordered list used to contain five items: three steps plus two chevron
       list items. A reader announced it as a five-step process with blanks at 2 and 4, so the
       connector is drawn by CSS from the step cards instead of being a list member. */
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5) 60px;
    align-items: stretch;
  }
  .step { height: 100%; display: flex; flex-direction: column; }
  .step p:last-child { margin-top: auto; }
  .step:not(:last-child)::after {
    content: ""; position: absolute; right: -37px; top: 50%;
    width: 11px; height: 11px; margin-top: -6px;
    border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong);
    transform: rotate(45deg);
  }
}
.step .path { font-size: .8125rem; }
.step h3 { margin: var(--sp-3) 0 var(--sp-2); }

/* --- 4. Pricing cards. The grid aligned items to `start`, so a card with three feature lines sat
       shorter than its neighbour with five and the subscribe buttons finished at three different
       heights. Stretch plus a bottom-pinned action lines the buttons up on one rail. */
.plans-grid { align-items: stretch; }
.plans-grid > .plan { position: relative; display: flex; flex-direction: column; }
.plan > .plan-feats { order: 2; flex: 1 1 auto; }
.plan > .js-subscribe { order: 3; margin-top: var(--sp-4); align-self: flex-start; }
.plan > .plan-flag { order: 0; }
.plan .badge { flex: none; }
.plan-name { min-height: 1.2em; }
.plan-price { margin-top: var(--sp-4); }

/* --- 5. Cards and lists elsewhere on the same scale, so a four-up benefits grid and a three-up
       feature grid do not disagree about gutters. */
.cards-3 { gap: var(--sp-4); }
@media (min-width: 760px) {
  .cards-3 { gap: var(--sp-5); }
  .cards-3 li { display: flex; flex-direction: column; }
}

/* The header's primary button sits inside `.nav-list`, and `.nav-list a` is more specific than
   `.btn`, so it inherited nav-link colour and padding: grey text on a blue tile. A button in the
   navigation is still a button. */
.nav-list a.btn { color: #fff; background: var(--royal); padding: 10px 16px; box-shadow: var(--shadow-1); }
.nav-list a.btn:hover { background: var(--royal-600); color: #fff; }

/* --- 6. Responsive. Tablet and phone inherit the same reasoning at a smaller scale: the header
       keeps 20% of its desktop air rather than its absolute pixels, and the hero stops eating
       half of the first screen. */
@media (max-width: 980px) {
  :root { --nav-h: 72px; --sp-section: 64px; --group: var(--sp-6); }
  .bar { padding-block: 14px; }
  .hero { padding-block: clamp(20px, 5vw, 36px) var(--sp-7); }
  .hero-inner { gap: var(--sp-6); }
  .hero-visual { order: 2; }
  .steps { gap: var(--sp-4); }
}
@media (max-width: 620px) {
  :root { --nav-h: 64px; --sp-section: 52px; --group: var(--sp-5); }
  .bar { padding-block: 12px; }
  .hero { padding-block: var(--sp-5) var(--sp-6); }
  .hero-copy h1 { font-size: clamp(1.9rem, 8.4vw, 2.4rem); }
  .section-head { margin-bottom: var(--sp-5); }
  .cta-band { padding-block: var(--sp-7); }
  .site-footer { padding-block: var(--sp-7) var(--sp-5); }
  .plans-grid { gap: var(--sp-5); }
  .plan > .js-subscribe { width: 100%; align-self: stretch; }
  /* Carried forward rather than relied upon from the block above: this is the declaration that
     must be last, because `.code pre code { white-space: pre }` in the desktop rules would
     otherwise leave a phone reader with a clipped sample. */
  .code pre code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  /* A contents list whose tracks are `minmax(260px, 1fr)` cannot shrink below 260px, and on the
     endpoint reference page the list sits in the intro section, so the document itself grew to
     415px in a 375px viewport. One column that is allowed to shrink. */
  .toc ol,
  .toc ul { grid-template-columns: minmax(0, 1fr); }
  .toc ol li, .toc ul li { min-width: 0; overflow-wrap: anywhere; }
  /* The hero panel carries a JSON sample; on a phone it is the second thing a visitor sees and
     938px of it is more page than the copy above it. The sample scrolls inside its own box. */
  .hero-visual .code pre { max-height: 240px; overflow-y: auto; }
  /* `keyword_positions` and `uploads[]` are single words: an underscore or a bracket is not a
     break point, so one paragraph carrying them grew 18px past its own box and the section, with
     it, the document - 415px inside a 375px viewport. Anywhere is the honest value for body copy
     on a phone, and it only ever fires on tokens that cannot fit. */
  main p, main li, main dd, main dt, main th, main code, figcaption, caption {
    overflow-wrap: anywhere;
  }

  /* 26px is the size the lockup was drawn for; on a phone the bar is narrower and
     the wordmark earns its place more than the tile does. */
  .brand-logo { height: 26px; }
}

/* --- 7b. Code samples. Every styled sample on the site is a `<pre>` inside a `.code` wrapper, but
       the features page ships seven bare ones, and nothing matched them: unframed monospace sitting
       loose in the column next to dark framed samples on the other pages. The element gets the
       frame, so a forgotten wrapper produces the same sample rather than a different one. */
main pre {
  margin: 0 0 1.25rem; background: var(--navy); color: #D5E0F2;
  border: 1px solid #22314F; border-radius: var(--r);
  padding: 14px 16px; overflow-x: auto;
  font: 400 .8125rem/1.7 var(--font-mono); text-shadow: none;
}
main pre code { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.code > pre {
  background: none; color: inherit; border: 0; border-radius: 0;
  padding: 14px 16px; font: inherit;
}

/* --- 7c. The features page restructures each capability as a lead sentence, a sub-point label and
       a list. The label inherited the card heading size, so every group appeared to contain a third
       title; it is a caption, and it now reads as one. The list markers were the browser's default
       disc, which sits differently from the site's own bullets everywhere else. */
.doc-section h3 {
  font-size: .9375rem; font-weight: 600; letter-spacing: .01em; color: var(--navy-700);
  margin: var(--sp-5) 0 var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.doc-section ul {
  list-style: none; margin: 0 0 var(--sp-5); padding: 0;
  display: grid; gap: 10px; max-width: 72ch;
}
.doc-section ul li { position: relative; margin: 0; padding-left: 20px; }
.doc-section ul li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--royal);
}

/* --- 8. The heading scale. Every heading carried the same 8px bottom margin, which is right for a
       16px `<h4>` and wrong for a 56px display `<h1>`: the cap height sits on the margin, so the
       first line of body copy looked attached to the title. Larger steps get larger air. */
h1 { margin-bottom: var(--sp-4); }
.section-head h1, .section-head h2 { margin-bottom: var(--sp-4); }
.section-head .eyebrow { margin-bottom: var(--sp-3); }
.toc h2 { font-size: 1.125rem; margin-bottom: var(--sp-3); }
.doc-intro .lede { max-width: 72ch; }
.step p + p, .card p + p { margin-top: var(--sp-2); }
.plan-billing { color: var(--muted); font-size: .8125rem; }
.plan-permo { font-size: .8125rem; }

/* --- 7. Print stays as it was: the header, footer and bands are still suppressed. */

/* ============================================================
   9. VERTICAL RHYTHM - one separation per relationship
   ----------------------------------------------------------------
   Measured on the rendered pages at 1440px, before this block:

     features / docs / api-reference   capability group -> group     96px
     features / docs / api-reference   contents list -> first group   0px
     features                          lead paragraph -> note         0px
     features / terms / privacy        table -> paragraph after it    0px
     index                             buttons -> trust chips          0px
     index                             grid -> closing line            0px
     index                             card title -> card body         6px
     faq                               question -> question            5px
     terms / privacy                   list item -> list item          6px

   That spread is what reads as "some places too much, some too little": the same relationship
   between two blocks was 0px on one page and 96px on another, because each component set its own
   margins and nobody reconciled them. Every relationship now has a name and one value.
   ============================================================ */


/* 9.1 The two tokens are declared in the primary `:root` at the top of this file, so the
       breakpoint blocks can shrink `--group` without being outranked by source order.

   Content groups. The capability sections carried a 48px bottom margin, a 64px top margin on
       the next one and 32px of padding inside it: three separations doing one job. */
.doc-section { padding-top: 0; margin-bottom: 0; }
.doc-section + .doc-section {
  margin-top: var(--group); padding-top: var(--sp-5); border-top: 1px solid var(--line);
}

/* 9.2 A contents list is a signpost, not a section. It had no bottom margin, so the first group
       below it started against its last link. */
.toc { margin-bottom: var(--sp-6); }

/* 9.3 Blocks that carried no vertical margin at all, so whatever followed sat flush against them. */
.table-wrap { margin-bottom: var(--flow); }
.doc-intro > * + * { margin-top: var(--sp-3); }
main .container > p.row { margin-top: var(--sp-5); }
.hero-copy .btn-row + .trust { margin-top: var(--sp-5); }
#status-banner:not([hidden]) { margin: var(--sp-4) 0 var(--sp-5); }

/* 9.4 The browser-ish 0.3rem between list rows and the 6px under a card title are both smaller
       than the line-height of the text above them, which is why the columns looked dense. */
.prose li { margin: var(--sp-2) 0; }
.feat h3 + p, .cards-3 li h3 + p { margin-top: var(--sp-3); }

/* 9.5 The FAQ read as a wall of text: eight questions 5px apart with nothing separating them. The
       row dividers are the treatment the contact page's link list already uses, so the pattern is
       borrowed rather than invented. */
ul.faqs > li { margin: 0; border-bottom: 1px solid var(--line); }
ul.faqs > li:first-child { border-top: 1px solid var(--line); }

/* 9.6 On smaller screens a 48px group break between eight sections is a lot of scrolling with
       nothing in it, so the group step follows the section step down. */
/* The group step lives in the responsive :root declarations above, so there is still one
   declaration per breakpoint: 48px desktop, 32px tablet, 24px phone. */