/* /api/ and its cookbook. Tokens match the launch site (public/site/launch/launch.css). */
:root {
  /* The launch palette (public/site/launch/launch.css); dark follows the OS. */
  --paper: #f6f6f4; --paper-deep: #ededea; --card: #ffffff; --ink: #121518; --ink-soft: #5d6670; --line: #dcdfe3;
  --petrol: #121518; --teal: #1d7f81; --aqua: #77c0b7; --mustard: #e7ab27; --orange: #f25c2d; --orange-text: #b93d12;
  --code-bg: #121518; --code-ink: #e9edf0; --code-soft: #8b96a1; --code-key: #f3c25b;
  --btn-bg: #121518; --btn-ink: #ffffff;
  --serif: 'Saira', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 6vw, 96px);
  --wide: 1120px;
  color-scheme: light;
}
.on-dark { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--orange-text); }
a:focus-visible { outline: 2px solid var(--orange-text); outline-offset: 4px; border-radius: 4px; }

/* Header and footer follow the launch pages (/site). */
.top { max-width: 1240px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 36px; }
.top a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; width: auto; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: 15px; font-weight: 500; color: var(--ink-soft); flex: 1 1 auto; }
.top nav > a[aria-current], .top nav > a:hover { color: var(--ink); }
/* The site's Products menu (as in /site/launch/launch.css). */
.pmenu { position: relative; }
.pmenu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pmenu summary::-webkit-details-marker { display: none; }
.pmenu summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.pmenu[open] summary, .pmenu summary:hover { color: var(--ink); }
.pmenu__list { position: absolute; z-index: 30; top: calc(100% + 12px); left: -14px; width: min(360px, calc(100vw - 32px)); padding: 8px; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .14); }
.pmenu__list a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.pmenu__list a:hover { background: var(--paper-deep); color: var(--ink); }
.pmenu__list b { font: 600 15px/1.3 var(--serif); }
.pmenu__list span { font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
/* Under the site header: this section's own pages, sticky while you read. */
.subbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-block: 1px solid var(--line); }
.subbar > div { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 4px 24px; overflow-x: auto; scrollbar-width: none; font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.subbar b { font: 600 15px/1 var(--serif); color: var(--ink); padding-right: 16px; border-right: 1px solid var(--line); }
.subbar a { padding: 13px 0; text-decoration: none; border-bottom: 2px solid transparent; }
.subbar a[aria-current] { color: var(--ink); border-bottom-color: var(--orange); }
:target, h2[id] { scroll-margin-top: 64px; }
.top .acts { display: flex; gap: 12px; align-items: center; }
.top .signin { font-size: 15px; font-weight: 500; padding: 10px 14px; }
.top .go { font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-ink); }
.top .go:hover { color: var(--btn-ink); opacity: .9; }
.bottom { border-top: 1px solid var(--line); }
.bottom > div { max-width: 1240px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.bottom p { margin: 0; } .bottom p + p { margin-top: 6px; }
.bottom b { color: var(--ink); }
.bottom a { text-decoration: none; }
.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

main { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 24px var(--gutter) 80px; }
.eyebrow { margin: 0 0 20px; font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-text); }
h1 { margin: 0; font: 600 clamp(40px, 6vw, 72px)/1.02 var(--serif); letter-spacing: -.03em; text-wrap: balance; }
.lede { margin: 18px 0 0; max-width: 58ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); }
h2 { margin: 72px 0 6px; font: 600 clamp(28px, 3vw, 38px)/1.15 var(--serif); letter-spacing: -.015em; }
h2 + .lede { margin-top: 4px; font-size: 17px; }
h3 { margin: 0; font: 600 19px/1.3 var(--sans); }
code { font: 14.5px/1.5 var(--mono); background: var(--paper-deep); padding: 1px 5px; border-radius: 4px; }
pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }

/* The three transports: two across, and the odd one out (MCP) takes the full row so its tool names fit. */
.transports { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--band); }
.card.mcp { --band: var(--orange); } .card.graphql { --band: var(--mustard); } .card.rest { --band: var(--petrol); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card h3 { font: 600 26px/1.1 var(--serif); letter-spacing: -.01em; }
.card .use { margin: 0; color: var(--ink-soft); }
.card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14.5px; }
.card dt { color: var(--ink-soft); }
.card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.card dd code { font-size: 13.5px; }
.card pre { margin: auto 0 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: #17716f; background: #dff1ee; }
.pill.partial { color: #8a5a00; background: #fbecc4; }
.pill.planned { color: var(--ink-soft); background: var(--paper-deep); }

pre { margin: 0; padding: 16px 18px; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; font: 13.5px/1.6 var(--mono); overflow-x: auto; tab-size: 2; }
pre .c { color: var(--code-soft); }
pre .k { color: var(--code-key); }

/* Auth strip. */
.auth { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.auth > div { padding: 20px 22px; border: 1px dashed var(--line); border-radius: 14px; }
.auth h3 { font-size: 16px; margin-bottom: 6px; }
.auth p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* Cookbook grid. */
.recipes { margin: 32px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recipes a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; transition: border-color .15s, transform .15s; }
.recipes a:hover { color: inherit; border-color: var(--ink); transform: translateY(-2px); }
.recipes .num { font: 600 13px/1 var(--mono); color: var(--teal); }
.recipes h3 { font: 600 22px/1.2 var(--serif); }
.recipes p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.recipes .via { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 600 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 6px; background: var(--paper-deep); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .recipes a { transition: none; } .recipes a:hover { transform: none; } }

/* Product coverage matrix. */
.matrix-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.matrix { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.matrix th, .matrix td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix thead th { font: 600 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); background: var(--paper-deep); }
.matrix td:first-child { font-weight: 600; }
.matrix td:not(:first-child) { width: 20%; }
.matrix small { display: block; color: var(--ink-soft); font-size: 13.5px; font-weight: 400; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.live { background: var(--teal); } .dot.partial { background: var(--mustard); } .dot.planned { background: transparent; border: 1.5px solid var(--ink-soft); }
.legend { margin: 12px 0 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.fine { margin-top: 14px; font-size: 14.5px; color: var(--ink-soft); max-width: 75ch; }

/* Recipe pages. */
.crumbs { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-soft); }
.crumbs a { text-decoration: none; }
.recipe { max-width: 920px; }
.recipe .meta { margin: 18px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.recipe h2 { font-size: clamp(24px, 2.4vw, 30px); margin-top: 52px; }
.recipe p, .recipe li { max-width: 68ch; }
.recipe ol.steps { padding-left: 0; list-style: none; counter-reset: step; }
.recipe ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-top: 26px; }
.recipe ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 14px/28px var(--mono); text-align: center; }
.recipe ol.steps pre { margin-top: 12px; }
.recipe .note { border-left: 3px solid var(--mustard); background: #fdf6dc; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 24px 0; font-size: 15.5px; }
.next { margin-top: 64px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; font-size: 15px; }
.next a { text-decoration: none; }
.next a span { display: block; color: var(--ink-soft); font-size: 13px; }

/* Sequence diagrams (drawn by seq.js; pre.seq is the no-JS fallback). */
figure.diagram { margin: 28px 0 0; padding: 18px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
figure.diagram figcaption { padding: 0 20px 6px; font-size: 14px; color: var(--ink-soft); }
.seq-svg { overflow-x: auto; padding: 0 8px; }
.seq-svg svg { display: block; width: 100%; height: auto; margin: 0 auto; font: 13px var(--sans); }
pre.seq { margin: 0 16px; background: var(--paper-deep); color: var(--ink); }
.seq-svg .life { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 5; }
.seq-svg .actor { stroke: none; }
.seq-svg .actor.a0 { fill: var(--petrol); } .seq-svg .actor.a1 { fill: #1d7f81; } .seq-svg .actor.a2 { fill: #8a5a00; } .seq-svg .actor.a3 { fill: var(--orange-text); } .seq-svg .actor.a4 { fill: #4d6670; }
.seq-svg .actor-text { fill: #fff; font-weight: 600; }
.seq-svg .msg { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.seq-svg .msg.reply { stroke: var(--ink-soft); stroke-dasharray: 6 4; }
.seq-svg .head { fill: var(--ink); } .seq-svg .head.soft { fill: var(--ink-soft); }
.seq-svg .label { fill: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.seq-svg .label.soft { fill: var(--ink-soft); }
.seq-svg .note { fill: #fdf0c8; stroke: #e9cf86; }
.seq-svg .note-text { fill: var(--ink); font-size: 12.5px; }
.seq-svg .frame { fill: none; stroke: var(--aqua); stroke-width: 1.5; }
.seq-svg .frame-tag { fill: #e2f2ef; stroke: var(--aqua); stroke-width: 1.5; }
.seq-svg .frame-text { fill: #17716f; font: 600 12px var(--mono); }

@media (max-width: 900px) {
  .recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .top nav { gap: 4px 16px; }
  .wide-only { display: none; }
  .transports, .auth, .recipes { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px 18px 18px; }
  .bottom { flex-direction: column; align-items: flex-start; }
  h2 { margin-top: 56px; }
}

/* Events: the envelope next to the ways in. */
h2 .pill { vertical-align: 6px; margin-left: 8px; }
.events { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: stretch; }
.events pre.event { font-size: 12.5px; }
.events .c { color: var(--code-soft); }
.events .ways { margin-top: 0; }
.ways .matrix { min-width: 0; }
.ways td:first-child { width: 32%; }
.ways td:not(:first-child) { width: auto; }
.ways code { background: none; padding: 0; font-size: 12.5px; }
.events + .rules { margin-top: 16px; }

/* Overview: URL anatomy. */
.anatomy { margin: 40px 0 0; padding: 26px 24px 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 44px rgba(0,0,0,.08); border-radius: 16px; color: var(--ink); overflow-x: auto; }
.anatomy .url { font: 500 clamp(15px, 2.1vw, 24px)/1.3 var(--mono); white-space: nowrap; }
/* Each part gets its own underline, inset so neighbours read as separate pieces. */
.anatomy .seg { color: var(--c); padding-bottom: 12px; background: linear-gradient(var(--c), var(--c)) 3px 100% / calc(100% - 6px) 3px no-repeat; }
.anatomy .keys { margin-top: 40px; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 14px 20px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.anatomy .k b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--c); font-weight: 600; }
.anatomy .k b::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
/* Code and terminals are the one black thing on the site (Doug 2026-10-14); this panel is light, so its colours are the deep variants. */
.anatomy .host { --c: #4d7f81; } .anatomy .prod { --c: #c2410c; } .anatomy .ver { --c: #a86f00; } .anatomy .res, .anatomy .sub { --c: #1d7f81; } .anatomy .id { --c: #b4407e; }
pre.hello { margin-top: 16px; }
.preview-note { margin: 18px 0 0; font-size: 15px; color: var(--ink-soft); }
.preview-note .pill { margin-right: 8px; vertical-align: 1px; }

.transports.compact .card { gap: 10px; }
.transports > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.spell { margin-top: 20px; }
.spell .matrix { min-width: 600px; }
.spell { overflow: hidden; }
.spell-scroll { overflow-x: auto; }
.spell-head { margin: 0; padding: 16px 16px 14px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.spell-head b { color: var(--ink); font-weight: 600; }
.spell thead th small { display: block; margin-top: 4px; font: 400 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.spell td { width: 25%; }
.spell td:first-child { font-weight: 400; }
.spell code { background: none; padding: 0; font-size: 13.5px; }

/* Product explorer. */
.legend-inline { display: inline-flex; gap: 14px; flex-wrap: wrap; margin-left: 6px; font-size: 14px; }
.explorer { margin-top: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 10px; background: var(--paper-deep); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs button { flex: none; font: 600 14px/1 var(--sans); color: var(--ink-soft); background: none; border: 0; border-radius: 9px; padding: 10px 14px; cursor: pointer; }
.tabs button:hover { color: var(--ink); background: var(--card); }
.tabs button[aria-selected="true"] { color: var(--paper); background: var(--ink); }
.tabs button:focus-visible { outline: 2px solid var(--orange-text); outline-offset: 2px; }
.product { padding: 24px 24px 18px; }
.product + .product { border-top: 1px solid var(--line); }
.explorer.js .product + .product { border-top: 0; }
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.product-head h3 { font: 600 28px/1.15 var(--serif); }
.product-head h3 span { display: block; margin-top: 2px; font: 500 15px/1.4 var(--sans); color: var(--teal); }
.product-head p { margin: 8px 0 0; max-width: 60ch; color: var(--ink-soft); font-size: 15.5px; }
.product-head .base { font-size: 14px; padding: 6px 10px; }
.product-head .base b { color: var(--orange-text); }
.eps { margin: 18px 0 0; padding: 0; list-style: none; }
.eps li { display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 14px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.eps code { background: none; padding: 0; font-size: 14px; overflow-wrap: anywhere; }
.eps code i { font-style: normal; color: var(--ink-soft); }
.eps .what { color: var(--ink-soft); }
.eps .st { width: 10px; height: 10px; border-radius: 50%; }
.eps .live .st { background: var(--teal); } .eps .built .st { background: var(--mustard); } .eps .planned .st { border: 1.5px solid var(--ink-soft); }
.m { font: 700 11.5px/1 var(--mono); letter-spacing: .03em; padding: 5px 0; border-radius: 6px; text-align: center; }
.m-get { color: #17716f; background: #dff1ee; } .m-post { color: #8a5a00; background: #fbecc4; } .m-patch { color: #4d6670; background: var(--paper-deep); } .m-delete { color: var(--orange-text); background: #fde3d9; }

/* Conventions. */
.rules { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rules article { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.rules h3 { font: 600 22px/1.2 var(--serif); margin-bottom: 8px; }
.rules p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.rules p + p, .rules pre + p, .rules p + pre { margin-top: 10px; }
.rules pre { font-size: 12.5px; }
.rules .ids code { margin-right: 2px; }

.promise { margin-top: 24px; padding: 28px 28px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 44px rgba(0,0,0,.08); color: var(--ink); }
.promise .big { margin: 0; font: 600 clamp(26px, 3vw, 36px)/1.15 var(--serif); }
.promise ul { margin: 18px 0 0; padding-left: 1.1em; color: var(--ink-soft); }
.promise li + li { margin-top: 8px; }
.promise b { color: var(--ink); }
.promise code { background: var(--paper-deep); color: var(--ink); }

@media (max-width: 900px) {
  .events { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .anatomy { padding: 20px 16px; }
  .anatomy .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anatomy .url { white-space: normal; line-height: 2.1; }
  .anatomy .seg { display: inline-block; line-height: 1.3; padding-bottom: 8px; }
  .anatomy .keys { margin-top: 28px; }
  .ways thead { display: none; }
  .ways tr, .ways td { display: block; width: auto !important; }
  .ways td:first-child { padding-bottom: 4px; border-bottom: 0; }
  .ways td + td { padding-top: 0; }
  .ways code { overflow-wrap: anywhere; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .product { padding: 20px 16px 14px; }
  .eps li { grid-template-columns: 56px minmax(0, 1fr) 12px; gap: 6px 10px; }
  .eps .what { grid-column: 2; grid-row: 2; font-size: 14px; }
  .eps .st { grid-column: 3; grid-row: 1; }
  .promise { padding: 22px 18px 18px; }
}
.fine code, .preview-note code, .auth code { overflow-wrap: anywhere; }
/* Phones: logo and buttons on one row, the main menu under them. */
@media (max-width: 720px) { .top { gap: 10px 16px; padding: 16px; } .top nav { order: 3; flex-basis: 100%; } .top .acts { margin-left: auto; gap: 4px; } .top .signin { font-size: 14px; padding: 9px 10px; } .top .go { font-size: 14px; padding: 9px 14px; } .subbar > div { padding: 0 16px; } }
