/* Quai Compute — cypherpunk design system.
   Cool whites and ink black, with signal red, electric blue and terminal green used sparingly.
   Type: Fraunces for headlines, Geist for text, Geist Mono for labels, code and the ASCII layer. */

:root {
  --bg: #f4f5f6;
  --bg-subtle: #eef0f2;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --line: #e1e4e8;
  --line-strong: #cbd0d6;
  --ink: #0a0b0d;
  --ink-2: #2f333a;
  --muted: #61676f;
  --faint: #959aa3;
  --accent: #0a0b0d;
  --accent-hover: #24272c;
  --on-accent: #ffffff;
  --blue: #2156ff;
  --blue-soft: #e8eeff;
  --blue-ink: #1b45d6;
  --red: #ff3b30;
  --red-soft: #ffeceb;
  --red-ink: #c4231a;
  --green: #0f8c55;
  --green-soft: #e2f6ec;
  --danger: #c4231a;
  --night: #050607;
  --night-2: #0b0c0e;
  --night-line: rgba(255, 255, 255, .1);
  --chart: #2156ff;
  --chart-2: #0f8c55;
  --shadow-sm: 0 1px 2px rgba(10, 11, 13, .05);
  --shadow-md: 0 14px 34px -16px rgba(10, 11, 13, .25);
  --shadow-lg: 0 50px 100px -30px rgba(0, 0, 0, .65);
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --nav-h: 64px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050607; --bg-subtle: #08090b; --surface: #0d0e11; --surface-2: #131519;
    --line: #1d2025; --line-strong: #2b2f36; --ink: #f2f3f5; --ink-2: #c4c8cf; --muted: #8b9199; --faint: #5c626b;
    --accent: #f2f3f5; --accent-hover: #ffffff; --on-accent: #0a0b0d;
    --blue: #4c8dff; --blue-soft: #101a33; --blue-ink: #8fb0ff; --red-soft: #2a0f0d; --red-ink: #ff6a60;
    --green: #39e58c; --green-soft: #0b2418; --danger: #ff6a60; --chart: #4c8dff; --chart-2: #39e58c;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 14px 34px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #050607; --bg-subtle: #08090b; --surface: #0d0e11; --surface-2: #131519;
  --line: #1d2025; --line-strong: #2b2f36; --ink: #f2f3f5; --ink-2: #c4c8cf; --muted: #8b9199; --faint: #5c626b;
  --accent: #f2f3f5; --accent-hover: #ffffff; --on-accent: #0a0b0d;
  --blue: #4c8dff; --blue-soft: #101a33; --blue-ink: #8fb0ff; --red-soft: #2a0f0d; --red-ink: #ff6a60;
  --green: #39e58c; --green-soft: #0b2418; --danger: #ff6a60; --chart: #4c8dff; --chart-2: #39e58c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 14px 34px -16px rgba(0,0,0,.7);
  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 { padding: 120px 24px; text-align: center; color: var(--muted); }
.skip-link { position: fixed; top: -80px; left: 12px; padding: 10px 14px; background: var(--surface); border-radius: var(--r-sm); z-index: 300; box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }
.garden-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* 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: 26px; height: 26px; color: var(--ink); flex-shrink: 0; }
.brand-mark .tail { fill: var(--red); }
.brand:hover .brand-mark rect:not(.tail) { animation: cell-glint .9s ease-out; }
.brand-mark rect:nth-child(3n) { animation-delay: .08s; } .brand-mark rect:nth-child(3n+1) { animation-delay: .16s; }
@keyframes cell-glint { 40% { fill: var(--blue); } }
.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); }

/* ============ Console ============ */
.console-topbar { position: sticky; top: 0; z-index: 40; height: var(--nav-h); padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar-slash { color: var(--line-strong); font-size: 22px; font-weight: 300; margin: 0 2px; }
.workspace-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.top-controls { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; margin: 0 4px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 500; color: #0d1512; background: linear-gradient(135deg, #eef0f3, #c3c9d2); }
.mobile-menu { display: none; }
.divider { width: 1px; height: 20px; background: var(--line); }

.console-layout { display: grid; grid-template-columns: 252px 1fr; min-height: calc(100vh - var(--nav-h)); }
.sidebar { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 22px 12px; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 22px; }
.nav-label { padding: 0 10px 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); border: 1px solid transparent; }
.side-link .icon { width: 17px; height: 17px; color: var(--faint); }
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link.active { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-sm); }
.side-link.active .icon { color: var(--blue-ink); }
.nav-tag { margin-left: auto; font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--red-soft); color: var(--red-ink); }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.network-status { padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; }
.network-status p { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.mobile-backdrop { display: none; }

.console-main { background: var(--bg-subtle); min-width: 0; }
.console-content { max-width: 1200px; margin: 0 auto; padding: 24px 36px 40px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb .icon { width: 14px; height: 14px; }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.page-title { margin-bottom: 26px; align-items: flex-end; flex-wrap: wrap; }
.page-title h1 { font-size: 44px; letter-spacing: -.03em; }
.page-title p { margin-top: 8px; color: var(--muted); }
.title-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key-select, .search-input, .field input, .field select, .field textarea { height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; min-width: 0; }
.key-select { padding-right: 32px; max-width: 240px; }
.key-select:focus, .search-input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-ink) 20%, transparent); }
.environment-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding: 12px 16px; border-radius: var(--r); background: var(--blue-soft); color: var(--blue-ink); font-size: 14px; font-weight: 500; }
.environment-notice .text-link { margin-left: auto; color: var(--blue-ink); }
.info-box { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--font); font-weight: 500; font-size: 15px; letter-spacing: -.01em; line-height: 1.3; }
.panel-head > .icon { color: var(--faint); }
.panel-body { padding: 20px; }
.section-title { margin: 40px 0 16px; }
.section-title h2 { font-size: 28px; letter-spacing: -.02em; }
.section-title p { color: var(--muted); margin-top: 4px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel .stat-card { box-shadow: none; background: var(--surface-2); }
.stat-card > .between > .icon { color: var(--faint); width: 16px; }
.stat-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat-name .icon { width: 15px; height: 15px; }
.stat-value { margin-top: 14px; font-family: var(--display); font-size: 42px; font-weight: 450; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.stat-value small { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.stat-foot { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stat-foot .icon { width: 14px; height: 14px; }
.stat-foot strong { color: var(--blue-ink); font-weight: 500; }

.overview-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; color: var(--muted); }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.chart-meta { display: flex; gap: 36px; margin-bottom: 18px; }
.chart-meta span { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.chart-meta b { font-family: var(--display); font-size: 30px; color: var(--ink); font-weight: 450; letter-spacing: -.02em; }
.chart { display: grid; grid-template-columns: 56px 1fr; height: 220px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--faint); padding-bottom: 24px; }
.chart-plot { position: relative; }
.chart-lines { position: absolute; inset: 0 0 24px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-lines span { border-top: 1px dashed var(--line); }
.chart-bars { position: absolute; inset: 0 0 24px; display: flex; align-items: flex-end; gap: 6px; }
.bar-pair { flex: 1; height: 100%; }
.bar-pair svg { width: 100%; height: 100%; display: block; }
.bar-pair rect { fill: var(--chart); opacity: .85; }
.bar-pair:hover rect { opacity: 1; }
.bar-pair:last-child rect { fill: var(--chart-2); }
.chart-empty { position: absolute; inset: 0 0 24px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.chart-dates { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.chart-legend { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; color: var(--muted); }
.legend-square { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--chart); margin-right: 6px; vertical-align: -1px; }

.quick-step { display: flex; gap: 14px; padding: 12px 0; }
.quick-step + .quick-step { border-top: 1px solid var(--line); }
.quick-step h3 { font-size: 15px; letter-spacing: 0; font-family: var(--font); font-weight: 500; }
.quick-step p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.quick-step a { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--blue-ink); }
.quick-step a .icon { width: 14px; height: 14px; }
.step-number { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); }
.step-number.complete { background: var(--green); border-color: var(--green); color: #fff; }
.step-number .icon { width: 14px; height: 14px; stroke-width: 2.6; }

.funding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.funding-card { overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.funding-media { height: 150px; background: var(--night); overflow: hidden; }
.funding-media img { width: 100%; height: 100%; object-fit: cover; }
.funding-copy { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.funding-copy h3 { font-size: 21px; }
.funding-copy p { font-size: 13.5px; color: var(--muted); flex: 1; }
.funding-copy .text-link { font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 11px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.mono { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .badge { margin-top: 4px; }
.table-primary { display: flex; align-items: center; gap: 12px; }
.table-primary small { display: block; font-size: 12px; color: var(--faint); font-family: var(--mono); }
.table-primary .icon-box { width: 32px; height: 32px; border-radius: 8px; }
.table-primary .icon-box .icon { width: 16px; height: 16px; }

.detail-list { margin: 0; display: grid; }
.detail-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 14px; }
.detail-list dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field small { font-size: 12px; color: var(--muted); }
.field input[type="range"] { padding: 0; height: auto; border: 0; box-shadow: none; accent-color: var(--blue-ink); }
.form-error { color: var(--danger); font-size: 13px; }
.form-error:not(:empty) { margin: 4px 0 12px; }

.allowance { position: relative; margin: 8px 0 16px; padding: 22px; border-radius: var(--r-lg); color: #fff; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #13203f, #050607 70%); }
.allowance .eyebrow { color: rgba(255,255,255,.7); }
.allowance .value { font-family: var(--display); font-size: 52px; font-weight: 450; letter-spacing: -.03em; margin-top: 6px; }
.allowance p { color: rgba(255,255,255,.75); font-size: 14px; }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.flow > div { padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.flow b { font-family: var(--mono); color: var(--blue-ink); font-size: 12px; font-weight: 500; }
.flow h3 { font-size: 18px; margin-top: 8px; }
.flow p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.models-toolbar { margin-bottom: 16px; }
.search-input { width: min(420px, 100%); }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.model-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.model-card h3 { font-size: 22px; }
.model-card p { font-size: 13.5px; color: var(--muted); }
.model-card .button { align-self: flex-start; margin-top: 4px; }
.model-symbol { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef0f3, #c3c9d2); color: #0d1512; }
.model-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; }
.model-prices span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.model-prices b { font-size: 15px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.playground { display: flex; flex-direction: column; overflow: hidden; }
.chat-log { height: min(56vh, 560px); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.chat-message { max-width: 78%; padding: 12px 16px; border-radius: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.chat-message.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat-message.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.speaker { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; color: var(--blue-ink); margin-bottom: 4px; }
.chat-empty { margin: auto; text-align: center; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chat-garden { position: relative; inset: auto; width: 320px; height: 150px; margin-bottom: 4px; }
.chat-empty h2 { font-size: 34px; }
.chat-empty p { color: var(--muted); font-size: 14px; }
.chat-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.chat-composer { display: flex; gap: 10px; align-items: flex-end; margin: 0 16px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.chat-composer:focus-within { border-color: var(--blue-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-ink) 16%, transparent); }
.chat-composer textarea { flex: 1; min-height: 44px; max-height: 200px; resize: vertical; border: 0; outline: none; background: transparent; padding: 10px 8px; font-size: 14.5px; }
.chat-composer .button { width: 42px; height: 42px; padding: 0; border-radius: 10px; }
.chat-disclaimer { text-align: center; font-size: 12px; color: var(--faint); padding: 10px 16px 16px; }

.docs-section { padding: 24px 4px; border-top: 1px solid var(--line); max-width: 760px; }
.docs-section:first-child { border-top: 0; padding-top: 4px; }
.docs-section h2 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 8px; }
.docs-section p { color: var(--ink-2); }
.code-block { position: relative; margin-top: 14px; }
.code-block pre, pre.secret { margin: 0; padding: 18px 52px 18px 18px; border-radius: var(--r); overflow-x: auto; background: var(--night); color: #dfe6e2; font-size: 13px; line-height: 1.7; border: 1px solid var(--night-line); }
pre.secret { padding-right: 18px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0; }
.code-block .copy { position: absolute; top: 8px; right: 8px; color: rgba(255,255,255,.6); }
.code-block .copy:hover { background: rgba(255,255,255,.1); color: #fff; }

.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .icon-box { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px; }
.empty h3 { font-size: 22px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 380px; }
.empty .button { margin-top: 8px; }

.footer-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--faint); }
.footer-note a { display: inline-flex; align-items: center; gap: 6px; }
.footer-note a:hover { color: var(--ink); }
.footer-note .icon { width: 14px; height: 14px; }

/* Auth */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; justify-content: center; }
.auth-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 64px; }
.auth-card h1 { font-size: 48px;  margin-bottom: 28px; }
.auth-card > p { color: var(--muted); margin: 12px 0 30px; }
.auth-card form .button { width: 100%; margin-top: 4px; }
.auth-card > .button { width: 100%; }
.auth-switch { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-art { position: relative; margin: 12px; border-radius: var(--r-sm); overflow: hidden; background: var(--night); isolation: isolate; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(5,6,7,.88)); z-index: 1; }
.auth-art .garden-canvas { z-index: 0; }
.auth-art-copy { position: absolute; left: 40px; right: 40px; bottom: 40px; z-index: 2; color: #fff; }
.auth-art-copy h2 { font-size: 44px; margin-top: 14px; }
.auth-art-copy p { margin-top: 10px; color: rgba(255,255,255,.75); max-width: 420px; }

/* 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); }

/* Native coin checkout */
.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: var(--blue-soft); color: var(--blue-ink); font-weight: 700; font-size: 20px; flex-shrink: 0; }
.coin-icon.qi { background: var(--blue-soft); color: var(--blue-ink); font-size: 16px; }
.asset-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.asset-choice { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); display: flex; align-items: center; gap: 10px; text-align: left; padding: 14px 12px; cursor: pointer; min-width: 0; }
.asset-choice.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.asset-choice strong { display: block; font-size: 14px; font-weight: 500; }
.asset-choice small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.choice-dot { margin-left: auto; width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 50%; flex-shrink: 0; }
.selected .choice-dot { border: 4px solid var(--ink); }
.payment-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.payment-presets .selected { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.payment-total { display: flex; justify-content: space-between; font-size: 14px; 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: var(--r-lg); text-align: center; padding: 24px 12px; margin-top: 22px; }
.payment-summary.paid { background: var(--green-soft); border-color: transparent; }
.payment-amount { font-family: var(--display); font-size: 40px; font-weight: 450; letter-spacing: -.03em; margin: 8px 0; overflow-wrap: anywhere; }
.payment-amount span { font-family: var(--font); font-size: 16px; letter-spacing: 0; margin-left: 8px; color: var(--muted); }
.payment-summary p { font-size: 13px; color: var(--muted); }
.payment-status { display: flex; gap: 9px; align-items: center; font-size: 14px; 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-family: var(--mono); font-size: 11px; color: var(--faint); }
.payment-steps span { border-bottom: 2px solid var(--line); padding: 8px 0; flex: 1; }
.payment-steps .done { color: var(--green); border-color: var(--green); }
.payment-steps .current { color: var(--blue-ink); border-color: var(--blue); }
.invoice-reference { display: grid; gap: 5px; font-size: 11px; color: var(--faint); }
.invoice-reference code { overflow-wrap: anywhere; }
.payment-history { border-top: 1px solid var(--line); padding-top: 20px; }
.payment-history h3 { padding: 0 20px 12px; font-size: 17px; }
.payment-history td small { display: block; font-size: 11px; margin-top: 4px; }
.payment-history td { font-size: 13px; }
.payment-explainer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 0; font-size: 13px; }
.payment-explainer span { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; }
.payment-explainer .icon { width: 14px; flex-shrink: 0; color: var(--faint); }
#payment-destination { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }

/* ============ Public website ============ */
.site { 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: -1; pointer-events: none; }
.sky-wash img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; opacity: .55; }
.sky-wash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 40%, transparent), color-mix(in srgb, var(--bg) 72%, transparent)); }
.page-field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.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: 1fr auto 1fr; align-items: center; gap: 24px; }
.site-links { display: flex; gap: 4px; }
.site-links a { position: relative; padding: 8px 14px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.site-links a.active { color: var(--ink); }
.site-links a.active::after { content: ""; position: absolute; left: 14px; right: 14px; 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; }
.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; z-index: -2; 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: 520px; }
.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 { padding: 8px 24px 0; }
.marks ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; }
.marks li { font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--faint); white-space: nowrap; }

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

.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.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: 260px; max-width: none; }
.garden-block > .garden-canvas { top: auto; height: 320px; bottom: 0; }
.code-center { position: relative; z-index: 1; 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 at 50% 45%, rgba(4,16,31,.28), rgba(4,16,31,.02) 75%), linear-gradient(0deg, rgba(4,12,19,.18), transparent 60%); }
.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); }
.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(--faint); }

/* ============ 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: 1100px) {
  .site-nav-inner { grid-template-columns: auto 1fr; }
  .site-nav .site-links { display: none; }
  .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; }
  .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; }
  .console-topbar .site-links { display: none; }
  .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; }
  .marks li { font-size: 16px; }
  .block { padding: 96px 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; }
  .chat-message { max-width: 90%; }
  .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}

/* Shared Quai identity entry point. Privy's SDK modal renders outside #app. */
.quai-signin{width:100%;margin-top:8px;justify-content:center;min-height:48px}
.auth-card .auth-wallet-note{font-size:13px;line-height:1.6;margin:12px 0 0;color:var(--muted)}
.quai-identity{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}
.quai-identity h3{margin-bottom:10px}

/* Persistent request analytics. */
.usage-filters{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.usage-filters label{display:grid;gap:7px;color:var(--muted);font-size:12px;min-width:140px;max-width:100%}
.usage-filters select{max-width:280px;width:100%}
.usage-filters .segmented{margin-right:auto;align-self:flex-end}
.usage-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.usage-metrics .stat-value{font-size:30px;letter-spacing:-1px}
.usage-metrics .stat-foot{line-height:1.6;display:block}
.usage-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:20px}
.usage-layout>.panel{min-width:0}.usage-layout .panel-head{flex-wrap:wrap;gap:12px}
.usage-chart{display:flex;gap:12px;height:210px;margin-top:12px}
.usage-y{display:flex;flex-direction:column;justify-content:space-between;min-width:52px;color:var(--muted);font-size:11px;font-family:var(--mono);text-align:right}
.usage-plot{position:relative;flex:1;min-width:0}
.usage-gridlines{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;pointer-events:none}
.usage-gridlines i{border-top:1px dashed var(--line);width:100%}
.usage-bars{position:absolute;inset:0;display:flex;align-items:stretch;gap:2px}
.usage-bar{flex:1;min-width:0;border:0;background:transparent;padding:0;cursor:pointer;border-radius:3px}
.usage-bar svg{display:block;width:100%;height:100%;max-width:42px;margin:auto}
.usage-bar:hover,.usage-bar:focus-visible{background:var(--blue-soft);outline:2px solid var(--blue)}
.usage-input{fill:var(--blue)}.usage-output{fill:var(--green)}
.usage-chart-dates{display:flex;justify-content:space-between;margin:12px 0 18px 64px;color:var(--muted);font-size:11px}
.usage-chart-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}
.usage-dot{display:inline-block;width:8px;height:8px;border-radius:2px;margin:0 4px 0 8px}.usage-dot.input{background:var(--blue)}.usage-dot.output{background:var(--green)}
.usage-day-detail{margin-top:16px;min-height:20px}.token-total{font-size:38px;letter-spacing:-1px}.token-total small{display:block;font-size:12px;letter-spacing:0;color:var(--muted)}
.token-meter{height:8px;margin:20px 0}.token-meter svg{display:block;width:100%;height:100%}
.usage-breakdown{margin:16px 0}.usage-breakdown>div{display:flex;justify-content:space-between;gap:12px;margin:14px 0;font-size:13px}.usage-breakdown dt{color:var(--muted)}.usage-breakdown dd{font-family:var(--mono);margin:0}.usage-breakdown .usage-dot{margin-left:0}
.model-share{display:block;width:100%;max-width:180px;height:3px;margin-top:8px}.usage-model-link{font-size:13px;border:0;background:none;padding:0;text-align:left;color:var(--ink);cursor:pointer;overflow-wrap:anywhere}
.request-history small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.request-history td{font-size:12px}.request-history strong{overflow-wrap:anywhere}.usage-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-top:1px solid var(--line)}.usage-pagination>div{display:flex;gap:8px}
@media(max-width:1000px){.usage-layout{grid-template-columns:1fr}.usage-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.usage-filters{gap:12px}.usage-filters .segmented{width:100%}.usage-filters label{flex:1;min-width:120px}.usage-filters select{max-width:100%}.usage-metrics{gap:10px}.usage-metrics .stat-card{padding:16px}.usage-metrics .stat-value{font-size:24px}.usage-chart-footer{flex-wrap:wrap}.usage-chart{height:180px}.usage-layout .panel-head .segmented{width:100%}.usage-pagination{padding:12px}.hero h1{font-size:clamp(44px,12vw,68px)}}
/* Console funding cards describe actions; balances live in the ledger panels. */
.console-funding .snip{display:none}
.auth-intro{color:var(--muted);font-size:15px;line-height:1.7;margin:16px 0 28px}.signin-social{display:grid;grid-template-columns:1fr 1fr;gap:12px}.signin-method{height:56px;font-size:15px;justify-content:center;gap:10px}.signin-wallet{width:100%;padding:17px 18px;justify-content:flex-start;gap:14px;margin-top:12px;min-height:76px}.signin-wallet img{width:32px;height:32px;object-fit:contain}.signin-wallet>span{text-align:left;flex:1}.signin-wallet strong,.signin-wallet small{display:block}.signin-wallet small{font-size:12px;font-weight:400;color:var(--muted);margin-top:5px}.signin-wallet>.icon{width:17px}.auth-error:empty{display:none}.auth-error{margin:18px 0}.auth-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:20px;margin-top:32px;font-size:12px}#email-auth-form{padding:20px 0 0}#email-auth-form>.button{width:100%;margin:12px 0}#email-auth-form>.text-link{display:block;margin:8px auto;border:0;background:none;font-size:12px;cursor:pointer}.auth-card>h1{font-size:clamp(36px,5vw,52px);line-height:1.1}
.feature-eyebrow{display:block;font-size:12px;font-weight:650;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:18px}
.x402-feature .block-head{max-width:720px;margin-left:auto;margin-right:auto}
.x402-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface)}
.x402-flow article{padding:32px;border-right:1px solid var(--line)}
.x402-flow article:last-child{border-right:0}
.flow-number{display:block;font-size:12px;color:var(--muted);margin-bottom:36px;font-family:var(--mono)}
.x402-flow h3{font-size:21px;letter-spacing:-.5px;margin:0 0 12px}
.x402-flow p{font-size:14px;line-height:1.7;color:var(--muted);min-height:76px}
.x402-flow code{display:block;margin-top:28px;font-size:12px;color:var(--ink)}
.x402-feature-foot{display:flex;align-items:center;justify-content:center;gap:24px;margin-top:24px;text-align:left}
.x402-feature-foot p{font-size:12px;max-width:390px;line-height:1.7;color:var(--muted)}
@media(max-width:700px){.x402-flow{grid-template-columns:1fr}.x402-flow article{border-right:0;border-bottom:1px solid var(--line);padding:26px}.x402-flow article:last-child{border-bottom:0}.flow-number{margin-bottom:18px}.x402-flow p{min-height:0}.x402-feature-foot{align-items:flex-start;flex-direction:column;gap:12px}}

/* 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}}
