/* Zearch tokens: the one source of colour, type, space, radius, elevation, motion and layers.
   Loaded first by the app (index.html → styles.css) and the public pages (pricing, developers → site.css).
   "Ethereal Glass": near-black OLED dark and a cool silver-white light theme. Monochrome identity, one cool
   accent, functional status colours (see BRAND.md). Light is the base; dark follows the system, or the
   Settings toggle (data-theme on <html>). Component files use these names and no raw values. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  /* canvas and surfaces */
  --bg: #eef0f6;
  --rail: #f8f9fc;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceef5;
  --sunken: #f1f3f8;
  --field: #f6f7fb;
  --pop: #ffffff;
  /* hairlines */
  --line: #0f172a14;
  --line-2: #0f172a24;
  --line-3: #7c8496;
  /* text (AA on every surface above) */
  --ink: #0c0e14;
  --ink-2: #2b303b;
  --muted: #565c6b;
  --subtle: #626878;
  --on-ink: #ffffff;
  /* one cool accent for focus, indicators, glows and citations */
  --accent: #3a4fe0;
  --accent-ink: #2c3fc4;
  --accent-soft: #3a4fe01a;
  --focus: #3a4fe0;
  --hover: #0f172a0d;
  --backdrop: #0b0f1a59;
  /* double bezel: outer shell tint + hairline ring around an inner core */
  --shell: #0f172a08;
  --ring: #0f172a1a;
  --hi: inset 0 1px 0 #ffffffe6;
  --bezel: 0 0 #0000;
  --card-sheen: linear-gradient(180deg, #ffffff 0%, #ffffff00 38%);
  --amb: 0 1px 2px #0f172a0a, 0 10px 28px -18px #1e2a5033;
  --amb-lg: 0 32px 80px -24px #1e2a5047, 0 8px 24px -8px #1e2a5019;
  --shimmer: #ffffffb3;
  --island: #ffffff24;
  --mesh-1: #6d7cff26; --mesh-2: #38bdf822; --mesh-3: #a78bfa1f;
  --hero-a: #ffffffcc; --hero-b: #e9edfb;
  --glow: #5b6cf033;
  /* composer glass, neumorphic light and shade, and the Zearch gradient */
  --glass: #ffffffcc; --core: #fbfcfe; --neu-hi: #ffffff; --neu-lo: #1e2a5026; --neu-in: #ffffff;
  --g1: #5b6cf0; --g2: #22b3e6; --g3: #9b7bf2;
  --mark-bg: #0c0e14;
  --mark-ink: #ffffff;
  --noise: .022;
  /* functional status: text on its tinted background, and a solid fill for dots and bars */
  --bad: #a3271c;
  --ok: #14693a; --ok-bg: #e2f3e9; --ok-fill: #1f9d5b;
  --warn: #874700; --warn-bg: #fdefd6; --warn-fill: #c47f00;
  --err: #a3271c; --err-bg: #fce8e6; --err-fill: #d64537;
  --run: #1d43b8; --run-bg: #e5ecff; --run-fill: #2f5fd0;
  --idle: #454b59; --idle-bg: #eceef2; --idle-fill: #7c8494;
  --on-danger: #ffffff;
  /* categorical, for source tiers */
  --c1: #2450c8; --c2: #c2691a; --c3: #6b7280;
  /* type */
  --f-ui: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --t-xs: 12px;
  --t-sm: 13px;
  --t-md: 15px;
  --t-lg: 17px;
  --t-xl: clamp(26px, 3.2vw, 32px);
  --t-display: clamp(34px, 5.4vw, 60px);
  /* radius: inner cores are concentric with the 6px bezel around them */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-4: 22px;
  --r-5: 28px;
  --r-pill: 999px;
  /* 4/8 spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  /* layout */
  --rail-width: 256px;
  --topbar-h: 60px;
  --answer-width: 768px;
  --home-width: 940px;
  --prose-width: 68ch;
  --hit: 44px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --t-in: var(--dur-3);
  --t-hover: var(--dur-1);
  /* ---------- added in the shared token file (docs/ux/UI_AUDIT.md) ---------- */
  /* control boundary: inputs and other fields, 3.2:1 on --bg and --surface (WCAG 1.4.11) */
  --line-field: #0f172a7c;
  /* evidence semantics: they reuse the status colours so meaning stays consistent */
  --verified: var(--ok); --verified-fill: var(--ok-fill);
  --partial: var(--warn); --partial-fill: var(--warn-fill);
  --unverified: var(--idle); --unverified-fill: var(--idle-fill);
  --tier-official: var(--accent-ink); --tier-publisher: var(--ink-2); --tier-reference: var(--muted); --tier-low: var(--warn);
  /* highlighted source passage (14:1 light, 9.7:1 dark) */
  --hl-bg: #fff2b8; --hl-ink: #2b2200;
  /* elevation: 1 resting surface, 2 popover and menu, 3 dialog and sheet */
  --elev-1: 0 1px 2px #0f172a0a, 0 6px 16px -12px #1e2a5026;
  --elev-2: 0 1px 2px #0f172a0f, 0 16px 36px -14px #1e2a5047;
  --elev-3: var(--amb-lg);
  /* type scale (Geist and Geist Mono only) */
  --fs-micro: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 16px;
  --fs-prose: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: clamp(26px, 2.6vw, 32px);
  --fs-3xl: clamp(32px, 4.2vw, 44px);
  --fs-display: clamp(40px, 6.4vw, 72px);
  --lh-tight: 1.06; --lh-snug: 1.2; --lh-ui: 1.45; --lh-prose: 1.65;
  --tr-display: -0.04em; --tr-heading: -0.025em; --tr-ui: -0.006em; --tr-label: 0.08em; --tr-wordmark: -0.045em;
  --measure: 70ch;
  /* radius extras around the existing 8/12/16/22/28 steps */
  --r-bar: 3px;
  --r-0: 6px;
  --bezel-pad: 6px;
  /* motion (D1): short and purposeful; one curve */
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --dur-1: 150ms;
  --dur-2: 220ms;
  --dur-3: 300ms;
  --stagger: 40ms;
  /* layers: named, values unchanged from before so stacking order is the same */
  --z-edge: 15; --z-scrim: 20; --z-rail: 30; --z-menu: 40; --z-mode-scrim: 59; --z-mode: 60;
  --z-toast: 80; --z-popover: 90; --z-overlay: 95; --z-grain: 200; --z-skip: 300;
}
/* Dark palette. It appears twice on purpose: once for the system setting, once for the manual choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #060608; --rail: #0b0c10; --surface: #0f1014; --surface-2: #15161c; --surface-3: #1d1f27; --sunken: #0a0a0d; --field: #0a0b0f; --pop: #121319;
    --line: #ffffff14; --line-2: #ffffff24; --line-3: #6b7082;
    --ink: #f1f2f6; --ink-2: #c9ccd6; --muted: #9a9eae; --subtle: #8b8fa0; --on-ink: #0a0a0d;
    --accent: #8fa2ff; --accent-ink: #b4c1ff; --accent-soft: #8fa2ff24; --focus: #9db0ff;
    --hover: #ffffff0f; --backdrop: #000000a6;
    --shell: #ffffff08; --ring: #ffffff17; --hi: inset 0 1px 1px #ffffff1f;
    --amb: 0 1px 0 #ffffff05, 0 16px 32px -22px #000000cc; --card-sheen: linear-gradient(180deg, #ffffff0a 0%, #ffffff00 42%); --amb-lg: 0 40px 90px -24px #000000e6, 0 0 0 1px #ffffff0a;
    --shimmer: #ffffff14; --island: #0a0a0d1a;
    --mesh-1: #5865f238; --mesh-2: #2f7cff26; --mesh-3: #8b5cf624;
    --hero-a: #ffffff0a; --hero-b: #ffffff03; --glow: #6a7cff3d;
    --glass: #15161ccc; --core: #121319; --neu-hi: #ffffff0a; --neu-lo: #000000b3; --neu-in: #ffffff14;
    --g1: #7181ff; --g2: #38c2f0; --g3: #a78bfa;
    --mark-bg: #ececf1; --mark-ink: #0a0a0d; --noise: .028;
    --bad: #e38d84;
    --ok: #7bdca3; --ok-bg: #12291b; --ok-fill: #3fbf7f;
    --warn: #f3c274; --warn-bg: #2e230d; --warn-fill: #e0a13a;
    --err: #f5a39c; --err-bg: #331a19; --err-fill: #e5695d;
    --run: #a5bdff; --run-bg: #18254a; --run-fill: #7ea2ff;
    --idle: #babfcb; --idle-bg: #23252d; --idle-fill: #8a91a1;
    --on-danger: #1b1b1b;
    --c1: #7ea2ff; --c2: #f0a24d; --c3: #9aa3b2;
    --line-field: #ffffff5c;
    --hl-bg: #4a3d0f; --hl-ink: #fff4cc;
    --elev-1: 0 1px 0 #ffffff05, 0 10px 24px -18px #000000cc;
    --elev-2: 0 1px 0 #ffffff08, 0 20px 44px -16px #000000e6, 0 0 0 1px #ffffff0a;
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #060608; --rail: #0b0c10; --surface: #0f1014; --surface-2: #15161c; --surface-3: #1d1f27; --sunken: #0a0a0d; --field: #0a0b0f; --pop: #121319;
  --line: #ffffff14; --line-2: #ffffff24; --line-3: #6b7082;
  --ink: #f1f2f6; --ink-2: #c9ccd6; --muted: #9a9eae; --subtle: #8b8fa0; --on-ink: #0a0a0d;
  --accent: #8fa2ff; --accent-ink: #b4c1ff; --accent-soft: #8fa2ff24; --focus: #9db0ff;
  --hover: #ffffff0f; --backdrop: #000000a6;
  --shell: #ffffff08; --ring: #ffffff17; --hi: inset 0 1px 1px #ffffff1f;
  --amb: 0 1px 0 #ffffff05, 0 16px 32px -22px #000000cc; --card-sheen: linear-gradient(180deg, #ffffff0a 0%, #ffffff00 42%); --amb-lg: 0 40px 90px -24px #000000e6, 0 0 0 1px #ffffff0a;
  --shimmer: #ffffff14; --island: #0a0a0d1a;
  --mesh-1: #5865f238; --mesh-2: #2f7cff26; --mesh-3: #8b5cf624;
  --hero-a: #ffffff0a; --hero-b: #ffffff03; --glow: #6a7cff3d;
    --glass: #15161ccc; --core: #121319; --neu-hi: #ffffff0a; --neu-lo: #000000b3; --neu-in: #ffffff14;
    --g1: #7181ff; --g2: #38c2f0; --g3: #a78bfa;
  --mark-bg: #ececf1; --mark-ink: #0a0a0d; --noise: .028;
  --bad: #e38d84;
  --ok: #7bdca3; --ok-bg: #12291b; --ok-fill: #3fbf7f;
  --warn: #f3c274; --warn-bg: #2e230d; --warn-fill: #e0a13a;
  --err: #f5a39c; --err-bg: #331a19; --err-fill: #e5695d;
  --run: #a5bdff; --run-bg: #18254a; --run-fill: #7ea2ff;
  --idle: #babfcb; --idle-bg: #23252d; --idle-fill: #8a91a1; --on-danger: #1b1b1b;
  --c1: #7ea2ff; --c2: #f0a24d; --c3: #9aa3b2;
  --line-field: #ffffff5c;
  --hl-bg: #4a3d0f; --hl-ink: #fff4cc;
  --elev-1: 0 1px 0 #ffffff05, 0 10px 24px -18px #000000cc;
  --elev-2: 0 1px 0 #ffffff08, 0 20px 44px -16px #000000e6, 0 0 0 1px #ffffff0a;
}
@media (prefers-contrast: more) {
  :root { --line: var(--line-3); --line-2: var(--subtle); --ring: var(--line-3); --muted: var(--ink-2); --subtle: var(--ink-2); }
}

/* Reduced motion: the durations collapse (styles.css also cuts animations outright). */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 1ms; --stagger: 0ms; }
}
:root[data-motion=reduce] { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 1ms; --stagger: 0ms; }
