/* barrettis kit: tokens.css
   One set of design tokens for share, compress and igo.
   Themes: light and dark. Default follows the system; <html data-theme="light|dark"> forces one.
   No web fonts and no third-party requests: the serif and sans stacks use what the device has
   (New York on iPhone and Mac, Georgia elsewhere), which keeps share free of outside requests. */

:root {
  /* Type */
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;    /* 12 */
  --text-sm: 0.8125rem;  /* 13 */
  --text-base: 1rem;     /* 16, inputs never below this so iOS does not zoom */
  --text-md: 1.0625rem;  /* 17 */
  --text-lg: 1.375rem;   /* 22 */
  --text-xl: 1.875rem;   /* 30 */
  --text-2xl: 2.5rem;    /* 40 */
  --leading-tight: 1.12;
  --leading-body: 1.55;
  --tracking-tight: -0.02em;
  --tracking-caps: 0.08em;

  /* Space (4 px steps) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --page-max: 560px;      /* share, compress */
  --page-max-wide: 760px; /* igo */
  --tap: 44px;            /* smallest touch target */

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* Light theme (default) */
  color-scheme: light;
  --bg: #f6f4ef;            /* paper */
  --surface: #ffffff;
  --surface-2: #efece5;     /* inset fields, code, segmented track */
  --ink: #1b1a17;
  --ink-2: #4a4741;
  --muted: #6e6a62;         /* 5.1:1 on --bg */
  --line: #e2ded5;
  --line-strong: #cbc6ba;
  --accent: #b8431c;        /* burnt vermilion, 5.6:1 on --surface */
  --accent-ink: #ffffff;
  --accent-soft: #f6e3da;
  --primary: #1b1a17;       /* main button: ink */
  --primary-ink: #fbfaf7;
  --good: #1f7a45;
  --good-soft: #e1f1e6;
  --bad: #b3261e;
  --bad-soft: #f8e1df;
  --focus: #b8431c;
  --shadow-1: 0 1px 2px rgb(27 26 23 / 0.06), 0 1px 1px rgb(27 26 23 / 0.04);
  --shadow-2: 0 8px 24px rgb(27 26 23 / 0.08), 0 2px 6px rgb(27 26 23 / 0.05);
  --board-frame: #e9e3d6;   /* igo: mat behind the OGS Plain board */
}

/* Dark theme: system dark, unless the person forced light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121110;
    --surface: #1a1917;
    --surface-2: #232120;
    --ink: #eceae4;
    --ink-2: #c9c5bc;
    --muted: #9d988e;
    --line: #2d2a27;
    --line-strong: #403c37;
    --accent: #f08a5d;
    --accent-ink: #1b1a17;
    --accent-soft: #3a241b;
    --primary: #eceae4;
    --primary-ink: #141312;
    --good: #5ccb88;
    --good-soft: #17301f;
    --bad: #ff8a80;
    --bad-soft: #3a1c1a;
    --focus: #f08a5d;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 10px 30px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.3);
    --board-frame: #26231f;
  }
}

/* Dark theme: forced by the toggle */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110;
  --surface: #1a1917;
  --surface-2: #232120;
  --ink: #eceae4;
  --ink-2: #c9c5bc;
  --muted: #9d988e;
  --line: #2d2a27;
  --line-strong: #403c37;
  --accent: #f08a5d;
  --accent-ink: #1b1a17;
  --accent-soft: #3a241b;
  --primary: #eceae4;
  --primary-ink: #141312;
  --good: #5ccb88;
  --good-soft: #17301f;
  --bad: #ff8a80;
  --bad-soft: #3a1c1a;
  --focus: #f08a5d;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 10px 30px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.3);
  --board-frame: #26231f;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
  }
}
