/* Design tokens. Owned by the architect; do not edit in work packages. */

@font-face {
  font-family: "Charis SIL";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/charis-sil-latin-400-normal.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: "Charis SIL";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/charis-sil-latin-ext-400-normal.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: "Charis SIL";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/charis-sil-latin-700-normal.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: "Charis SIL";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/charis-sil-latin-ext-700-normal.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 {
  color-scheme: light;

  /* Type */
  --font-ipa: "Charis SIL", "Gentium Plus", "Doulos SIL", "Noto Serif", "DejaVu Serif", serif;
  --font-serif: "Charis SIL", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --text-xs: 0.78rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.2rem;
  --text-xl: 1.6rem;
  --text-2xl: 2.3rem;
  --text-3xl: clamp(2.4rem, 6vw, 3.4rem);
  --text-symbol: clamp(6rem, 30vw, 10.5rem);   /* the hero symbol on a card */
  --text-symbol-md: clamp(3rem, 12vw, 4.5rem); /* quiz prompt, symbol options */
  --text-symbol-sm: 1.9rem;                    /* chart cells */

  /* Space (4px base) */
  --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: 4.5rem;

  --page-width: 46rem;
  --gutter: 1rem;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --rule: 1px;

  /* Paper and ink */
  --paper: #f5f0e6;
  --paper-raised: #fbf8f1;
  --paper-sunk: #ece5d6;
  --ink: #24201a;
  --ink-soft: #5d564b;
  --ink-faint: #666055;
  --line: #d9d0be;
  --line-strong: #b9ae98;

  /* One accent: ink-stamp red */
  --accent: #b23a2a;
  --accent-ink: #fff9f2;
  --accent-soft: #f1ddd4;

  /* Answer states */
  --right: #2f6f4f;
  --right-soft: #dcebdd;
  --wrong: #a8342b;
  --wrong-soft: #f3dcd6;

  /* Sound-class colour code: quiet, used as marks and tints, never as large fills */
  --c-short-vowel: #ac542b;
  --c-long-vowel: #8c2f4c;
  --c-diphthong: #896714;
  --c-voiced: #2c6a78;
  --c-voiceless: #55617a;
  --c-short-vowel-soft: #f1dfd2;
  --c-long-vowel-soft: #eed8df;
  --c-diphthong-soft: #efe4c4;
  --c-voiced-soft: #d6e6e8;
  --c-voiceless-soft: #dfe2ea;

  --shadow: 0 1px 0 rgba(36, 32, 26, 0.04), 0 8px 24px -12px rgba(36, 32, 26, 0.18);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 140ms;
}

/* Dark theme: OS preference unless the user forced light; or forced dark. Keep both blocks equal. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1b1916;
    --paper-raised: #24211d;
    --paper-sunk: #151311;
    --ink: #ece5d8;
    --ink-soft: #b5ac9c;
    --ink-faint: #a0998d;
    --line: #38342d;
    --line-strong: #524c42;
    --accent: #e0705c;
    --accent-ink: #1b1916;
    --accent-soft: #43271f;
    --right: #7dbf98;
    --right-soft: #1f3529;
    --wrong: #e58477;
    --wrong-soft: #45231e;
    --c-short-vowel: #e0946c;
    --c-long-vowel: #d98aa4;
    --c-diphthong: #d6b458;
    --c-voiced: #7fbcc9;
    --c-voiceless: #a3adc6;
    --c-short-vowel-soft: #3d2a20;
    --c-long-vowel-soft: #3b2430;
    --c-diphthong-soft: #3a311a;
    --c-voiced-soft: #1d3338;
    --c-voiceless-soft: #282d3b;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b1916;
  --paper-raised: #24211d;
  --paper-sunk: #151311;
  --ink: #ece5d8;
  --ink-soft: #b5ac9c;
  --ink-faint: #a0998d;
  --line: #38342d;
  --line-strong: #524c42;
  --accent: #e0705c;
  --accent-ink: #1b1916;
  --accent-soft: #43271f;
  --right: #7dbf98;
  --right-soft: #1f3529;
  --wrong: #e58477;
  --wrong-soft: #45231e;
  --c-short-vowel: #e0946c;
  --c-long-vowel: #d98aa4;
  --c-diphthong: #d6b458;
  --c-voiced: #7fbcc9;
  --c-voiceless: #a3adc6;
  --c-short-vowel-soft: #3d2a20;
  --c-long-vowel-soft: #3b2430;
  --c-diphthong-soft: #3a311a;
  --c-voiced-soft: #1d3338;
  --c-voiceless-soft: #282d3b;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

/* Sound class → local custom properties. Put data-cls on any element (card, cell, option). */
[data-cls="short-vowel"] { --cls: var(--c-short-vowel); --cls-soft: var(--c-short-vowel-soft); }
[data-cls="long-vowel"]  { --cls: var(--c-long-vowel);  --cls-soft: var(--c-long-vowel-soft); }
[data-cls="diphthong"]   { --cls: var(--c-diphthong);   --cls-soft: var(--c-diphthong-soft); }
[data-cls="voiced"]      { --cls: var(--c-voiced);      --cls-soft: var(--c-voiced-soft); }
[data-cls="voiceless"]   { --cls: var(--c-voiceless);   --cls-soft: var(--c-voiceless-soft); }
