/*
  Design tokens: every colour, font and shadow lives here, nowhere else.

  (2026-11-19) The app now runs the white-green-orange palette (styles/palette-fresh.css, fixed by the owner).
  The colours below are the ORIGINAL palette, kept on purpose: to bring it back, set PALETTE to "classic" in
  src/features/settings/theme.js and remove data-palette from <html> in index.html.
  Components only use var(--token). To restyle the app, change this file.

  Palette: dusty slate-blue ground, navy primary, cream cards, plus three calm tints:
  turquoise (--info: information, links, active tabs, focus, progress), mauve (--mauve-soft:
  headers and secondary surfaces) and soft pink (--pink-soft: the conversation summary,
  support chips, gentle accents). Honey gold (--accent) is kept for the main actions only
  (send, the main call-to-action button, the safety-plan shortcut).
  There is deliberately no red: an alarming colour is the wrong signal for someone
  who may already be frightened. Emergency pieces use navy + gold instead.

  Dark mode is defined twice on purpose (CSS cannot share one block between a media
  query and an attribute selector): once for the system setting, once for the manual
  override in Settings. tests/tokens.test.js fails if the two copies drift apart.
*/

:root {
  /* type */
  --display: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --brush: "Aref Ruqaa", "IBM Plex Sans Arabic", Tahoma, serif; /* handwriting, big headings only */

  /* surfaces */
  --ground: #aebbd3; /* page background */
  --surface: #f6f1e3; /* cards, inputs */
  --surface-2: #eae4d3; /* quieter inset surface */
  --line: #dcd5c2; /* borders, dividers */
  --desk: #e9e6de; /* behind the phone frame on desktop */
  --frame: #18214a; /* phone frame on desktop */

  /* text */
  --ink: #18214a;
  --ink-soft: #3a4569; /* secondary text, AA (4.7:1) on --ground */

  /* brand */
  --primary: #1c2654; /* main buttons, active states */
  --primary-soft: #c6d0e3; /* tinted backgrounds */
  --on-primary: #f6f1e3; /* text on --primary */
  --accent: #e2a650; /* gold: main actions only (send, main CTA) */
  --on-accent: #18214a; /* text on --accent */
  --emphasis: #1c2654; /* emergency emphasis (navy, never red) */
  --emphasis-soft: #c6d0e3;

  /* calm tints */
  --info: #1f6b67; /* turquoise: icons, links, active marks; AA on --surface and --info-soft */
  --info-soft: #cfe6e1; /* turquoise wash: active tab, info badges, selected items */
  --mauve-soft: #ddd3e6; /* mauve wash: headers, quoted law, secondary surfaces */
  --pink-soft: #f5e1e6; /* soft pink wash: summary box, support chips */
  --pink-line: #e8c6cf; /* soft pink border */
  --pink: #f2b6c6; /* pink icon on --primary (quick exit) */

  --shadow: 0 1px 2px rgba(24, 33, 74, 0.08), 0 12px 24px -16px rgba(24, 33, 74, 0.45);

  /* the tab she is on, and section titles (the original look; the fresh palette makes them orange) */
  --tab-on: var(--info-soft);
  --tab-on-icon: var(--info);
  --heading-accent: var(--ink);

  /* illustration skin and hair (used by the character symbols in the sprite) */
  --skin: #f0c3a0;
  --skin-2: #dba47e;
  --hair: #3b2a2f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #121935;
    --surface: #1c2548;
    --surface-2: #253059;
    --line: #34406e;
    --desk: #0a0e1f;
    --frame: #060916;
    --ink: #f3efe2;
    --ink-soft: #aeb9d6;
    --primary: #c6d0e3;
    --primary-soft: #2a3662;
    --on-primary: #121935;
    --accent: #ebb868;
    --on-accent: #121935;
    --emphasis: #c6d0e3;
    --emphasis-soft: #2a3662;
    --info: #7fd1c6;
    --info-soft: #1d4249;
    --mauve-soft: #342d57;
    --pink-soft: #3f2c4a;
    --pink-line: #5d4266;
    --pink: #9a3f64;
    --shadow: 0 0 0 1px #34406e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #121935;
  --surface: #1c2548;
  --surface-2: #253059;
  --line: #34406e;
  --desk: #0a0e1f;
  --frame: #060916;
  --ink: #f3efe2;
  --ink-soft: #aeb9d6;
  --primary: #c6d0e3;
  --primary-soft: #2a3662;
  --on-primary: #121935;
  --accent: #ebb868;
  --on-accent: #121935;
  --emphasis: #c6d0e3;
  --emphasis-soft: #2a3662;
  --info: #7fd1c6;
  --info-soft: #1d4249;
  --mauve-soft: #342d57;
  --pink-soft: #3f2c4a;
  --pink-line: #5d4266;
  --pink: #9a3f64;
  --shadow: 0 0 0 1px #34406e;
}

:root[data-theme="light"] {
  color-scheme: light;
}
