/* Design tokens. OpenAI's palette: pure black and pure white, one grey for
   the secondary button (#1f1f1f) and one for secondary text (#989898). */

:root {
  /* Type families. A grotesk for headings in the manner of OpenAI and Cohere,
     Geist for everything read at speed, and a serif only for the wordmark. */
  --font-head: "Instrument Sans", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-logo: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;

  /* Surfaces, from the page backwards to the frontmost sheet. */
  --bg: #000000;
  --surface: #0d0d0d;
  --surface-2: #1f1f1f;
  --surface-3: #2a2a2a;
  --scrim: rgba(0, 0, 0, 0.7);

  /* Overlays only. The bar at the top is solid. */
  --glass: rgba(22, 22, 22, 0.94);
  --glass-light: rgba(255, 255, 255, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.1);

  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --text: #ffffff;
  --text-2: #989898;
  --text-3: #8a8a8a;
  --text-invert: #000000;

  /* Type that sits on a tile. The tiles are always light, so it is always ink. */
  --ink: #0a0a0a;
  --ink-2: rgba(10, 10, 10, 0.66);

  /* One accent, taken from the tiles' own blue, plus the states a report can be in. */
  --accent: #368df1;
  --ok: #2cd3a5;
  --pending: #fcb76a;
  --drift: #ff7a6b;

  /* Spacing on a 4px rhythm, in rem so it scales with the reader's text size. */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 3rem;     --s-8: 4rem;
  --s-9: 6rem;

  /* Round at rest: pills for buttons, soft corners for everything else. */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, 0.8);

  /* Nothing moves on hover. A workspace panel may take this quiet shadow. */
  --lift-quiet: 0 14px 34px -18px rgba(0, 0, 0, 0.95);

  /* Response times, named after the interaction rather than the number. */
  --t-press: 90ms;
  --t-hover: 180ms;
  --t-move: 380ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --surface-3: #e8e8e8;
  --scrim: rgba(0, 0, 0, 0.28);

  --glass: rgba(255, 255, 255, 0.95);
  --glass-light: rgba(0, 0, 0, 0.05);
  --glass-edge: rgba(0, 0, 0, 0.08);

  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);

  --text: #000000;
  --text-2: #676767;
  --text-3: #6e6e6e;
  --text-invert: #ffffff;

  --accent: #1f6fd6;
  --ok: #077a52;
  --pending: #a35c00;
  --drift: #d0402f;

  --shadow-sm: 0 1px 2px rgba(20, 20, 24, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(20, 20, 24, 0.18);
  --shadow-lg: 0 36px 70px -30px rgba(20, 20, 24, 0.28);

  --lift-quiet: 0 14px 30px -18px rgba(20, 20, 24, 0.22);

  color-scheme: light;
}

/* Frosty instead of clear, solid instead of frosty, when asked. Both
   selectors, or the light theme's own values would win. */
@media (prefers-reduced-transparency: reduce) {
  :root, :root[data-theme="light"] { --glass: var(--surface); }
}
@media (prefers-contrast: more) {
  :root, :root[data-theme="light"] { --line: var(--line-strong); --text-2: var(--text); --text-3: var(--text-2); }
}
