/*
 * Spiek design tokens, light and dark (decision 0020).
 *
 * Ported from the UI prototype's index.css (commit
 * a66cfe0), with the same names and values, so the web app (M5) can use this
 * file as it is. Change a value here and in the prototype together.
 *
 * The extension follows the system's light or dark setting. A page that has its
 * own theme switch (the web app) sets class="dark" or class="light" on <html>.
 * Fonts are not bundled yet, so Inter and IBM Plex Mono show only where
 * installed; the stacks fall back to the system fonts.
 */

:root {
  color-scheme: light;

  /* Colour: the prototype's light theme. */
  --signature: #0e6b6b;
  --signature-deep: #094848;
  --signature-tint: #e3f0ef;
  --on-signature: #ffffff;
  --canvas: #f6f4ee;
  --surface: #ffffff;
  --ink: #141414;
  --ink-body: #3a3a3a;
  --ink-muted: #5c5a55;
  --border-color: #dedad0;
  --status-ok: #2e9e5e;
  --status-wait: #8f5b0b;
  --status-error: #b42318;
  --shadow-raised: 0 1px 2px rgb(20 20 20 / 6%), 0 8px 24px -4px rgb(20 20 20 / 10%);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-wordmark: 18px;

  /* Space and shape (the prototype's Tailwind steps, in pixels) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* Motion: 130 ms for hover and focus */
  --duration-fast: 130ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark: the prototype's dark theme. Two copies, because CSS can't share one
   block between a media query and a class. Keep them the same. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --signature: #4fb3ae;
    --signature-deep: #a6dcd8;
    --signature-tint: #12302f;
    --on-signature: #062424;
    --canvas: #121413;
    --surface: #1b1e1d;
    --ink: #f2f1ec;
    --ink-body: #d6d5cf;
    --ink-muted: #a9a8a1;
    --border-color: #2e3331;
    --status-ok: #7fd49f;
    --status-wait: #e3b04b;
    --status-error: #f27a6f;
    --shadow-raised: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -4px rgb(0 0 0 / 45%);
  }
}

:root.dark {
  color-scheme: dark;
  --signature: #4fb3ae;
  --signature-deep: #a6dcd8;
  --signature-tint: #12302f;
  --on-signature: #062424;
  --canvas: #121413;
  --surface: #1b1e1d;
  --ink: #f2f1ec;
  --ink-body: #d6d5cf;
  --ink-muted: #a9a8a1;
  --border-color: #2e3331;
  --status-ok: #7fd49f;
  --status-wait: #e3b04b;
  --status-error: #f27a6f;
  --shadow-raised: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -4px rgb(0 0 0 / 45%);
}
