/* x402 Work. Black and white, like a protocol spec: paper, ink and rules.
   Type: IBM Plex Mono for headings, labels and code; IBM Plex Sans for reading.
   Component rules below the tokens are shared with the marketplace and demo modules. */

:root {
  --bg: #ffffff; --bg-subtle: #f6f6f6; --surface: #ffffff; --surface-2: #f3f3f3;
  --line: #e3e3e3; --line-strong: #c6c6c6; --ink: #000000; --ink-2: #1f1f1f; --muted: #5a5a5a; --faint: #969696;
  --accent: #000000; --accent-hover: #262626; --on-accent: #ffffff;
  /* Colour carries meaning only: 402 and errors red, work amber, paid and live green,
     and one hue per marketplace category. Everything else is ink on paper. */
  --blue: #2f5bea; --blue-soft: #eaf0ff; --blue-ink: #2448c4;
  --red: #e5484d; --red-soft: #fdeced; --red-ink: #c2292f;
  --green: #1f9d63; --green-soft: #e3f5eb; --danger: #c2292f;
  --amber: #d98300; --amber-soft: #fdf2df; --violet: #7c4dde; --violet-soft: #f1ebfd;
  --night: #000000; --night-2: #0a0a0a; --night-line: rgba(255,255,255,.14);
  --chart: #2f5bea; --chart-2: #1f9d63;
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  --r-sm: 2px; --r: 4px; --r-lg: 6px;
  --display: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 64px;
  --grain: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-subtle: #0a0a0a; --surface: #000000; --surface-2: #0f0f0f;
    --line: #232323; --line-strong: #3a3a3a; --ink: #ffffff; --ink-2: #e6e6e6; --muted: #a3a3a3; --faint: #6b6b6b;
    --accent: #ffffff; --accent-hover: #e6e6e6; --on-accent: #000000;
    --blue: #7196ff; --blue-soft: #121a33; --blue-ink: #a9bdff; --red: #ff6b6f; --red-soft: #2b1213; --red-ink: #ff9497;
    --green: #3ddc84; --green-soft: #0d2418; --danger: #ff9497; --chart: #7196ff; --chart-2: #3ddc84;
    --amber: #ffb224; --amber-soft: #2a1f08; --violet: #a98bff; --violet-soft: #1d1533;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-subtle: #0a0a0a; --surface: #000000; --surface-2: #0f0f0f;
  --line: #232323; --line-strong: #3a3a3a; --ink: #ffffff; --ink-2: #e6e6e6; --muted: #a3a3a3; --faint: #6b6b6b;
  --accent: #ffffff; --accent-hover: #e6e6e6; --on-accent: #000000;
  --blue: #7196ff; --blue-soft: #121a33; --blue-ink: #a9bdff; --red: #ff6b6f; --red-soft: #2b1213; --red-ink: #ff9497;
  --green: #3ddc84; --green-soft: #0d2418; --danger: #ff9497; --chart: #7196ff; --chart-2: #3ddc84;
  --amber: #ffb224; --amber-soft: #2a1f08; --violet: #a98bff; --violet-soft: #1d1533;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
/* Reserve the scrollbar's space so the top bar doesn't shift between short and long pages. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
figure { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 450; font-variation-settings: "SOFT" 80; letter-spacing: -.02em; font-optical-sizing: auto; }
h1, h2 { line-height: 1.02; letter-spacing: -.03em; }
p { line-height: 1.6; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 3px; border-radius: 4px; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
pre code { padding: 0; background: none; border: 0; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.initial-loading { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── Marketplace: tools, data and AI paid for with work ─────────────────── */
/* Each category has a tone; service glyphs are drawn on the logo's cell grid. */
.market-site { --tone: var(--ink-2); --tone-soft: var(--surface-2); }
.market-tools { --tone: var(--green); --tone-soft: var(--green-soft); }
.market-ai { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.market-data { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.market-content { --tone: var(--red); --tone-soft: var(--red-soft); }
.market-other { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.market-sky::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 30%, transparent), var(--bg) 62%); }
.market-main { position: relative; max-width: 1240px; margin: 0 auto; padding: 40px 28px 88px; min-height: 70vh; }
.market-main p { color: var(--muted); }
.market-small { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.market-loading { padding: 120px 20px; text-align: center; color: var(--muted); }
.market-text-link { color: var(--blue-ink); font-size: 13.5px; }
.market-text-link:hover { text-decoration: underline; }
.market-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 26px; font-size: 13px; color: var(--muted); }
.market-crumbs a { color: var(--ink-2); }
.market-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.market-crumbs span[aria-hidden] { color: var(--faint); }

/* Glyphs and meters */
.market-glyph { display: block; width: 100%; height: 100%; }
.market-glyph rect { fill: var(--tone); }
.market-glyph.mini { width: 16px; height: 16px; flex-shrink: 0; }
.market-meter { display: inline-flex; gap: 3px; flex-shrink: 0; }
.market-meter i { width: 9px; height: 9px; border-radius: 2.5px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.market-meter[data-level="1"] i:nth-child(-n+1), .market-meter[data-level="2"] i:nth-child(-n+2), .market-meter[data-level="3"] i:nth-child(-n+3), .market-meter[data-level="4"] i:nth-child(-n+4), .market-meter[data-level="5"] i { background: var(--red); }
.market-price { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.market-availability { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.market-availability i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.market-availability.available i, .market-availability.limited i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.market-availability.demo i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.market-availability.external i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.market-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font: 600 11px var(--mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.market-tag.available { color: var(--green); background: var(--green-soft); border-color: transparent; }
.market-publisher { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.market-publisher img { border-radius: 4px; }
.market-verified { padding: 1px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink); font-size: 11px; font-weight: 600; }

/* Catalog header */
.market-head.market-bar { display: block; margin-bottom: 18px; }
.market-bar .market-head-side { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.market-bar .market-stats div { text-align: left; }
.market-bar .market-stats dd { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.market-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-bottom: 22px; }
.market-head h1 { font-size: clamp(44px, 5.4vw, 76px); line-height: .98; letter-spacing: -.035em; font-weight: 480; font-variation-settings: "SOFT" 100; }
.market-head-copy p { margin-top: 14px; max-width: 560px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.market-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.market-head-actions { display: flex; gap: 10px; }
.market-stats { display: flex; gap: 28px; margin: 0; }
.market-stats div { text-align: right; }
.market-stats dt { font-size: 12px; color: var(--muted); }
.market-stats dd { margin: 2px 0 0; font-family: var(--display); font-size: 34px; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.market-how { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 30px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13.5px; color: var(--ink-2); }
.market-how li { display: inline-flex; align-items: center; gap: 9px; }
.market-how li + li::before { content: ""; width: 18px; height: 1px; margin-right: 4px; background: var(--line-strong); }
.market-how b, .market-step-label b, .market-track b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: var(--bg); font: 600 11.5px var(--mono); }

/* Toolbar and filters */
.market-discovery { scroll-margin-top: 90px; }
.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.market-search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 520px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.market-search:focus-within { border-color: var(--ink-2); }
.market-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.market-search input { flex: 1; min-width: 0; padding: 13px 0; border: 0; background: transparent; font-size: 14.5px; outline: none; }
.market-sort { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.market-sort select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--ink); }
.market-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.market-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.market-chip small { font: 11px var(--mono); color: var(--faint); }
.market-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.market-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.market-chip[aria-pressed="true"] small { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.market-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Cards */
.market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; transition: transform .2s cubic-bezier(.3,1.3,.4,1), box-shadow .2s, border-color .2s; }
.market-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--tone) 70%, transparent); }
.market-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.market-card-art { position: relative; display: flex; align-items: center; justify-content: center; height: 132px; background: var(--tone-soft); background-image: radial-gradient(color-mix(in srgb, var(--tone) 18%, transparent) 1px, transparent 1.2px); background-size: 12px 12px; }
.market-card-art .market-glyph { width: 66px; height: 66px; transition: transform .35s cubic-bezier(.3,1.5,.4,1); }
.market-card:hover .market-card-art .market-glyph { transform: scale(1.08) rotate(-3deg); }
.market-card-art .market-availability { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); }
.market-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 16px; }
.market-card-kicker { font: 600 11px var(--mono); letter-spacing: .04em; color: var(--tone); }
.market-card h3 { font-family: var(--display); font-size: 23px; font-weight: 500; line-height: 1.15; letter-spacing: -.015em; }
.market-card-body > p { flex: 1; font-size: 14px; line-height: 1.6; }
.market-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line); }
.market-activity { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.market-results { margin-top: 16px; }
.market-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 18px; }
.market-empty .market-glyph { width: 44px; height: 44px; opacity: .55; }

/* Bottom of the catalog */
.market-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 56px; }
.market-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.market-panel h2, .market-box h2 { font-size: 28px; line-height: 1.1; }
.market-panel p { font-size: 14.5px; line-height: 1.6; max-width: 480px; }
.market-sell { color: #fff; border-color: transparent; background: linear-gradient(135deg, #2a0f14, #5c1d1b 55%, #b8442d); }
.market-sell h2 { color: #fff; }
.market-sell p { color: rgba(255,255,255,.75); }
.market-sell .button.primary { background: #fff; color: #111; border-color: #fff; margin-top: auto; }
.market-endpoint { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.market-endpoint b { color: var(--blue-ink); font-weight: 600; }
.market-fineprint { margin-top: 22px; font-size: 12px; color: var(--faint); }

/* Service page */
.market-detail-head { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 32px; }
.market-detail-art { display: grid; place-items: center; width: 132px; height: 132px; border-radius: 28px; background: var(--tone-soft); background-image: radial-gradient(color-mix(in srgb, var(--tone) 18%, transparent) 1px, transparent 1.2px); background-size: 12px 12px; border: 1px solid color-mix(in srgb, var(--tone) 18%, transparent); }
.market-detail-art .market-glyph { width: 70px; height: 70px; }
.market-detail-copy h1 { margin: 6px 0 10px; font-size: clamp(40px, 4.8vw, 66px); line-height: 1; letter-spacing: -.03em; font-weight: 480; font-variation-settings: "SOFT" 100; }
.market-lede { max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--ink-2) !important; }
.market-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 14px; }
.market-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.market-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.market-box { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.market-box > p { margin-top: 10px; font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.market-box h2 + p { margin-top: 10px; }
.market-facts { margin: 18px 0 0; }
.market-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.market-facts dt { color: var(--muted); flex-shrink: 0; }
.market-facts dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.market-facts code { font-size: 11.5px; }
.market-tech { margin-top: 16px; }
.market-tech summary, .market-receipt summary, .market-listing summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.market-tech p { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.market-address { display: block; margin-top: 8px; padding: 8px 10px; font-size: 11.5px; overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.market-code { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; font-size: 12px; line-height: 1.7; }
.market-side .market-endpoint { margin-top: 14px; }

/* Purchase panel */
.market-unlock { padding: 28px; border-color: var(--line-strong); box-shadow: 0 30px 70px -45px rgba(80, 20, 10, .55); }
.market-unlock-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.market-steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; }
.market-step { position: relative; padding: 0 0 22px 36px; }
.market-step::before { content: ""; position: absolute; left: 10.5px; top: 28px; bottom: 4px; width: 1px; background: var(--line-strong); }
.market-step:last-child { padding-bottom: 0; }
.market-step:last-child::before { display: none; }
.market-step-label { display: flex; align-items: center; gap: 12px; margin: 0 0 12px -36px; font-weight: 600; font-size: 15px; color: var(--ink); }
.market-step-label b { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); transition: background .3s, color .3s; }
.market-unlock[data-phase="asking"] .market-step:nth-child(2) .market-step-label b, .market-unlock[data-phase="working"] .market-step:nth-child(2) .market-step-label b, .market-unlock[data-phase="verifying"] .market-step:nth-child(3) .market-step-label b { background: var(--red); color: #fff; border-color: transparent; }
.market-unlock[data-phase="working"] .market-step:nth-child(1) .market-step-label b, .market-unlock[data-phase="verifying"] .market-step:nth-child(-n+2) .market-step-label b, .market-unlock[data-phase="done"] .market-step-label b { background: var(--green); color: #fff; border-color: transparent; }
.market-form { display: flex; flex-direction: column; gap: 16px; }
.market-form fieldset { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--line); }
.market-form legend { padding: 0 0 12px; font-family: var(--display); font-size: 19px; color: var(--ink); }
.market-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.market-form label small { font-weight: 400; font-size: 12px; color: var(--muted); }
.market-form input, .market-form textarea, .market-form select, .market-dns input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); font-size: 14px; color: var(--ink); }
.market-form input:focus, .market-form textarea:focus, .market-form select:focus { outline: 2px solid color-mix(in srgb, var(--red) 45%, transparent); outline-offset: 1px; border-color: transparent; }
.market-form textarea { font: 13px/1.7 var(--mono); resize: vertical; }
.market-form-pair { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.market-consent label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.market-consent input { accent-color: var(--red); width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }
.market-work-meter { margin-top: 14px; }
.market-work-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.market-work-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ff8a3d, var(--red)); transition: width .2s linear; }
.market-unlock[data-phase="verifying"] .market-work-bar i, .market-unlock[data-phase="done"] .market-work-bar i { background: var(--green); }
.market-work-numbers { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font: 12px var(--mono); color: var(--muted); }
.market-work-numbers b { color: var(--ink); font-weight: 500; }
.market-work-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.market-work-actions [hidden] { display: none; }
.market-work-status { font-size: 13px; line-height: 1.6; min-height: 21px; }
.market-result-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.market-result-head { justify-content: flex-end; }
.market-box > .market-form { margin-top: 20px; }
.market-result-head .button { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.market-output { margin: 0; padding: 16px; border-radius: 12px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 18%, transparent); font: 12.5px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; color: var(--ink); }
.market-receipt { margin-top: 10px; }
.market-receipt pre { margin-top: 8px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 11px; max-height: 220px; overflow: auto; }
.market-feature { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.market-feature-art { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 22px; background: var(--tone-soft); }
.market-feature-art .market-glyph { width: 48px; height: 48px; }
.market-feature p { max-width: 520px; }

/* Utilities */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.red { color: var(--blue-ink); }
.green { color: var(--green); }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.spaced { margin-top: 18px; }
.fig { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fig::before { content: ""; width: 6px; height: 6px; background: var(--red); }
.fig.light { color: rgba(255,255,255,.72); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 30px; height: 30px; }
.brand-mark { width: 24px; height: 24px; color: var(--ink); flex-shrink: 0; }
.brand-mark rect { fill: currentColor; transition: fill .22s ease-out; }
.brand-mark rect.tail { fill: var(--red); }
/* A looping mark for anything that is waiting (see compute-logo.js). */
.logo-loader { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.logo-loader .brand-mark { width: 22px; height: 22px; color: var(--ink); }
.try-thinking { font-size: 14px; }
.try-thinking .brand-mark { width: 18px; height: 18px; }
.brand-word { font-family: var(--display); font-weight: 560; font-variation-settings: "SOFT" 100; font-size: 21px; letter-spacing: -.02em; display: inline-flex; gap: 6px; }
.brand-word span { font-weight: 380; color: var(--muted); }

/* Buttons and controls */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 40px; padding: 0 16px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.button:hover { border-color: var(--faint); }
.button .icon { width: 16px; height: 16px; }
.button.primary, .button.ink { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover, .button.ink:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.ink { box-shadow: 0 18px 34px -18px rgba(5,6,7,.7); }
.button.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.button.ghost { background: transparent; border-color: transparent; }
.button.ghost:hover { background: var(--surface-2); }
.button.quiet { background: transparent; }
.button.pill { border-radius: 999px; background: var(--surface); border-color: var(--line-strong); padding: 0 18px; }
.button.pill:hover { background: var(--bg); }
.button.large { height: 50px; padding: 0 24px; font-size: 15.5px; border-radius: 6px; }
.button.white { background: #fff; border-color: #fff; color: #0a0b0d; box-shadow: 0 1px 2px rgba(10,11,13,.08), 0 0 0 1px rgba(10,11,13,.06); }
.button.white:hover { background: #f2f3f5; border-color: #f2f3f5; }
.console-funding { margin-bottom: 24px; }
.button.pill.large { border-radius: 999px; }
.button.large.ink { padding-right: 10px; }
.button.compact { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.button.on-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.24); color: #fff; }
.button.on-dark:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); }
.arrow-dot { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--on-accent) 88%, transparent); color: var(--accent); transition: transform .2s; }
.on-dark .arrow-dot { background: #fff; color: var(--night); }
.button:hover .arrow-dot { transform: rotate(45deg); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-ink); font-weight: 500; background: none; border: 0; padding: 0; font-size: inherit; }
.text-link .icon { width: 16px; height: 16px; transition: transform .15s; }
.text-link:hover .icon { transform: translateX(3px); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-family: var(--font); font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: 0; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge.thermal, .badge.red { background: var(--red-soft); color: var(--red-ink); border-color: transparent; }
.badge.blue { background: var(--blue-soft); color: var(--blue-ink); border-color: transparent; }
.icon-box { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; background: var(--blue-soft); color: var(--blue-ink); }
.icon-box.green { background: var(--green-soft); color: var(--green); }
.icon-box.red { background: var(--red-soft); color: var(--red-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; display: inline-block; }
.dot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Dialog and toast */
#modal { width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px -20px rgba(5,6,7,.5); }
#modal::backdrop { background: rgba(8, 16, 13, .5); backdrop-filter: blur(4px); }
#modal[open] { animation: dialog-in .2s cubic-bezier(.2,.7,.2,1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#modal h2 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 10px; padding-right: 36px; }
#modal p { color: var(--ink-2); font-size: 14.5px; }
#modal form { margin-top: 18px; }
.dialog-close { position: absolute; top: 16px; right: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
#modal:has(form) .dialog-actions { display: none; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 10px; background: var(--night); color: #fff; font-size: 14px; border: 1px solid var(--night-line); box-shadow: var(--shadow-md); transition: opacity .2s, transform .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ============ Public website ============ */
.site { position: relative; isolation: isolate; overflow-x: clip; }
.site > main, .site-footer { position: relative; z-index: 1; }
/* The hero's sky continues, washed out, behind the whole page. */
.sky-wash { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.sky-wash img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; opacity: .85; }
.sky-wash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 22%, transparent), color-mix(in srgb, var(--bg) 52%, transparent)); }
.page-field, .butterfly-field { position: fixed; top: 0; left: 0; width: 100%; height: calc(100% + 16px); z-index: 0; pointer-events: none; }
.butterfly-field { z-index: 0; }
@media(max-width:720px){.butterfly-field{opacity:.65}}
.site-nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); border-bottom: 1px solid transparent; transition: background .25s, border-color .25s; }
/* Frosted only after scrolling: blurring over the moving sky every frame is expensive and unnecessary at the top. */
.site-nav.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
.site-nav-inner { height: 100%; padding: 0 24px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 24px; }
.site-links { display: flex; gap: 4px; justify-content: center; white-space: nowrap; }
.site-links a { position: relative; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-size: 16px; font-weight: 450; }
.site-links a.active { color: var(--ink); }
.site-links a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--red); }
.site-links a:hover { color: var(--ink); }
.site-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
/* The one coloured item in the top bar: a way into the live x402 work demo. */
.site-links { align-items: center; }
.site-links a.nav-callout { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; overflow: hidden; isolation: isolate; color: #fff; font-size: 15px; font-weight: 550; background: linear-gradient(120deg, var(--red), #ff7a3d 70%, #ffa046); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--red) 80%, transparent), inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .2s cubic-bezier(.3,1.4,.4,1), box-shadow .2s; }
.site-links a.nav-callout:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--red) 90%, transparent), inset 0 0 0 1px rgba(255,255,255,.28); }
.site-links a.nav-callout:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.site-links a.nav-callout i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: callout-pulse 2.4s infinite; }
/* A slow sheen crosses the pill now and then, so it reads as live without shouting. */
.site-links a.nav-callout::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; right: auto; width: 45%; height: auto; border-radius: 0; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: callout-sheen 6s ease-in-out infinite 1.5s; }
.site-links a.nav-callout.here { box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 25%, transparent), inset 0 0 0 1px rgba(255,255,255,.28); }
@keyframes callout-pulse { 70% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes callout-sheen { 0%, 70% { left: -60%; } 100% { left: 120%; } }
@media (prefers-reduced-motion: reduce) { .site-links a.nav-callout i, .site-links a.nav-callout::after { animation: none; } .site-links a.nav-callout::after { display: none; } }
.site-menu { display: none; }

/* Each theme has its own photograph. */
.theme-night { display: none; }
:root[data-theme="dark"] .theme-night { display: block; }
:root[data-theme="dark"] .theme-day { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-night { display: block; }
  :root:not([data-theme="light"]) .theme-day { display: none; }
}

.hero { position: relative; margin-top: calc(-1 * var(--nav-h)); padding-top: var(--nav-h); overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0 0 auto; z-index: -1; animation: drift 40s ease-in-out infinite alternate; }
.hero-img { -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 97%); mask-image: linear-gradient(180deg, #000 58%, transparent 97%); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@keyframes drift { from { transform: scale(1.04) translateX(-1%); } to { transform: scale(1.1) translateX(1.2%); } }
.hero-copy { position: relative; max-width: 920px; margin: 0 auto; padding: 104px 24px 64px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero-pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 11px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent); color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.hero-pill:hover { color: var(--ink); }
.hero-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255,59,48,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }
.hero h1 { font-size: clamp(56px, 7.6vw, 112px); line-height: .95; letter-spacing: -.035em; font-weight: 480; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.hero-copy > p { font-size: clamp(16px, 1.45vw, 19px); color: var(--ink-2); max-width: 640px; }
.hero-copy > p span { display: block; text-wrap: balance; }
.hero-copy > p span + span { margin-top: 6px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.hero-product { position: relative; max-width: 1140px; margin: 0 auto; padding: 0 28px; }

.product {
  display: grid; grid-template-columns: 176px minmax(0, 1fr); color: #e7e9ec; font-size: 12.5px;
  background: rgba(11,12,14,.97); border: 1px solid rgba(255,255,255,.12); border-bottom: 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 50px 100px -30px rgba(10,20,60,.5);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.product-side { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; border-right: 1px solid rgba(255,255,255,.07); }
.product-side img { margin: 0 6px 14px; }
.product-side span { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; color: #8b9199; }
.product-side span.active { background: rgba(255,255,255,.07); color: #f2f3f5; }
.product-side .icon { width: 14px; height: 14px; }
.product-main { padding: 14px 20px 40px; min-width: 0; }
.product-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.07); color: #8b9199; }
.product-top b { color: #5c626b; font-weight: 400; margin: 0 4px; }
.product-top em { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: #5c626b; }
.product-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.product-stats div { padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; background: rgba(255,255,255,.02); }
.product-stats small { display: block; color: #8b9199; }
.product-stats strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 30px; font-weight: 450; line-height: 1; color: #f2f3f5; }
.product-stats i { display: block; margin-top: 6px; font-style: normal; font-size: 11.5px; color: #8b9199; }
.product .up { color: #39e58c; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.product-chart { padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
.product-chart small { color: #8b9199; }
.product-chart svg { display: block; width: 100%; height: 150px; margin-top: 10px; }
.product-log { list-style: none; margin: 0; padding: 6px 0; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
.product-log li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; }
.product-log li + li { border-top: 1px solid rgba(255,255,255,.05); }
.product-log i { width: 6px; height: 6px; border-radius: 50%; background: #39e58c; flex-shrink: 0; }
.product-log i.amber { background: #ff3b30; }
.product-log b { font-family: var(--mono); font-weight: 400; font-size: 11.5px; color: #c4c8cf; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-log em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; color: #f2f3f5; }

.marks { position: relative; z-index: 1; overflow: hidden; padding: 20px 0 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marks:hover .marquee { animation-play-state: paused; }
.marquee ul { list-style: none; margin: 0; padding: 0 28px 0 0; display: flex; gap: 56px; }
.marquee li { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--muted); white-space: nowrap; }
.marquee li .brand-img { width: 22px; height: 22px; flex-shrink: 0; object-fit: contain; }
.marquee li:hover { color: var(--ink); }
:root[data-theme="dark"] .marquee li .brand-img.mono { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marquee li .brand-img.mono { filter: invert(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }

.block { position: relative; max-width: 1180px; margin: 0 auto; padding: 104px 24px 0; }
.block-head { position: relative; z-index: 1; text-align: center; margin-bottom: 40px; }
.block-head h2 { max-width: 860px; margin: 0 auto; font-size: clamp(42px, 5.4vw, 76px); line-height: 1; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.block-head p { margin: 14px auto 0; max-width: 640px; font-size: 17px; color: var(--muted); text-wrap: balance; }

.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.block-head.long h2 { max-width: 1000px; font-size: clamp(36px, 4.6vw, 64px); }
.block-head.long p { max-width: 700px; }
.use-grid .snip code { font-size: 11.5px; padding: 1px 5px; }
.use-grid [data-access-step] { opacity: .32; transition: opacity .35s; }
.use-grid [data-access-step].on { opacity: 1; }
.use-status { transition: color .3s; color: var(--red-ink) !important; font-family: var(--mono) !important; font-size: 22px !important; }
.use-status.ok { color: var(--green) !important; }
.use-direct { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 22px auto 0; font-size: 14.5px; color: var(--muted); text-align: center; }
.use-direct .icon { width: 17px; height: 17px; }
.use-direct a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.use-direct a:hover { text-decoration-color: var(--red); }
@media (prefers-reduced-motion: reduce) { .use-grid [data-access-step] { opacity: 1; } }
.pay-card { display: flex; flex-direction: column; align-items: flex-start; padding: 16px 16px 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow-sm); }
.snip { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 160px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: 13px; }
.snip-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); }
.snip-row b { font-family: var(--display); font-size: 28px; font-weight: 450; font-variation-settings: "SOFT" 100; line-height: 1; color: var(--ink); }
.snip-line { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.snip-line em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.snip-line i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.d-green { background: var(--green); }
.d-blue { background: var(--blue); }
.d-red { background: var(--red); }
.snip-bars { display: block; width: 100%; height: 46px; }
.snip-bars rect { fill: var(--green); opacity: .7; }
.snip-bars rect:last-child { opacity: 1; }
.pay-card h3 { margin: 22px 4px 0; display: flex; align-items: center; gap: 10px; font-family: var(--font); font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.pay-card p { margin: 6px 4px 0; color: var(--muted); font-size: 14.5px; }
.pay-card .text-link { margin: 16px 4px 0; font-size: 14px; }

.try { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-md); overflow: hidden; }
.try-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.try-model { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.try-model i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.try-meter { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.try-log { min-height: 230px; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.try-hint { margin: auto; color: var(--faint); font-size: 14px; }
.try-msg { max-width: 82%; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.try-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.try-msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.try-msg .speaker { color: var(--blue-ink); }
.caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--green); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.try-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.try-prompts .button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.code-window { border-radius: var(--r); overflow: hidden; background: rgba(11,12,14,.96); border: 1px solid var(--night-line); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); backdrop-filter: blur(10px); }
.code-window-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 6px; border-bottom: 1px solid var(--night-line); }
.code-tabs { display: flex; gap: 2px; }
.code-tabs button { height: 32px; padding: 0 12px; border-radius: 6px; border: 0; background: transparent; color: rgba(255,255,255,.58); font-family: var(--mono); font-size: 12.5px; }
.code-tabs button:hover { color: #fff; }
.code-tabs button.active { background: rgba(255,255,255,.1); color: #fff; }
.code-file { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.38); padding-right: 8px; }
.code-window pre { margin: 0; padding: 22px 24px 26px; font-size: 13px; line-height: 1.75; color: #e7e9ec; overflow-x: auto; min-height: 300px; }
.tk-k { color: #8fb0ff; }
.tk-s { color: #39e58c; }
.tk-c { color: rgba(255,255,255,.36); }

.garden-block { padding-bottom: 230px; }
.garden-block > .garden-canvas { top: auto; height: 320px; bottom: 0; }
.code-center { position: relative; z-index: 1; width: 100%; min-width: 0; max-width: 760px; margin: 0 auto; }

.cta { position: relative; max-width: 1272px; margin: 120px auto 0; min-height: 560px; border-radius: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; isolation: isolate; background: #050607; }
.cta-art { position:absolute; inset:0; z-index:-2; }
.cta-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; transform:scale(1.04); }
.meadow-canvas { position:absolute; inset:0; width:100%; height:100%; opacity:0; pointer-events:none; }
.meadow-canvas.is-ready { opacity:1; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(5,6,7,.86), rgba(5,6,7,.55) 60%, rgba(5,6,7,.12) 100%); }
/* The halftone panel needs an edge where the page behind it is dark too. */
.cta { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 40px 90px -40px rgba(5,6,7,.5); }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; padding: 0 24px; }
.cta h2 { font-size: clamp(60px, 10vw, 150px); line-height: .92; color: #fff; font-weight: 600; font-variation-settings: "SOFT" 100; text-shadow: 0 10px 50px rgba(0,0,0,.35); }

.site-footer { margin-top: 120px; border-top: 1px solid var(--line); background: var(--bg); }
.site-footer-inner { max-width: 1320px; margin: 0 auto; padding: 48px 28px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--ink); }
.site-footer-base { max-width: 1320px; margin: 0 auto; padding: 18px 28px 28px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ============ Responsive ============ */
/* Phones reach Models, Playground and Rankings from the sidebar instead of the top bar. */
.sidebar-explore { display: none; }
@media (max-width: 1240px) {
  .console-topbar .topbar-slash, .console-topbar .workspace-name, .console-topbar .badge { display: none; }
}
@media (max-width: 1240px) {
  .site-nav-inner { grid-template-columns: auto 1fr; }
  .site-menu { display: inline-flex; color: var(--ink); }
  .site-nav.menu-open .site-links { display: flex; flex-direction: column; position: absolute; top: calc(var(--nav-h) + 6px); left: 12px; right: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
  .site-nav.menu-open .site-links a { padding: 12px; font-size: 16px; }
  .site-nav.menu-open .site-links { align-items: stretch; }
  .site-nav.menu-open .site-links a.nav-callout { margin: 6px 0 0; justify-content: center; border-radius: 12px; }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pay-grid { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product-side { display: none; }
  .site-footer-inner { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .console-layout { grid-template-columns: 1fr; }
  .console-topbar { grid-template-columns: 1fr auto; }
  .sidebar-explore { display: block; }
  .mobile-menu { display: inline-flex; }
  .sidebar { position: fixed; top: var(--nav-h); left: 0; bottom: 0; height: auto; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .22s cubic-bezier(.2,.7,.2,1); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .mobile-backdrop.open { display: block; position: fixed; inset: var(--nav-h) 0 0; z-index: 55; background: rgba(5,6,7,.5); }
  .console-content { padding: 20px 20px 32px; }
  .split, .funding-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 760px) {
  .topbar-slash, .console-topbar .badge, .docs-button, .workspace-name, .hide-sm { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .site-nav-inner { padding: 0 14px; gap: 10px; }
  .brand-word { font-size: 19px; }
  .site-actions .button.pill { height: 36px; padding: 0 14px; font-size: 13px; }
  .try-log { min-height: 260px; padding: 18px 14px; }
  .try-msg { max-width: 92%; font-size: 14.5px; }
  .cta { margin: 96px 12px 0; min-height: 460px; }
  .hero-copy { padding: 64px 18px 44px; gap: 18px; }
  .hero h1 { font-size: clamp(46px, 13vw, 62px); }
  .hero-cta { flex-direction: column; align-self: stretch; }
  .hero-cta .button { width: 100%; }
  .hero-product { padding: 0 12px; }
  .product-main { padding: 12px 12px 32px; }
  .product-stats { grid-template-columns: 1fr 1fr; }
  .product-stats div:last-child { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .product-log { display: none; }
  .marquee li { font-size: 16px; }
  .block { padding: 72px 16px 0; }
  .block-head { margin-bottom: 36px; }
  .garden-block { padding-bottom: 180px; }
  .code-window pre { font-size: 12px; padding: 18px; min-height: 0; }
  .code-file { display: none; }
  .roadmap-row b { font-size: 24px; }
  .site-footer-inner { padding: 36px 16px 20px; grid-template-columns: 1fr 1fr; }
  .site-footer-base { padding: 16px; }
  .console-topbar { padding: 0 12px; gap: 8px; }
  .console-content { padding: 16px 16px 28px; }
  .page-title h1 { font-size: 38px; }
  .title-actions { width: 100%; }
  .key-select { max-width: none; flex: 1; }
  .stats-grid { grid-template-columns: 1fr; }
  .chart-meta { gap: 20px; }
  .flow { grid-template-columns: 1fr; }
  .detail-list div { flex-direction: column; gap: 2px; }
  .detail-list dd { text-align: left; }
  th, td { padding: 12px 14px; }
  .auth-top { margin-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.payments-layout{align-items:start}.pay-icon,.coin-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:#feeae7;color:#d53e32;font-weight:700;font-size:20px;flex-shrink:0}.coin-icon.qi{background:var(--surface-2);color:var(--ink);font-size:16px}.asset-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.asset-choice{background:var(--surface);color:var(--ink);border:1px solid var(--line,#e5e7eb);border-radius:10px;display:flex;align-items:center;gap:10px;text-align:left;padding:14px 12px;cursor:pointer;min-width:0}.asset-choice.selected{border-color:#ed493b;box-shadow:0 0 0 1px #ed493b;background:var(--red-soft)}.asset-choice strong{display:block;font-size:14px}.asset-choice small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.choice-dot{margin-left:auto;width:12px;height:12px;border:1px solid #ccd0d5;border-radius:50%;flex-shrink:0}.selected .choice-dot{border:4px solid #ed493b}.payment-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0}.payment-presets .selected{border-color:#ed493b;color:#d53e32;background:var(--red-soft)}.payment-total{display:flex;justify-content:space-between;font-size:13px;padding:18px 0;border-top:1px solid var(--line);margin-top:18px}.payment-submit{width:100%;justify-content:center;margin-top:16px}.payment-summary{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;text-align:center;padding:24px 12px;margin-top:22px}.payment-summary.paid{background:var(--green-soft);border-color:var(--green)}.payment-amount{font-size:34px;font-weight:650;letter-spacing:-1.1px;margin:8px 0;overflow-wrap:anywhere}.payment-amount span{font-size:16px;letter-spacing:0;margin-left:8px;color:var(--muted)}.payment-summary p{font-size:12px;color:var(--muted)}.payment-status{display:flex;gap:9px;align-items:center;font-size:13px;margin-top:22px}.payment-status>span:last-child:not(.dot){margin-left:auto;color:var(--muted)}.payment-steps{display:flex;justify-content:space-between;gap:5px;font-size:11px;color:var(--muted)}.payment-steps span{border-bottom:2px solid var(--line);padding:8px 0;flex:1}.payment-steps .done{color:#28864f;border-color:#3b9963}.payment-steps .current{color:#d53e32;border-color:#ed493b}.invoice-reference{display:grid;gap:5px;font-size:10px;color:var(--muted)}.invoice-reference code{overflow-wrap:anywhere}.payment-history{border-top:1px solid var(--line);padding-top:20px}.payment-history h3{padding:0 24px 12px;font-size:13px}.payment-history td small{display:block;font-size:10px;margin-top:4px}.payment-history td{font-size:12px}.payment-explainer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:24px 0;font-size:12px}.payment-explainer span{background:var(--surface-2);border-radius:6px;padding:10px}.payment-explainer .icon{width:14px;flex-shrink:0}#payment-destination{width:100%;resize:vertical;padding:12px;border:1px solid var(--line);border-radius:8px}.asset-choice:focus-visible{outline:3px solid #ffc3ba;outline-offset:3px}@media(max-width:500px){.asset-choices{gap:8px}.asset-choice{padding:10px 8px;gap:7px}.coin-icon{width:30px;height:30px}.asset-choice small{font-size:9px}.payment-amount{font-size:30px}.payment-history th,.payment-history td{padding:12px 10px}.payment-explainer span{padding:9px}}

.payments-layout>div>section.spaced>.panel-body{padding-top:24px}

/* Opaque controls remain legible over the animated sky in both themes. */
.theme-toggle{width:40px;height:40px;flex:0 0 40px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:0 2px 8px #00000018}
.theme-toggle .icon{width:20px;height:20px;stroke-width:1.8}
.theme-toggle:hover{background:var(--surface-2);color:var(--ink);border-color:var(--muted)}
.theme-toggle:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media(max-width:360px){.site-nav .brand{font-size:17px}.site-actions{gap:5px}.site-nav .pill{padding-inline:12px}.site-nav .brand img{width:22px}}
@media(max-width:360px){
  .site-nav-inner{padding-inline:10px;gap:6px}
  .site-nav .brand{gap:6px}
  .site-nav .brand-mark{width:22px;height:22px}
  .site-nav .brand-word{font-size:16px;gap:4px}
  .site-nav .site-actions{gap:4px}
  .site-nav .site-actions .button.pill{padding-inline:10px}
}

/* Split sections: copy on one side, a live piece of product on the other. */
.split-block { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split-block.reverse .split-copy { order: 2; }
.split-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.split-copy h2 { font-size: clamp(38px, 4.2vw, 58px); line-height: 1; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.split-copy > p { font-size: 16.5px; color: var(--muted); max-width: 470px; }
.split-copy .x402-tagline { margin-top: -4px !important; }
.split-copy .hero-cta { justify-content: flex-start; margin-top: 6px; }
.split-copy .feature-eyebrow { margin-bottom: 0; }
.x402-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; max-width: 470px; }
.x402-steps li { display: flex; gap: 14px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.x402-steps b { flex-shrink: 0; width: 30px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--red-soft); color: var(--red-ink); font-family: var(--mono); font-size: 11px; font-weight: 500; }
.x402-steps strong { color: var(--ink); font-weight: 500; }
.checks { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px; }
.checks .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--red-soft); color: var(--red-ink); stroke-width: 2.4; }

.x402-exchange { position: relative; z-index: 1; border-radius: 16px; overflow: hidden; background: #0b0c0e; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 90px -36px rgba(80,20,10,.55); color: #e7e9ec; }
.exchange-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.exchange-bar > span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); }
.exchange-bar b { margin-left: 10px; font-family: var(--mono); font-weight: 400; color: rgba(255,255,255,.7); }
.exchange-bar em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; color: #ff8a70; }
.exchange-log { list-style: none; margin: 0; padding: 22px 20px 26px; display: grid; gap: 14px; min-height: 300px; }
.exchange-log li { display: flex; align-items: center; gap: 14px; opacity: .14; transform: translateY(4px); transition: opacity .35s, transform .35s; }
.exchange-log li.on { opacity: 1; transform: none; }
.exchange-log code { background: none; border: 0; padding: 0; font-size: 13px; color: #e7e9ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exchange-log .tag { flex-shrink: 0; min-width: 48px; text-align: center; padding: 3px 6px; border-radius: 6px; font-style: normal; font-family: var(--mono); font-size: 10.5px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75); }
.exchange-log .tag.pay { background: rgba(255,59,48,.18); color: #ff8a80; }
.exchange-log .tag.mine { background: rgba(255,138,61,.16); color: #ffb37a; }
.exchange-log .tag.ok { background: rgba(57,229,140,.14); color: #6ff0aa; }
.exchange-meter { color: #ffb37a !important; }

/* Headings resolve out of ASCII glyphs; the real glyph keeps its space underneath. */
.dw { white-space: nowrap; }
.dc { position: relative; }
.dc.scr { color: transparent; text-shadow: none; }
.dc.scr::after { content: attr(data-g); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .52em; font-weight: 500; color: var(--red); }

.snip-line.flash { animation: snip-flash 1.2s ease-out; }
@keyframes snip-flash { 15% { background: color-mix(in srgb, var(--red) 16%, transparent); } }
.snip-line { border-radius: 6px; margin: 0 -6px; padding: 2px 6px; }

.footer-brand p { margin: 14px 0 16px; max-width: 320px; font-size: 14px; color: var(--muted); }
.footer-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.footer-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.site-footer h4 { margin: 0 0 4px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ============ Documentation ============ */
.docs-shell { position: relative; min-height: 100vh; background: var(--bg); overflow-x: clip; }
.docs-shell .site-nav { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px); border-bottom-color: var(--line); }
.docs-layout { position: relative; display: grid; grid-template-columns: 264px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; }
.docs-nav { position: sticky; top: var(--nav-h); align-self: start; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 28px 16px 40px 24px; }
.docs-nav-toggle summary { display: none; }
.docs-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; margin-bottom: 22px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--muted); }
.docs-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.docs-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.docs-search .icon { width: 15px; height: 15px; }
.docs-nav-group { margin-bottom: 20px; }
.docs-nav-group[hidden] { display: none; }
.docs-nav-link { display: block; padding: 6px 10px; margin: 1px 0; border-radius: 7px; font-size: 14px; color: var(--ink-2); border-left: 2px solid transparent; }
.docs-nav-link[hidden] { display: none; }
.docs-nav-link:hover { color: var(--ink); background: var(--surface-2); }
.docs-nav-link.active { color: var(--ink); font-weight: 500; background: var(--surface); border-left-color: var(--red); border-radius: 0 7px 7px 0; box-shadow: var(--shadow-sm); }

.docs-main { min-width: 0; padding: 40px 48px 96px; }
.docs-article { max-width: 780px; margin: 0 auto; }
.docs-crumb { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.docs-crumb .icon { width: 13px; height: 13px; }
.docs-crumb a:hover { color: var(--ink); }
.docs-article h1 { font-size: clamp(40px, 4.4vw, 56px); line-height: 1.02; font-variation-settings: "SOFT" 100; }
.docs-lede { margin-top: 16px; font-size: 18.5px; line-height: 1.6; color: var(--ink-2); max-width: 680px; }
.docs-section { padding-top: 44px; scroll-margin-top: 88px; }
.docs-section h2 { position: relative; font-size: 28px; letter-spacing: -.02em; margin-bottom: 14px; font-variation-settings: "SOFT" 100; }
.docs-anchor { position: absolute; left: -24px; top: 2px; font-family: var(--mono); font-size: 18px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.docs-section h2:hover .docs-anchor, .docs-anchor:focus-visible { opacity: 1; }
.docs-section h3 { font-family: var(--font); font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 26px 0 8px; }
.docs-section p, .docs-section li { font-size: 15.5px; line-height: 1.72; color: var(--ink-2); }
.docs-section p + p { margin-top: 12px; }
.docs-section ul, .docs-section ol:not(.docs-steps) { padding-left: 20px; margin: 10px 0; }
.docs-section li + li { margin-top: 4px; }
.docs-section a:not(.docs-anchor):not(.docs-card) { color: var(--blue-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue-ink) 35%, transparent); text-underline-offset: 3px; }
.docs-section strong { color: var(--ink); font-weight: 600; }

.docs-code { margin: 16px 0; border-radius: 12px; overflow: hidden; background: #0b0c0e; border: 1px solid rgba(255,255,255,.08); }
.docs-code-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.docs-code-tabs button, .docs-code-tabs span { height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.55); font-family: var(--mono); font-size: 12px; display: inline-flex; align-items: center; }
.docs-code-tabs button:hover { color: #fff; }
.docs-code-tabs button.active { background: rgba(255,255,255,.1); color: #fff; }
.docs-code-panel { position: relative; }
.docs-code-panel pre { margin: 0; padding: 18px 52px 20px 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: #e7e9ec; }
.docs-code-panel code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.docs-code-panel .copy { position: absolute; top: 8px; right: 8px; color: rgba(255,255,255,.55); }
.docs-code-panel .copy:hover { background: rgba(255,255,255,.1); color: #fff; }
.docs-code figcaption { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: rgba(255,255,255,.6); }

.docs-endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.docs-endpoint code { background: none; border: 0; padding: 0; font-size: 14px; color: var(--ink); }
.docs-endpoint .method { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.docs-endpoint .m-post { background: var(--blue-soft); color: var(--blue-ink); }
.docs-endpoint .m-get { background: var(--green-soft); color: var(--green); }
.docs-endpoint .m-delete { background: var(--red-soft); color: var(--red-ink); }
.docs-endpoint-note { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.callout { display: flex; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); border-left: 3px solid var(--blue); background: var(--surface); font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.callout strong { flex-shrink: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-ink); padding-top: 3px; }
.callout.warn { border-left-color: var(--red); }
.callout.warn strong { color: var(--red-ink); }
.callout.tip { border-left-color: var(--green); }
.callout.tip strong { color: var(--green); }
.callout p { font-size: 14.5px !important; }

.docs-table { margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.docs-table td { font-size: 14px; color: var(--ink-2); vertical-align: top; }
.docs-table td:first-child { white-space: nowrap; }

.docs-steps { list-style: none; counter-reset: step; margin: 18px 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.docs-steps li > div { min-width: 0; }
.docs-steps li { counter-increment: step; position: relative; padding: 0 0 22px 46px; border-left: 1px solid var(--line); margin-left: 14px; }
.docs-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.docs-steps li::before { content: counter(step); position: absolute; left: -15px; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; color: var(--ink); }
.docs-steps h4 { margin: 2px 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
.docs-steps .docs-code { margin-bottom: 0; }

.docs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.docs-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 40px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, transform .15s; }
.docs-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.docs-card strong { font-size: 15px; color: var(--ink); }
.docs-card span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.docs-card .icon { position: absolute; right: 14px; top: 16px; width: 16px; color: var(--faint); }

.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.docs-pager a:hover { border-color: var(--line-strong); }
.docs-pager a.next { text-align: right; grid-column: 2; }
.docs-pager small { font-size: 12px; color: var(--muted); }
.docs-pager strong { font-size: 15px; font-weight: 500; color: var(--ink); }

.docs-toc { position: sticky; top: calc(var(--nav-h) + 8px); align-self: start; padding: 36px 20px 24px 8px; display: flex; flex-direction: column; gap: 2px; }
.docs-toc a { padding: 5px 10px; border-left: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.active { color: var(--ink); border-left-color: var(--red); }

@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 248px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: sticky; top: var(--nav-h); z-index: 5; max-height: none; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
  .docs-nav-toggle summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 500; color: var(--ink); }
  .docs-nav-toggle summary::-webkit-details-marker { display: none; }
  .docs-nav-toggle summary span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .docs-nav-toggle[open] summary { margin-bottom: 14px; }
  .docs-nav-toggle[open] nav { max-height: 60vh; overflow-y: auto; }
  .docs-main { padding: 28px 18px 72px; }
  .docs-anchor { display: none; }
  .docs-cards { grid-template-columns: 1fr; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager a.next { grid-column: auto; }
  .docs-endpoint-note { margin-left: 0; width: 100%; }
}

/* Homepage x402 integration sample. */
.integrate-code { position: relative; z-index: 1; }
.integrate-code pre { min-height: 0; font-size: 12.5px; line-height: 1.75; }
.integrate-code .code-tabs button { cursor: default; }
.split-copy code { font-size: .85em; }

.label-short { display: none; }
@media (max-width: 640px) { .label-long { display: none; } .label-short { display: inline; } }

.mining-steps { flex-wrap: wrap; }


@media (max-width: 640px) { .guide-button span { display: none; } .guide-button { padding: 0 9px; } }

/* ============ Homepage visuals ============ */
.viz { position: relative; z-index: 1; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 40px 90px -40px rgba(80, 20, 10, .45); overflow: hidden; }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Scraper shield: before and after, side by side */
.viz-shield { padding: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.shield-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shield-panel { position: relative; height: 430px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background-color: var(--surface); background-image: linear-gradient(color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.shield-panel.off { background-color: color-mix(in srgb, var(--red) 4%, var(--surface)); }
.shield-panel canvas { z-index: 2; }
.shield-status { position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.shield-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.shield-panel.on .shield-status i { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 20%, transparent); }
.shield-gate { position: absolute; left: 0; right: 0; top: 46%; height: 0; z-index: 1; border-top: 2px solid var(--red); box-shadow: 0 0 22px 2px color-mix(in srgb, var(--red) 35%, transparent); }
.shield-gate span { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); padding: 4px 9px; border-radius: 8px; background: var(--red); color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.shield-site { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); font-size: 12px; }
.shield-panel.overloaded .shield-site { animation: site-shake .3s linear infinite; border-color: var(--red); }
@keyframes site-shake { 25% { transform: translate(-1px, 1px); } 75% { transform: translate(1px, -1px); } }
.shield-bar { display: flex; align-items: center; gap: 5px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.shield-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.shield-bar b { margin-left: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-2); }
.shield-row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.shield-row b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.shield-row b.earned { color: var(--muted); }
.shield-panel.on .shield-row b.earned { color: var(--green); }
.shield-load { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.shield-load i { display: block; height: 100%; width: var(--load, 20%); background: var(--green); transition: width .2s, background .3s; }
.shield-panel.overloaded .shield-load i { background: var(--red); }
.shield-spark { display: block; width: 100%; height: 18px; margin-top: -3px; overflow: visible; }
.shield-spark polyline { fill: none; stroke: var(--green); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.shield-panel { container-type: inline-size; }
.shield-gate span { left: auto; right: 10px; transform: translateY(-50%); white-space: nowrap; box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--red) 70%, transparent); }
.shield-gate em { font-style: normal; font-weight: 500; opacity: .85; }
@container (max-width: 300px) { .shield-gate em { display: none; } }
.agent-rig { border: 1px solid rgba(255,255,255,.08); }
.shield-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; padding: 14px 8px 4px; font-size: 12.5px; color: var(--muted); }
.shield-legend span { display: inline-flex; align-items: center; gap: 8px; }
.shield-legend .lg { white-space: nowrap; padding: 2px 7px; border-radius: 6px; font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 600; }
.lg-bot { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.lg-agent { background: var(--blue); color: #fff; }
.lg-work { background: #0b0c0e; color: #ffb37a; }

/* Agent that pays its own way */
.viz-agent { padding: 0; }
.agent-head { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.agent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.agent-head b { font-family: var(--mono); font-weight: 500; }
.agent-head em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.agent-flow { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 20px; min-height: 360px; }
.agent-flow > * { opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .35s, transform .45s cubic-bezier(.3,1.4,.4,1); }
.agent-flow > .on { opacity: 1; transform: none; }
.agent-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.agent-msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.agent-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.agent-msg.bot small { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--green); }
.agent-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.agent-line code { font-size: 12px; }
.agent-line small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.agent-line .tag, .viz .tag { flex-shrink: 0; min-width: 44px; text-align: center; padding: 3px 6px; border-radius: 6px; font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.viz .tag.pay { background: var(--red-soft); border-color: transparent; color: var(--red-ink); }
.viz .tag.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.agent-line.challenge.on { animation: challenge-pop .5s cubic-bezier(.3,1.6,.4,1); }
@keyframes challenge-pop { 40% { transform: scale(1.04); } }
.agent-rig { padding: 12px; border-radius: 12px; background: #0b0c0e; color: #e7e9ec; }
.rig-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.rig-head span { display: inline-flex; align-items: center; gap: 8px; }
.rig-head .icon { width: 16px; height: 16px; color: #ffb37a; }
[data-step="3"] .rig-head .icon { animation: rig-swing .6s ease-in-out infinite; transform-origin: 20% 80%; }
@keyframes rig-swing { 50% { transform: rotate(-24deg); } }
.rig-head b { font-family: var(--mono); font-weight: 500; color: #ffb37a; }
.rig-meter { height: 6px; margin: 10px 0 8px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.rig-meter i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, #ff8a3d, #ff3b30); }
.agent-rig code { display: block; background: none; border: 0; padding: 0; font-size: 11px; letter-spacing: .06em; color: rgba(255,255,255,.4); }
.rig-target { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; font-size: 11.5px; color: rgba(255,255,255,.55); }
.rig-target code { color: #39e58c; }
.rig-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 9px; }
.rig-grid code { padding: 5px 0; border-radius: 5px; text-align: center; background: rgba(255,255,255,.04); overflow: hidden; transition: background .3s, color .3s; }
.rig-grid code.try { color: rgba(255,140,90,.8); background: rgba(255,80,40,.08); }
.rig-grid code.dim { color: rgba(255,255,255,.22); }
.rig-grid code.hit { color: #0b0c0e; background: #39e58c; font-weight: 600; animation: hit-pop .5s cubic-bezier(.3,1.6,.4,1); }
@keyframes hit-pop { from { transform: scale(.7); } }
.rig-foot { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.45); }
.rig-foot b { font-weight: 500; color: #e7e9ec; }
.rig-foot .ok { color: #39e58c; }

/* ── /x402-work: a cat behind a real 402 ─────────────────────────────── */
.xw-hero { max-width: 1180px; margin: 0 auto; padding: 64px 24px 0; display: flex; flex-direction: column; gap: 40px; }
/* Headline on the left, the story on the right; the stage spans below. */
.xw-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "pill pill" "title lede" "title checks"; gap: 16px 56px; align-items: end; }
.xw-copy .hero-pill { grid-area: pill; justify-self: start; }
.xw-copy h1 { grid-area: title; align-self: start; }
.xw-copy .xw-lede { grid-area: lede; }
.xw-copy .checks { grid-area: checks; align-self: start; }
.xw-copy h1 { font-size: clamp(44px, 5.6vw, 80px); line-height: .98; letter-spacing: -.035em; font-weight: 480; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.xw-copy > p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.xw-copy > p b { font-weight: 600; color: var(--red-ink); }
.xw-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); grid-template-areas: "mode ." "frame agent" "bar agent" "caption agent" "again agent"; grid-template-rows: auto auto auto auto 1fr; gap: 10px 14px; align-items: start; padding: 12px; border-radius: 20px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 78%, transparent); box-shadow: 0 40px 90px -40px rgba(80, 20, 10, .45); }
.xw-mode { grid-area: mode; }
.xw-frame { grid-area: frame; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #2a1418; }
.xw-mosaic, .xw-cat { position: absolute; inset: 0; width: 100%; height: 100%; }
.xw-cat { object-fit: cover; image-rendering: pixelated; }
.xw-lock, .xw-mining { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: #fff; transition: opacity .3s, transform .4s cubic-bezier(.3,1.3,.4,1); }
.xw-lock { background: radial-gradient(ellipse at center, rgba(20,6,8,.62), rgba(20,6,8,.18) 70%); }
.xw-lock strong { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -.02em; text-shadow: 0 4px 24px rgba(0,0,0,.35); }
.xw-lock > span:not(.xw-code) { max-width: 340px; font-size: 14.5px; color: rgba(255,255,255,.85); }
.xw-lock .button { margin-top: 8px; }
.xw-lock .button .icon { width: 18px; height: 18px; }
.xw-code { padding: 5px 11px; border-radius: 8px; background: var(--red); font-family: var(--mono); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 25%, transparent), 0 8px 30px -6px var(--red); }
.xw-mining { opacity: 0; pointer-events: none; transform: scale(.96); background: radial-gradient(ellipse at center, rgba(12,4,6,.7), rgba(12,4,6,.25) 70%); }
.xw-stage:not([data-state="locked"]) .xw-lock { opacity: 0; pointer-events: none; transform: scale(1.04); }
.xw-stage[data-state="mining"] .xw-mining, .xw-stage[data-state="found"] .xw-mining, .xw-stage[data-state="verifying"] .xw-mining { opacity: 1; pointer-events: auto; transform: none; }
.xw-ring { position: relative; width: 156px; height: 156px; display: grid; place-items: center; }
.xw-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.xw-ring circle { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 6; }
.xw-ring .xw-ring-fill { stroke: #ffb37a; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .2s linear, stroke .3s; }
.xw-stage[data-state="found"] .xw-ring-fill, .xw-stage[data-state="verifying"] .xw-ring-fill { stroke: #39e58c; }
.xw-stage[data-state="found"] .xw-ring { animation: hit-pop .5s cubic-bezier(.3,1.6,.4,1); }
.xw-ring > div { display: flex; flex-direction: column; align-items: center; }
.xw-ring b { font-family: var(--mono); font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.xw-ring small { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.6); }
.xw-hash { background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12); color: #ffb37a; font-size: 12.5px; letter-spacing: .08em; padding: 4px 10px; border-radius: 7px; }
.xw-stage[data-state="found"] .xw-hash, .xw-stage[data-state="verifying"] .xw-hash { color: #39e58c; border-color: rgba(57,229,140,.4); }
.xw-stage[data-state="found"] [data-xw="stop"], .xw-stage[data-state="verifying"] [data-xw="stop"] { visibility: hidden; }
.xw-bar { grid-area: bar; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 6px; font-size: 13.5px; color: var(--muted); }
.xw-meta { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.xw-caption { grid-area: caption; padding: 0 6px; font-family: var(--display); font-size: 22px; letter-spacing: -.01em; color: var(--ink); }
.xw-again { grid-area: again; padding: 0 6px 4px; }
.xw-again .icon { width: 16px; height: 16px; }
.xw-stage[data-state="unlocked"] .xw-frame { box-shadow: 0 0 0 2px var(--green), 0 0 40px -6px color-mix(in srgb, var(--green) 60%, transparent); transition: box-shadow .5s; }

.xw-log { max-width: 980px; margin: 0 auto; padding: 104px 24px 0; }
.xw-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: xw; }
.xw-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 22px 24px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent); transition: border-color .3s, box-shadow .3s; }
.xw-step h3 { font-size: 22px; margin-bottom: 6px; }
.xw-step p { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 680px; }
.xw-dot { counter-increment: xw; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.xw-dot::before { content: counter(xw); }
.xw-step.active { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 10%, transparent); }
.xw-step.active .xw-dot { background: var(--red); border-color: transparent; color: #fff; animation: pulse 1.6s infinite; }
.xw-step.done .xw-dot { background: var(--green); border-color: transparent; color: #fff; }
.xw-step.done .xw-dot::before { content: "✓"; }
.xw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.xw-facts:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.xw-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.xw-facts dt { color: var(--muted); flex-shrink: 0; }
.xw-facts dd { margin: 0; text-align: right; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.xw-facts dd.ok { color: var(--green); }
.xw-facts code { font-size: 12px; }
.xw-muted { color: var(--muted); }
.xw-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.xw-pill.pay { background: var(--red-soft); color: var(--red-ink); }
.xw-pill.ok { background: var(--green-soft); color: var(--green); }
.xw-site .cta { margin-top: 104px; }

@media (max-width: 900px) {
  /* The cat frame comes straight after the headline, so the button is in reach. */
  .xw-hero { align-items: stretch; gap: 20px; padding-top: 40px; }
  .xw-copy { display: contents; }
  .xw-copy .hero-pill { align-self: flex-start; order: 1; }
  .xw-copy h1 { order: 2; }
  .xw-stage { order: 3; margin: 4px 0 8px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "mode" "frame" "bar" "caption" "again" "agent"; grid-template-rows: none; }
  .xw-agent-log { flex: none; height: 300px; }
  .xw-copy > p { order: 4; }
  .xw-copy .checks { order: 5; }
  .xw-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .xw-hero, .xw-log { padding-left: 16px; padding-right: 16px; }
  .xw-stage { padding: 8px; }
  .xw-step { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 10px; }
  .xw-ring { width: 128px; height: 128px; }
  .xw-lock > span:not(.xw-code) { font-size: 13px; }
  .xw-bar { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .xw-step.active .xw-dot, .xw-stage[data-state="found"] .xw-ring { animation: none; }
  .xw-lock, .xw-mining { transition: none; }
}

/* Agent mode: a switch, and a live transcript under the picture. */
.xw-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.xw-mode button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.xw-mode button .icon { width: 16px; height: 16px; }
.xw-mode button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.xw-mode button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.xw-stage.busy .xw-mode { opacity: .55; pointer-events: none; }
.xw-agent { grid-area: agent; align-self: stretch; display: flex; flex-direction: column; min-height: 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.xw-stage[data-mode="self"] .xw-agent-head .agent-dot { background: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.xw-agent-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.xw-agent-head b { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.xw-agent-head em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.xw-agent-log { list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; height: 0; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.xw-a-empty { margin: auto; font-size: 13px; color: var(--faint); }
.xw-a { flex-shrink: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); animation: xw-line .35s cubic-bezier(.3,1.3,.4,1); }
@keyframes xw-line { from { opacity: 0; transform: translateY(6px); } }
.xw-a code { font-size: 12px; }
.xw-a-user { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: var(--on-accent); }
.xw-a-call, .xw-a-reply { font-family: var(--mono); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.xw-a-reply { color: var(--muted); }
.xw-arrow { color: var(--faint); }
.xw-a-think, .xw-a-work { padding-left: 10px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.xw-a-work { border-left-color: #ff8a3d; }
.xw-a-work b { font-family: var(--mono); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.xw-a-work.ok { border-left-color: var(--green); }
.xw-a-done { align-self: flex-start; max-width: 90%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.xw-a-done small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--green); }

/* Not just for websites. */
.xw-uses { max-width: 1180px; margin: 0 auto; padding: 104px 24px 0; }
.xw-uses-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.xw-use { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 84%, transparent); }
.xw-use h3 { font-size: 21px; margin-top: 4px; }
.xw-use p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.xw-use .text-link { margin-top: auto; font-size: 14px; }
.xw-req { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xw-req code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.xw-method { flex-shrink: 0; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.xw-flow { display: flex; align-items: center; gap: 6px; }
.xw-flow i { padding: 2px 7px; border-radius: 6px; font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--faint); transition: background .3s, color .3s, transform .3s cubic-bezier(.3,1.6,.4,1); }
.xw-flow span { flex: 1; max-width: 40px; height: 1px; background: var(--line-strong); }
.played .xw-flow .f402 { background: var(--red-soft); color: var(--red-ink); transition-delay: calc(var(--d) + .1s); }
.played .xw-flow .fwork { background: #0b0c0e; color: #ffb37a; transition-delay: calc(var(--d) + .5s); }
.played .xw-flow .f200 { background: var(--green-soft); color: var(--green); transform: scale(1.08); transition-delay: calc(var(--d) + .9s); }
.xw-use[data-i="0"] { --d: 0s; } .xw-use[data-i="1"] { --d: .15s; } .xw-use[data-i="2"] { --d: .3s; }
.xw-use[data-i="3"] { --d: .45s; } .xw-use[data-i="4"] { --d: .6s; } .xw-use[data-i="5"] { --d: .75s; }
@media (max-width: 900px) { .xw-uses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .xw-uses { padding-left: 16px; padding-right: 16px; }
  .xw-uses-grid { grid-template-columns: minmax(0, 1fr); }
  .xw-agent-head em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .xw-a { animation: none; }
  .xw-flow i { transition: none; }
}

/* Keep the expanded global nav clear of the brand and account controls. */
@media(min-width:1241px) and (max-width:1440px) { .site-nav-inner { gap: 16px; } .site-nav .label-long { display:none; } .site-nav .label-short { display:inline; } }



/* One persistent global navigation across the website and console. */
.site-links { min-width:0; }
.site-links > a { flex-shrink:0; }
.console-topbar .topbar-slash,.console-topbar .workspace-name,.console-topbar > .row > .badge { display:none; }
@media(max-width:1240px) {
  :root { --nav-h:112px; }
  .site-nav-inner,.console-topbar { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:64px 48px; column-gap:16px; row-gap:0; }
  .site-nav-inner > .brand,.console-topbar > .row { grid-row:1; grid-column:1; }
  .site-actions,.console-topbar .top-controls { grid-row:1; grid-column:2; }
  .site-nav .site-links,.console-topbar .site-links { display:flex; grid-row:2; grid-column:1 / -1; align-self:stretch; align-items:center; justify-content:flex-start; gap:4px; padding:2px 0; border-top:1px solid var(--line); overflow-x:auto; scrollbar-width:thin; scroll-padding-inline:10px; }
  .site-nav .site-links a,.console-topbar .site-links a { font-size:16px; }
  .site-nav.menu-open .site-links { max-height:calc(100svh - var(--nav-h) - 16px); overflow-y:auto; }
  .console-topbar .sidebar-explore { display:block; }
}
@media(max-width:600px) {
  .console-topbar { column-gap:8px; }
  .console-topbar > .row { gap:7px; }
  .console-topbar .brand { gap:6px; }
  .console-topbar .brand-word { font-size:17px; gap:4px; }
  .console-topbar .brand-mark { width:22px; height:22px; }
}
@media(max-width:360px) { .console-topbar .brand-word { font-size:16px; } }




/* ============ x402 Work ============ */
body { background: var(--bg); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 12px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--ink); z-index: 300; }
.skip-link:focus { top: 12px; }
.initial-loading { min-height: 100vh; display: grid; place-items: center; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; background: var(--ink); color: var(--bg); font: 13px var(--mono); transition: opacity .2s, transform .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.button { border-radius: var(--r-sm); font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; box-shadow: none !important; }
.market-card:hover { transform: none; box-shadow: none; border-color: var(--tone); }
.button.ink, .button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button.white { background: var(--bg); color: var(--ink); border: 1px solid var(--ink); }
.button.on-dark { color: var(--bg); border: 1px solid currentColor; background: transparent; }
.text-link { font-family: var(--mono); font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; gap: 6px; }
code, pre { font-family: var(--mono); }
.x-muted { color: var(--muted); }

/* The mark is the status code in a box. */
.x-brand { gap: 10px; color: var(--ink); text-decoration: none; }
.x-mark { display: inline-grid; place-items: center; height: 26px; padding: 0 6px; border: 1.5px solid currentColor; font: 700 13px/1 var(--mono); letter-spacing: .02em; }
.x-word { font: 600 17px/1 var(--mono); letter-spacing: -.02em; }
.initial-loading .x-mark { height: 44px; padding: 0 10px; font-size: 22px; animation: x-blink 1.2s steps(2) infinite; }
@keyframes x-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .initial-loading .x-mark { animation: none; } }

/* Navigation: a rule under the bar, no glass. */
.site-nav.x-nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.x-nav .site-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.x-nav .site-links { display: flex; align-items: center; gap: 4px; font: 500 14px var(--mono); }
.x-nav .site-links a { padding: 8px 12px; color: var(--muted); text-decoration: none; border-radius: 0; background: none; }
.x-nav .site-links a:hover, .x-nav .site-links a.active { color: var(--ink); }
.x-nav .site-links a.active::after { left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 0; background: var(--ink); }
.x-nav .site-links .x-demo-link.active { background: var(--ink); color: var(--bg); }
.x-nav .site-links .x-demo-link.active::after { display: none; }
.x-nav .site-links .x-demo-link { margin-left: 8px; border: 1px solid var(--ink); color: var(--ink); padding: 7px 12px; }
.x-nav .site-links .x-demo-link:hover { background: var(--ink); color: var(--bg); }
.x-nav .site-actions { display: flex; align-items: center; gap: 8px; }
.x-nav .site-menu { display: none; }

/* Hero: the headline on the left, a live HTTP exchange on the right. */
.x-site main { display: block; }
.x-hero { max-width: 1200px; margin: 0 auto; padding: 96px 24px 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.x-hero h1 { margin: 0; font-size: clamp(40px, 4.7vw, 68px); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.x-lede { margin: 28px 0 0; max-width: 34em; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.x-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.x-trace { margin: 0; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); min-width: 0; }
.x-trace-bar { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); font: 12px var(--mono); opacity: .75; }
.x-trace-body { margin: 0; padding: 18px 16px 22px; min-height: 400px; font: 13px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; overflow: hidden; }
.x-trace .t-req { opacity: .72; }
.x-trace .t-402, .x-trace .t-200 { font-weight: 700; opacity: 1; }
.x-trace .t-work { font-weight: 500; }
:root[data-theme="dark"] .x-trace { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
:root[data-theme="dark"] .x-trace-bar { border-bottom-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .x-trace { background: var(--bg); color: var(--ink); border-color: var(--line-strong); } :root:not([data-theme="light"]) .x-trace-bar { border-bottom-color: var(--line); } }

/* Live numbers, set between rules. */
.x-numbers { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.x-number { display: flex; flex-direction: column; gap: 6px; padding: 28px 24px 28px 0; color: var(--ink); text-decoration: none; }
.x-number + .x-number { padding-left: 24px; border-left: 1px solid var(--line); }
.x-number b { font: 600 36px/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.x-number span { font-size: 14px; color: var(--muted); }
a.x-number:hover b { text-decoration: underline; text-underline-offset: 6px; }

/* Sections: a heading column and the content, separated by rules. */
.x-section { max-width: 1200px; margin: 0 auto; padding: 96px 24px; border-bottom: 1px solid var(--line); }
.x-head { max-width: 720px; margin-bottom: 40px; }
.x-head h2 { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -.035em; }
.x-head p { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.x-more { margin: 32px 0 0; }
.x-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
.x-steps li { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.x-steps li + li { border-left: 1px solid var(--ink); }
.x-step-n { font: 500 13px var(--mono); color: var(--muted); }
.x-steps h3 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.x-steps code { font-size: 12.5px; padding: 6px 8px; background: var(--surface-2); overflow-wrap: anywhere; }
.x-steps p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.x-table-wrap { overflow-x: auto; border: 1px solid var(--ink); }
.x-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.x-table th, .x-table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.x-table tbody tr:last-child > * { border-bottom: 0; }
.x-table thead th { font: 600 15px var(--mono); border-bottom: 1px solid var(--ink); }
.x-table thead small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.x-table tbody th { font: 500 14px var(--mono); color: var(--muted); width: 26%; }
.x-table td:last-child { font-weight: 600; }
#compare .x-table td:nth-child(2) { color: var(--muted); }
.x-why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.x-why article { padding: 28px 32px 32px 0; border-bottom: 1px solid var(--line); }
.x-why article:nth-child(2n) { padding-left: 32px; border-left: 1px solid var(--line); }
.x-why h3 { margin: 0 0 10px; font-size: 22px; letter-spacing: -.02em; }
.x-why p { margin: 0; color: var(--ink-2); line-height: 1.6; max-width: 36em; }
.x-split .viz-shield { margin-top: 8px; }
.x-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); }
.x-service { display: flex; flex-direction: column; gap: 10px; padding: 22px; min-height: 220px; color: var(--ink); text-decoration: none; }
.x-service + .x-service { border-left: 1px solid var(--line); }
.x-service:first-child { background: var(--ink); color: var(--bg); }
.x-service:first-child .x-service-top, .x-service:first-child .x-service-sum { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.x-service-top { display: flex; justify-content: space-between; gap: 8px; font: 12px var(--mono); color: var(--muted); }
.x-service strong { font: 600 22px/1.15 var(--mono); letter-spacing: -.03em; }
.x-service-sum { font-size: 14px; line-height: 1.5; color: var(--muted); flex: 1; }
.x-service-price { font: 12.5px var(--mono); }
.x-service:hover strong { text-decoration: underline; text-underline-offset: 5px; }
.x-code-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.x-code-pair figure { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.x-code-pair figcaption { font: 600 14px var(--mono); }
.x-code-pair pre { margin: 0; padding: 20px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 13px; line-height: 1.6; overflow-x: auto; flex: 1; }
.x-invert { background: var(--ink); color: var(--bg); }
.x-invert-inner { max-width: 1200px; margin: 0 auto; padding: 112px 24px; }
.x-invert h2 { margin: 0; font-size: clamp(36px, 5.4vw, 72px); line-height: 1; letter-spacing: -.045em; max-width: 14em; }
.x-invert p { margin: 20px 0 32px; font-size: 18px; max-width: 34em; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.x-invert .button.white { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* Footer */
.site-footer.x-footer { border-top: 1px solid var(--line); background: var(--bg); }
.x-footer .site-footer-inner { max-width: 1200px; margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.x-footer h4 { margin: 0 0 12px; font: 600 13px var(--mono); }
.x-footer nav a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: 14px; }
.x-footer nav a:hover { color: var(--ink); }
.x-footer .footer-brand p { margin: 14px 0 0; color: var(--muted); max-width: 28em; font-size: 14px; line-height: 1.6; }
.x-footer .site-footer-base { max-width: 1200px; margin: 0 auto; padding: 18px 24px 40px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font: 12.5px var(--mono); color: var(--muted); }
.x-footer .site-footer-base a { color: inherit; }

/* Statistics */
.x-page { max-width: 1200px; margin: 0 auto; padding: 56px 24px 96px; }
.x-page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.x-page-head h1 { margin: 0; font-size: clamp(40px, 5vw, 64px); letter-spacing: -.045em; line-height: 1; }
.x-ranges { display: inline-flex; border: 1px solid var(--ink); }
.x-ranges button { appearance: none; border: 0; background: none; color: var(--ink); padding: 8px 14px; font: 500 13px var(--mono); cursor: pointer; }
.x-ranges button + button { border-left: 1px solid var(--ink); }
.x-ranges button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.x-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.x-tiles div { padding: 32px 24px 32px 0; display: flex; flex-direction: column; gap: 8px; }
.x-tiles div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.x-tiles b { font: 600 44px/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.x-tiles span { color: var(--muted); font-size: 14px; }
.x-panel { padding: 40px 0; border-bottom: 1px solid var(--line); }
.x-panel h2 { margin: 0 0 6px; font-size: 24px; }
.x-panel > p { margin: 0 0 20px; }
.x-chart { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.x-chart svg { width: 100%; height: 220px; border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.x-chart .hit { fill: transparent; }
.x-chart .b-site, .x-legend .b-site { fill: var(--ink); background: var(--ink); }
.x-chart .b-hf, .x-legend .b-hf { fill: var(--faint); background: var(--faint); }
.x-chart-y { display: flex; flex-direction: column; justify-content: space-between; font: 12px var(--mono); color: var(--muted); text-align: right; }
.x-chart-x { grid-column: 2; display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); }
.x-legend { grid-column: 2; display: flex; gap: 20px; font: 12.5px var(--mono); color: var(--muted); }
.x-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.x-rank td:first-child { width: 48px; font-family: var(--mono); color: var(--muted); }
.x-rank tbody th { font: 600 15px var(--font); color: var(--ink); width: auto; }
.x-rank a { color: inherit; }
.x-hf { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 24px; align-items: center; }
.x-hf dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.x-hf dt { font-size: 13px; color: var(--muted); }
.x-hf dd { margin: 4px 0 0; font: 600 28px var(--mono); letter-spacing: -.03em; }
.x-fine { margin: 24px 0 0; font-size: 13px; color: var(--muted); max-width: 60em; }
.x-empty { padding: 64px 0; }

/* The shared component styles assume the old palette; flatten them to ink and paper. */
.market-site, .xw-site, .docs-shell { background: var(--bg); }
.market-card, .market-box, .market-panel, .xw-stage, .docs-code, .callout { border-radius: var(--r) !important; box-shadow: none !important; }
.hero-pill { border-radius: 0; font-family: var(--mono); }
.cta { background: var(--ink); color: var(--bg); border-radius: 0; }
.cta h2 { color: var(--bg); text-shadow: none; font-weight: 700; }

/* Phones */
@media (max-width: 960px) {
  .x-hero { grid-template-columns: 1fr; padding-top: 56px; gap: 40px; }
  .x-trace-body { min-height: 0; }
  .x-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-steps li:nth-child(3) { border-left: 0; }
  .x-steps li:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .x-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-service:nth-child(3) { border-left: 0; }
  .x-service:nth-child(n+3) { border-top: 1px solid var(--line); }
  .x-code-pair, .x-why { grid-template-columns: 1fr; }
  .x-why article:nth-child(2n) { padding-left: 0; border-left: 0; }
  .x-numbers, .x-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x-number:nth-child(3), .x-tiles div:nth-child(3) { padding-left: 0; border-left: 0; }
  .x-number:nth-child(n+3), .x-tiles div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .x-hf { grid-template-columns: 1fr; }
  .x-footer .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .x-nav .site-menu { display: inline-flex; }
  .x-nav .site-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .x-nav.menu-open .site-links { display: flex; }
  .x-nav .site-links .x-demo-link { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 560px) {
  .x-section { padding: 64px 16px; }
  .x-hero, .x-page, .x-numbers, .x-invert-inner, .x-nav .site-nav-inner { padding-left: 16px; padding-right: 16px; }
  .x-steps, .x-services { grid-template-columns: 1fr; }
  .x-steps li + li, .x-service + .x-service { border-left: 0; border-top: 1px solid var(--line); }
  .x-steps li + li { border-top-color: var(--ink); }
  .x-trace-body { font-size: 11.5px; }
  .x-number b, .x-tiles b { font-size: 28px; }
  .x-footer .site-footer-inner { grid-template-columns: 1fr; }
}

/* Docs tables */
.table-wrap { overflow-x: auto; }
.docs-table { border: 1px solid var(--ink); border-radius: 0; }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.docs-table th, .docs-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.docs-table tbody tr:last-child td { border-bottom: 0; }
.docs-table thead th { font: 600 13px var(--mono); border-bottom: 1px solid var(--ink); }
.docs-table td:first-child code { background: none; border: 0; padding: 0; font-weight: 500; white-space: nowrap; }

/* Signal colours in the exchange: 402 red, work amber, 200 green. The transcript is always on black. */
.x-trace .t-402 { color: #ff6b6f; }
.x-trace .t-200 { color: #3ddc84; }
.x-trace .t-work { color: #ffb224; }
.x-steps li:nth-child(2) h3 { color: var(--red); }
.x-steps li:nth-child(3) h3 { color: var(--amber); }
.x-steps li:nth-child(4) h3 { color: var(--green); }
.x-steps li:nth-child(2) code { background: var(--red-soft); }
.x-steps li:nth-child(3) code { background: var(--amber-soft); }
.x-steps li:nth-child(4) code { background: var(--green-soft); }
#compare .x-table td:last-child { color: var(--ink); }
/* Category colours on the homepage service cards, matching the marketplace. */
.x-service { --tone: var(--muted); }
.x-service.cat-ai { --tone: var(--blue); } .x-service.cat-tools { --tone: var(--green); } .x-service.cat-data { --tone: var(--violet); } .x-service.cat-content { --tone: var(--red); } .x-service.cat-other { --tone: var(--amber); }
.x-service-top span:first-child { color: var(--tone); font-weight: 600; }
.x-service { box-shadow: inset 0 3px 0 var(--tone); }
.x-service:first-child .x-service-top span:first-child { color: color-mix(in srgb, var(--tone) 55%, var(--bg)); }
/* Statistics */
.x-chart .b-hf, .x-legend .b-hf { fill: var(--blue); background: var(--blue); }
.x-chart .b-site, .x-legend .b-site { fill: var(--green); background: var(--green); }
.x-dot { display: inline-flex; align-items: center; gap: 8px; }
.x-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.x-dot.available::before, .x-dot.external::before, .x-dot.limited::before { background: var(--green); }
.x-dot.demo::before { background: var(--amber); }
.x-tiles div:nth-child(2) b { color: var(--blue); }
.x-tiles div:nth-child(3) b { color: var(--green); }

/* The work meter is work, so amber. */
.market-meter[data-level="1"] i:nth-child(-n+1), .market-meter[data-level="2"] i:nth-child(-n+2), .market-meter[data-level="3"] i:nth-child(-n+3), .market-meter[data-level="4"] i:nth-child(-n+4), .market-meter[data-level="5"] i { background: var(--amber); }

/* Integrate callout: the install line, then paying and charging side by side. */
.x-install { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; padding: 12px 12px 12px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-family: var(--mono); }
.x-install span { font-size: 12px; opacity: .6; }
.x-install code { flex: 1; min-width: 0; font-size: 14px; overflow-x: auto; white-space: nowrap; }
.x-install .icon-button { color: var(--bg); }
.x-install .icon-button:hover { background: color-mix(in srgb, var(--bg) 15%, transparent); color: var(--bg); }
.x-integrate .x-code-pair figcaption { display: flex; flex-direction: column; gap: 2px; }
.x-integrate .x-code-pair figcaption b { font: 600 18px var(--mono); letter-spacing: -.02em; }
.x-integrate .x-code-pair figcaption span { font: 400 14px var(--font); color: var(--muted); }
.x-integrate .x-code-pair figure:first-child pre { box-shadow: inset 3px 0 0 var(--amber); }
.x-integrate .x-code-pair figure:last-child pre { box-shadow: inset 3px 0 0 var(--green); }
.x-integrate .x-code-pair .button { align-self: flex-start; }
