
:root {
  --bg: #fbfaf8;
  --fg: #14171a;
  --muted: #5c6670;
  --rule: #e2ddd5;
  --card: #ffffff;
  --accent: #8a4b2a;
  --accent-soft: #f6efe8;
  --measure: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #e9e6e1;
    --muted: #9aa3ad;
    --rule: #2b2f36;
    --card: #1b1e23;
    --accent: #e0a077;
    --accent-soft: #24211f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  overflow-wrap: break-word;
}
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 5vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font: 600 .95rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}
.bar nav { display: flex; gap: 1.25rem; }
.bar nav a {
  font: 400 .85rem/1 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
  text-decoration: none;
}
.bar nav a:hover, .wordmark:hover { color: var(--accent); }
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 5vw, 2.5rem) 4rem;
}
main.wide { max-width: 64rem; }
h1 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  letter-spacing: -.01em;
}
h2 {
  font: 600 .8rem/1.3 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.75rem 0 .85rem;
}
h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
p, li { color: var(--fg); }
.lede { font-size: 1.15rem; color: var(--muted); }
ul, ol { padding-left: 1.25rem; }
li { margin: .5rem 0; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85em;
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.75rem 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font: 600 .95rem/1 ui-sans-serif, system-ui, sans-serif;
  padding: .95rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
}
.cta:hover { filter: brightness(1.1); }
.step {
  font: 500 .8rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.progress {
  display: flex;
  gap: 4px;
  margin: 0 0 2rem;
  list-style: none;
  padding: 0;
}
.progress li {
  height: 3px;
  flex: 1;
  margin: 0;
  border-radius: 2px;
  background: var(--rule);
}
.progress li.done { background: var(--accent); }
form { margin: 1.5rem 0 0; }
.choices { display: flex; flex-direction: column; gap: .5rem; }
.choices button {
  width: 100%;
  text-align: left;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  font: 400 1rem/1.4 ui-serif, Georgia, serif;
  cursor: pointer;
}
.choices button:hover { border-color: var(--accent); color: var(--accent); }
label {
  display: block;
  font: 500 .85rem/1.4 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
  margin: 1.5rem 0 .4rem;
}
input[type=text], textarea {
  width: 100%;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .7rem .9rem;
  font: 400 1rem/1.5 ui-serif, Georgia, serif;
}
textarea { min-height: 6.5rem; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.row button {
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  padding: .8rem 1.4rem;
  font: 600 .95rem/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.row a { font: 400 .9rem/1 ui-sans-serif, system-ui, sans-serif; color: var(--muted); }
.hint { font-size: .95rem; color: var(--muted); }
.recap { border-collapse: collapse; width: 100%; font-size: .95rem; }
.recap th, .recap td {
  text-align: left;
  vertical-align: top;
  padding: .55rem .75rem .55rem 0;
  border-bottom: 1px solid var(--rule);
}
.recap th {
  font: 500 .8rem/1.5 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
  white-space: nowrap;
  width: 11rem;
}
.tasks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  columns: 15rem auto;
  column-gap: 2rem;
}
.tasks li {
  margin: 0 0 .3rem;
  break-inside: avoid;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
}
h1.taskname { font-size: clamp(1.1rem, 3.5vw, 1.5rem); word-break: break-all; }
.picker {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  columns: 18rem auto;
  column-gap: 2.5rem;
}
.picker li { margin: 0 0 .55rem; break-inside: avoid; }
.picker .hint { font-size: .8rem; }
.field { margin: 2rem 0; }
.field > label {
  font: 600 1rem/1.4 ui-serif, Georgia, serif;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 .2rem;
}
.field .hint { margin: 0 0 .6rem; }
.field.flagged {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-left: -1rem;
}
.field input, .field textarea, .field select { margin-bottom: .5rem; }
.opt {
  font: 400 .75rem/1 ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-left: .4rem;
}
select {
  width: 100%;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .7rem .9rem;
  font: 400 1rem/1.5 ui-serif, Georgia, serif;
}
.alert {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.alert > :first-child { margin-top: 0; }
.alert > :last-child { margin-bottom: 0; }
.contract {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  line-height: 1.7;
}
.marker {
  display: block;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
  word-break: break-all;
  user-select: all;
}
.quote {
  border-left: 2px solid var(--accent);
  padding: .25rem 0 .25rem 1.1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}
/* ---------------------------------------------------------------------------
   The reference. Laid out the way generated API documentation is laid out,
   because that is what a client arriving at a base URL expects to find: an
   operation list, a coloured method, a parameter table, a response table, and
   somewhere to send a live call from.

   All of it is server-rendered. The obvious way to get this look is to ship a
   bundled documentation viewer, but those render client-side, and a client that
   reads with a fetch tool would receive an empty mount point and a script tag.
   Everything here survives being converted to text, which is how most of our
   traffic reads it. <details> is open by default for the same reason.
   --------------------------------------------------------------------------- */
/* The masthead. A reference page that opens on a bare <h1> reads like a
   generated file rather than a product, so the title, the version and the
   spec link sit on one line and the tagline carries the second. */
.api-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem;
  padding-bottom: .55rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule);
}
.api-head h1 {
  margin: 0; font-size: 1.9rem; letter-spacing: -.018em; line-height: 1.1;
}
.lede { font-size: 1.02rem; line-height: 1.62; max-width: 46rem; }
.api-version {
  font: 600 .72rem/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  padding: .3rem .5rem; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--rule);
}
.api-head .spec-link { font-size: .82rem; margin-left: auto; }

.opblock {
  border: 1px solid var(--rule); border-left-width: 4px; border-radius: 4px;
  background: var(--card); margin: 0 0 .8rem;
}
.opblock > summary {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding: .65rem .8rem; cursor: pointer; list-style: none;
}
.opblock > summary::-webkit-details-marker { display: none; }
.opblock-get   { border-left-color: #4b8fd6; }
.opblock-gated { border-left-color: var(--accent); }
.http-method {
  font: 700 .7rem/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  letter-spacing: .06em; color: #fff; background: #4b8fd6;
  padding: .38rem .6rem; border-radius: 3px; min-width: 3.4rem; text-align: center;
}
.opblock-gated .http-method { background: var(--accent); }
.op-path {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 600; font-size: .92rem; word-break: break-all;
}
.op-summary { color: var(--muted); font-size: .86rem; }
.op-auth { margin-left: auto; font-size: .75rem; color: var(--accent); white-space: nowrap; }
.opblock-body { padding: .2rem .9rem 1rem; border-top: 1px solid var(--rule); }
.opblock-body h4 {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin: 1.1rem 0 .45rem;
}
table.params { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.params th, table.params td {
  text-align: left; vertical-align: top; padding: .45rem .5rem;
  border-bottom: 1px solid var(--rule);
}
table.params th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.params td.name {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-weight: 600; white-space: nowrap;
}
table.params td.type { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.req { color: var(--accent); font-weight: 600; font-size: .75rem; display: block; }
.status-code {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-weight: 700; white-space: nowrap;
}
.tryit { border: 1px solid var(--rule); border-radius: 4px; padding: .9rem; margin-top: 1rem; background: var(--bg); }
.tryit > h4 { margin-top: 0; }

/* Stat strip, console, and the benchmark table. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .7rem; margin: 1.4rem 0; }
.stat {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--card); padding: .75rem .85rem;
}
.stat b { display: block; font-size: 1.45rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span {
  display: block; margin-top: .18rem; font-size: .7rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.stat .mono { font-size: 1rem; }

/* The console is the one thing on the page you can operate, so it is built as
   a panel rather than another run of prose: its own surface, its own header
   bar, and enough contrast against the page that it does not read as more
   reference material. */
.console {
  border: 1px solid var(--rule); border-radius: 6px; background: var(--card);
  margin: 0 0 2.2rem; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px -12px rgba(0,0,0,.28);
}
.console > h2 {
  margin: 0; padding: .7rem 1.15rem; font-size: .95rem;
  background: var(--accent-soft); border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: .55rem;
}
.console > h2::after {
  content: "live"; margin-left: auto;
  font: 600 .64rem/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: .26rem .5rem;
}
.console > *:not(h2) { margin-left: 1.15rem; margin-right: 1.15rem; }
.console > p:first-of-type { margin-top: .9rem; }
.console > form { margin-bottom: 1.1rem; }
.console > :last-child { margin-bottom: 1.15rem; }
.console .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .1rem 1.4rem; }
.console .field { margin: 0 0 .85rem; }
.console label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: .15rem; }
.console input { width: 100%; }
.console .hint { margin: .1rem 0 .3rem; font-size: .76rem; }
.console .row { margin-top: .5rem; }

table.benchmarks { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.benchmarks th, table.benchmarks td {
  text-align: left; padding: .42rem .55rem; border-bottom: 1px solid var(--rule);
}
table.benchmarks th { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
table.benchmarks td.n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
table.benchmarks td.fam { color: var(--muted); font-size: .8rem; }
table.benchmarks tr:hover td { background: var(--accent-soft); }

/* Quickstart. Three lines that say what the thing is before anyone reads a
   parameter table: pick a set, name a task, say who is asking. */
ol.steps {
  list-style: none; counter-reset: step; margin: 1.4rem 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .7rem;
}
ol.steps li {
  counter-increment: step; position: relative;
  border: 1px solid var(--rule); border-radius: 5px; background: var(--card);
  padding: .7rem .8rem .75rem 2.6rem; font-size: .86rem;
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: .8rem; top: .68rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--accent); color: var(--card);
  font: 700 .78rem/1.35rem var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  text-align: center;
}

/* Depth. The page was a stack of same-weight rectangles; these give it a
   foreground (the console), a midground (cards) and a background (the page). */
h2 {
  font-size: 1.02rem; letter-spacing: .01em; margin: 2.1rem 0 .7rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--rule);
}
.stat { transition: none; }
.stat b { letter-spacing: -.02em; }
a { text-underline-offset: .18em; text-decoration-thickness: .06em; }
table.benchmarks tr:first-child th { position: sticky; top: 0; background: var(--bg); }
table.benchmarks td a { text-decoration: none; }
table.benchmarks td a:hover { text-decoration: underline; }
.opblock > summary:hover { background: var(--accent-soft); }
input, button { font-size: .9rem; }
input {
  padding: .45rem .55rem; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--bg); color: var(--fg);
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button {
  padding: .5rem 1.05rem; border-radius: 4px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--card); font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
pre.contract { overflow-x: auto; }
@media (max-width: 40rem) {
  .api-head h1 { font-size: 1.5rem; }
  table.benchmarks { display: block; overflow-x: auto; }
}

.canary {
  margin-top: 1.6rem; padding: .7rem .8rem; font-size: .74rem; line-height: 1.5;
  color: var(--muted); border: 1px dashed var(--rule); border-radius: 4px;
}

h1.alarm { margin-top: 2.4rem; }
.marker {
  display: block; margin: 1rem 0 1.3rem; padding: .8rem .9rem;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 1rem; word-break: break-all;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 5px;
}

footer {
  max-width: var(--measure); margin: 3.5rem auto 2rem; padding: 1rem 1.15rem 0;
  border-top: 1px solid var(--rule);
}
main.wide ~ footer { max-width: 64rem; }
footer p { margin: 0; font-size: .76rem; color: var(--muted); }

