/*
 * events.jetskibay.com — the developer platform.
 *
 * The consumer site (workhardplayhard.club) is a single-file worker whose CSS
 * lives inline in explorer/index.ts. This file borrows its language rather than
 * its layout: the same oklch ground, the same vermillion accent used sparingly
 * and always to mean "the thing to press or the thing to read", the same heavy
 * tightly-tracked display type, the same 999px controls on a 44px tap floor,
 * and the same night/day pair. A developer arriving from the consumer site
 * should recognise the product before they read a word.
 *
 * Night is the default because the consumer site's night is. Day is a token
 * swap and nothing else, so every colour below is a token — no literal colour
 * is written outside the two blocks at the top.
 */

:root {
  color-scheme: dark;

  --bg: oklch(0.145 0.014 270);
  --nav: oklch(0.17 0.014 270);
  --surface: oklch(0.205 0.016 270);
  --surface-hi: oklch(0.245 0.018 270);
  /* Code sits *below* the page rather than above it: a well, not a card. */
  --well: oklch(0.115 0.012 270);
  --line: oklch(0.31 0.018 270);
  --line-strong: oklch(0.42 0.02 270);
  /* The edge of a control, as opposed to a divider between two pieces of
     content — WCAG 2.2 SC 1.4.11 wants 3:1 for the first and exempts the
     second. Kept as its own token for the same reason the consumer site does. */
  --control: oklch(0.53 0.02 270);

  --ink: oklch(0.96 0.008 65);
  --muted: oklch(0.72 0.014 270);
  --quiet: oklch(0.64 0.014 270);

  --accent: oklch(0.69 0.19 29);
  --accent-hi: oklch(0.75 0.17 29);
  --accent-ink: oklch(0.16 0.03 29);
  --accent-wash: oklch(0.69 0.19 29 / 0.13);
  --accent-edge: oklch(0.69 0.19 29 / 0.34);

  --cool: oklch(0.79 0.09 197);
  --cool-wash: oklch(0.79 0.09 197 / 0.12);
  --cool-edge: oklch(0.79 0.09 197 / 0.3);
  --danger: oklch(0.74 0.14 15);

  /* Three syntax roles, not thirty. Key/keyword cool, string/number warm,
     comment quiet. Anything a highlighter would paint a fourth colour is
     something the reader can work out from the shape of the line. */
  --tok-k: oklch(0.80 0.09 197);
  --tok-s: oklch(0.83 0.11 68);
  --tok-c: oklch(0.56 0.015 270);

  --tap: 44px;
  --shadow: 0 28px 90px oklch(0.08 0.02 270 / 0.44);
  --shadow-sm: 0 10px 34px oklch(0.08 0.02 270 / 0.3);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, monospace;
  --page: 1200px;
  --rule: 1px solid var(--line);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: oklch(0.965 0.008 255);
    --nav: oklch(0.985 0.006 255);
    --surface: oklch(0.995 0.004 255);
    --surface-hi: oklch(0.94 0.011 255);
    /* A hair darker than --bg, so a code block still reads as a well in day
       mode rather than as a raised card. */
    --well: oklch(0.945 0.011 255);
    --line: oklch(0.86 0.014 255);
    --line-strong: oklch(0.69 0.02 255);
    --control: oklch(0.62 0.02 255);

    /* Day lightness is set by contrast, not by taste — the same two values the
       consumer site had to move to clear AA on its own background. */
    --ink: oklch(0.22 0.02 265);
    --muted: oklch(0.43 0.018 265);
    --quiet: oklch(0.54 0.016 265);

    --accent: oklch(0.56 0.2 29);
    --accent-hi: oklch(0.52 0.2 29);
    --accent-ink: oklch(0.98 0.008 29);
    --accent-wash: oklch(0.56 0.2 29 / 0.09);
    --accent-edge: oklch(0.56 0.2 29 / 0.28);

    --cool: oklch(0.48 0.1 197);
    --cool-wash: oklch(0.48 0.1 197 / 0.09);
    --cool-edge: oklch(0.48 0.1 197 / 0.26);
    --danger: oklch(0.51 0.17 15);

    --tok-k: oklch(0.47 0.1 197);
    --tok-s: oklch(0.45 0.12 60);
    --tok-c: oklch(0.6 0.016 265);

    --shadow: 0 26px 80px oklch(0.34 0.03 260 / 0.14);
    --shadow-sm: 0 10px 30px oklch(0.34 0.03 260 / 0.1);
  }
}

/* ── base ───────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hi);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

code,
pre,
kbd,
samp {
  font-family: var(--mono);
  font-feature-settings: "liga" 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-wash);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 40px, var(--page));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
  font-weight: 700;
}

.skip:focus {
  left: 0;
  color: var(--accent-ink);
}

/* ── nav ────────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklch, var(--nav) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.25s ease;
}

.site-nav[data-scrolled="true"] {
  box-shadow: var(--shadow-sm);
}

.nav-in {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: var(--ink);
}

.wordmark:hover {
  color: var(--ink);
}

/* The consumer wordmark's slash, leaned the same 24 degrees. It is the one
   piece of the mark that carries across both products. */
.wm-slash {
  color: var(--accent);
  font-weight: 800;
  margin-inline: 8px;
  display: inline-block;
  transform: skewX(-24deg) scaleY(1.15);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--muted);
}

.nav-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
}

/* ── controls ───────────────────────────────────────────────────────────── */

.btn {
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  color: var(--accent-ink);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--control);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-sm {
  min-height: var(--tap);
  padding: 0 16px;
  font-size: 13px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--tap);
  background: var(--bg);
  border: 1px solid var(--control);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
}

/* The native select keeps its own disclosure arrow, which follows
   `color-scheme` in both themes for free — a hand-drawn one would need a
   hard-coded colour, and this file has none outside the two token blocks. */
select {
  cursor: pointer;
  padding-right: 10px;
}

input::placeholder,
textarea::placeholder {
  color: var(--quiet);
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > label,
.field-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.field .hint {
  font-size: 12.5px;
  color: var(--quiet);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.checkline input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.status {
  min-height: 20px;
  font-size: 13.5px;
  color: var(--quiet);
}

.status[data-tone="ok"] {
  color: var(--cool);
}

.status[data-tone="error"] {
  color: var(--danger);
}

.status[data-tone="busy"] {
  color: var(--quiet);
}

/* ── shared type ────────────────────────────────────────────────────────── */

.eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}

.note {
  font-size: 13px;
  color: var(--quiet);
}

/* A caption belonging to the code block above it. Inside .code rather than
   after it, so the border keeps the sample and the sentence that qualifies it
   as one object — a reader skimming for the shape should not be able to take
   the JSON without the caveat. */
.code-note {
  margin: 0;
  padding: 12px 16px 14px;
  border-top: var(--rule);
  font-size: 13px;
  line-height: 1.55;
  color: var(--quiet);
}

.code-note code {
  color: var(--ink);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: var(--rule);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1;
  text-wrap: balance;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head p {
  margin-top: 18px;
  color: var(--muted);
  max-width: 60ch;
}

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(38px, 6vw, 76px) 0 clamp(40px, 5vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 0.96;
  max-width: 12ch;
  text-wrap: balance;
  margin-top: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lede {
  margin-top: 22px;
  max-width: 44ch;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--quiet);
}

/* ── stat strip ─────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: var(--rule);
}

.stat {
  background: var(--bg);
  padding: 26px 22px;
}

.stat b {
  display: block;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1;
  color: var(--ink);
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--quiet);
  max-width: 22ch;
}

/* ── cards ──────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 24px;
  min-width: 0;
}

.card .kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card h3 {
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
}

.card p + p {
  margin-top: 10px;
}

.card code {
  font-size: 12.5px;
  color: var(--ink);
}

/* ── callouts ───────────────────────────────────────────────────────────── */

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px 16px 16px 4px;
  background: var(--surface);
  padding: 20px 24px;
  font-size: 14.5px;
  color: var(--muted);
}

.callout strong,
.callout b {
  color: var(--ink);
  font-weight: 720;
}

.callout p + p {
  margin-top: 12px;
}

.callout.cool {
  border-left-color: var(--cool);
}

/* ── chips (categories, sources) ────────────────────────────────────────── */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 15px;
  border: 1px solid var(--control);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.chip.on {
  border-color: var(--accent-edge);
  background: var(--accent-wash);
  color: var(--ink);
}

/* ── source list ────────────────────────────────────────────────────────── */

.sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1px;
  background: var(--line);
  border: var(--rule);
  border-radius: 16px;
  overflow: hidden;
}

.src {
  background: var(--surface);
  padding: 16px 18px;
  min-width: 0;
}

.src b {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--cool);
  word-break: break-word;
}

.src span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ── code ───────────────────────────────────────────────────────────────── */

.code {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--well);
  overflow: hidden;
  min-width: 0;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-height: 46px;
}

.code-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: var(--accent-wash);
  color: var(--accent);
}

.copy-btn {
  border: 1px solid var(--control);
  background: transparent;
  color: var(--quiet);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 7px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

/* A long line scrolls this box, never the page. */
.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  tab-size: 2;
}

.code pre .k {
  color: var(--tok-k);
}

.code pre .s {
  color: var(--tok-s);
}

.code pre .c {
  color: var(--tok-c);
}

.code pre .p {
  color: var(--accent);
}

/* Inline code inside prose. */
.prose code,
.card code,
td code,
li code,
p code {
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-hi);
  color: var(--ink);
  word-break: break-word;
}

/* ── CTA ────────────────────────────────────────────────────────────────── */

.cta {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: clamp(26px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.cta h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 760;
  letter-spacing: -0.05em;
  line-height: 1.02;
  text-wrap: balance;
}

.cta p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
}

.cta .hero-btns {
  margin-top: 26px;
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: var(--rule);
}

.foot-in {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-block: 22px;
}

.foot-tag {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 13px;
}

.foot-links a {
  color: var(--muted);
}

.foot-links a:hover {
  color: var(--ink);
}

/* ── docs ───────────────────────────────────────────────────────────────── */

.docs {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
  padding: clamp(32px, 4vw, 56px) 0 clamp(60px, 8vw, 100px);
}

.docnav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 1px;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding-left: 14px;
  border-left: var(--rule);
  font-size: 13.5px;
}

.docnav a {
  color: var(--quiet);
  padding: 5px 0;
  line-height: 1.35;
}

.docnav a:hover,
.docnav a.active {
  color: var(--ink);
}

.docnav a.active {
  font-weight: 700;
}

.docnav .group {
  margin-top: 18px;
  padding-bottom: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.docnav .group:first-child {
  margin-top: 0;
}

.prose {
  min-width: 0;
  max-width: 76ch;
}

.prose > h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 760;
  letter-spacing: -0.05em;
  margin: 62px 0 16px;
  scroll-margin-top: 92px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.03em;
  margin: 34px 0 12px;
  scroll-margin-top: 92px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.prose h4 {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.02em;
  margin: 26px 0 10px;
}

.prose p {
  margin: 0 0 15px;
  color: var(--muted);
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--muted);
}

.prose li {
  margin-bottom: 8px;
}

.prose li strong {
  color: var(--ink);
  font-weight: 700;
}

.prose .code {
  margin: 16px 0 22px;
}

.prose .callout {
  margin: 20px 0 24px;
}

.prose hr {
  border: 0;
  border-top: var(--rule);
  margin: 40px 0;
}

.prose .lede {
  margin-bottom: 20px;
}

/* Tables scroll in their own box; the page never moves sideways. */
.table-scroll {
  overflow-x: auto;
  border: var(--rule);
  border-radius: 14px;
  margin: 8px 0 26px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 480px;
}

th,
td {
  text-align: left;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-hi);
}

td {
  color: var(--muted);
}

td:first-child code {
  white-space: nowrap;
}

.method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.method.get {
  color: var(--cool);
}

.method.post {
  color: var(--accent);
}

.method.delete {
  color: var(--danger);
}

.endpoint {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  word-break: break-word;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--cool-edge);
  background: var(--cool-wash);
  color: var(--cool);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill.cost {
  border-color: var(--accent-edge);
  background: var(--accent-wash);
  color: var(--accent);
}

/* ── playground ─────────────────────────────────────────────────────────── */

.play {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 88px);
}

.play-col {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 22px;
  min-width: 0;
}

.panel > h2 {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.panel > h2 + p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--quiet);
}

.panel-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1 1 190px;
}

/* The minted key, shown exactly once. */
.keyreveal {
  border: 1px solid var(--accent-edge);
  background: var(--accent-wash);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.keyreveal .warn {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

.keyreveal-value {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.keyreveal code {
  flex: 1 1 200px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
  user-select: all;
}

.quota {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--quiet);
}

.quota b {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}

/* The request line, rebuilt on every keystroke. */
.reqline {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--well);
  overflow: hidden;
}

.reqline pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre;
}

.reqline .m {
  color: var(--cool);
}

.reqline .q {
  color: var(--tok-s);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.result-head h2 {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.viewswitch {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.viewswitch button {
  border: 0;
  background: transparent;
  color: var(--quiet);
  font-size: 12.5px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.viewswitch button[aria-selected="true"] {
  background: var(--accent-wash);
  color: var(--accent);
}

.evlist {
  display: grid;
  gap: 10px;
}

.ev {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 15px 17px;
  min-width: 0;
}

.ev-when {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}

.ev h3 {
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.025em;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.ev h3 a {
  color: var(--ink);
}

.ev h3 a:hover {
  color: var(--accent);
}

.ev-desc {
  font-size: 13.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--quiet);
}

.ev-meta .tag {
  font-family: var(--mono);
  color: var(--cool);
}

.raw {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--well);
  overflow: hidden;
}

.raw pre {
  margin: 0;
  padding: 16px;
  max-height: 60vh;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pagerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: var(--rule);
}

.pagerow .note {
  max-width: 46ch;
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--quiet);
  font-size: 14px;
  border: 1px dashed var(--control);
  border-radius: 14px;
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
  }
}

@media (max-width: 940px) {
  .hero-grid,
  .cta {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    max-width: 16ch;
  }
  .play {
    grid-template-columns: 1fr;
  }
  .docs {
    grid-template-columns: 1fr;
  }
  .docnav {
    position: static;
    max-height: none;
    border-left: 0;
    padding-left: 0;
    padding-bottom: 20px;
    border-bottom: var(--rule);
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 2px 18px;
  }
  .docnav .group {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 32px, var(--page));
  }
  .nav-in {
    min-height: 64px;
    gap: 8px;
  }
  .wordmark {
    font-size: 12.5px;
  }
  .nav-link {
    padding: 0 10px;
    font-size: 12.5px;
  }
  .hide-sm {
    display: none;
  }
  .hero .lede,
  .lede {
    font-size: 16px;
  }
  .row-2 {
    grid-template-columns: 1fr;
  }
  .foot-in {
    min-height: 96px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .btn {
    min-height: var(--tap);
  }
  .code pre {
    font-size: 12.5px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav {
    background: var(--nav);
    backdrop-filter: none;
  }
}
