/* Design tokens: colour (OKLCH, so equal lightness looks equally bright),
   type, shape and motion. Light is "paper", dark is "ink". The theme follows
   the system unless <html data-theme> says otherwise (set by shell.js). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/vendor/fonts/inter-latin-opsz-normal.woff2) format("woff2-variations");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/vendor/fonts/inter-latin-ext-opsz-normal.woff2) format("woff2-variations");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/vendor/fonts/inter-cyrillic-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-latin-opsz-normal.woff2) format("woff2-variations");
  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: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-latin-ext-opsz-normal.woff2) format("woff2-variations");
  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: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-cyrillic-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-latin-opsz-italic.woff2) format("woff2-variations");
  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: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-latin-ext-opsz-italic.woff2) format("woff2-variations");
  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: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/static/vendor/fonts/literata-cyrillic-opsz-italic.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  color-scheme: light;
  /* paper */
  --bg: oklch(0.982 0.006 85);
  --surface: oklch(0.962 0.008 85);
  --card: oklch(0.997 0.003 85);
  --raised: oklch(1 0 0);
  --sunken: oklch(0.948 0.009 85);
  --hover: oklch(0.24 0.02 280 / 0.05);
  --line: oklch(0.24 0.02 280 / 0.10);
  --line-strong: oklch(0.24 0.02 280 / 0.18);
  --fg: oklch(0.24 0.02 280);
  --fg-soft: oklch(0.36 0.02 280);
  --muted: oklch(0.51 0.016 280);
  --faint: oklch(0.66 0.012 280);
  --accent: oklch(0.52 0.17 285);
  --accent-hover: oklch(0.47 0.18 285);
  --accent-fg: oklch(0.99 0.01 285);
  --accent-text: oklch(0.47 0.17 285);
  --accent-soft: oklch(0.52 0.17 285 / 0.10);
  --accent-line: oklch(0.52 0.17 285 / 0.35);
  /* grades: equal lightness, low chroma */
  --again: oklch(0.58 0.15 20);
  --hard: oklch(0.64 0.12 65);
  --good: oklch(0.57 0.11 165);
  --easy: oklch(0.57 0.11 240);
  --ok: var(--good);
  --err: var(--again);
  /* hidden text (blanks) */
  --hide: oklch(0.90 0.07 85);
  --hide-fg: oklch(0.38 0.08 65);
  /* memory strength: weak -> strong */
  --mem-weak: oklch(0.62 0.12 20);
  --mem-mid: oklch(0.75 0.10 75);
  --mem-strong: oklch(0.62 0.10 165);
  --mem-new: oklch(0.66 0.012 280);
  /* topic colours: hue comes from the topic (style="--hue: N") */
  --topic-l: 0.62;
  --topic-c: 0.12;
  --glass: oklch(0.997 0.003 85 / 0.78);
  --shadow-1: 0 1px 2px oklch(0.24 0.02 280 / 0.06), 0 1px 1px oklch(0.24 0.02 280 / 0.04);
  --shadow-2: 0 2px 6px oklch(0.24 0.02 280 / 0.06), 0 12px 32px oklch(0.24 0.02 280 / 0.10);
  --shadow-3: 0 4px 12px oklch(0.24 0.02 280 / 0.08), 0 24px 64px oklch(0.24 0.02 280 / 0.16);

  /* Inter and Literata have no emoji: the system's colour emoji font fills in. */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-read: "Literata", "Iowan Old Style", Georgia, serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8667rem;
  --text-md: 1rem;
  --text-lg: 1.2rem;
  --text-xl: 1.6rem;
  --text-2xl: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem);
  --text-card: clamp(1.3rem, 0.95rem + 0.9vw, 1.85rem);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;
  --sidebar-w: 252px;

  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: var(--ease-out);
  --spring-bouncy: var(--ease-out);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.024, 0.084, 0.167, 0.264, 0.365, 0.465, 0.559, 0.646, 0.723, 0.79, 0.847, 0.894, 0.932, 0.962, 0.985, 1.002, 1.014, 1.021, 1.026, 1.028, 1.028, 1.027, 1.025, 1.023, 1.02, 1.017, 1.014, 1.012, 1.009, 1.007, 1.005, 1.004, 1.003, 1.002, 1.001, 1);
    --spring-bouncy: linear(0, 0.053, 0.185, 0.359, 0.547, 0.725, 0.879, 1, 1.085, 1.137, 1.16, 1.161, 1.145, 1.119, 1.089, 1.059, 1.032, 1.009, 0.992, 0.981, 0.975, 0.973, 0.975, 0.978, 0.983, 0.988, 0.993, 0.997, 1, 1.002, 1.004, 1.004, 1.004, 1.004, 1.003, 1.002, 1);
  }
}

/* ink. Written twice: for the system setting and for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(0.165 0.012 280);
    --surface: oklch(0.185 0.013 280);
    --card: oklch(0.212 0.014 280);
    --raised: oklch(0.245 0.015 280);
    --sunken: oklch(0.15 0.012 280);
    --hover: oklch(0.95 0.02 280 / 0.06);
    --line: oklch(0.92 0.02 280 / 0.08);
    --line-strong: oklch(0.92 0.02 280 / 0.15);
    --fg: oklch(0.94 0.008 85);
    --fg-soft: oklch(0.85 0.01 85);
    --muted: oklch(0.71 0.014 280);
    --faint: oklch(0.55 0.014 280);
    --accent: oklch(0.72 0.13 285);
    --accent-hover: oklch(0.77 0.12 285);
    --accent-fg: oklch(0.18 0.03 285);
    --accent-text: oklch(0.79 0.11 285);
    --accent-soft: oklch(0.72 0.13 285 / 0.14);
    --accent-line: oklch(0.72 0.13 285 / 0.4);
    --again: oklch(0.70 0.13 20);
    --hard: oklch(0.79 0.11 70);
    --good: oklch(0.76 0.10 165);
    --easy: oklch(0.75 0.10 235);
    --hide: oklch(0.40 0.07 75);
    --hide-fg: oklch(0.94 0.05 85);
    --mem-weak: oklch(0.64 0.11 20);
    --mem-mid: oklch(0.77 0.09 78);
    --mem-strong: oklch(0.75 0.09 165);
    --mem-new: oklch(0.55 0.014 280);
    --topic-l: 0.74;
    --topic-c: 0.10;
    --glass: oklch(0.212 0.014 280 / 0.78);
    --shadow-1: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-2: 0 2px 6px oklch(0 0 0 / 0.25), 0 12px 32px oklch(0 0 0 / 0.35);
    --shadow-3: 0 4px 12px oklch(0 0 0 / 0.3), 0 24px 64px oklch(0 0 0 / 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.165 0.012 280);
  --surface: oklch(0.185 0.013 280);
  --card: oklch(0.212 0.014 280);
  --raised: oklch(0.245 0.015 280);
  --sunken: oklch(0.15 0.012 280);
  --hover: oklch(0.95 0.02 280 / 0.06);
  --line: oklch(0.92 0.02 280 / 0.08);
  --line-strong: oklch(0.92 0.02 280 / 0.15);
  --fg: oklch(0.94 0.008 85);
  --fg-soft: oklch(0.85 0.01 85);
  --muted: oklch(0.71 0.014 280);
  --faint: oklch(0.55 0.014 280);
  --accent: oklch(0.72 0.13 285);
  --accent-hover: oklch(0.77 0.12 285);
  --accent-fg: oklch(0.18 0.03 285);
  --accent-text: oklch(0.79 0.11 285);
  --accent-soft: oklch(0.72 0.13 285 / 0.14);
  --accent-line: oklch(0.72 0.13 285 / 0.4);
  --again: oklch(0.70 0.13 20);
  --hard: oklch(0.79 0.11 70);
  --good: oklch(0.76 0.10 165);
  --easy: oklch(0.75 0.10 235);
  --hide: oklch(0.40 0.07 75);
  --hide-fg: oklch(0.94 0.05 85);
  --mem-weak: oklch(0.64 0.11 20);
  --mem-mid: oklch(0.77 0.09 78);
  --mem-strong: oklch(0.75 0.09 165);
  --mem-new: oklch(0.55 0.014 280);
  --topic-l: 0.74;
  --topic-c: 0.10;
  --glass: oklch(0.212 0.014 280 / 0.78);
  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-2: 0 2px 6px oklch(0 0 0 / 0.25), 0 12px 32px oklch(0 0 0 / 0.35);
  --shadow-3: 0 4px 12px oklch(0 0 0 / 0.3), 0 24px 64px oklch(0 0 0 / 0.5);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 1ms;
    --dur-2: 1ms;
    --dur-3: 1ms;
    --spring: linear;
    --spring-bouncy: linear;
  }
}
