/* Design tokens: the only place with colors, fonts, radii and motion curves.
   Components use var(--...) only. Light values here, dark below (twice, so both the
   system setting and the in-app switch work). See docs/frontend-guidelines.md. */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --paper: #fffdf8;
  --fg: #15171c;
  --muted: #62667a; /* 5.1:1 on --bg (WCAG AA) */
  --line: rgba(60, 64, 82, 0.14);
  --fill: rgba(60, 64, 82, 0.06);
  --accent: #2f5fd0;
  --accent-soft: rgba(47, 95, 208, 0.1);
  --on-accent: #ffffff;
  --know: #14753f; /* 5.2:1 on --surface */
  --again: #c2410c; /* 4.6:1 on --bg */
  --subject-english: #2f5fd0;
  --subject-history: #8a5a2b;
  --subject-ukr: #c99a06;
  --subject-math: #6b5bd2;
  --shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 12px 32px rgba(20, 24, 40, 0.1);
  --blur-bg: rgba(242, 242, 247, 0.8);

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-word: ui-serif, "New York", "Newsreader", Georgia, serif;

  --radius-group: 14px;
  --radius-card: 22px;
  --radius-study: 28px;
  --tabbar-h: 56px;
  --sidebar-w: 248px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0f; --surface: #1b1d22; --paper: #22242a; --fg: #f2f3f6; --muted: #9a9fac;
    --line: rgba(255, 255, 255, 0.1); --fill: rgba(255, 255, 255, 0.06);
    --accent: #7f9cff; --accent-soft: rgba(127, 156, 255, 0.14); --on-accent: #0b0c0f;
    --know: #3fd082; --again: #ff8a52;
    --subject-english: #7f9cff; --subject-history: #d29a62; --subject-ukr: #f0c63c; --subject-math: #a598ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.5);
    --blur-bg: rgba(11, 12, 15, 0.74);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f; --surface: #1b1d22; --paper: #22242a; --fg: #f2f3f6; --muted: #9a9fac;
  --line: rgba(255, 255, 255, 0.1); --fill: rgba(255, 255, 255, 0.06);
  --accent: #7f9cff; --accent-soft: rgba(127, 156, 255, 0.14); --on-accent: #0b0c0f;
  --know: #3fd082; --again: #ff8a52;
  --subject-english: #7f9cff; --subject-history: #d29a62; --subject-ukr: #f0c63c; --subject-math: #a598ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px rgba(0, 0, 0, 0.5);
  --blur-bg: rgba(11, 12, 15, 0.74);
  color-scheme: dark;
}
