/* Colour themes (2026-11). Every accent green and neutral grey in the app's
   CSS points at one of these tokens, so a theme is just a different set of
   values. Sporty (the default) keeps the original black, white and green.
   Pick one in Account > App > Colour theme; it is saved per device in
   localStorage('palette') and set as <html data-palette="..."> before first
   paint. Light/dark (data-theme) works on top of every theme. JS-drawn
   colours (rings, dials, charts) read these tokens via window.pc(). */
:root {
  /* accent scale */
  --acc-100: #dcfce7; --acc-200: #bbf7d0; --acc-300: #86efac; --acc-400: #4ade80;
  --acc-500: #22c55e; --acc-600: #16a34a; --acc-700: #15803d; --acc-800: #166534;
  --acc-mint: #6fcf97; --acc-dim: #2f7a4d; --acc-deep: #06290f;
  --acc-500-rgb: 34, 197, 94; --acc-400-rgb: 74, 222, 128;
  /* light neutrals */
  --n-ink: #111214; --n-ink-rgb: 17, 18, 20; --n-hero: #16181b;
  --n-bg: #eef0f2; --n-tile: #f4f5f7; --n-hair: #e9ebee; --n-seg: #e4e6e9; --n-border: #e7e9ec;
  --n-badge: #f1f2f4; --n-muted: #868a93; --n-faint: #9aa0a8; --n-faint2: #9ca1a8; --n-line: #c9ccd1;
  --n-soft: #eceef1; --n-soft2: #e3e6ea; --n-panel: #ffffff;
  /* dark neutrals */
  --d-bg: #0c0d0f; --d-panel: #17191c; --d-tile: #1f2226; --d-hair: #26292e; --d-seg: #23262b;
  --d-raise: #24272b; --d-line: #2c3036; --d-line2: #2a2e33; --d-muted: #8f949c;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Stone: neutral. Warm off-white and charcoal with a muted sage accent. */
:root[data-palette="stone"] {
  --acc-100: #e4ebe5; --acc-200: #d3e0d8; --acc-300: #b9cdc1; --acc-400: #93b0a0;
  --acc-500: #6b8a78; --acc-600: #587565; --acc-700: #465e51; --acc-800: #3d5246;
  --acc-mint: #93b0a0; --acc-dim: #4f6a5b; --acc-deep: #1e2622;
  --acc-500-rgb: 107, 138, 120; --acc-400-rgb: 147, 176, 160;
  --n-ink: #1f1d1a; --n-ink-rgb: 38, 34, 29; --n-hero: #26231f;
  --n-bg: #f1eee9; --n-tile: #f4f1ec; --n-hair: #ebe6df; --n-seg: #e6e0d8; --n-border: #e8e3dc;
  --n-badge: #f1ede7; --n-muted: #8b857c; --n-faint: #a39d93; --n-faint2: #a39d93; --n-line: #d0cac1;
  --n-soft: #ece8e2; --n-soft2: #e5e0d9; --n-panel: #fffdfa;
  --d-bg: #12110f; --d-panel: #1c1a17; --d-tile: #25221e; --d-hair: #2e2a25; --d-seg: #2a2722;
  --d-raise: #2b2823; --d-line: #35312b; --d-line2: #322e29; --d-muted: #958f86;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Blush: soft pink and plum with a rose accent, rounder type. */
:root[data-palette="blush"] {
  --acc-100: #fbe4eb; --acc-200: #f9d3de; --acc-300: #f6b6c9; --acc-400: #f08eab;
  --acc-500: #e0688c; --acc-600: #c95278; --acc-700: #a63f62; --acc-800: #8a3352;
  --acc-mint: #f08eab; --acc-dim: #8e3b58; --acc-deep: #3b1526;
  --acc-500-rgb: 224, 104, 140; --acc-400-rgb: 240, 142, 171;
  --n-ink: #2a1e25; --n-ink-rgb: 60, 30, 45; --n-hero: #2e1f29;
  --n-bg: #f8eff1; --n-tile: #f9f0f2; --n-hair: #f1e4e8; --n-seg: #efe0e5; --n-border: #f0e3e7;
  --n-badge: #f6ebee; --n-muted: #9a8890; --n-faint: #b29ea7; --n-faint2: #b29ea7; --n-line: #dcc9d0;
  --n-soft: #f2e6ea; --n-soft2: #eedfe4; --n-panel: #fffcfd;
  --d-bg: #130d11; --d-panel: #1e151b; --d-tile: #281d24; --d-hair: #31252d; --d-seg: #2c2128;
  --d-raise: #2d2229; --d-line: #3a2c35; --d-line2: #352830; --d-muted: #a08f98;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Account > App > Colour theme picker ---------- */
.ac-pal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ac-pal-opt { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: center; font: inherit; color: var(--text); }
.ac-pal-prev { display: block; position: relative; height: 96px; border-radius: 16px; padding: 8px; background: var(--pv-bg); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.18); transition: box-shadow .15s ease, transform .15s ease; }
.ac-pal-opt:active .ac-pal-prev { transform: scale(.97); }
.ac-pal-opt.active .ac-pal-prev { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--pv-acc); }
.ac-pal-card { display: flex; align-items: center; gap: 6px; height: 30px; border-radius: 9px; background: var(--pv-panel); padding: 0 7px; }
.ac-pal-ring { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--pv-acc); border-right-color: var(--pv-track); flex: none; }
.ac-pal-lines { flex: 1; display: grid; gap: 3px; }
.ac-pal-lines i { display: block; height: 4px; border-radius: 3px; background: var(--pv-track); }
.ac-pal-lines i:first-child { width: 70%; background: var(--pv-ink); opacity: .75; }
.ac-pal-hero { display: flex; align-items: flex-end; justify-content: flex-end; height: 40px; margin-top: 6px; border-radius: 9px; background: var(--pv-hero); padding: 6px; }
.ac-pal-btn { width: 42%; height: 11px; border-radius: 99px; background: var(--pv-acc); box-shadow: 0 2px 8px var(--pv-acc); }
.ac-pal-name { display: block; margin-top: 7px; font-size: 12.5px; font-weight: 700; }
.ac-pal-font { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.ac-pal-tick { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--pv-acc); color: #fff; display: none; place-items: center; }
.ac-pal-tick svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ac-pal-opt.active .ac-pal-tick { display: grid; }
.ac-pal-opt[data-ac-palette="sporty"] { --pv-acc: #22c55e; --pv-hero: #16181b; --pv-ink: #111214; --pv-bg: #eef0f2; --pv-panel: #fff; --pv-track: #e4e6e9; }
.ac-pal-opt[data-ac-palette="stone"] { --pv-acc: #6b8a78; --pv-hero: #26231f; --pv-ink: #1f1d1a; --pv-bg: #f1eee9; --pv-panel: #fffdfa; --pv-track: #e6e0d8; font-family: "DM Sans", sans-serif; }
.ac-pal-opt[data-ac-palette="blush"] { --pv-acc: #e0688c; --pv-hero: #2e1f29; --pv-ink: #2a1e25; --pv-bg: #f8eff1; --pv-panel: #fffcfd; --pv-track: #efe0e5; font-family: "Nunito", sans-serif; }
:root[data-theme="dark"] .ac-pal-opt[data-ac-palette="sporty"] { --pv-bg: #0c0d0f; --pv-panel: #17191c; --pv-ink: #f4f5f6; --pv-track: #2c3036; --pv-hero: #24272b; }
:root[data-theme="dark"] .ac-pal-opt[data-ac-palette="stone"] { --pv-bg: #12110f; --pv-panel: #1c1a17; --pv-ink: #f4f1ec; --pv-track: #35312b; --pv-hero: #2b2823; }
:root[data-theme="dark"] .ac-pal-opt[data-ac-palette="blush"] { --pv-bg: #130d11; --pv-panel: #1e151b; --pv-ink: #f9f0f2; --pv-track: #3a2c35; --pv-hero: #2d2229; }
.ac-pal-head { margin-top: 14px; }
