:root {
  color-scheme: light;
  --app-bg: #f4f7fb;
  --app-panel: #ffffff;
  --app-panel2: #f1f5f9;
  --app-control: #e8edf4;
  --app-text: #0f172a;
  --app-muted: #475569;
  --app-subtle: #64748b;
  --app-accent: #0284c7;
  --app-accent-hover: #0369a1;
  --app-accent-text: #ffffff;
  --app-border: rgba(15, 23, 42, 0.12);
  --app-border-strong: rgba(15, 23, 42, 0.22);
  --app-hover: rgba(15, 23, 42, 0.06);
  --app-selected: color-mix(in srgb, var(--app-accent) 14%, transparent);
  --app-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --orange: #ff5b24;
  --orange-soft: #fff0e8;
  --green: #059669;
  --red: #dc2626;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --app-bg: #070a0f;
    --app-panel: #0f172a;
    --app-panel2: #111827;
    --app-control: #172033;
    --app-text: #f8fafc;
    --app-muted: #94a3b8;
    --app-subtle: #64748b;
    --app-accent: #38bdf8;
    --app-accent-hover: #7dd3fc;
    --app-accent-text: #082f49;
    --app-border: rgba(255, 255, 255, 0.12);
    --app-border-strong: rgba(255, 255, 255, 0.24);
    --app-hover: rgba(255, 255, 255, 0.08);
    --app-selected: color-mix(in srgb, var(--app-accent) 18%, transparent);
    --app-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
    --orange-soft: rgba(255, 91, 36, 0.13);
    --green: #34d399;
    --red: #f87171;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--app-bg); color: var(--app-text); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; z-index: -2; inset: 0; content: ""; background: radial-gradient(circle at 85% -10%, color-mix(in srgb, var(--app-accent) 11%, transparent), transparent 34%); pointer-events: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
[hidden] { display: none !important; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.site-header { position: sticky; z-index: 40; top: 0; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-bg) 88%, transparent); backdrop-filter: blur(20px); }
.site-nav, .dashboard-nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-logo { width: 42px; height: 42px; border: 1px solid var(--app-border); border-radius: 13px; background: #fff; object-fit: cover; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1); }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: -0.02em; }
.brand small { margin-top: 4px; color: var(--app-muted); font-size: 10px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.nav-links, .dashboard-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a:not(.button), .dashboard-links > a:not(.button) { padding: 9px 12px; border-radius: 9px; color: var(--app-muted); font-size: 13px; font-weight: 650; transition: 160ms ease; }
.nav-links > a:not(.button):hover, .dashboard-links > a:not(.button):hover, .nav-links > a[aria-current="page"] { background: var(--app-hover); color: var(--app-text); }
.language-switcher { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--app-border); border-radius: 10px; padding: 3px; background: var(--app-panel); }
.language-switcher button { min-width: 38px; min-height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--app-muted); cursor: pointer; font-size: 13px; font-weight: 800; }
.language-switcher button[aria-pressed="true"] { background: var(--app-selected); color: var(--app-text); }

.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 0 17px; cursor: pointer; font-size: 13px; font-weight: 750; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }
.button-primary { background: var(--app-accent); color: var(--app-accent-text); box-shadow: 0 10px 25px color-mix(in srgb, var(--app-accent) 22%, transparent); }
.button-primary:hover { background: var(--app-accent-hover); }
.button-secondary { border-color: var(--app-border); background: var(--app-panel); color: var(--app-text); }
.button-secondary:hover, .button-quiet:hover { background: var(--app-hover); border-color: var(--app-border-strong); }
.button-quiet { border-color: var(--app-border); background: transparent; color: var(--app-muted); }
.button-dark { background: #0f172a; color: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18); }
.button-dark:hover { background: #1e293b; }
.button-danger { border-color: color-mix(in srgb, var(--red) 25%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); color: var(--red); }
.button-danger:hover { background: color-mix(in srgb, var(--red) 14%, transparent); }
.button-small { min-height: 36px; padding-inline: 12px; border-radius: 9px; font-size: 12px; }
.text-link, .text-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: var(--app-accent); cursor: pointer; font-size: 13px; font-weight: 750; }
.text-link:hover, .text-button:hover { color: var(--app-accent-hover); }

.eyebrow { margin: 0 0 14px; color: var(--app-accent); font-size: 11px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent); }
.hero { min-height: 680px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr); align-items: center; gap: 70px; padding-block: 86px 72px; }
.hero-copy h1 { margin: 0; font-size: clamp(50px, 6.2vw, 82px); line-height: 0.98; letter-spacing: -0.065em; }
.hero-copy h1 span { color: var(--app-muted); }
.hero-lead { max-width: 640px; margin: 28px 0 32px; color: var(--app-muted); font-size: 17px; line-height: 1.75; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 17px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--app-muted); font-size: 12px; font-weight: 650; }
.hero-trust span { color: var(--green); }
.hero-product { position: relative; min-height: 500px; display: grid; place-items: center; }
.product-glow { position: absolute; width: min(430px, 100%); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(140deg, color-mix(in srgb, var(--orange) 28%, transparent), color-mix(in srgb, var(--app-accent) 18%, transparent)); filter: blur(70px); opacity: 0.8; }
.product-window { position: relative; width: min(100%, 530px); overflow: hidden; border: 1px solid var(--app-border); border-radius: 24px; background: var(--app-panel); box-shadow: 0 30px 90px color-mix(in srgb, var(--app-text) 17%, transparent); transform: rotate(1deg); }
.product-window > header, .code-window > header { min-height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--app-border); padding: 0 16px; background: var(--app-panel2); color: var(--app-muted); }
.product-window > header small, .code-window > header small { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.window-dots i:nth-child(2) { background: #fbbf24; }
.window-dots i:nth-child(3) { background: #4ade80; }
.secure-label { justify-self: end; color: var(--green); font-size: 10px; font-weight: 750; }
.product-body { padding: 28px; }
.product-brand { display: flex; align-items: center; gap: 22px; }
.product-brand img { width: 104px; height: 104px; border: 1px solid var(--app-border); border-radius: 24px; background: #fff; object-fit: cover; }
.product-brand div { display: grid; gap: 8px; }
.product-brand small { color: var(--orange); font-size: 10px; font-weight: 850; letter-spacing: 0.16em; }
.product-brand strong { font-size: 30px; line-height: 1.05; letter-spacing: -0.04em; }
.endpoint-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 26px; border: 1px solid var(--app-border); border-radius: 13px; padding: 13px; background: var(--app-bg); }
.endpoint-card span { border-radius: 7px; padding: 5px 7px; background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); font-size: 9px; font-weight: 850; }
.endpoint-card code { overflow: hidden; color: var(--app-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-card i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.model-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.model-stack-single { grid-template-columns: 1fr; }
.model-stack > span { min-width: 0; display: grid; gap: 5px; border: 1px solid var(--app-border); border-radius: 12px; padding: 13px; }
.model-stack b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-stack small { color: var(--app-muted); font-size: 9px; }

.proof-strip { border-block: 1px solid var(--app-border); background: var(--app-panel); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-grid > div { min-height: 112px; display: grid; align-content: center; gap: 5px; padding: 22px 28px; }
.proof-grid > div + div { border-left: 1px solid var(--app-border); }
.proof-grid strong { font-size: 26px; letter-spacing: -0.04em; }
.proof-grid span { color: var(--app-muted); font-size: 11px; font-weight: 650; }
.section-block { padding-block: 112px; }
.section-heading { max-width: 720px; margin-bottom: 48px; }
.section-heading.compact { margin-bottom: 0; }
.section-heading h2, .split-section h2 { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.055em; }
.section-heading > p:last-child, .split-section > div:first-child > p:not(.eyebrow) { margin: 20px 0 0; color: var(--app-muted); font-size: 15px; line-height: 1.75; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { position: relative; min-height: 290px; border: 1px solid var(--app-border); border-radius: 22px; padding: 27px; background: var(--app-panel); box-shadow: 0 12px 35px color-mix(in srgb, var(--app-text) 5%, transparent); }
.feature-number { position: absolute; top: 24px; right: 24px; color: var(--app-subtle); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.feature-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: var(--app-panel2); color: var(--app-accent); font-size: 24px; }
.feature-card h3 { margin: 55px 0 12px; font-size: 20px; letter-spacing: -0.025em; }
.feature-card p { margin: 0; color: var(--app-muted); font-size: 13px; line-height: 1.75; }
.section-tinted { border-block: 1px solid var(--app-border); background: var(--app-panel2); }
.split-section { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 70px; padding-block: 96px; }
.split-section .text-link { margin-top: 24px; }
.code-window { overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; background: #0d1117; color: #e5e7eb; box-shadow: 0 25px 70px rgba(15, 23, 42, 0.22); }
.code-window > header { border-color: rgba(255, 255, 255, 0.08); background: #161b22; color: #94a3b8; }
.code-window pre { overflow: auto; margin: 0; padding: 28px; font-size: 12px; line-height: 1.85; }
.code-purple { color: #c084fc; }
.code-green { color: #86efac; }
.demo-section { display: grid; grid-template-columns: 0.75fr 1.25fr; align-items: center; gap: 70px; padding-block: 112px; }
.demo-card { overflow: hidden; border: 1px solid var(--app-border); border-radius: 22px; padding: 20px; background: var(--app-panel); box-shadow: var(--app-shadow); }
.demo-title { display: flex; align-items: center; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid var(--app-border); }
.demo-title img { width: 38px; height: 38px; border: 1px solid var(--app-border); border-radius: 11px; background: #fff; object-fit: cover; }
.demo-title span { display: grid; gap: 3px; }
.demo-title strong { font-size: 13px; }
.demo-title small { color: var(--green); font-size: 10px; }
.chat-box { min-height: 220px; max-height: 340px; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 20px 2px; }
.chat-empty { align-self: center; margin: 60px auto; color: var(--app-muted); font-size: 12px; }
.chat-row { display: flex; }
.chat-row.user { justify-content: flex-end; }
.chat-bubble { max-width: 82%; margin: 0; border: 1px solid var(--app-border); border-radius: 15px 15px 15px 4px; padding: 10px 13px; background: var(--app-panel2); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.chat-row.user .chat-bubble { border-color: transparent; border-radius: 15px 15px 4px 15px; background: var(--app-accent); color: var(--app-accent-text); }
.chat-row.pending .chat-bubble { color: var(--app-muted); }
.chat-row.error .chat-bubble { color: var(--red); }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; border-top: 1px solid var(--app-border); padding-top: 15px; }
.chat-form input, .text-field { width: 100%; min-height: 44px; border: 1px solid var(--app-border); border-radius: 11px; padding: 0 13px; background: var(--app-control); color: var(--app-text); font-size: 13px; }
.chat-form input::placeholder, .text-field::placeholder { color: var(--app-subtle); }
.cta-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; margin-bottom: 112px; border: 1px solid var(--app-border); border-radius: 26px; padding: 34px; background: linear-gradient(120deg, color-mix(in srgb, var(--orange) 7%, var(--app-panel)), var(--app-panel)); }
.cta-panel > img { width: 72px; height: 72px; border: 1px solid var(--app-border); border-radius: 19px; background: #fff; object-fit: cover; }
.cta-panel .eyebrow { margin-bottom: 8px; color: var(--orange); }
.cta-panel h2 { margin: 0; font-size: 24px; letter-spacing: -0.035em; }
.cta-panel p:last-child { margin: 7px 0 0; color: var(--app-muted); font-size: 12px; }
.site-footer { border-top: 1px solid var(--app-border); background: var(--app-panel); }
.footer-grid { min-height: 220px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 30px; padding-block: 44px; }
.footer-grid > div:first-child > p { max-width: 410px; margin: 17px 0 0; color: var(--app-muted); font-size: 12px; line-height: 1.7; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); align-content: center; gap: 14px 34px; color: var(--app-muted); font-size: 12px; font-weight: 650; }
.footer-links a:hover { color: var(--app-text); }
.copyright { grid-column: 1 / -1; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--app-border); color: var(--app-subtle); font-size: 11px; }

/* Documentation */
.docs-page { padding-block: 64px 100px; }
.docs-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding: 26px 0 58px; border-bottom: 1px solid var(--app-border); }
.docs-hero > div:first-child { max-width: 790px; }
.docs-hero h1 { margin: 0; font-size: clamp(42px, 6vw, 70px); line-height: 1; letter-spacing: -0.06em; }
.docs-hero > div:first-child > p:last-child { max-width: 720px; margin: 22px 0 0; color: var(--app-muted); font-size: 16px; line-height: 1.75; }
.docs-hero-actions { display: flex; gap: 9px; }
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 70px; padding-top: 42px; }
.docs-sidebar { position: sticky; top: 110px; }
.docs-sidebar > p { margin: 0 0 10px; padding: 0 11px; color: var(--app-subtle); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.docs-sidebar nav { display: grid; gap: 2px; }
.docs-sidebar nav a { display: grid; grid-template-columns: 25px 1fr; gap: 5px; border-radius: 9px; padding: 9px 11px; color: var(--app-muted); font-size: 12px; font-weight: 650; }
.docs-sidebar nav a span { color: var(--app-subtle); font-size: 9px; letter-spacing: 0.05em; }
.docs-sidebar nav a:hover { background: var(--app-hover); color: var(--app-text); }
.docs-side-card { display: grid; gap: 8px; margin-top: 22px; border: 1px solid var(--app-border); border-radius: 13px; padding: 14px; background: var(--app-panel); }
.docs-side-card strong { font-size: 11px; }
.docs-side-card code { overflow: hidden; color: var(--app-accent); font-size: 9px; text-overflow: ellipsis; }
.docs-side-card p { margin: 0; color: var(--app-muted); font-size: 10px; line-height: 1.5; }
.docs-content { min-width: 0; }
.docs-section { scroll-margin-top: 105px; padding: 16px 0 78px; border-bottom: 1px solid var(--app-border); }
.docs-section + .docs-section { padding-top: 72px; }
.docs-section:last-child { border-bottom: 0; }
.section-index { margin: 0 0 14px; color: var(--app-accent) !important; font-size: 10px !important; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.docs-section > h2, .endpoint-heading h2 { margin: 0; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -0.045em; }
.docs-section > h3 { margin: 34px 0 13px; font-size: 17px; letter-spacing: -0.02em; }
.docs-section > p:not(.section-index):not(.fine-print) { max-width: 780px; margin: 18px 0; color: var(--app-muted); font-size: 14px; line-height: 1.8; }
.docs-section p code, .steps code { border: 1px solid var(--app-border); border-radius: 5px; padding: 1px 5px; background: var(--app-panel2); color: var(--app-text); font-size: 0.9em; }
.docs-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.docs-card-grid > div { min-height: 170px; border: 1px solid var(--app-border); border-radius: 16px; padding: 20px; background: var(--app-panel); }
.docs-card-grid span { display: block; margin-bottom: 30px; color: var(--app-accent); font-size: 23px; }
.docs-card-grid strong { font-size: 14px; }
.docs-card-grid p { margin: 8px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.65; }
.callout { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; border: 1px solid var(--app-border); border-radius: 14px; padding: 17px; }
.callout::before { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; content: "i"; background: var(--app-selected); color: var(--app-accent); font-size: 11px; font-weight: 850; }
.callout strong { font-size: 12px; }
.callout p { margin: 5px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.65; }
.callout-action { align-items: center; justify-content: space-between; background: var(--app-panel); }
.callout-action::before { content: "◈"; }
.callout-action .button { margin-left: auto; }
.steps { display: grid; gap: 0; margin: 30px 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 17px; padding: 18px 0; border-top: 1px solid var(--app-border); }
.steps li:last-child { border-bottom: 1px solid var(--app-border); }
.steps li > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--app-border); border-radius: 10px; background: var(--app-panel); color: var(--app-accent); font-size: 11px; font-weight: 800; }
.steps strong { display: block; font-size: 13px; }
.steps p { margin: 5px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.6; }
.code-block { overflow: hidden; margin-top: 18px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; background: #0d1117; color: #e5e7eb; }
.code-block > header { min-height: 43px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 0 14px; background: #161b22; color: #94a3b8; font-size: 10px; font-weight: 700; }
.copy-code { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 7px; padding: 5px 8px; background: rgba(255, 255, 255, 0.04); color: #cbd5e1; cursor: pointer; font-size: 9px; }
.code-block pre { overflow-x: auto; margin: 0; padding: 21px; font-size: 11px; line-height: 1.75; }
.code-block.compact pre { padding: 16px 20px; }
.docs-table { width: 100%; margin-top: 22px; border: 1px solid var(--app-border); border-collapse: separate; border-spacing: 0; border-radius: 14px; background: var(--app-panel); font-size: 11px; }
.docs-table th { padding: 12px 14px; border-bottom: 1px solid var(--app-border); color: var(--app-muted); font-size: 9px; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.docs-table td { padding: 14px; border-bottom: 1px solid var(--app-border); color: var(--app-muted); line-height: 1.55; vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table code { color: var(--app-text); font-size: 10px; }
.model-table td:first-child { color: var(--app-text); font-weight: 700; }
.model-table td:first-child small { display: block; margin-top: 5px; color: var(--green); font-size: 8px; text-transform: uppercase; }
.featured-row { background: color-mix(in srgb, var(--app-accent) 7%, transparent); }
.fine-print { margin: 12px 0 0; color: var(--app-subtle); font-size: 10px; line-height: 1.6; }
.endpoint-heading { display: flex; align-items: center; gap: 12px; }
.endpoint-heading > span { border-radius: 7px; padding: 6px 8px; background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); font-size: 9px; font-weight: 850; }
.endpoint-heading.secondary { margin-top: 48px; }
.endpoint-heading.secondary > span { background: var(--app-selected); color: var(--app-accent); }
.endpoint-heading.secondary h3 { margin: 0; font-size: 20px; }
.billing-explainer { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; overflow: hidden; border: 1px solid var(--app-border); border-radius: 16px; background: var(--app-panel); }
.billing-explainer > div { display: grid; gap: 8px; padding: 22px; }
.billing-explainer > div + div { border-left: 1px solid var(--app-border); }
.billing-explainer small { color: var(--app-muted); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.billing-explainer strong { font-size: 16px; letter-spacing: -0.02em; }
.billing-explainer p { margin: 0; color: var(--app-muted); font-size: 10px; line-height: 1.6; }
.security-list { display: grid; gap: 10px; margin-top: 28px; }
.security-list > div { display: grid; grid-template-columns: 34px 1fr; gap: 14px; border: 1px solid var(--app-border); border-radius: 13px; padding: 17px; background: var(--app-panel); }
.security-list > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--app-panel2); color: var(--app-accent); font-size: 10px; font-weight: 850; }
.security-list p { margin: 0; color: var(--app-muted); font-size: 11px; line-height: 1.65; }
.security-list strong { color: var(--app-text); }
.docs-final-cta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; margin-top: 28px; border-radius: 17px; padding: 22px; background: var(--app-panel2); }
.docs-final-cta img { width: 58px; height: 58px; border: 1px solid var(--app-border); border-radius: 15px; background: #fff; object-fit: cover; }
.docs-final-cta strong { font-size: 14px; }
.docs-final-cta p { margin: 5px 0 0; color: var(--app-muted); font-size: 10px; }

/* Dashboard */
.loading-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; }
.loading-screen img { width: 72px; height: 72px; border: 1px solid var(--app-border); border-radius: 19px; background: #fff; object-fit: cover; box-shadow: var(--app-shadow); }
.loading-screen p { margin: 0; color: var(--app-muted); font-size: 12px; }
.loader { width: 28px; height: 28px; border: 3px solid var(--app-border); border-top-color: var(--app-accent); border-radius: 50%; animation: spin 700ms linear infinite; }
.loader.small { width: 17px; height: 17px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.dashboard-header { background: color-mix(in srgb, var(--app-panel) 88%, transparent); }
.user-chip { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.user-chip > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--app-selected); color: var(--app-accent); font-size: 11px; font-weight: 850; }
.user-chip b { max-width: 130px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-main { padding-block: 58px 90px; }
.dashboard-welcome { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.dashboard-welcome h1 { margin: 0; font-size: 45px; letter-spacing: -0.055em; }
.dashboard-welcome > div:first-child > p:last-child { margin: 10px 0 0; color: var(--app-muted); font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.stat-card { min-height: 200px; display: flex; flex-direction: column; border: 1px solid var(--app-border); border-radius: 19px; padding: 22px; background: var(--app-panel); box-shadow: 0 12px 35px color-mix(in srgb, var(--app-text) 5%, transparent); }
.stat-card.balance-card { background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 9%, var(--app-panel)), var(--app-panel)); }
.stat-heading { display: flex; align-items: center; gap: 10px; }
.stat-heading small { color: var(--app-muted); font-size: 11px; font-weight: 650; }
.stat-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--app-panel2); color: var(--app-accent); font-size: 15px; }
.balance-card .stat-icon { background: var(--orange-soft); color: var(--orange); }
.stat-card > strong { margin-top: 22px; font-size: 29px; letter-spacing: -0.045em; }
.stat-card > p { margin: 5px 0 18px; color: var(--app-muted); font-size: 10px; }
.stat-card .text-button { margin-top: auto; align-self: flex-start; font-size: 11px; }
.balance-card .text-button { color: var(--orange); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--app-border); border-radius: 19px; background: var(--app-panel); box-shadow: 0 12px 35px color-mix(in srgb, var(--app-text) 4%, transparent); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 24px; border-bottom: 1px solid var(--app-border); }
.panel-header .eyebrow { margin-bottom: 6px; }
.panel-header h2, .getting-started h2 { margin: 0; font-size: 21px; letter-spacing: -0.035em; }
.panel-header p:last-child { margin: 6px 0 0; color: var(--app-muted); font-size: 10px; }
.keys-list { min-height: 250px; }
.list-loading { min-height: 250px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--app-muted); font-size: 11px; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; padding: 16px 22px; }
.key-row + .key-row { border-top: 1px solid var(--app-border); }
.key-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.key-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--app-selected); color: var(--app-accent); font-size: 17px; }
.key-identity p { min-width: 0; display: grid; gap: 5px; margin: 0; }
.key-identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.key-identity code { color: var(--app-muted); font-size: 9px; }
.key-meta { display: flex; align-items: center; gap: 9px; }
.key-meta > small { color: var(--app-subtle); font-size: 9px; }
.status-badge { border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.status-badge.active { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.status-badge.revoked { background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); }
.empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 35px; text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--app-panel2); color: var(--app-accent); font-size: 22px; }
.empty-state strong { margin-top: 5px; font-size: 13px; }
.empty-state p { max-width: 330px; margin: 0 0 10px; color: var(--app-muted); font-size: 10px; line-height: 1.6; }
.getting-started { padding: 24px; }
.getting-started ol { display: grid; gap: 0; margin: 22px 0; padding: 0; list-style: none; }
.getting-started li { display: grid; grid-template-columns: 30px 1fr; gap: 11px; padding: 13px 0; border-top: 1px solid var(--app-border); }
.getting-started li > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--app-panel2); color: var(--app-accent); font-size: 9px; font-weight: 850; }
.getting-started li p { display: grid; gap: 4px; margin: 0; }
.getting-started li strong { font-size: 11px; }
.getting-started li small { color: var(--app-muted); font-size: 9px; }
.getting-started > .button { width: 100%; }
.security-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; border-radius: 11px; padding: 12px; background: var(--app-panel2); }
.security-note > span { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); font-size: 9px; font-weight: 850; }
.security-note p { display: grid; gap: 3px; margin: 0; }
.security-note strong { font-size: 9px; }
.security-note small { color: var(--app-muted); font-size: 8px; line-height: 1.45; }
.dashboard-footer { border-top: 1px solid var(--app-border); background: var(--app-panel); }
.dashboard-footer > div { min-height: 80px; display: flex; align-items: center; justify-content: space-between; color: var(--app-muted); font-size: 10px; }
.dashboard-footer > div > div { display: flex; gap: 20px; }
.dashboard-footer a:hover { color: var(--app-text); }

/* Dialogs */
.modal { width: min(620px, calc(100% - 30px)); max-width: none; max-height: calc(100vh - 30px); overflow: visible; border: 0; padding: 0; background: transparent; color: var(--app-text); }
.modal::backdrop { background: rgba(2, 6, 23, 0.64); backdrop-filter: blur(8px); }
.modal-card { overflow: auto; max-height: calc(100vh - 30px); border: 1px solid var(--app-border); border-radius: 22px; padding: 24px; background: var(--app-panel); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35); }
.modal-wide { width: 100%; }
.modal-header { display: flex; align-items: flex-start; gap: 13px; }
.modal-title-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--orange-soft); color: var(--orange); font-size: 20px; }
.modal-header > div:not(.modal-title-icon) { flex: 1; }
.modal-header .eyebrow { margin-bottom: 6px; }
.modal-header h2 { margin: 0; font-size: 23px; letter-spacing: -0.04em; }
.modal-header p:last-child { margin: 7px 0 0; color: var(--app-muted); font-size: 10px; line-height: 1.5; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--app-border); border-radius: 10px; background: transparent; color: var(--app-muted); cursor: pointer; font-size: 20px; }
.icon-button:hover { background: var(--app-hover); color: var(--app-text); }
.wallet-summary { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 22px; border: 1px solid var(--app-border); border-radius: 15px; padding: 18px; background: linear-gradient(120deg, var(--orange-soft), var(--app-panel2)); }
.wallet-summary span { display: grid; gap: 6px; }
.wallet-summary small { color: var(--app-muted); font-size: 9px; }
.wallet-summary strong { font-size: 24px; letter-spacing: -0.04em; }
.wallet-summary p { margin: 0; color: var(--app-muted); font-size: 10px; }
.modal-loading { min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--app-muted); font-size: 10px; }
.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.package-button { min-height: 80px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--app-border); border-radius: 13px; padding: 12px; background: var(--app-panel); color: var(--app-text); cursor: pointer; text-align: left; transition: 150ms ease; }
.package-button:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--app-border)); background: var(--orange-soft); transform: translateY(-1px); }
.package-button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }
.package-icon { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--orange-soft); color: var(--orange); }
.package-button > span:last-child { display: grid; gap: 4px; }
.package-button strong { font-size: 12px; }
.package-button small { color: var(--app-muted); font-size: 9px; }
.payment-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; border-radius: 12px; padding: 13px; background: var(--app-panel2); }
.payment-note > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); font-size: 9px; font-weight: 850; }
.payment-note p { display: grid; gap: 4px; margin: 0; }
.payment-note strong { font-size: 10px; }
.payment-note small { color: var(--app-muted); font-size: 9px; line-height: 1.5; }
.field-label { display: block; margin: 24px 0 8px; color: var(--app-muted); font-size: 10px; font-weight: 700; }
.form-error { margin: 12px 0 0; border-radius: 9px; padding: 10px 12px; background: color-mix(in srgb, var(--red) 9%, transparent); color: var(--red); font-size: 10px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.secret-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 22px; border: 1px solid var(--app-border); border-radius: 13px; padding: 11px; background: var(--app-panel2); }
.secret-box code { overflow-x: auto; padding: 0 5px; color: var(--app-accent); font-size: 10px; white-space: nowrap; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(390px, calc(100% - 44px)); border: 1px solid color-mix(in srgb, var(--green) 25%, var(--app-border)); border-radius: 12px; padding: 13px 16px; background: var(--app-panel); color: var(--app-text); box-shadow: var(--app-shadow); font-size: 11px; font-weight: 650; }
.toast[data-tone="error"] { border-color: color-mix(in srgb, var(--red) 35%, var(--app-border)); color: var(--red); }

/* Readable type scale */
body { font-size: 16px; line-height: 1.55; }
.brand strong { font-size: 17px; }
.brand small { font-size: 12px; }
.nav-links > a:not(.button), .dashboard-links > a:not(.button), .button, .text-link, .text-button { font-size: 15px; }
.button-small { font-size: 14px; }
.eyebrow { font-size: 13px; }
.hero-lead { font-size: 19px; }
.hero-trust { font-size: 15px; }
.product-window > header small, .code-window > header small, .secure-label, .product-brand small { font-size: 12px; }
.endpoint-card span, .model-stack small { font-size: 12px; }
.endpoint-card code, .model-stack b { font-size: 14px; }
.proof-grid span { font-size: 14px; }
.section-heading > p:last-child, .split-section > div:first-child > p:not(.eyebrow) { font-size: 17px; }
.feature-number { font-size: 12px; }
.feature-card p { font-size: 16px; }
.code-window pre { font-size: 14px; }
.demo-title strong { font-size: 16px; }
.demo-title small, .chat-empty { font-size: 13px; }
.chat-bubble, .chat-form input, .text-field { font-size: 15px; }
.cta-panel p:last-child, .footer-grid > div:first-child > p, .footer-links { font-size: 15px; }
.copyright { font-size: 13px; }
.docs-hero > div:first-child > p:last-child { font-size: 18px; }
.docs-sidebar > p { font-size: 12px; }
.docs-sidebar nav a { font-size: 14px; }
.docs-sidebar nav a span, .docs-side-card code { font-size: 11px; }
.docs-side-card strong { font-size: 14px; }
.docs-side-card p { font-size: 13px; }
.section-index { font-size: 12px !important; }
.docs-section > h3 { font-size: 20px; }
.docs-section > p:not(.section-index):not(.fine-print) { font-size: 17px; }
.docs-card-grid strong { font-size: 16px; }
.docs-card-grid p, .callout p, .steps p, .security-list p { font-size: 14px; }
.callout strong, .steps strong { font-size: 15px; }
.code-block > header { font-size: 13px; }
.copy-code { font-size: 12px; }
.code-block pre, .docs-table, .docs-table code { font-size: 13px; }
.docs-table th { font-size: 12px; }
.model-table td:first-child small, .fine-print { font-size: 12px; }
.billing-explainer small { font-size: 11px; }
.billing-explainer strong { font-size: 18px; }
.billing-explainer p { font-size: 13px; }
.docs-final-cta strong { font-size: 16px; }
.docs-final-cta p, .loading-screen p { font-size: 13px; }
.user-chip b { font-size: 13px; }
.dashboard-welcome > div:first-child > p:last-child { font-size: 16px; }
.stat-heading small { font-size: 14px; }
.stat-card > p, .panel-header p:last-child { font-size: 13px; }
.stat-card .text-button, .list-loading { font-size: 14px; }
.key-identity strong { font-size: 15px; }
.key-identity code, .key-meta > small, .status-badge { font-size: 12px; }
.empty-state strong { font-size: 16px; }
.empty-state p, .getting-started li strong { font-size: 14px; }
.getting-started li small, .security-note strong, .security-note small { font-size: 12px; }
.dashboard-footer > div { font-size: 13px; }
.modal-header p:last-child, .wallet-summary p, .modal-loading, .payment-note small, .field-label, .form-error, .secret-box code, .toast { font-size: 13px; }
.wallet-summary small, .package-button small { font-size: 12px; }
.package-button strong, .payment-note strong { font-size: 14px; }

@media (max-width: 980px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 45px; padding-block: 72px; }
  .hero-copy { max-width: 760px; }
  .hero-product { min-height: 450px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 230px; }
  .feature-card h3 { margin-top: 40px; }
  .split-section, .demo-section { grid-template-columns: 1fr; gap: 42px; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-sidebar { position: static; overflow-x: auto; border-bottom: 1px solid var(--app-border); padding-bottom: 14px; }
  .docs-sidebar > p, .docs-side-card { display: none; }
  .docs-sidebar nav { display: flex; width: max-content; }
  .docs-sidebar nav a { grid-template-columns: auto auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .getting-started { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
  .getting-started > .eyebrow, .getting-started > h2 { grid-column: 1 / -1; }
  .getting-started .security-note { margin-top: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1160px); }
  .site-nav, .dashboard-nav { min-height: 64px; }
  .brand-logo { width: 37px; height: 37px; border-radius: 11px; }
  .brand small { display: none; }
  .nav-links > a:not(.button) { display: none; }
  .nav-links .button { min-height: 34px; padding-inline: 10px; font-size: 13px; }
  .language-switcher button { min-width: 34px; }
  .hero { padding-block: 56px; }
  .hero-copy h1 { font-size: 48px; }
  .hero-lead { font-size: 17px; }
  .hero-trust { display: grid; gap: 10px; }
  .hero-product { min-height: 390px; }
  .product-window { transform: none; }
  .product-body { padding: 20px; }
  .product-brand img { width: 80px; height: 80px; border-radius: 19px; }
  .product-brand strong { font-size: 24px; }
  .model-stack { grid-template-columns: 1fr; }
  .model-stack > span { grid-template-columns: 1fr auto; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-grid > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--app-border); }
  .proof-grid > div:nth-child(4) { border-top: 1px solid var(--app-border); }
  .section-block, .split-section, .demo-section { padding-block: 76px; }
  .section-heading h2, .split-section h2 { font-size: 38px; }
  .cta-panel { grid-template-columns: auto 1fr; margin-bottom: 76px; padding: 22px; }
  .cta-panel .button { grid-column: 1 / -1; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .copyright { grid-column: auto; }
  .docs-page { padding-block: 40px 70px; }
  .docs-hero { grid-template-columns: 1fr; gap: 25px; }
  .docs-hero h1 { font-size: 45px; }
  .docs-hero-actions { flex-wrap: wrap; }
  .docs-card-grid, .billing-explainer { grid-template-columns: 1fr; }
  .billing-explainer > div + div { border-top: 1px solid var(--app-border); border-left: 0; }
  .table-scroll { overflow-x: auto; }
  .table-scroll table { min-width: 680px; }
  .parameter-table { display: block; overflow-x: auto; }
  .docs-final-cta { grid-template-columns: auto 1fr; }
  .docs-final-cta .button { grid-column: 1 / -1; }
  .dashboard-links > a:not(.button), .dashboard-links .user-chip, .dashboard-links .button-quiet { display: none; }
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .dashboard-welcome h1 { font-size: 38px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 175px; }
  .key-row { align-items: flex-start; flex-direction: column; }
  .key-meta { width: 100%; flex-wrap: wrap; padding-left: 50px; }
  .getting-started { display: block; }
  .getting-started .security-note { margin-top: 16px; }
  .dashboard-footer > div { align-items: flex-start; flex-direction: column; justify-content: center; gap: 10px; }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: 42px; }
  .button-row .button { width: 100%; }
  .product-brand { gap: 14px; }
  .product-brand img { width: 64px; height: 64px; border-radius: 16px; }
  .product-brand strong { font-size: 21px; }
  .endpoint-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .proof-grid > div { min-height: 92px; padding: 17px; }
  .proof-grid strong { font-size: 21px; }
  .chat-form { grid-template-columns: 1fr; }
  .docs-hero-actions .button { width: 100%; }
  .callout-action { align-items: stretch; flex-direction: column; }
  .callout-action .button { width: 100%; margin: 4px 0 0; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .panel-header .button { width: 100%; }
  .package-grid { grid-template-columns: 1fr; }
  .wallet-summary { align-items: flex-start; flex-direction: column; }
  .modal-card { padding: 18px; border-radius: 17px; }
}

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