/* Setka: wspólne tokeny dla LP i aplikacji */
:root {
  --chalk: #F2F3F7;
  --chalk-2: #E6E8F0;
  --ink: #10123A;
  --ink-soft: #4A4E72;
  --line: #CDD0E0;
  --blue: #2F3BFF;
  --blue-ink: #FFFFFF;
  --yellow: #FFC83D;
  --yellow-ink: #10123A;
  --mint: #2BD4A0;
  --violet: #6A4CF0;
  --ok: #138A4A;
  --warn: #B4361C;

  --bg: var(--chalk);
  --surface: #FFFFFF;
  --text: var(--ink);
  --muted: var(--ink-soft);

  /* ilustracje */
  --fig-base: #DCDFEA;
  --fig-skin: #E9EBF2;
  --fig-line: #B9BDD2;
  --fig-body: var(--ink);
  --fig-gap: var(--surface);

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --r-sm: 10px;
  --r-lg: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0D29;
    --surface: #161942;
    --text: #EEF0FA;
    --muted: #A3A7C9;
    --line: #2C3066;
    --chalk-2: #1F2353;
    --blue: #6A74FF;
    --ok: #3DD68C;
    --warn: #FF7A5C;
    --fig-base: #2A2E63;
    --fig-skin: #232757;
    --fig-line: #4A4F8C;
    --fig-body: #EEF0FA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0D29;
  --surface: #161942;
  --text: #EEF0FA;
  --muted: #A3A7C9;
  --line: #2C3066;
  --chalk-2: #1F2353;
  --blue: #6A74FF;
  --ok: #3DD68C;
  --warn: #FF7A5C;
  --fig-base: #2A2E63;
  --fig-skin: #232757;
  --fig-line: #4A4F8C;
  --fig-body: #EEF0FA;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.tally line { stroke-linecap: round; }
@keyframes tally-draw {
  from { opacity: 1; }
  to { opacity: 1; stroke-dashoffset: 0; }
}

/* Ilustracje ćwiczeń (assets/figures.js) */
.motion { display: block; width: 100%; height: auto; }
.musclemap { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.musclemap figure { margin: 0; }
.musclemap svg { display: block; width: 100%; height: auto; max-height: 320px; }
.musclemap figcaption { text-align: center; font: 700 13px var(--font-body); color: var(--muted); margin-top: 4px; }
.fig-legend { display: flex; align-items: baseline; gap: 8px; font-size: 15px; margin: 6px 0 0; }
.fig-legend b { white-space: nowrap; }
.fig-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--fig-color, var(--blue)); transform: translateY(1px); }
.fig-dot--help { opacity: .42; }

/* Przełącznik motywu */
.theme-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line); background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text); padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
