:root {
  color-scheme: light;
  --bg: #fdf6e3;
  --panel: #eee8d5;
  --ink: #073642;
  --heading: #002b36;
  --muted: #657b83;
  --link: #268bd2;
  --link-text: #176b9f;
  --muted-text: #526970;
  --accent: #b58900;
  --border: #ddd6c1;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 64px, 1060px); margin-inline: auto; }
a { color: var(--link-text); text-decoration-color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
/* The reference blue and gray remain in the palette. Darker text variants meet
   WCAG AA on both cream surfaces at the reference's 17px body size. */
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--heading); outline-offset: 4px; }
:target { scroll-margin-top: 24px; }
.skip-link { position: absolute; top: 8px; left: 16px; padding: 12px; background: var(--bg); z-index: 10; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header, .site-header nav, .actions, .endpoint-line, .section-heading, .catalog-status, .service-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-header { min-height: 100px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--heading); font-size: 20px; font-weight: 700; text-decoration: none; }
.brand span { font-weight: 400; }
.site-header nav { gap: 24px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
h1, h2, h3, strong { color: var(--heading); }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; margin: 18px 0 24px; }
h2 { font-size: clamp(1.65rem, 4vw, 2rem); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 18px; font-weight: 650; }
h3 { font-size: 1.12rem; line-height: 1.4; margin: 0 0 12px; }
p { margin: 0 0 16px; }
section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.hero { padding: 64px 0 40px; }
.eyebrow, .label { font-family: var(--mono); font-size: 14px; letter-spacing: .03em; }
.eyebrow { color: var(--muted-text); margin: 0 0 12px; }
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 10px; background: var(--accent); }
.lead { font-size: 21px; line-height: 1.55; max-width: 40ch; }
.hero-note, .section-intro { max-width: 70ch; }
.hero-note, .note { color: var(--muted-text); }
.note { font-size: 15px; line-height: 1.6; }
.actions { justify-content: flex-start; margin: 28px 0 32px; }
button, .button, input, select { font: inherit; color: var(--ink); border: 1px solid var(--muted); border-radius: 5px; }
button, .button { cursor: pointer; background: transparent; padding: 9px 15px; min-height: 44px; line-height: 1.4; }
.button { display: inline-flex; align-items: center; gap: 26px; text-decoration: none; }
button:hover, .button:hover { background: var(--panel); color: var(--heading); }
.primary { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.primary:hover { background: var(--ink); color: var(--bg); }
button:disabled { cursor: wait; }
.endpoint { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 20px 24px; max-width: 850px; }
.label { display: block; margin-bottom: 8px; }
.endpoint code { padding: 0; }
.endpoint button { flex-shrink: 0; }
.service-status { justify-content: flex-start; margin: 24px 0 6px; font-size: 15px; }
.service-status p { margin: 0; }
.service-status button { font-size: 15px; }
.hero > .note { margin-bottom: 0; }
code, pre { font-family: var(--mono); font-size: 1rem; overflow-wrap: anywhere; }
code { background: var(--panel); padding: 2px 5px; border-radius: 3px; }
pre { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 20px; margin: 12px 0; line-height: 1.65; }
pre code { padding: 0; background: transparent; }
.copy-status { font-size: 15px; margin: 8px 0 0; }
.copy-status:empty { display: none; }
.copy-area { min-width: 0; }
.section-heading { align-items: baseline; }
.filters { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; }
input, select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; background: var(--bg); }
input::placeholder { color: var(--muted-text); opacity: 1; }
.catalog-status { margin: 16px 0; }
.catalog-status p { margin: 0; }
.status-table-scroll { max-height: 24rem; overflow: auto; margin-bottom: 16px; }
.model-status-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; font-size: 14px; line-height: 1.35; }
.model-status-table caption { text-align: left; font-weight: 600; color: var(--heading); padding-bottom: 6px; }
.model-status-table th, .model-status-table td { text-align: left; vertical-align: middle; padding: 6px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.model-status-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.model-status-table thead th:nth-child(1) { width: 40%; }
.model-status-table thead th:nth-child(2) { width: 20%; }
.model-status-table thead th:nth-child(3) { width: 16%; }
.model-status-table thead th:nth-child(4) { width: 24%; }
.model-status-table tbody th { font-family: var(--mono); font-weight: 400; }
.model-status-table time { font-variant-numeric: tabular-nums; }
.model-status-table small { display: block; font-size: inherit; color: var(--muted-text); }
.model-status-table [data-status="available"] { color: #28613c; }
.model-status-table [data-status="waiting"] { color: #785500; }
.model-status-table [data-status="unavailable"], .model-status-table [data-status="funding"] { color: #9c3535; }
.catalog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 20px; overflow: clip; }
.model-picker, .model-detail { padding: 24px; min-width: 0; }
.model-picker { border-right: 1px solid var(--border); }
.model-picker select { font-family: var(--mono); height: 350px; padding: 4px; }
.model-picker option { padding: 10px 8px; overflow-wrap: anywhere; }
.model-picker .note { margin: 12px 0 0; }
.model-detail { background: var(--panel); }
.model-id { font-family: var(--mono); overflow-wrap: anywhere; font-size: 1.2rem; }
.model-detail .note { color: var(--ink); margin-top: 16px; }
.rates { margin: 24px 0 0; }
.rates > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; border-bottom: 1px solid var(--border); padding: 10px 0; }
.rates dt { font-size: 15px; }
.rates dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 32px 54px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.steps > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--muted-text); }
.steps > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.steps .copy-area { margin: 24px 0; }
details { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 24px 0; padding: 4px 0; }
summary { cursor: pointer; padding: 12px 4px; color: var(--heading); font-weight: 600; }
details[open] summary { margin-bottom: 12px; }
.notice { border-left: 3px solid var(--accent); padding: 16px 20px; background: var(--panel); margin: 24px 0 0; }
.notice p { margin: 8px 0 0; }
.payment-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 30px 0 36px; gap: 24px; }
.payment-flow li { border-top: 2px solid var(--border); padding-top: 16px; }
.payment-flow span { font-family: var(--mono); color: var(--muted-text); margin-right: 10px; }
.payment-flow p { font-size: 15px; margin: 8px 0 0; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.api-list article { padding: 24px 0; border-bottom: 1px solid var(--border); }
.api-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.api-list article p:last-child { margin-bottom: 0; }
.method { display: inline-block; min-width: 48px; margin-right: 10px; font: 14px var(--mono); color: var(--muted-text); }
footer { padding: 36px 0 48px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer p { margin: 8px 0 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; align-items: flex-start; }
.footer-note { width: 100%; max-width: 75ch; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { padding: 20px 0; gap: 12px 24px; }
  .site-header nav { gap: 20px; }
  .hero { padding-top: 40px; }
  section { padding: 40px 0; }
  .endpoint { padding: 18px; }
  .endpoint-line { align-items: flex-start; }
  .catalog, .two-columns { grid-template-columns: minmax(0, 1fr); }
  .model-picker { border-right: 0; border-bottom: 1px solid var(--border); }
  .model-picker, .model-detail { padding: 18px; }
  .model-picker select { height: 240px; }
  .payment-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > li { padding-left: 0; }
  .steps > li::before { position: static; display: block; margin-bottom: 8px; }
  pre { padding: 16px; }
}
@media (max-width: 430px) { .filters { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (forced-colors: active) { .primary { border: 1px solid ButtonText; } }
