:root {
  /* one size for every page title and its intro line, so pages look the same size as you move between them (landing heroes keep their own) */
  --title: clamp(28px, 4vw, 38px); --intro: 17px;
  --bg: #fbfbfd; --surface: #fff; --surface-2: #f4f5f9; --ink: #11151c; --muted: #566174; --line: #e4e8ee; --line-strong: #c9d0dc;
  --field-border: #7c8799;  /* 3.5:1 on the page background: input borders must reach 3:1, the hairline --line is only for dividers */
  --accent: #433fcf; --accent-hover: #3733b8; --accent-ink: #fff; --accent-soft: #eeeefc;
  --good: #0a6b37; --bad: #b3261e; --warn: #8a5a00;
  --code-bg: #0f1623; --code-ink: #dbe4f5; --code-dim: #98a5bb; --code-key: #8fb4ff; --code-str: #9be3b0; --code-num: #ffcf8a;
  --radius: 12px; --r-sm: 6px; --r-md: 8px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --t-fast: 120ms; --t-base: 180ms; --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-std: cubic-bezier(.4, 0, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f16; --surface: #121823; --surface-2: #18202e; --ink: #e8edf5; --muted: #93a0b4; --line: #232d3c; --line-strong: #33405a;
          --field-border: #5d6b82;
          --accent: #9d9aff; --accent-hover: #b4b2ff; --accent-ink: #0b1020; --accent-soft: #1c1b3f;
          --good: #4cc27f; --bad: #ff7b72; --warn: #e3b341; --shadow: none; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; }
code { background: var(--accent-soft); padding: .1em .38em; border-radius: 6px; font-size: .9em; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 20; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.nav nav { display: flex; gap: 4px; margin-left: 8px; }
.nav nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--r-md); font-size: 15px; transition: color var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std); }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); background: var(--accent-soft); text-decoration: none; }
.nav .cta { margin-left: auto; }
.nav .signin { margin-left: auto; color: var(--muted); font-size: 15px; padding: 8px 10px; border-radius: var(--r-md); }
.nav .signin:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav .signin + .cta { margin-left: 4px; }
.nav .signin.in { color: var(--ink); font-weight: 600; }
.nav .signin.in::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #16a34a; vertical-align: 1px; }
/* Header items never break onto two lines; when a header holds more links than fit, its link row scrolls sideways instead. */
.nav .wrap > *, .nav nav a { white-space: nowrap; flex-shrink: 0; }
.nav .wrap > nav { flex-shrink: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav nav::-webkit-scrollbar { display: none; }
/* Second bar, finance and accounting sites: the family's APIs as tabs, then the open API's own pages. */
.subnav { border-top: 1px solid var(--line); }
.subnav .wrap { height: 44px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.nav .subnav .wrap { flex-wrap: nowrap; height: 44px; padding-top: 0; padding-bottom: 0; }  /* not the phone layout of the first bar */
.nav .subnav nav { align-items: center; margin: 0; gap: 2px; overflow: visible; flex: 0 0 auto; order: 0; -webkit-mask-image: none; mask-image: none; }
.nav .subnav nav a { font-size: 14px; padding: 11px 10px; border-radius: 0; box-shadow: inset 0 -2px 0 transparent; }
.nav .subnav nav a:hover { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--line); }
.nav .subnav nav a[aria-current="page"] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.nav .subnav .products a { font-weight: 600; }
.nav .subnav .products a.on { color: var(--accent); background: var(--accent-soft); border-radius: var(--r-md); padding: 6px 12px; box-shadow: none; }
.subnav .sep { width: 1px; height: 20px; background: var(--line); margin: 0 8px; flex-shrink: 0; }
:root { --nav-h: 62px; }
:root:has(.nav .subnav) { --nav-h: 107px; }
@media (max-width: 720px) { :root { --nav-h: 101px; } :root:has(.nav .subnav) { --nav-h: 146px; } }
html { scroll-padding-top: calc(var(--nav-h) + 12px); }
/* phones: logo + CTA on the first row, the links on a swipeable second row */
@media (max-width: 720px) {
  .nav .wrap { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 10px; padding-bottom: 4px; }
  .nav .cta { order: 1; }
  .nav nav { order: 2; flex: 0 0 100%; margin: 6px -4px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }  /* shows that the row scrolls */
  .nav nav a { white-space: nowrap; padding: 8px 10px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: var(--r-md);
       border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer;
       transition: background-color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std); }
.btn:hover { text-decoration: none; background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); background: var(--surface-2); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.code :focus-visible, .band :focus-visible { outline-color: #c9c7ff; }  /* the accent ring is only 2.5:1 on the dark panels */

/* hero */
.hero { padding: 72px 0 48px; }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); margin: 18px 0 16px; letter-spacing: -.03em; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .fine { margin-top: 18px; font-size: 14px; color: var(--muted); }
@media (max-width: 880px) { .hero { padding-top: 44px; } .hero .grid { grid-template-columns: 1fr; } }

/* code */
.code { background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #1d2840; }
.code .bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #1d2840; flex-wrap: wrap; }
.code .bar .tab { background: none; border: 0; color: var(--code-dim); font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.code .bar .tab[aria-pressed="true"] { background: #1b2740; color: #fff; }
.code .bar .copy { margin-left: auto; background: none; border: 1px solid #2a3a5a; color: var(--code-ink); font: inherit; font-size: 13px; padding: 4px 11px; border-radius: 7px; cursor: pointer; transition: background-color var(--t-fast) var(--ease-std), border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.code .bar .copy:hover { background: #1b2740; }
.code .bar .copy.done { border-color: #2c6b45; color: #7ee2a0; }
.code pre { margin: 0; padding: 16px 18px; overflow: auto; font-size: 13.5px; line-height: 1.6; max-height: 420px; white-space: pre; }
.code pre.wrapjson { white-space: pre-wrap; word-break: break-word; }
.k { color: var(--code-key); } .s { color: var(--code-str); } .n { color: var(--code-num); }
td.n, th.n { color: inherit; }  /* table number columns share the JSON-sample class, so they must not take its amber */ .c { color: var(--code-dim); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid #2a3a5a; color: var(--code-ink); }
.pill.ok { color: #7ee2a0; border-color: #2c6b45; } .pill.err { color: #ff9a92; border-color: #7a3a36; }

/* try it */
.try { padding: 0; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 4px; }
.presets button { background: #16213a; color: var(--code-ink); border: 1px solid #2a3a5a; border-radius: 8px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.presets button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.try .urlline { padding: 6px 16px 2px; font-size: 12.5px; color: var(--code-dim); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.try .urlline code { background: none; color: var(--code-ink); padding: 0; overflow-wrap: anywhere; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .v { font-size: 28px; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; }
.sec-head p { color: var(--muted); margin: 0; font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--bg); }
.card h3 { font-size: 18px; margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.card .ico svg { width: 20px; height: 20px; }
.i { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }  /* every icon comes from /assets/icons.svg (Lucide, ISC): one stroke, one grid */
/* a short last row fills its row, so a grid never ends on a lone card with empty slots beside it */
.cards > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.cards > .card:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } .cards > .card:last-child:nth-child(3n+1), .cards > .card:last-child:nth-child(3n+2) { grid-column: auto; } .cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* compare table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.n, th.n { font-variant-numeric: tabular-nums; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
td.yes { color: var(--good); font-weight: 650; } td.no { color: var(--muted); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 22px 22px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
section.alt .step { background: var(--bg); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 17px; margin-bottom: 6px; } .step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* pricing */
.price { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.plan.main { border-color: var(--accent); box-shadow: var(--shadow); }
.plan h3 { font-size: 18px; } .plan .amt { font-size: 40px; font-weight: 780; letter-spacing: -.03em; margin: 8px 0 2px; }
.facts.two { grid-template-columns: 1fr 1fr; margin: 18px 0 4px; gap: 16px; }
.plan { display: flex; flex-direction: column; } .plan .btn { align-self: flex-start; margin-top: auto; }
.plan ul { margin: 16px 0 22px; padding: 0; list-style: none; display: grid; gap: 9px; }
.plan li { padding-left: 26px; position: relative; font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 6px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.price.three { grid-template-columns: 1fr 1fr .8fr; }
@media (max-width: 800px) { .price, .price.three { grid-template-columns: 1fr; } }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 18px 16px; color: var(--muted); }

/* cta band + footer */
.band { background: var(--accent); color: var(--accent-ink); border-radius: 16px; padding: 40px 32px; text-align: center; }
.band h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 10px; } .band p { margin: 0 0 22px; opacity: .85; }
.band .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
footer { border-top: 1px solid var(--line); padding: 36px 0 40px; margin-top: 64px; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none !important; transition: color var(--t-fast) var(--ease-std); }
footer a:hover { color: var(--ink); text-decoration: underline !important; }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 32px; }
footer h3 { margin: 0 0 10px; color: var(--ink); font-size: 14px; } footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
footer .small { margin-top: 28px; }

/* docs layout */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 36px; }  /* minmax(0, ..): a wide code block must scroll inside its box, not stretch the page */
.doc { min-width: 0; }
.doc .code, .doc .tablewrap, .doc .note { max-width: 820px; }
.side { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; max-height: calc(100vh - var(--nav-h) - 38px); overflow: auto; font-size: 14px; }
.side h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 6px; padding-left: 10px; }
.side a { display: block; padding: 6px 10px; border-radius: var(--r-md); color: var(--ink); transition: background-color var(--t-fast) var(--ease-std); }
.side a:hover { background: var(--surface-2); text-decoration: none; }
.side a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-fold { margin: 0 0 8px; } .side-fold > summary { padding: 12px 14px; }
.side-fold[open] { padding-bottom: 8px; }
.doc h1 { font-size: var(--title); margin-bottom: 8px; } .doc h2 { font-size: 26px; margin: 52px 0 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.doc .lead + h2 { border-top: 0; margin-top: 36px; } .doc h3 { font-size: 17px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink); max-width: 72ch; } .doc .lead { color: var(--muted); font-size: var(--intro); max-width: 64ch; }
.ep { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.ep .m { font-weight: 700; font-size: 12px; letter-spacing: .03em; background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); padding: 2px 8px; border-radius: var(--r-sm); }
.ep code { background: none; padding: 0; font-size: 14px; word-break: break-all; }
.ep .auth { margin-left: auto; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.ep .auth.free { color: var(--good); border-color: var(--good); }
.doc .code { margin: 12px 0 18px; }
.note { border: 1px solid var(--line-strong); background: var(--surface); padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-size: 15px; }
.note.warn { border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.note.danger { border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line)); border-left: 4px solid var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.note.warn > strong:first-child, .note.danger > strong:first-child { display: block; margin-bottom: 2px; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .side { position: static; max-height: none; } }
/* endpoint blocks: what it does and its parameters on the left, a request and a real response on the right */
.wrap.docs.wide { max-width: 1360px; }
.endpoint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.endpoint:first-child { border-top: 0; }
.endpoint .ep-text h3 { font-size: 20px; margin: 0 0 8px; }
.endpoint .ep-text p { margin: 10px 0; }
.endpoint .ep-code { align-self: start; position: sticky; top: calc(var(--nav-h) + 22px); display: grid; gap: 12px; }
.endpoint .code { margin: 0; max-width: none; }
.endpoint .code .cap { font-size: 12.5px; color: var(--code-dim); padding: 4px 6px; }
.endpoint .code pre { max-height: 300px; font-size: 12.5px; }
.doc .endpoint .tablewrap, .doc .endpoint .code, .doc .endpoint p { max-width: none; }
table.params td:first-child { white-space: nowrap; }
.ty { font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted); }
.req { font-size: 12px; font-weight: 700; color: var(--bad); margin-left: 6px; }
@media (max-width: 1180px) { .endpoint { grid-template-columns: minmax(0, 1fr); } .endpoint .ep-code { position: static; } }

/* a finance term with its meaning: dotted underline, the explanation in the title (read out by screen readers too) */
abbr.term { text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--muted); cursor: help; }
.table-hint { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; max-width: 70ch; }

/* forms */
.formcard { max-width: 560px; margin: 44px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--r-md); padding: 11px 12px; transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.hint { font-size: 14px; color: var(--muted); margin: -2px 0 6px; }
.field-error { margin: 6px 0 0; font-size: 14px; font-weight: 650; color: var(--bad); }
input[aria-invalid=true], textarea[aria-invalid=true] { border: 2px solid var(--bad); padding: 10px 11px; }
.errsummary { border: 3px solid var(--bad); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.errsummary h2 { font-size: 18px; margin: 0 0 6px; } .errsummary ul { margin: 0; padding-left: 20px; } .errsummary a { font-weight: 650; }
textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.msg.ok { background: color-mix(in srgb, var(--good) 14%, var(--bg)); color: var(--good); }
.msg.err { background: color-mix(in srgb, var(--bad) 12%, var(--bg)); color: var(--bad); }
.page { padding-top: 48px; }  /* top only: a .wrap.page keeps its side padding on phones */ .page h1 { font-size: var(--title); margin-bottom: 8px; }
.prose { max-width: 720px; } .prose h2 { font-size: 22px; margin: 34px 0 8px; } .prose p, .prose li { color: var(--ink); }
.status-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.status-row:last-child { border: 0; }
.runs { display: flex; gap: 2px; margin-top: 8px; }
.runs i { width: 6px; height: 16px; border-radius: 2px; background: var(--good); }
.runs i.bad { background: var(--bad); }
.fresh-line { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 8px; }
.dot.up { background: var(--good); } .dot.down { background: var(--bad); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
@keyframes eji-fresh { from { background-color: color-mix(in srgb, var(--accent) 16%, transparent); } to { background-color: transparent; } }
.fresh { animation: eji-fresh 900ms var(--ease-out); }  /* a row or figure that has just changed: a short tint, then gone */
@keyframes eji-sheen { to { background-position: -200% 0; } }
.skel { display: block; height: 1em; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: eji-sheen 1.4s linear infinite; }

/* breadcrumb in the header */
.crumb { color: var(--muted); margin: 0 -10px 0 -12px; }
.crumb-link { color: var(--muted); font-size: 15px; }
.crumb-link:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 960px) { .crumb, .crumb-link { display: none; } }

/* front door: two audiences side by side, each with a real sample */
.hero.small .lead { max-width: 40em; }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 22px; }
.door { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.door .tag { align-self: flex-start; }
.door h2 { font-size: 24px; margin: 4px 0 0; }
.door .for { color: var(--muted); margin: 0; font-size: 15px; }
.door .sample { margin: 6px 0 4px; padding: 12px 14px; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-md); font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-x: auto; white-space: pre; }
.door .sample .out { color: var(--code-str); }
.door .actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; }
.routes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.routes .lead-in { font-size: 14px; color: var(--muted); margin-right: 4px; }
.routes a { font-size: 14px; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: var(--surface); transition: border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.routes a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
@media (max-width: 760px) { .doors { grid-template-columns: minmax(0, 1fr); } .door { padding: 20px; } }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.four > .card:last-child { grid-column: auto; }
@media (max-width: 900px) { .cards.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards.four { grid-template-columns: 1fr; } }

/* plain facts under a hero: a short bold claim with its one-line proof, set off by a left rule */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; max-width: 900px; }
.fact { border-left: 3px solid var(--accent); padding-left: 14px; }
.fact b { display: block; font-size: 17px; line-height: 1.3; }
.fact span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 14px; } }

/* hub pages */
.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.live { background: color-mix(in srgb, var(--good) 14%, var(--bg)); color: #075a2d; }
.tag.soon { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.tile { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--ink); }
a.tile { transition: border-color var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std); }
a.tile:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.tile h3 { font-size: 20px; margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.tile .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 15px; }
.tile.ghost { border-style: dashed; background: transparent; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.hero.small { padding: 64px 0 40px; }
.hero.small .grid { grid-template-columns: 1fr; }
.hero.small h1 { max-width: 16em; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kv > div { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv > div:nth-child(odd) { background: var(--bg); color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 2px; } }

/* breadcrumbs */
.crumbs { font-size: 13px; color: var(--muted, #5c6178); padding: 14px 0 0; }
.crumbs a { color: inherit; }
.crumbs i { font-style: normal; opacity: .5; margin: 0 4px; }
.crumbs [aria-current] { color: var(--ink); }
.logo svg g { stroke: #433fcf; }
@media (prefers-color-scheme: dark) { .logo svg g { stroke: #fff; } }

/* a11y: links inside running text are underlined, not colour-only */
p a:not(.btn), li a:not(.btn), details a, dd a, .prose a:not(.btn), .fine a { text-decoration: underline; text-underline-offset: 2px; }
tbody th { text-align: left; font-weight: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .tag.live { color: var(--good); } }

div > a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

/* "Ways to use it" feature cards on the home pages: each says what it is, shows one small sample, and links to it */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feats:has(> :nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }  /* four cards: two by two, never three and one */
.feat { display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: inherit; }
a.feat:hover { border-color: var(--accent); text-decoration: none; }
section.alt .feat { background: var(--bg); }
.feat h3 { font-size: 17px; margin: 0; }
.feat .tag { align-self: flex-start; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feat .mini { margin: 4px 0 2px; padding: 10px 12px; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-md); font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.feat .mini .out { color: var(--code-str); }
.feat .more { margin-top: auto; padding-top: 4px; font-weight: 600; color: var(--accent); font-size: 14.5px; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps3 > div { border-top: 2px solid var(--accent); padding-top: 12px; }
.steps3 b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps3 b::before { counter-increment: step; content: counter(step) ". "; color: var(--accent); }
.steps3 p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .steps3 { grid-template-columns: minmax(0, 1fr); } }
.hero-sample { display: inline-block; margin: 4px 0 18px; padding: 10px 14px; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-md); font: 14px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.hero-sample .out { color: var(--code-str); }

/* ======================================================================================================================
   2026-11 redesign (Stitch "EJI API Design System": Geist + Geist Mono, indigo #433FCF, one navy hero band on home pages,
   mono uppercase kickers). Overrides the rules above; later rules win.
   ====================================================================================================================== */
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --bg: #fafafc; --line: #e6e8ef; --radius: 14px;
  --shadow: 0 1px 2px rgba(17,21,28,.04), 0 6px 20px -6px rgba(17,21,28,.08);
  --shadow-lift: 0 2px 4px rgba(17,21,28,.04), 0 14px 32px -10px rgba(67,63,207,.22);
  --navy: #0b1020; --navy-2: #141a3a;
  --code-bg: #0b0f1a;
}
@media (prefers-color-scheme: dark) { :root { --bg: #0b0f16; --line: #232d3c; --shadow-lift: none; } }
body { font-family: var(--font); letter-spacing: -.003em; }
code, pre, kbd, .ty, .door .sample, .feat .mini, .hero-sample { font-family: var(--mono) !important; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.028em; }
.hero h1 { font-weight: 680; letter-spacing: -.04em; line-height: 1.06; }

/* small mono uppercase label above a section heading */
.kicker { display: block; font: 600 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.sec-head h2 { letter-spacing: -.035em; }

/* header: frosted, with the Developer / Non-developer switch */
.nav { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
@media (min-width: 721px) { .nav .wrap { height: 64px; } }
.logo { font-weight: 700; letter-spacing: -.03em; }
.mode { display: inline-flex; margin-left: auto; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); flex-shrink: 0; }
.mode button { font: 500 13px/1 var(--font); color: var(--muted); background: none; border: 0; padding: 7px 11px; border-radius: 7px; cursor: pointer; white-space: nowrap;
               transition: background-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std); }
.mode button:hover { color: var(--ink); }
.mode button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17,21,28,.08), 0 0 0 1px var(--line); }
.nav .mode + .signin { margin-left: 6px; }
@media (max-width: 1100px) { .mode button { padding: 7px 8px; } }
@media (max-width: 720px) {
  .nav .mode { order: 3; flex: 0 0 100%; margin: 8px 0 4px; }
  .nav .mode button { flex: 1; padding: 8px; }
  .nav .signin { margin-left: auto; }
  :root { --nav-h: 146px; } :root:has(.nav .subnav) { --nav-h: 191px; }
}

/* cards, tiles, features: one surface, a hairline, and a lift on hover */
.card, .feat, .tile, .stat, .step { box-shadow: 0 1px 2px rgba(17,21,28,.03); }
a.tile, a.feat, a.card { transition: border-color var(--t-base) var(--ease-std), box-shadow var(--t-base) var(--ease-std), transform var(--t-base) var(--ease-out); }
a.tile:hover, a.feat:hover, a.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.stat .v { letter-spacing: -.035em; font-weight: 680; }
.tag { font-family: var(--mono); font-weight: 600; font-size: 11.5px; letter-spacing: .02em; border-radius: 6px; padding: 2px 8px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; }

/* tables: mono uppercase heads */
th { font: 600 11.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
tbody th { font: inherit; letter-spacing: normal; text-transform: none; }

/* code panels */
.code { background: var(--code-bg); border-color: #1a2236; }
.code .bar .tab, .code .bar .copy { font-family: var(--mono); font-size: 12.5px; }
.ep .m { font-family: var(--mono); }

/* CTA band */
.band { background: radial-gradient(120% 140% at 15% 0%, #5753e6 0%, var(--accent) 45%, #2d29a8 100%); border-radius: 20px; padding: 52px 32px; box-shadow: 0 20px 50px -24px rgba(67,63,207,.6); }
.band .btn.ghost, .band .btn + .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }

/* footer */
footer h3 { font: 600 11.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* the one dark band: home pages of ejiapi.com, fin. and acc. */
.hero.dark { position: relative; color: #e8ebf7; border-bottom: 1px solid #1d2448;
             background: radial-gradient(60% 80% at 85% 10%, rgba(87,83,230,.38), transparent 70%),
                         radial-gradient(50% 60% at 0% 100%, rgba(67,63,207,.22), transparent 70%), linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); }
.hero.dark h1, .hero.dark h2, .hero.dark h3 { color: #fff; }
.hero.dark .lead, .hero.dark p.lead, .hero.dark .fine, .hero.dark .for, .hero.dark .routes .lead-in, .hero.dark p { color: #aeb5d0; }
.hero.dark .eyebrow { background: rgba(255,255,255,.06); color: #d7dafc; border: 1px solid rgba(255,255,255,.12); }
.hero.dark a:not(.btn) { color: #c9c7ff; }
.hero.dark .btn.ghost { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); }
.hero.dark .btn.ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.hero.dark :is(.door, .stat, .card, .feat, .tile) { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: #e8ebf7; box-shadow: none; }
.hero.dark .stat .l { color: #aeb5d0; }
.hero.dark :is(.door .sample, .hero-sample, .mini) { background: rgba(3,6,16,.72); border: 1px solid rgba(255,255,255,.08); }
.hero.dark .routes a { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); color: #dfe2f5; font-family: var(--mono); font-size: 13px; }
.hero.dark .routes a:hover { border-color: #9d9aff; color: #fff; }
.hero.dark .code { border-color: rgba(255,255,255,.1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.hero.dark :focus-visible { outline-color: #c9c7ff; }
.hero.dark .tag { background: rgba(157,154,255,.14); color: #c9c7ff; }
.hero.dark .tag.live { background: rgba(76,194,127,.16); color: #7ee2a0; }
.hero.dark .tag.beta { background: rgba(227,179,65,.16); color: #f2c862; }
.hero.dark code { background: rgba(255,255,255,.08); color: #e8ebf7; }
@media (min-width: 981px) {
  .hero.dark.split > .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
  .hero.dark.split .doors { grid-template-columns: minmax(0, 1fr); margin: 0; }
  .hero.dark.split .left { min-width: 0; }
  .hero.dark.split h1 { font-size: clamp(36px, 4.2vw, 50px); }
  .feats:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hero.dark .door .sample { white-space: pre-wrap; overflow-wrap: anywhere; }
.feat .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feat .ico svg { width: 20px; height: 20px; }

/* ---------- states (Stitch "UI states" board) ---------- */
.msg { border-radius: 12px; }
.msg.err { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); border-left: 4px solid var(--bad); }
.msg.ok { background: color-mix(in srgb, var(--good) 8%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); border-left: 4px solid var(--good); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.errsummary { border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); border-left: 4px solid var(--bad); background: color-mix(in srgb, var(--bad) 5%, var(--surface)); }

/* ---------- Non-developer mode: developer-only parts look disabled; nothing is hidden or switched off ---------- */
.devnote-wrap { display: none; }
html[data-mode="simple"] .devnote-wrap { display: block; padding-top: 18px; }
.devnote { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px;
           background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); font-size: 14.5px; }
html[data-mode="simple"] :is(.dev, .devpage, .code, .ep, .sample.dev, .mini.dev) {
  opacity: .42; filter: grayscale(1); transition: opacity var(--t-base) var(--ease-std), filter var(--t-base) var(--ease-std); }
html[data-mode="simple"] :is(.dev, .code, .ep):hover { opacity: .8; filter: none; }
html[data-mode="simple"] .devpage :is(.code, .ep, .dev) { opacity: 1; filter: none; }  /* dimmed once, by the page, not twice */
html[data-mode="simple"] .dev :is(.code, .ep, .sample, .mini) { opacity: 1; filter: none; }
html[data-mode="simple"] :is(.code, .feat.dev, .card.dev, .tile.dev, .door .sample.dev) { position: relative; }
html[data-mode="simple"] :is(.code, .feat.dev, .card.dev, .tile.dev, .door .sample.dev)::after {
  content: "Developer mode"; position: absolute; right: 10px; bottom: 10px; z-index: 1; pointer-events: none;
  font: 600 11px/1 var(--mono); letter-spacing: .04em; padding: 5px 8px; border-radius: 6px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
html[data-mode="simple"] :is(.devpage, .dev) :is(.code, .door .sample.dev)::after { content: none; }  /* :is() takes its heaviest argument, so match the chip rule's weight */
html[data-mode="simple"] .nav a.dev::after { content: "dev"; font: 600 9.5px/1 var(--mono); margin-left: 4px; padding: 2px 4px; border-radius: 4px; border: 1px solid var(--line); vertical-align: 2px; }
html[data-mode="simple"] .nav a.dev { opacity: .5; filter: none; }
html[data-mode="simple"] .nav a.dev:hover { opacity: .9; }

/* header fit: the switch takes room, so the bar packs tighter */
@media (min-width: 721px) { .nav .wrap { gap: 14px; } }
.nav nav { margin-left: 4px; gap: 2px; }
.nav nav a { padding: 8px 9px; }
.mode button { padding: 6px 10px; }
@media (max-width: 1180px) { .nav .wrap > nav a { padding: 8px 7px; font-size: 14.5px; } .crumb, .crumb-link { display: none; } }
.hero.dark .crumbs { padding: 0 0 14px; color: #8e96b8; }
.hero.dark .crumbs [aria-current] { color: #fff; }
html[data-mode="simple"] .door.dev { position: relative; }
html[data-mode="simple"] .door.dev::after { content: "Developer mode"; position: absolute; right: 12px; top: 12px; font: 600 11px/1 var(--mono); letter-spacing: .04em;
  padding: 5px 8px; border-radius: 6px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 980px) { .hero.dark.split .doors { margin-top: 28px; } }
@media (min-width: 1000px) { footer .cols { grid-template-columns: 1.5fr repeat(6, minmax(0, 1fr)); gap: 28px 24px; } }
/* 404: an empty state, not a dead end */
.notfound { max-width: 720px; margin: 24px auto 0; text-align: center; }
.notfound .code404 { font: 600 13px/1 var(--mono); letter-spacing: .2em; color: var(--accent); }
.notfound h1 { font-size: clamp(32px, 5vw, 48px); margin: 14px 0 10px; letter-spacing: -.035em; }
.notfound > p { color: var(--muted); margin: 0 auto 28px; max-width: 46ch; }
.notfound .tiles { text-align: left; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.notfound .tile { padding: 18px; } .notfound .tile h3 { font-size: 16px; }
/* the family cards on ejiapi.com: one row; more families than fit scroll sideways (site.js moves it slowly, a card at a time) */
.doors.rail { display: flex; gap: 16px; margin: 28px 0 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
              scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 2px; }
.doors.rail::-webkit-scrollbar { display: none; }
.doors.rail > .door { flex: 0 0 calc((100% - 16px) / 2); min-width: 0; scroll-snap-align: start; }
@media (max-width: 760px) { .doors.rail > .door { flex-basis: 88%; } }
.doors.rail:focus-visible { outline-offset: 4px; }
.rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.rail-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.28); cursor: pointer; }
.rail-dots button[aria-current="true"] { background: #c9c7ff; width: 20px; border-radius: 4px; }
.hero.dark:not(.split) .left { max-width: 820px; }

/* ======================================================================================================================
   Second pass (2026-11-18): every inner page, from the Stitch inner-page kit
   ====================================================================================================================== */
html { overflow-x: clip; }  /* the full-bleed bands below are 100vw wide; clip, unlike hidden, keeps position: sticky working */

/* page head: every page whose main column is a .wrap gets a soft indigo glow and dot grid behind its top, fading out */
#main.wrap { position: relative; isolation: isolate; }
#main.wrap::before { content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; height: 340px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(560px 280px at 82% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
              radial-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1.3px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0,0,0,.55) 45%, transparent 100%); mask-image: linear-gradient(#000 0%, rgba(0,0,0,.55) 45%, transparent 100%); }
.kicker.chip { display: inline-flex; width: fit-content; align-items: center; padding: 4px 9px; border-radius: 6px; margin-bottom: 12px; font-size: 11.5px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
#main h1 { letter-spacing: -.035em; }
.hero.headband { position: relative; padding: 48px 0 44px; border-bottom: 1px solid var(--line);
  background: radial-gradient(560px 280px at 82% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
              radial-gradient(color-mix(in srgb, var(--accent) 18%, transparent) 1px, transparent 1.3px) 0 0 / 22px 22px, var(--bg); }
.hero.headband .crumbs, .hero.dark .crumbs { padding: 0 0 16px; }

/* product pages: the dark band, and the live numbers as one strip that sits across its lower edge */
.hero.dark.product { padding-bottom: 0; }
.hero.dark.product .grid { align-items: start; }
.hero.dark.product .fine { color: #8e96b8; }
.hero.dark.product .stats { position: relative; z-index: 2; margin: 52px 0 -58px; gap: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(11,16,32,.45); }
.hero.dark.product .stats .stat { background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--ink); padding: 22px 24px; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero.dark.product .stats .stat + .stat { border-left: 1px solid var(--line); }
.hero.dark.product .stats .stat .v { color: var(--ink); }
.hero.dark.product .stats .stat .l { color: var(--muted); }
.hero.dark.product + section { padding-top: 116px; }
@media (max-width: 760px) { .hero.dark.product .stats .stat:nth-child(3) { border-left: 0; } .hero.dark.product .stats .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* feature cards: icon and a one-fact tag on one row, text below */
.card:has(> .cardtag) { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; align-content: start; }
.card:has(> .cardtag) > :not(.ico):not(.cardtag) { grid-column: 1 / -1; }
.card .cardtag { justify-self: end; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
section.alt .card .cardtag { background: var(--surface); }
.card:has(> .cardtag) h3 { margin-top: 14px; }

/* boxes beside a form */
.formsplit { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 330px); gap: 24px; justify-content: center; align-items: start; margin-top: 40px; }
.formsplit .formcard { margin: 0; max-width: none; }
.sidebox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sidebox .fine { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 900px) { .formsplit { grid-template-columns: minmax(0, 1fr); } }
.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }

/* ejiapi.com: the CAS workbook preview */
.split2 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.split2 h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.035em; margin-bottom: 10px; }
.split2 .btn { margin-top: 22px; }
@media (max-width: 900px) { .split2 { grid-template-columns: minmax(0, 1fr); } }
.sheetmock { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lift); }
.sheetmock figcaption { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 600 13px/1 var(--mono); background: var(--surface-2); }
.sheetmock figcaption .tag { margin-left: auto; }
.sheetmock .dots { display: inline-flex; gap: 5px; } .sheetmock .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.sheetmock .fx { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sheetmock .fx b { font: italic 600 12px/1 var(--mono); color: var(--accent); }
.sheetmock .fx code { background: none; padding: 0; }
.sheetmock table { font-size: 14px; } .sheetmock th, .sheetmock td { padding: 10px 14px; }
.sheetmock td.n, .sheetmock th.n { text-align: right; font-family: var(--mono); font-size: 13px; }
.sheetmock td.up { color: var(--good); }
.sheetmock tr.tot td { font-weight: 650; background: var(--surface-2); }

/* finance second bar: live status from the API's own check */
.live-status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; font: 500 12.5px/1 var(--mono); color: var(--muted);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none !important; }
.live-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.live-status[data-state="operational"]::before { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.live-status[data-state="degraded"]::before { background: var(--warn); }
.live-status[data-state="outage"]::before { background: var(--bad); }
.live-status:hover { color: var(--ink); border-color: var(--line-strong); }

/* guides: "On this page" beside the article */
@media (min-width: 1100px) {
  .withtoc { display: grid; grid-template-columns: minmax(0, 1fr) 250px; column-gap: 56px; }
  .withtoc > .article-head { grid-column: 1 / -1; }
  .withtoc > .article { grid-column: 1; min-width: 0; }
  .withtoc > .toc { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
}
@media (max-width: 1099px) { .withtoc > .toc { display: none; } }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: 14px; }
.toc nav { display: grid; gap: 2px; margin-top: 4px; }
.toc nav a { color: var(--muted); padding: 5px 8px; border-radius: 6px; text-decoration: none !important; border-left: 2px solid transparent; }
.toc nav a:hover { color: var(--ink); background: var(--surface-2); }
.toc nav a[aria-current] { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.toc-help { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* changelog: what kind of release, from its version number */
.changelog .kind { font: 600 11px/1 var(--mono); letter-spacing: .03em; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.changelog .kind.feature { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }

/* family rail: pause / play */
.rail-dots { align-items: center; }
.rail-dots .rail-hold { width: auto; height: auto; padding: 4px 10px; margin-left: 8px; border-radius: 999px; font: 600 11.5px/1 var(--mono); color: #dfe2f5;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); }

/* Non-developer chips: top right, sitting on the box's edge, so they never cover text or the Copy button */
html[data-mode="simple"] :is(.code, .feat.dev, .card.dev, .tile.dev, .door .sample.dev)::after { top: -11px; right: 12px; bottom: auto; }
html[data-mode="simple"] :is(.code, .door .sample.dev) { overflow: visible; }
.prose.withtoc { max-width: none; }
.withtoc > .article { max-width: 760px; }

/* Non-developer mode, round 3: formula boxes are no-code, so never dimmed; developer links and tabs anywhere get the small "dev" mark */
html[data-mode="simple"] .code.nodev { opacity: 1; filter: none; }
html[data-mode="simple"] .code.nodev::after { content: none !important; }  /* the chip rule is weighted by its heaviest :is() argument */
html[data-mode="simple"] :is(a, button).dev:not(.feat):not(.card):not(.tile):not(.door) { opacity: .5; filter: grayscale(1); }
html[data-mode="simple"] :is(a, button).dev:not(.feat):not(.card):not(.tile):not(.door):hover { opacity: .9; }
html[data-mode="simple"] :is(a, button).dev:not(.feat):not(.card):not(.tile):not(.door)::after {
  content: "dev"; display: inline-block; font: 600 9.5px/1 var(--mono); letter-spacing: .02em; margin-left: 5px; padding: 2px 4px; border-radius: 4px;
  border: 1px solid currentColor; vertical-align: 2px; opacity: .8; position: static; background: none; color: inherit; }

/* account portal */
.whoami { position: relative; }
.whoami > .kicker.chip { margin-top: 4px; }
.famcard .famhead { display: flex; align-items: center; gap: 12px; }
.famcard .famhead h2 { margin: 0; }
.famcard .famhead .tag { margin-left: auto; }
.famcard .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.famcard .ico svg { width: 20px; height: 20px; }
.tag.beta { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.titlebox { display: grid; justify-items: start; } .titlebox .kicker.chip { margin: 0 0 8px; }
.whoami .titlebox { padding-top: 18px; }

/* ======================================================================================================================
   Third pass (2026-11-18): one Stitch screen per page. Shared parts every page now uses.
   ====================================================================================================================== */
/* card head: an icon on the left, a one-fact tag on the right */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top .tag { margin-left: auto; }
.ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; flex: none; }
.ico svg { width: 20px; height: 20px; }
.ico.mute { background: var(--surface-2); color: var(--muted); }
.ico.good { background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--good); }
.ico.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); }
.hero.dark .ico { background: rgba(157,154,255,.14); color: #c9c7ff; }
.tag.grey { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.hero.dark .tag.grey { background: rgba(255,255,255,.06); color: #c3c8e4; border-color: rgba(255,255,255,.12); }
.feat > .top + h3, .tile > .top + h3, .card > .top + h3 { margin-top: 6px; }
.more .i, .btn .i, a .i.after { width: 16px; height: 16px; }
.more { display: inline-flex; align-items: center; gap: 6px; }

/* door head: icon + title on one line, tag at the right */
.door .dhead { display: flex; align-items: center; gap: 10px; }
.door .dhead h2 { margin: 0; font-size: 21px; }
.door .dhead .i { width: 20px; height: 20px; color: #c9c7ff; }
.door .dhead .tag { margin-left: auto; }

/* a row of small links under a tile: Overview › Docs › Explorer */
.linkchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.linkchips a { display: inline-flex; align-items: center; gap: 4px; font: 500 12.5px/1 var(--mono); padding: 7px 10px; border-radius: 7px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); text-decoration: none !important; }
.linkchips a::after { content: "›"; color: var(--muted); }
.linkchips a:first-child { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.linkchips a:hover { border-color: var(--accent); }

/* step cards: number, icon, title, text and one fact in a grey box */
.stepcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: sc; }
.stepcards > div { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(17,21,28,.03); }
section.alt .stepcards > div { background: var(--bg); }
.stepcards .top::before { counter-increment: sc; content: counter(sc); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 650 14px/1 var(--mono); }
.stepcards .top .i { width: 20px; height: 20px; color: var(--muted); }
.stepcards b { font-size: 17px; margin-top: 6px; }
.stepcards p { margin: 0; color: var(--muted); font-size: 14.5px; }
.stepcards .fact1 { margin-top: auto; padding: 9px 12px; border-radius: 8px; background: var(--surface-2); font: 500 12.5px/1.45 var(--mono); color: var(--muted); }
@media (max-width: 860px) { .stepcards { grid-template-columns: minmax(0, 1fr); } }

/* CTA band, split: words on the left, buttons on the right */
.band.split { display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; padding: 40px; flex-wrap: wrap; }
.band.split h2 { margin: 0 0 6px; } .band.split p { margin: 0; }
.band.split .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.band .btn.alt { background: rgba(11,16,32,.28); color: #fff; border-color: rgba(255,255,255,.18); }
.band .btn.alt:hover { background: rgba(11,16,32,.42); }

/* a callout with an icon: info, warn, good */
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); margin: 16px 0;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-left: 4px solid var(--accent); }
.callout > .i { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.callout b { display: block; margin-bottom: 2px; }
.callout p { margin: 0; color: var(--muted); font-size: 15px; max-width: none; }
.callout.warn { background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); border-left-color: var(--warn); }
.callout.warn > .i { color: var(--warn); }
.callout.good { background: color-mix(in srgb, var(--good) 6%, var(--surface)); border-color: color-mix(in srgb, var(--good) 30%, var(--line)); border-left-color: var(--good); }
.callout.good > .i { color: var(--good); }

/* can / cannot: two columns with ticks and crosses */
.cando { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.cando > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.cando h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 10px; }
.cando h3 .i { width: 18px; height: 18px; }
.cando .yes h3 { color: var(--good); } .cando .no h3 { color: var(--bad); }
.cando ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
@media (max-width: 700px) { .cando { grid-template-columns: 1fr; } }

/* section heads: kicker + title on the left, an action on the right */
.sec-head.row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-head.row > div { max-width: 640px; }

/* numbered h2s in articles (agent guide, docs basics) */
.numhead { counter-reset: nh; }
.numhead h2 { display: flex; align-items: center; gap: 10px; }
.numhead h2::before { counter-increment: nh; content: counter(nh); display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font: 650 13px/1 var(--mono); }

/* a download / file card */
.filecard { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 16px 0; flex-wrap: wrap; }
.filecard .meta { flex: 1; min-width: 200px; }
.filecard .meta b { display: block; font-family: var(--mono); font-size: 14.5px; }
.filecard .meta span { color: var(--muted); font-size: 14px; }

/* stat cells inside light page heads */
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 22px 0 0; }
.minis > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.minis b { display: block; font-size: 20px; letter-spacing: -.02em; }
.minis span { display: block; color: var(--muted); font: 500 11.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.hero.dark .minis { margin: 28px 0 22px; }
.hero.dark .minis > div { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.hero.dark .minis b { color: #fff; } .hero.dark .minis span { color: #8e96b8; }
.tile h3 a { color: inherit; } .tile h3 a:hover { color: var(--accent); }
.ctaband { margin-top: 56px; }
/* two tiles: two equal columns, full width; a short last row of feature cards fills its row */
.tiles:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .tiles:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 981px) {
  .feats:not(:has(> :nth-child(4):last-child)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feats > :last-child:nth-child(3n+2) { grid-column: span 2; }
  .feats > :last-child:nth-child(3n+1):not(:nth-child(4)) { grid-column: 1 / -1; }
}
/* code window: three dots, a title and a status pill */
.code.win .bar { gap: 10px; }
.code.win .dots { display: inline-flex; gap: 6px; } .code.win .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.code.win .wtitle { font: 500 12.5px/1 var(--mono); color: var(--code-dim); }
.code.win .pill { margin-left: auto; }
/* one line of plain facts under the hero buttons */
.trust { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font: 500 12.5px/1.5 var(--mono); letter-spacing: .02em; color: #8e96b8; }
.trust .i { width: 16px; height: 16px; flex: none; }
/* endpoint and formula chips at the foot of a capability card */
.card { display: flex; flex-direction: column; }
.card:has(> .cardtag) { display: grid; }
.epchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
.epchips code { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.epchips code + code:not(.dev) { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.card .foot { margin-top: auto; padding-top: 14px; font: 600 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.callout + *, .cards + .callout { margin-top: 18px; }
/* help pages (agent guide): numbered sections "01", fact chips under the lead, requirement cards, step boxes */
.numhead h2::before { content: counter(nh, decimal-leading-zero); background: none; width: auto; height: auto; color: var(--accent); font: 600 14px/1 var(--mono); }
.factchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.factchips span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font: 500 12.5px/1 var(--mono); color: var(--muted); }
.factchips .i { width: 15px; height: 15px; color: var(--accent); }
.reqs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.reqs.five { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.reqs > div { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.reqs .i { width: 20px; height: 20px; color: var(--accent); margin-bottom: 4px; }
.reqs b { font-size: 15.5px; } .reqs span { color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .reqs { grid-template-columns: minmax(0, 1fr); } }
.stepsbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.stepsbox ol { list-style: none; counter-reset: sb; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.stepsbox li { position: relative; padding-left: 40px; min-height: 28px; }
.stepsbox li::before { counter-increment: sb; content: counter(sb); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font: 600 12.5px/1 var(--mono); color: var(--accent); }
.rowcard { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin: 16px 0; }
.rowcard p { margin: 0 0 10px; } .rowcard p:last-child { margin: 0; }
.choice2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.choice2 > div { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.choice2 > div .tag { align-self: flex-start; }
.choice2 > div.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad) 4%, var(--surface)); }
.choice2 p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 700px) { .choice2 { grid-template-columns: 1fr; } }
.kvlist { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 16px 0; }
.kvlist > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kvlist > div:last-child { border-bottom: 0; }
.kvlist b { font-family: var(--mono); font-size: 13.5px; color: var(--accent); }
@media (max-width: 600px) { .kvlist > div { grid-template-columns: 1fr; gap: 2px; } }
.callout.danger { background: color-mix(in srgb, var(--bad) 5%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 32%, var(--line)); border-left-color: var(--bad); }
.callout.danger > .i { color: var(--bad); }
.prose .callout p, .prose .rowcard p { max-width: none; }
.prose details { margin-bottom: 8px; }
/* API reference pages (Stitch docs screens) */
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side .mchip { flex: none; font: 600 10px/1 var(--mono); letter-spacing: .04em; padding: 3px 5px; border-radius: 4px;
  background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--good); }
.side h4 { font-family: var(--mono); font-weight: 600; letter-spacing: .12em; }
.doc .lead code, .page .lead code { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.note { display: block; position: relative; padding: 14px 18px 14px 20px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.req { font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; vertical-align: 1px;
  background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); }
.ep { box-shadow: 0 1px 2px rgba(17,21,28,.03); padding: 12px 14px; }
.ep .m { padding: 4px 8px; }
.ep .auth { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }
.ep .auth::before { content: ""; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("/assets/key.svg") center / contain no-repeat; mask: url("/assets/key.svg") center / contain no-repeat; }
.doc h2 { display: flex; align-items: center; gap: 10px; }
.doc > .factchips { margin-bottom: 4px; }
.side .mchip.post { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
/* MCP pages: tool rows, prompt cards, one big card */
.toollist { display: grid; gap: 8px; margin: 16px 0; }
.toollist > div { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.toollist code { background: none; padding: 0; font-weight: 600; color: var(--accent); font-size: 14px; }
.toollist p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14.5px; }
.prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.prompts > div { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prompts .kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.prompts .kicker .i { width: 15px; height: 15px; }
.prompts b { font-size: 16px; font-weight: 550; line-height: 1.4; }
.prompts .uses { margin-top: auto; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; color: var(--muted); }
@media (max-width: 700px) { .prompts { grid-template-columns: 1fr; } }
.bigcard { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 16px 0; }
.bigcard > .top b { font-size: 17px; }
.numhead .toc nav { counter-reset: tc; }
.numhead .toc nav a::before { counter-increment: tc; content: counter(tc, decimal-leading-zero); font: 600 11.5px/1 var(--mono); color: var(--accent); margin-right: 10px; }
/* pricing pages (Stitch pricing screens) */
.hero.center .wrap { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero.center .lead { margin-left: auto; margin-right: auto; }
.hero.center .crumbs { align-self: center; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.price { align-items: stretch; }
.plan { padding: 30px; border-radius: 18px; }
.plan.main { border: 2px solid var(--accent); background: radial-gradient(300px 160px at 90% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--surface); }
.plan.alt { background: var(--surface-2); }
.plan .phead { display: flex; align-items: center; gap: 10px; }
.plan .phead .i { width: 20px; height: 20px; color: var(--accent); }
.plan .phead h3 { font-size: 22px; margin: 0; }
.plan .phead .tag { margin-left: auto; }
.plan.main .phead .tag { background: var(--accent); color: var(--accent-ink); }
.plan .amt { color: var(--accent); margin-top: 16px; }
.plan .amt small { font: 500 13px/1 var(--mono); color: var(--muted); letter-spacing: 0; }
.plan .amt.sm { font-size: 26px; color: var(--ink); letter-spacing: -.02em; }
.plan ul.ticks2 { gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.plan ul.ticks2 li { padding-left: 32px; }
.plan ul.ticks2 li::before { left: 0; top: .2em; width: 20px; height: 20px; border: 0; border-radius: 50%; transform: none;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)) url("/assets/check.svg") center / 12px no-repeat; }
.plan ul.ticks2 b { display: block; font-weight: 600; font-size: 16px; }
.plan ul.ticks2 span { display: block; color: var(--muted); font-size: 13.5px; }
.btn.wide { align-self: stretch !important; justify-content: center; }
.pnote { text-align: center; margin: 10px 0 0; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.pnote i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 2px; }
.scopestrip { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 18px 22px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.scopestrip > div { flex: 1; min-width: 240px; } .scopestrip p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.scopestrip .pfx { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; color: var(--accent); font-weight: 600; }
details summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: 2px; transition: transform var(--t-fast) var(--ease-std); flex: none; }
details[open] summary::after { content: ""; transform: rotate(225deg); margin-top: 8px; }
.kicker.onband { color: #c9c7ff; }
/* Sheets Lab: one card per formula */
.fcards { display: grid; gap: 10px; margin: 16px 0; }
.fcard { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fcard .fh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fcard .fh code { background: none; padding: 0; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.fcard .fh .tag { margin-left: auto; }
.fcard p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; max-width: none; }
h2 .htag { margin-left: auto; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 5px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
/* key pages: centred head, a three-step bar, key rows (Stitch key screen) */
.pagehead { padding-top: 8px; }
.pagehead.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pagehead.center .lead { max-width: 640px; color: var(--muted); font-size: 18px; margin: 0; }
.stepper { list-style: none; display: flex; gap: 6px; margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--line); counter-reset: none; }
.stepper li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex: 1; }
.stepper li + li::before { content: ""; height: 1px; flex: 0 0 18px; background: var(--line-strong); margin-right: 2px; }
.stepper span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); font: 600 12px/1 var(--mono); }
.stepper li[aria-current] { color: var(--ink); font-weight: 600; }
.stepper li[aria-current] span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper li.done span { background: color-mix(in srgb, var(--good) 14%, var(--surface)); border-color: var(--good); color: var(--good); }
input.otp { font: 600 22px/1 var(--mono) !important; letter-spacing: .4em; text-align: center; }
.krow { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.krow > div:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.krow code { font-weight: 600; }
.kwhen { font: 500 12.5px/1 var(--mono); color: var(--muted); }
.kact { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border-color: var(--bad); }
.iconlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.iconlist li { display: flex; gap: 10px; font-size: 14.5px; }
.iconlist .i { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
@media (min-width: 981px) { .tiles > .tile.ghost:last-child:nth-child(3n+1) { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 18px; }
  .tiles > .tile.ghost:last-child:nth-child(3n+1) .top { grid-row: span 2; } .tiles > .tile.ghost:last-child:nth-child(3n+1) .top .tag { display: none; }
  .tiles > .tile.ghost:last-child:nth-child(3n+1) .more { grid-row: 1 / span 2; grid-column: 3; margin: 0; } }
#sources table td:nth-child(2) { font: 500 13.5px/1.5 var(--mono); color: var(--accent); }
/* key and request forms (Stitch get-key screen): form on the left under the title, a grey "What you get" box on the right */
.keygrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 8px; }
.keygrid .lead { color: var(--muted); font-size: 18px; margin: 0 0 22px; }
.keygrid .formcard { margin: 0; max-width: none; padding: 32px; }
@media (max-width: 900px) { .keygrid { grid-template-columns: minmax(0, 1fr); } }
.labels-mono label { font: 600 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.labels-mono input[type=text], .labels-mono input[type=email], .labels-mono textarea, .labels-mono select { background: var(--surface-2); }
.labels-mono input:focus-visible, .labels-mono textarea:focus-visible { background: var(--surface); }
/* the terms box on the key forms: normal text, not a mono field label */
.formcard label.agree, .labels-mono label.agree { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font: 400 14px/1.5 var(--font, inherit); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
label.agree input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.sidebox.grey { background: var(--surface-2); border-radius: 18px; padding: 28px; margin-top: 64px; }
.sbhead { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px; }
.sbhead .i { width: 22px; height: 22px; color: var(--accent); }
.featlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.featlist li { display: flex; gap: 14px; }
.featlist .ico { width: 32px; height: 32px; border-radius: 50%; }
.featlist .ico svg { width: 16px; height: 16px; }
.featlist b { display: block; font-weight: 600; }
.featlist span:not(.ico) { color: var(--muted); font-size: 15px; }
.sbfoot { display: grid; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sbfoot .kicker { margin: 0; color: var(--muted); }
.sbfoot a .i { width: 14px; height: 14px; vertical-align: -2px; }
.sbfoot .fine { font-size: 14px; color: var(--muted); }
/* about page */
.about-lead { font-size: 19px; color: var(--muted); max-width: 46em; }
.aboutsec { padding: 44px 0 0; }
a.card { color: inherit; }
a.card:hover { text-decoration: none; }
.srcchips { display: flex; flex-wrap: wrap; gap: 10px; }
.srcchips span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font: 500 13.5px/1.3 var(--mono); }
.srcchips .i { width: 17px; height: 17px; color: var(--accent); }
.bizlist b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); color: var(--ink); font-size: 14.5px; }
.bizlist b .i { width: 16px; height: 16px; color: var(--accent); }
.kvlist.bizlist > div { grid-template-columns: 200px 1fr; }
/* guides index */
.gfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.gfilter .chip { font: inherit; font-size: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.gfilter .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gcards .card .more { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--accent); font-size: 14.5px; }
.gcards .card[hidden] { display: none; }
h2 .count { font: 600 13px/1 var(--mono); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; vertical-align: 6px; margin-left: 6px; }
.gsec[hidden] { display: none; }
/* ejiapi.com: every API as plain links (#every-api) */
.apidir { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 32px; }
.apidir h3 { font-size: 18px; margin: 0 0 8px; } .apidir h3 a { color: var(--ink); }
.apidir ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.apidir li { color: var(--muted); font-size: 15px; } .apidir li a { font-weight: 600; }
/* "Related guides" at the end of each guide (scripts/build_guides.py) */
.rguides { margin: 40px 0 24px; }
.rguides .cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.rguides .card { padding: 18px; display: flex; flex-direction: column; }
.rguides .card h3 { font-size: 16px; }
.prose .rguides a.card, .prose .rguides a.card * { text-decoration: none; }
.prose .rguides a.card h3 { color: var(--ink); } .prose .rguides a.card p { color: var(--muted); }
.rguides .cards > .card:last-child { grid-column: auto; }
#guides .gcards .card { display: flex; flex-direction: column; }
/* legal: privacy points as rows with icons, terms as numbered cards */
.privrows { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 16px 0; }
.privrows > div { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.privrows > div:last-child { border-bottom: 0; }
.privrows b { display: block; margin-bottom: 2px; }
.privrows p { margin: 0; color: var(--muted); font-size: 15px; max-width: none; }
.termcards { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; counter-reset: tcn; }
.termcards li { position: relative; padding: 16px 18px 16px 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: none; }
.termcards li::before { counter-increment: tcn; content: counter(tcn, decimal-leading-zero); position: absolute; left: 18px; top: 16px; font: 600 13px/1.6 var(--mono); color: var(--accent); }
/* 404 */
.notfound .code404 { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 25%, var(--line)); color: var(--bad); letter-spacing: .08em; }
.notfound .code404 i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.notfound .tile .more { display: inline-flex; }
