/* Hallmark · design tokens · theme: studied-DNA (source: game-of-life/styles.css, the author's own
 * design) · paper oklch(97.4% 0.007 75) · accent oklch(63.5% 0.19 38) vermilion · display
 * Instrument Serif · body Geist. Every color and font in styles.css comes from here. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;

  --color-paper: oklch(97.4% 0.007 75);
  --color-paper-2: oklch(94.6% 0.009 75);
  --color-rule: oklch(87.5% 0.009 75);
  --color-faint: oklch(52% 0.01 70); /* 4.7:1 on paper-2, for small text */
  --color-muted: oklch(45% 0.011 65);
  --color-ink: oklch(21% 0.012 60);
  --color-ink-hover: oklch(33% 0.012 60);
  --color-accent: oklch(63.5% 0.19 38);
  --color-accent-ink: oklch(51% 0.17 36);
  --color-accent-soft: oklch(92% 0.04 55);
  /* Checked: the answer a reviewer checked, and the tick itself */
  --color-check: oklch(50% 0.13 150);
  --color-check-soft: oklch(93% 0.05 150);
  --color-check-ink: oklch(42% 0.11 150);
  --color-focus: oklch(55% 0.19 38);
  --color-scrim: oklch(20% 0.01 60 / 0.4);
  /* Scroll bars: a solid warm gray thumb on no track (2.4:1 on paper), darker under the pointer,
   * the accent while dragged; solid, so it reads the same on the paper and on the darker desk */
  --color-scroll: oklch(71% 0.012 70);
  --color-scroll-hover: oklch(58% 0.012 68);
  --shadow-whisper: 0 1px 2px oklch(20% 0.01 60 / 0.06);
  --shadow-sheet: 0 20px 60px oklch(20% 0.01 60 / 0.18);

  /* The desk the pages sit on, the sheet a Word or text file is set on, and the highlighter.
   * PDF pages stay white in both themes, so their marks multiply and never change with it. */
  --color-desk: oklch(91.5% 0.01 75);
  --color-pdf-page: oklch(99.5% 0.002 75);
  --color-sheet: oklch(99% 0.004 75);
  --shadow-page: 0 1px 3px oklch(20% 0.01 60 / 0.16);
  --color-mark: oklch(86% 0.1 70 / 0.62);
  --color-mark-focus: oklch(74% 0.16 45 / 0.6);
  --color-mark-text: oklch(89% 0.07 70);
  --color-mark-text-focus: oklch(83% 0.11 55);

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-question: clamp(1.15rem, 1rem + 0.35vw, 1.35rem);
  --text-title: clamp(1.1rem, 0.75rem + 1vh, 1.5rem);
  --text-display: clamp(1.9rem, 1.2rem + 2.4vw, 3rem);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;

  --gutter: clamp(1rem, 2.5vw, 2rem);
  --radius: 12px;
  --radius-sm: 6px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  color-scheme: light;
}

/* Dark: the system's choice unless the toggle chose light, or the toggle's choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-paper: oklch(17.5% 0.008 60);
    --color-paper-2: oklch(21.5% 0.009 60);
    --color-rule: oklch(33% 0.009 60);
    --color-faint: oklch(62% 0.009 65); /* 4.8:1 on paper-2 */
    --color-muted: oklch(75% 0.008 70);
    --color-ink: oklch(94% 0.006 75);
    --color-ink-hover: oklch(84% 0.006 75);
    --color-accent: oklch(70% 0.17 40);
    --color-accent-ink: oklch(77% 0.14 45);
    --color-accent-soft: oklch(30% 0.05 40);
    --color-check: oklch(72% 0.14 150);
    --color-check-soft: oklch(30% 0.05 150);
    --color-check-ink: oklch(82% 0.11 150);
    --color-focus: oklch(74% 0.16 42);
    --color-scrim: oklch(5% 0.01 60 / 0.6);
    --color-scroll: oklch(46% 0.01 65);
    --color-scroll-hover: oklch(58% 0.01 68);
    --shadow-whisper: 0 1px 2px oklch(5% 0.01 60 / 0.4);
    --shadow-sheet: 0 20px 60px oklch(5% 0.01 60 / 0.6);

    --color-desk: oklch(14% 0.007 60);
    --color-sheet: oklch(22% 0.009 60);
    --shadow-page: 0 1px 3px oklch(0% 0 0 / 0.5);
    --color-mark-text: oklch(38% 0.07 55);
    --color-mark-text-focus: oklch(46% 0.12 45);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-paper: oklch(17.5% 0.008 60);
  --color-paper-2: oklch(21.5% 0.009 60);
  --color-rule: oklch(33% 0.009 60);
  --color-faint: oklch(62% 0.009 65); /* 4.8:1 on paper-2 */
  --color-muted: oklch(75% 0.008 70);
  --color-ink: oklch(94% 0.006 75);
  --color-ink-hover: oklch(84% 0.006 75);
  --color-accent: oklch(70% 0.17 40);
  --color-accent-ink: oklch(77% 0.14 45);
  --color-accent-soft: oklch(30% 0.05 40);
  --color-check: oklch(72% 0.14 150);
  --color-check-soft: oklch(30% 0.05 150);
  --color-check-ink: oklch(82% 0.11 150);
  --color-focus: oklch(74% 0.16 42);
  --color-scrim: oklch(5% 0.01 60 / 0.6);
  --color-scroll: oklch(46% 0.01 65);
  --color-scroll-hover: oklch(58% 0.01 68);
  --shadow-whisper: 0 1px 2px oklch(5% 0.01 60 / 0.4);
  --shadow-sheet: 0 20px 60px oklch(5% 0.01 60 / 0.6);

  --color-desk: oklch(14% 0.007 60);
  --color-sheet: oklch(22% 0.009 60);
  --shadow-page: 0 1px 3px oklch(0% 0 0 / 0.5);
  --color-mark-text: oklch(38% 0.07 55);
  --color-mark-text-focus: oklch(46% 0.12 45);

  color-scheme: dark;
}
