/* Shared dark theme for every public 0si.ai page (landing, docs, policies, billing). Load after page styles. */
:root {
  color-scheme: dark;
  --ink: #f2f4f8;
  --muted: #a3abba;
  --subtle: #7d8697;
  --line: rgba(255, 255, 255, .09);
  --paper: #07090d;
  --canvas: #0d1017;
  --surface: rgba(255, 255, 255, .035);
  --surface-strong: rgba(255, 255, 255, .06);
  --blue: #6f9eff;
  --blue-strong: #2f6bff;
  --blue-soft: rgba(77, 141, 255, .12);
  --violet: #8b6cff;
  --mint: #3ee6b5;
  --green: #3ee6b5;
  --coral: #ff7a6b;
  --terminal: #05070b;
}
html, body { background: var(--paper); color: var(--ink); }
.public-site { background: var(--paper); color: var(--ink); }
.public-site :focus-visible { outline-color: #7aa7ff; }
.public-site ::selection { background: rgba(77, 141, 255, .35); }

/* Header, navigation, buttons */
.public-site .site-header { background: rgba(7, 9, 13, .72); border-bottom-color: var(--line); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.public-site .site-brand img { filter: brightness(0) invert(1); }
.public-site .site-nav a { color: var(--muted); }
.public-site .site-nav a:hover, .public-site .site-nav a[aria-current] { color: #fff; }
.public-site .button { border-radius: 10px; transition: background .2s, border-color .2s, transform .2s; }
.public-site .button-primary { background: var(--blue-strong); color: #fff; }
.public-site .button-primary:hover { background: #4a7fff; transform: translateY(-1px); }
.public-site .button-outline { border-color: rgba(255, 255, 255, .18); color: var(--ink); background: rgba(255, 255, 255, .03); }
.public-site .button-outline:hover { background: var(--surface-strong); border-color: rgba(255, 255, 255, .3); }
.public-site .icon-button { border-color: var(--line); color: var(--muted); border-radius: 10px; background: transparent; }
.public-site .icon-button:hover { color: #fff; background: var(--surface-strong); }
.public-site .text-link { color: var(--ink); }
.public-site .text-link:hover { color: #fff; }
.public-site .eyebrow { color: #8ea3c7; letter-spacing: .08em; }
.public-site .status-square { background: var(--mint); border-radius: 50%; }
.public-site .skip-link { background: var(--canvas); color: #fff; }
.public-site dialog { background: #0b0e15; color: var(--ink); border: 1px solid rgba(255, 255, 255, .14); }
.public-site dialog::backdrop { background: rgba(3, 5, 9, .78); backdrop-filter: blur(4px); }
@media (max-width: 850px) {
  .public-site .site-nav { background: rgba(7, 9, 13, .97); border-bottom-color: var(--line); }
}

/* Footer */
.public-site .site-footer { border-top-color: var(--line); background: #05070a; }
.public-site .footer-heading nav a:hover, .public-site .footer-merchant a:hover { color: #fff; }
.public-site .footer-bottom { border-top-color: var(--line); }

/* Content pages: methodology, policies, support, plans, refund, billing */
.content-site main { position: relative; isolation: isolate; }
.content-site main::before { content: ""; position: absolute; z-index: -1; top: -200px; left: 50%; width: min(1100px, 100%); height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(77, 120, 255, .22), rgba(139, 108, 255, .08) 60%, transparent); pointer-events: none; }
.content-subnav { background: rgba(255, 255, 255, .02); border-bottom-color: var(--line); }
.content-subnav a:hover, .content-subnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--blue); }
.content-hero h1 { font-weight: 800; letter-spacing: -.025em; }
.content-index a:hover, .content-index a:focus-visible { color: #fff; background: var(--surface-strong); border-left-color: var(--blue); }
.content-section a:not(.button) { color: var(--blue); text-decoration-color: rgba(111, 158, 255, .45); }
.content-section h2 { font-weight: 700; }
.method-table th { background: var(--surface); }
.method-note { background: var(--surface); border-radius: 0 12px 12px 0; }
.policy-card { border-color: var(--line); }
.content-related .text-link { color: var(--blue); }

/* Billing */
.billing-products { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.billing-product, .billing-product:first-child, .billing-product:last-child { padding: 32px 26px; }
.billing-product:last-child { background: linear-gradient(180deg, rgba(77, 120, 255, .14), rgba(139, 108, 255, .04)); }
.billing-product h2 { font-weight: 800; }
.billing-product .billing-price { font-weight: 800; letter-spacing: -.02em; }
.billing-table thead { background: var(--surface); }
.billing-notice { background: var(--surface); border-radius: 0 12px 12px 0; }
.billing-test { background: rgba(255, 191, 71, .1); border-color: #e0a63a; color: #ffd38a; }
.billing-feedback[data-error="true"] { color: #ff8a80; }
.billing-segment input { border-radius: 10px; }
.billing-dialog { background: #0b0e15; border-radius: 16px; }
@media (max-width: 680px) {
  .billing-product, .billing-product:first-child, .billing-product:last-child { padding: 26px 20px; }
}

/* Developer docs */
.docs-site { background: var(--paper); }
.docs-site .dev-sidebar { background: #090c12; border-right-color: var(--line); }
.docs-site .docs-search-button { background: var(--surface); border-color: var(--line); border-radius: 10px; color: var(--subtle); }
.docs-site .docs-search-button:hover { border-color: rgba(255, 255, 255, .2); color: var(--ink); }
.docs-site .dev-sidebar a:hover { color: #fff; background: var(--surface-strong); }
.docs-site .dev-sidebar a.active { color: #fff; background: var(--blue-soft); box-shadow: inset 2px 0 0 var(--blue); }
.docs-site .dev-sidebar a { border-radius: 8px; }
.docs-site .dev-docs { position: relative; isolation: isolate; }
.docs-site .dev-docs::before { content: ""; position: absolute; z-index: -1; top: -120px; left: 0; width: 100%; height: 460px; background: radial-gradient(closest-side, rgba(77, 120, 255, .2), transparent); pointer-events: none; }
.docs-site .docs-title-row h1 { font-weight: 800; letter-spacing: -.025em; }
.docs-site .version-label { border-radius: 999px; background: var(--surface); }
.docs-site .base-url { background: var(--surface); border-color: var(--line); border-radius: 12px; }
.docs-site .doc-entry-grid > a { border-color: var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, transform .2s; }
.docs-site .doc-entry-grid > a:hover { background: var(--surface-strong); border-color: rgba(122, 167, 255, .35); transform: translateY(-2px); }
.docs-site .doc-entry-grid .icon:first-child { color: #9fc0ff; }
.docs-site .dev-section h2 { font-weight: 750; letter-spacing: -.02em; }
.docs-site .dev-section p code, .docs-site .dev-section li code { color: #c7d6f2; background: rgba(255, 255, 255, .07); }
.docs-site .dev-parameter-table code, .docs-site .dev-parameter-table td, .docs-site .dev-error-table td { background: transparent; }
.docs-site .dev-parameter-table code { color: #9fc0ff; }
.docs-site .dev-console-gate a, .docs-site .dev-key-toolbar button, .docs-site .dev-secret-actions button { background: var(--blue-strong); color: #fff; border-radius: 10px; }
.docs-site .dev-code-block, .docs-site .dev-terminal { background: var(--terminal); border-color: rgba(255, 255, 255, .1); border-radius: 12px; }
.docs-site .dev-code-block header, .docs-site .dev-terminal-bar { border-color: rgba(255, 255, 255, .08); }
.docs-site .dev-code-block .code-language-tabs button[aria-selected="true"] { border-color: var(--blue); }
.docs-site .dev-callout { background: rgba(62, 230, 181, .07); border-left-color: var(--mint); border-radius: 0 12px 12px 0; }
.docs-site .dev-callout strong { color: var(--mint); }
.docs-site .dev-callout p { color: var(--muted); }
.docs-site .method.get { background: rgba(62, 230, 181, .12); color: var(--mint); }
.docs-site .dev-header-cta, .docs-site .dev-primary-action { background: var(--blue-strong); color: #fff; }
.docs-site .dev-secondary-action { background: var(--surface); border-color: var(--line); color: var(--ink); }
.docs-site .dev-steps li::before { background: var(--canvas); border-color: rgba(122, 167, 255, .4); color: #a9c5ff; }
.docs-site .dev-key-toolbar input { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: 10px; }
.docs-site .dev-key-toolbar input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77, 141, 255, .2); }
.docs-site .dev-key-limits, .docs-site .dev-key-row, .docs-site .dev-key-empty { background: var(--surface); }
.docs-site .dev-key-row button { background: transparent; border-color: rgba(255, 122, 107, .45); color: var(--coral); }
.docs-site .dev-key-budget { color: var(--muted); }
.docs-site .dev-key-row .dev-key-budget-edit { border-color: var(--line); color: var(--ink); }
.docs-site .dev-secret-panel { background: rgba(62, 230, 181, .07); border-bottom-color: rgba(62, 230, 181, .25); }
.docs-site .dev-secret-panel strong { color: var(--mint); }
.docs-site .dev-secret-panel p { color: var(--muted); }
.docs-site .dev-secret-value { background: var(--terminal); border-color: rgba(62, 230, 181, .25); color: #c9f5e6; }
.docs-site .dev-toast { background: #1a2030; color: #fff; }
.docs-site .dev-footer { background: #05070a; }
.docs-site .doc-search-dialog { background: #0b0e15; border-color: rgba(255, 255, 255, .14); box-shadow: 0 24px 80px rgba(0, 0, 0, .6); }
.docs-site .doc-search-input input { background: transparent; color: var(--ink); }
.docs-site .doc-search-results a:hover, .docs-site .doc-search-results a:focus { background: var(--surface-strong); }
.docs-site .doc-toc a:hover, .docs-site .doc-toc a.active { color: #fff; }
.docs-site table th { color: var(--ink); }
@media (max-width: 1000px) {
  .docs-site .dev-sidebar { background: #090c12; }
}
@media (prefers-reduced-motion: reduce) {
  .public-site .button, .docs-site .doc-entry-grid > a { transition: none; }
}

/* Developer docs: write-method labels, plan tiers, changelog */
.docs-site .method.post { background: rgba(77, 141, 255, .14); color: #9fc0ff; }
.docs-site .method.patch { background: rgba(255, 191, 71, .12); color: #ffd38a; }
.docs-site .method.delete { background: rgba(255, 122, 107, .12); color: var(--coral); }
.dev-tier-grid { display: grid; gap: 10px; margin-top: 22px; }
.dev-tier-grid > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dev-tier-grid b { font-size: 13px; }
.dev-tier-grid span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.dev-changelog { display: grid; gap: 14px; margin-top: 22px; }
.dev-changelog > div { display: grid; grid-template-columns: 70px 96px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dev-changelog b { color: #9fc0ff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.dev-changelog time { color: var(--subtle); font-size: 12px; }
.dev-changelog ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.dev-changelog a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 680px) {
  .dev-tier-grid > div, .dev-changelog > div { grid-template-columns: 1fr; gap: 6px; }
}

/* Status page */
.status-overall { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.status-overall div { display: grid; gap: 4px; }
.status-overall strong { font-size: 18px; }
.status-overall span:not(.status-dot) { color: var(--subtle); font-size: 12px; }
.status-dot { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; background: var(--subtle); }
.status-overall[data-state="operational"] { border-color: rgba(62, 230, 181, .3); background: rgba(62, 230, 181, .06); }
.status-overall[data-state="operational"] .status-dot { background: var(--mint); box-shadow: 0 0 0 6px rgba(62, 230, 181, .15); }
.status-overall[data-state="degraded"] { border-color: rgba(255, 191, 71, .35); background: rgba(255, 191, 71, .06); }
.status-overall[data-state="degraded"] .status-dot { background: #ffbf47; box-shadow: 0 0 0 6px rgba(255, 191, 71, .15); }
.status-components { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row div { display: grid; gap: 2px; min-width: 0; }
.status-row strong { font-size: 15px; }
.status-row span { color: var(--muted); font-size: 12px; }
.status-row b { flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; font-size: 12px; background: var(--surface-strong); color: var(--muted); }
.status-row b[data-state="operational"] { background: rgba(62, 230, 181, .12); color: var(--mint); }
.status-row b[data-state="degraded"] { background: rgba(255, 191, 71, .12); color: #ffd38a; }
.status-shell .content-section code { color: #c7d6f2; background: rgba(255, 255, 255, .07); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 540px) {
  .status-overall, .status-row { padding: 16px; }
}
