/* THEME: CALM — low-stimulation.
   Soft, desaturated and flat: no vivid gradients, no glow. For children who
   find the bright tropical themes overwhelming, and for long sessions. */

body.theme-calm {
  background: #eef1ec;

  --text-main: #2f3a33;
  --text-muted: #4e5a51;
  --border-color: #c7d0c6;
  --bg-panel: #e2e7df;
  --bg-card: #f3f6f1;
  --accent: #4a6a58;
  --accent-active: #46685a; /* sage */
  --accent-ink: #ffffff;

  /* Grid surface */
  --board-bg: #f7f9f5;
  --cell-blank: #f7f9f5;
  --cell-line: #7f8a79; /* 3.4:1 on the blank cell — WCAG 1.4.11 wants >= 3 */

  /* Overlays — present but unalarming */
  --axis: #3f6ea8;
  --axis-halo: rgba(255, 255, 255, 0.9);
  --nearmiss: #b5533f; /* clay, not a klaxon red */
  --cursor: #2f3a33;
  --cursor-halo: rgba(255, 255, 255, 0.95);
  --ghost: #2f6b6b;                        /* muted teal — calm, not a highlight */
  --ghost-fill: rgba(47, 107, 107, 0.14);
  --lock: #2f3a33;                         /* dark padlock on the light board */
  --lock-halo: rgba(247, 249, 245, 0.95);
  --focus: #2f5d8c;

  color: var(--text-main);
}

/* Calm disables the settle animation, like the near-miss pulse — the scrub
   itself still works, it just doesn't glide on release. */
body.theme-calm .grid__ghost.is-snapping { transition: none; }

body.theme-calm .reading,
body.theme-calm .panel-left,
body.theme-calm .panel-right,
body.theme-calm .top-bar {
  background: var(--bg-panel);
  border-color: var(--border-color);
  box-shadow: none;
}

body.theme-calm .workspace { background: transparent; }

body.theme-calm .board {
  background: var(--board-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(47, 58, 51, 0.06);
}

body.theme-calm .results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

body.theme-calm .select,
body.theme-calm .btn {
  background: #f3f6f1;
  color: var(--text-main);
  border: 1px solid #b9c4b7;
}

body.theme-calm .btn-primary {
  background: var(--accent-active);
  color: var(--accent-ink);
  box-shadow: none;
}

/* Gentler feedback: no pulsing glow in a low-stimulation theme */
body.theme-calm .grid__cell--nearmiss {
  animation: none;
  stroke-width: 3.5;
}

body.theme-calm .results__nearmiss {
  background: rgba(181, 83, 63, 0.1);
  border-left-color: var(--nearmiss);
}
