.mp-section { margin-block: clamp(2.5rem, 7vw, 5rem); scroll-margin-top: 6rem; }
.mp-section > p { max-width: 72ch; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin-block: 1.25rem; }
.mp-grid > * { min-width: 0; }
.mp-lab { align-items: start; }
.mp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.mp-form, .mp-form fieldset { display: grid; gap: .65rem; }
.mp-form fieldset { min-width: 0; padding: 1rem; border: 1px solid var(--line, currentColor); }
.mp-section [hidden] { display: none; }
.mp-form input, .mp-form textarea, .mp-section select { width: 100%; font: inherit; padding: .55rem .65rem; color: inherit; background: transparent; border: 1px solid var(--line, currentColor); border-radius: .25rem; }
.mp-section option { color: #14181d; background: #fff; }
.mp-form button { justify-self: start; }
.mp-section pre { overflow: auto; max-height: 24rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.mp-price { font-size: 2rem; line-height: 1.2; }
.mp-price small { font-size: 1rem; }

.mp-shelf-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mp-shelf-controls { display: flex; gap: .5rem; }
.mp-shelf-controls[hidden], .mp-fields[hidden] { display: none; }
.mp-shelf-controls button:disabled { opacity: .48; cursor: default; }
.mp-shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(16.5rem, 32%, 25rem);
  gap: .9rem;
  overflow-x: auto;
  scroll-snap-type: inline proximity;
  scroll-behavior: smooth;
  scrollbar-color: var(--muted) var(--surface);
  padding: .25rem .1rem 1rem;
}
.mp-api-card {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto 1fr auto auto;
  gap: .8rem;
  padding: clamp(1.15rem, 2.4vw, 1.7rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent, var(--ink));
  border-radius: var(--r, 3px);
  scroll-snap-align: start;
}
.mp-api-card h3, .mp-api-card p { margin: 0; }
.mp-api-card h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.mp-api-card .btn { justify-self: start; align-self: end; }
.mp-api-group, .mp-api-card code { font: .82rem/1.5 "IBM Plex Mono", monospace; color: var(--muted); }
.mp-api-card code { padding: .6rem 0; border-block: 1px solid var(--rule); overflow-wrap: anywhere; }
.mp-fields { display: grid; gap: .65rem; }
@media (max-width: 40rem) {
  .mp-shelf { grid-auto-columns: min(87%, 23rem); }
}
@media (prefers-reduced-motion: reduce) {
  .mp-shelf { scroll-behavior: auto; }
}

.mp-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: .6rem 0; }
.mp-filter select { width: auto; }

.pilot-desk { max-width: 52rem; margin-inline: auto; }
.pilot-desk .mp-section { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.pilot-desk fieldset { display: grid; gap: 1rem; }
.pilot-desk fieldset label { display: grid; gap: .4rem; }
.pilot-desk fieldset label:has([type=checkbox]) { display: block; }
.pilot-paper { background: #f4f0e6; color: #262925; padding: clamp(1rem,4vw,2.75rem); border: 1px solid #a6a396; margin-block: 2rem; }
.pilot-paper header { border-bottom: 2px solid #414740; }
.pilot-paper :is(h2,h3,p,pre,dd,dt) { color: inherit; }
.pilot-paper dl { display: grid; grid-template-columns: minmax(7rem, 1fr) 2fr; }
.pilot-paper :is(dt,dd) { padding: .6rem 0; margin: 0; border-bottom: 1px solid #bbb8ab; overflow-wrap: anywhere; }
.pilot-paper dt { font: .8rem/1.5 "IBM Plex Mono", monospace; }
.pilot-paper pre { background: transparent; white-space: pre-wrap; font: inherit; border: 0; padding: 0; }
.pilot-paper .btn { background: #323832; color: #fff; margin: .25rem; }
@media print {
  body:has(#pilot-result) * { visibility: hidden; }
  #pilot-result, #pilot-result * { visibility: visible; }
  #pilot-result { position: absolute; inset: 0; padding: 1cm; color: black; background: white; }
  #pilot-result pre { max-height: none; overflow: visible; white-space: pre-wrap; }
  #pilot-result button, #pilot-result a { display: none; }
}

/* ── Six API products ────────────────────────────────────────────────
   One section per product: name and job, a status mark, four terms
   (who, auth, limits, price), the endpoints with a Try action, and a
   recorded response. Hairline rules and mono labels; no shadows, no
   gradients, square corners. Status uses the desk's go/hold colours. */
.mp-index { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.mp-index li { border-bottom: 1px solid var(--rule); }
.mp-index li:nth-child(3n+2), .mp-index li:nth-child(3n+3) { border-left: 1px solid var(--rule); }
.mp-index a { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .85rem 1rem .85rem 0; color: var(--ink); text-decoration: none; min-height: 44px; }
.mp-index li:nth-child(3n+2) a, .mp-index li:nth-child(3n+3) a { padding-left: 1rem; }
.mp-index a:hover span, .mp-index a:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.mp-status { flex: none; font: 500 .7rem/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; padding: .32rem .45rem; border: 1px solid currentColor; border-radius: 2px; }
.mp-status[data-status="live"] { color: var(--go, #85C6AD); }
.mp-status[data-status="planned"] { color: var(--hold, #D8B474); }
.mp-family { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); scroll-margin-top: 84px; }
.mp-family-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.mp-family-head h3 { margin: 0; font: 400 clamp(1.6rem, 2.6vw, 2.15rem)/1.1 "Instrument Serif", Georgia, serif; letter-spacing: -.005em; }
.mp-family-job { margin: .5rem 0 0; max-width: 68ch; color: var(--muted); line-height: 1.6; }
.mp-terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.25rem 0 0; border-top: 1px solid var(--rule); }
.mp-terms div { padding: .8rem 1rem .8rem 0; min-width: 0; }
.mp-terms div + div { padding-left: 1rem; border-left: 1px solid var(--rule); }
.mp-terms dt { font: .7rem/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--faint, var(--muted)); }
.mp-terms dd { margin: .4rem 0 0; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.mp-terms code, .mp-endpoints code { font: .8rem/1.45 "IBM Plex Mono", ui-monospace, monospace; }
.mp-today { margin: 1rem 0 0; padding: .9rem 1rem; border-left: 2px solid var(--hold, #D8B474); color: var(--muted); line-height: 1.6; max-width: 80ch; }
.mp-today b { color: var(--ink); font-weight: 500; }
.mp-endpoints { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.mp-endpoints th { text-align: left; font: .7rem/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--faint, var(--muted)); padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule); }
.mp-endpoints td { padding: .7rem .75rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.5; }
.mp-endpoints td:first-child { white-space: nowrap; }
.mp-endpoints td:last-child { text-align: right; padding-right: 0; }
.mp-access { color: var(--muted); white-space: nowrap; }
.mp-try { display: inline-block; font: .8rem/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--ink); border: 1px solid var(--rule); padding: .55rem .7rem; border-radius: 2px; text-decoration: none; min-height: 32px; }
.mp-try:hover, .mp-try:focus-visible { border-color: var(--ink); }
.mp-family-links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1rem 0 0; font-size: .9rem; }
.mp-family-links a { color: var(--ink); text-underline-offset: 3px; }
.mp-example { margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: .75rem; }
.mp-example summary { cursor: pointer; font-size: .9rem; color: var(--ink); min-height: 32px; }
.mp-recorded { margin: .6rem 0; color: var(--faint, var(--muted)); font: .78rem/1.6 "IBM Plex Mono", ui-monospace, monospace; }
.mp-code { margin: .5rem 0; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 2px; overflow: auto; font: .78rem/1.55 "IBM Plex Mono", ui-monospace, monospace; }
.mp-json { max-height: 340px; }
@media (max-width: 960px) {
  .mp-index { grid-template-columns: 1fr 1fr; }
  .mp-index li:nth-child(n) { border-left: 0; }
  .mp-index li:nth-child(2n) { border-left: 1px solid var(--rule); }
  .mp-index li:nth-child(n) a { padding-left: 0; }
  .mp-index li:nth-child(2n) a { padding-left: 1rem; }
  .mp-terms { grid-template-columns: 1fr 1fr; }
  .mp-terms div:nth-child(3) { padding-left: 0; border-left: 0; }
  .mp-terms div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .mp-index, .mp-terms { grid-template-columns: 1fr; }
  .mp-index li:nth-child(n), .mp-terms div:nth-child(n) { border-left: 0; }
  .mp-index li:nth-child(n) a, .mp-terms div:nth-child(n) { padding-left: 0; }
  .mp-terms div + div { border-top: 1px solid var(--rule); }
  .mp-family-head { flex-direction: column; }
  .mp-endpoints thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mp-endpoints, .mp-endpoints tbody, .mp-endpoints tr, .mp-endpoints td { display: block; width: 100%; }
  .mp-endpoints tr { border-bottom: 1px solid var(--rule); padding: .7rem 0; }
  .mp-endpoints td { border: 0; padding: .15rem 0; text-align: left !important; white-space: normal !important; }
  .mp-endpoints td:first-child code { overflow-wrap: anywhere; }
}
