/*
 * Modern Help design tokens: light ("Koivu") and dark ("Ilta").
 * Light values are unchanged from the design system v1 (9.10.2026).
 * Dark values are NEW (16.11.2026) and replace the old dark theme.
 *
 * Contrast (WCAG 2.x) for the dark theme, measured:
 *   ink #F4EFE6 on surface #17201D ............ 14.5 : 1
 *   ink-muted #B8C3BD on surface-raised ........  8.2 : 1
 *   ink-muted #B8C3BD on surface ...............  9.2 : 1
 *   spruce #9CCFB9 on surface ..................  9.5 : 1
 *   on-spruce #0E1C17 on spruce ................ 10.1 : 1
 *   ink #F4EFE6 on spruce-soft #213A30 ......... 10.7 : 1
 *   spruce #9CCFB9 on spruce-soft .............  7.0 : 1
 *   line-strong #71837C on surface-raised .....  3.7 : 1  (control borders, needs >= 3:1)
 */

:root, [data-theme="light"] {
  /* Surfaces */
  --mh-surface: #FAF7F2;
  --mh-surface-raised: #FFFFFF;
  --mh-surface-sunken: #F3EEE6;      /* chip / icon tile background */
  --mh-birch: #E6DAC6;

  /* Lines */
  --mh-line: #E3DBCD;                /* decorative only */
  --mh-line-strong: #8A8F86;         /* input, checkbox, radio borders */

  /* Text */
  --mh-ink: #1F2A2E;
  --mh-ink-muted: #56615F;
  --mh-ink-placeholder: #6E7773;

  /* Brand */
  --mh-spruce: #2F5D50;
  --mh-on-spruce: #FAF7F2;
  --mh-spruce-soft: #DCE8E1;
  --mh-sun: #F2C14E;                 /* fill only, never text */
  --mh-on-sun: #1F2A2E;
  --mh-sun-soft: #FBEFCB;
  --mh-sun-ink: #7A5A12;

  /* Status */
  --mh-danger: #B3412E;
  --mh-danger-soft: #F7E1DC;
  --mh-focus-ring: #2F5D50;

  /* Disabled */
  --mh-disabled-bg: #E3DBCD;
  --mh-disabled-ink: #6E7773;

  /* Logo: "modern" + "help" */
  --mh-logo-modern: #1F2A2E;
  --mh-logo-help: #2F5D50;

  /* Shape and type */
  --mh-radius-sm: 8px;
  --mh-radius-md: 16px;
  --mh-radius-lg: 28px;
  --mh-radius-pill: 999px;
  --mh-font-sans: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --mh-font-hand: "Playwrite IT Moderna", "Segoe Script", cursive;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mh-surface: #17201D;           /* warm spruce night, NOT neutral black */
    --mh-surface-raised: #1F2A26;    /* cards, inputs */
    --mh-surface-sunken: #263330;    /* chips, icon tiles, link boxes */
    --mh-birch: #3A3B35;

    --mh-line: #33423D;
    --mh-line-strong: #71837C;

    --mh-ink: #F4EFE6;
    --mh-ink-muted: #B8C3BD;
    --mh-ink-placeholder: #8E9C96;

    --mh-spruce: #9CCFB9;            /* light mint: primary button, selection, icons */
    --mh-on-spruce: #0E1C17;
    --mh-spruce-soft: #213A30;       /* selected card / chip background */
    --mh-sun: #F2C14E;
    --mh-on-sun: #1F2A2E;
    --mh-sun-soft: #3B3320;
    --mh-sun-ink: #F2C14E;

    --mh-danger: #F08A75;
    --mh-danger-soft: #3A2420;
    --mh-focus-ring: #9CCFB9;

    --mh-disabled-bg: #33423D;
    --mh-disabled-ink: #8E9C96;

    --mh-logo-modern: #F4EFE6;
    --mh-logo-help: #F2C14E;         /* sun "help" on dark, as on the spruce hero */

    color-scheme: dark;
  }
}

[data-theme="dark"] {
    --mh-surface: #17201D;           /* warm spruce night, NOT neutral black */
    --mh-surface-raised: #1F2A26;    /* cards, inputs */
    --mh-surface-sunken: #263330;    /* chips, icon tiles, link boxes */
    --mh-birch: #3A3B35;

    --mh-line: #33423D;
    --mh-line-strong: #71837C;

    --mh-ink: #F4EFE6;
    --mh-ink-muted: #B8C3BD;
    --mh-ink-placeholder: #8E9C96;

    --mh-spruce: #9CCFB9;            /* light mint: primary button, selection, icons */
    --mh-on-spruce: #0E1C17;
    --mh-spruce-soft: #213A30;       /* selected card / chip background */
    --mh-sun: #F2C14E;
    --mh-on-sun: #1F2A2E;
    --mh-sun-soft: #3B3320;
    --mh-sun-ink: #F2C14E;

    --mh-danger: #F08A75;
    --mh-danger-soft: #3A2420;
    --mh-focus-ring: #9CCFB9;

    --mh-disabled-bg: #33423D;
    --mh-disabled-ink: #8E9C96;

    --mh-logo-modern: #F4EFE6;
    --mh-logo-help: #F2C14E;         /* sun "help" on dark, as on the spruce hero */

    color-scheme: dark;
}

:root, [data-theme] {
 --surface:var(--mh-surface);
 --surface-raised:var(--mh-surface-raised);
 --surface-sunken:var(--mh-surface-sunken);
 --birch:var(--mh-birch);
 --line:var(--mh-line);
 --line-strong:var(--mh-line-strong);
 --ink:var(--mh-ink);
 --ink-muted:var(--mh-ink-muted);
 --ink-placeholder:var(--mh-ink-placeholder);
 --spruce:var(--mh-spruce);
 --on-spruce:var(--mh-on-spruce);
 --spruce-soft:var(--mh-spruce-soft);
 --sun:var(--mh-sun);
 --on-sun:var(--mh-on-sun);
 --sun-soft:var(--mh-sun-soft);
 --sun-ink:var(--mh-sun-ink);
 --danger:var(--mh-danger);
 --danger-soft:var(--mh-danger-soft);
 --focus-ring:var(--mh-focus-ring);
 --disabled-bg:var(--mh-disabled-bg);
 --disabled-ink:var(--mh-disabled-ink);
 --error:var(--mh-danger);
 --shadow-card:0 1px 2px rgb(0 0 0 / .06),0 6px 20px rgb(0 0 0 / .08);
}
