/* Styles: whole looks the person can choose in More, Look, Style. "Classic" is the glass look in tokens.css and
   app.css; the others are set here and change colours, corners, shadows and the tab bar only, never what a screen
   shows or does. Each has a light and a dark palette, and every one sets every colour token the other does
   (so nothing of Classic's shows through). The accent colour chosen in Colours still wins over a style's own. */

/* ---------- shared by every style except Classic: flat, solid surfaces and a light floating tab bar ---------- */
html[data-style]:not([data-style='classic']) {
  --blur: none;
  --nav-blur: none;
  --glass-bg: var(--surface);
  --glass-strong: var(--surface);
  --glass-border: var(--line);
  --glass-edge: var(--line);
  --glass-shine: transparent;
  --blob-a: transparent;
  --blob-b: transparent;
  --blob-c: transparent;

  --nav-bg: var(--surface);
  --nav-ring: var(--bg);
  --tab-ink: var(--ink-3);
  --tab-ink-on: var(--btn-ink);
  --plate-bg: var(--btn-bg); /* the open tab is a filled pill in the accent colour */
  --plate-hi: rgba(255, 255, 255, 0.3);
  --plate-lo: transparent;
  --plate-glow: transparent;
  --lens-tint: color-mix(in srgb, var(--btn-bg) 88%, transparent);
  --cyan: var(--brand); /* the + and the avatar are one flat colour, not a gradient */

  --r-btn: 999px;
  --r-s: 14px;
  --r-m: 20px;
  --r-l: 24px;
  --r-xl: 28px;
}
html[data-style]:not([data-style='classic']) .stat:nth-child(1) { background: var(--tile-dark); color: var(--tile-dark-ink); border-color: transparent; }
html[data-style]:not([data-style='classic']) .stat:nth-child(1) .lbl,
html[data-style]:not([data-style='classic']) .stat:nth-child(1) .hint { color: var(--tile-dark-dim); }
html[data-style]:not([data-style='classic']) .result { background: var(--tile-dark); }
html[data-style]:not([data-style='classic']) .rlabel,
html[data-style]:not([data-style='classic']) .rsub { color: var(--tile-dark-dim); }
html[data-style]:not([data-style='classic']) .topbar { background: color-mix(in srgb, var(--bg) 96%, transparent); } /* no blur to soften what scrolls under it */
html[data-style]:not([data-style='classic']) .sheet { background: var(--surface); } /* no glass to see the page through */
html[data-style]:not([data-style='classic']) .seg .lens-tint { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

/* ---------- Coral: warm and friendly, after a fitness app ---------- */
html[data-style='coral'] {
  --brand: #f26b4e;
  --btn-bg: #f26b4e;
  --btn-ink: #1d1b1a;
  --brand-text: #b93a0a;
  --brand-soft: #fde9e2;
  --chart-line: #d2491f;
  --teal: #f5a524;

  --bg: #f3f1ee;
  --surface: #ffffff;
  --surface-2: #f7f5f2;
  --ink: #1d1b1a;
  --ink-2: #4a4541;
  --ink-3: #6b655f;
  --line: rgba(29, 27, 26, 0.07);

  --ctl-track: rgba(29, 27, 26, 0.06);
  --ctl-thumb: #ffffff;
  --ctl-thumb-on: #ffffff;
  --shadow-1: 0 1px 2px rgba(60, 40, 30, 0.04), 0 12px 24px -18px rgba(60, 40, 30, 0.22);
  --shadow-glass: 0 12px 28px -12px rgba(60, 40, 30, 0.28);
  --tile-dark: #2b1b15;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #d9bfb3;
}
html[data-style='coral'][data-theme='dark'] {
  --brand: #ff7a59;
  --btn-bg: #ff7a59;
  --btn-ink: #1a1411;
  --brand-text: #ff9b80;
  --brand-soft: rgba(255, 122, 89, 0.18);
  --chart-line: #ff9b80;
  --teal: #ffb347;

  --bg: #1a1411;
  --surface: #261d19;
  --surface-2: #30251f;
  --ink: #f6efea;
  --ink-2: #d4c8c0;
  --ink-3: #aa9c92;
  --line: rgba(255, 240, 230, 0.09);

  --ctl-track: rgba(255, 240, 230, 0.07);
  --ctl-thumb: #3a2d26;
  --ctl-thumb-on: #3a2d26;
  --shadow-1: 0 0 0 1px rgba(255, 240, 230, 0.04), 0 10px 24px -18px rgba(0, 0, 0, 0.6);
  --shadow-glass: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
  --tile-dark: #3a261d;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #d9bfb3;
}

/* ---------- Lime: bright lime on near-black (or pale grey), after a music app ---------- */
html[data-style='lime'] {
  --brand: #d3f26a;
  --btn-bg: #d3f26a;
  --btn-ink: #11130a;
  --brand-text: #4d6a00;
  --brand-soft: #eef8c9;
  --chart-line: #5f8200;
  --teal: #9ad13f;

  --bg: #f2f2ef;
  --surface: #ffffff;
  --surface-2: #f6f6f3;
  --ink: #151515;
  --ink-2: #434341;
  --ink-3: #66665f;
  --line: rgba(21, 21, 21, 0.07);

  --ctl-track: rgba(21, 21, 21, 0.06);
  --ctl-thumb: #ffffff;
  --ctl-thumb-on: #ffffff;
  --shadow-1: 0 1px 2px rgba(20, 20, 20, 0.04), 0 12px 24px -18px rgba(20, 20, 20, 0.22);
  --shadow-glass: 0 12px 28px -12px rgba(20, 20, 20, 0.28);
  --tile-dark: #17171a;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #b8b8bd;
}
html[data-style='lime'][data-theme='dark'] {
  --brand: #d3f26a;
  --btn-bg: #d3f26a;
  --btn-ink: #11130a;
  --brand-text: #d3f26a;
  --brand-soft: rgba(211, 242, 106, 0.14);
  --chart-line: #d3f26a;
  --teal: #9ad13f;

  --bg: #111113;
  --surface: #1c1c20;
  --surface-2: #26262b;
  --ink: #f4f4f0;
  --ink-2: #cacac4;
  --ink-3: #9d9da3;
  --line: rgba(255, 255, 255, 0.08);

  --ctl-track: rgba(255, 255, 255, 0.07);
  --ctl-thumb: #34343a;
  --ctl-thumb-on: #34343a;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glass: 0 14px 30px -14px rgba(0, 0, 0, 0.8);
  --tile-dark: #26262b;
  --tile-dark-ink: #f4f4f0;
  --tile-dark-dim: #a9a9af;
}
html[data-style='lime'][data-theme='dark'] { --nav-bg: #26262b; --nav-ring: #111113; }

/* ---------- Indigo: cool violet-blue with a gradient hero, after a finance app ---------- */
html[data-style='indigo'] {
  --brand: #5547e8;
  --btn-bg: #5547e8;
  --btn-ink: #ffffff;
  --brand-text: #4f40d9;
  --brand-soft: #eceafe;
  --chart-line: #5547e8;
  --teal: #8f82ff;

  --bg: #f3f3f8;
  --surface: #ffffff;
  --surface-2: #f6f6fb;
  --ink: #14142b;
  --ink-2: #45456a;
  --ink-3: #66668a;
  --line: rgba(20, 20, 43, 0.07);

  --ctl-track: rgba(20, 20, 43, 0.06);
  --ctl-thumb: #ffffff;
  --ctl-thumb-on: #ffffff;
  --shadow-1: 0 1px 2px rgba(30, 30, 80, 0.04), 0 12px 24px -18px rgba(30, 30, 80, 0.25);
  --shadow-glass: 0 12px 28px -12px rgba(30, 30, 80, 0.3);
  --tile-dark: #1c1b45;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #bdbbea;
}
html[data-style='indigo'][data-theme='dark'] {
  --brand: #8f85ff;
  --btn-bg: #6b5cf0;
  --btn-ink: #ffffff;
  --brand-text: #a9a1ff;
  --brand-soft: rgba(143, 133, 255, 0.18);
  --chart-line: #a9a1ff;
  --teal: #a79eff;

  --bg: #0f0f1e;
  --surface: #19192e;
  --surface-2: #232340;
  --ink: #eeeefa;
  --ink-2: #c9c9e6;
  --ink-3: #a2a2c4;
  --line: rgba(220, 220, 255, 0.09);

  --ctl-track: rgba(220, 220, 255, 0.07);
  --ctl-thumb: #2f2f52;
  --ctl-thumb-on: #2f2f52;
  --shadow-1: 0 0 0 1px rgba(220, 220, 255, 0.05), 0 10px 24px -18px rgba(0, 0, 0, 0.6);
  --shadow-glass: 0 14px 30px -14px rgba(0, 0, 0, 0.75);
  --tile-dark: #26254f;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #bdbbea;
}

/* ---------- Pulse: calm warm white and near-black, one bright orange-red, light figures ---------- */
html[data-style='pulse'] {
  --brand: #ff4d1c;
  --btn-bg: #17181b;
  --btn-ink: #ffffff;
  --brand-text: #c2350a;
  --brand-soft: #ffe9e1;
  --chart-line: #e2400f;
  --teal: #2f9e6a;

  --bg: #f2f1ee;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --ink: #17181b;
  --ink-2: #45464b;
  --ink-3: #66676c;
  --line: rgba(23, 24, 27, 0.07);

  --ctl-track: rgba(23, 24, 27, 0.06);
  --ctl-thumb: #ffffff;
  --ctl-thumb-on: #ffffff;
  --shadow-1: 0 1px 2px rgba(23, 24, 27, 0.04), 0 12px 24px -18px rgba(23, 24, 27, 0.2);
  --shadow-glass: 0 12px 28px -12px rgba(23, 24, 27, 0.28);
  --tile-dark: #17181b;
  --tile-dark-ink: #ffffff;
  --tile-dark-dim: #a9aab0;
  --tile-good: #1c4634;
  --tile-good-ink: #ffffff;
  --tile-good-dim: #bfe3cf;
}
html[data-style='pulse'][data-theme='dark'] {
  --brand: #ff6a3d;
  --btn-bg: #f3f2ee; /* the main button is ink, as in light: the orange stays for the + and what is live */
  --btn-ink: #17181b;
  --brand-text: #ff8a63;
  --brand-soft: rgba(255, 106, 61, 0.16);
  --chart-line: #ff8a63;
  --teal: #4cc38a;

  --bg: #0f0f11;
  --surface: #1a1a1d;
  --surface-2: #242428;
  --ink: #f3f2ee;
  --ink-2: #cbcac5;
  --ink-3: #9d9ca3;
  --line: rgba(255, 255, 255, 0.08);

  --ctl-track: rgba(255, 255, 255, 0.07);
  --ctl-thumb: #333338;
  --ctl-thumb-on: #333338;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glass: 0 14px 30px -14px rgba(0, 0, 0, 0.8);
  --tile-dark: #232327;
  --tile-dark-ink: #f3f2ee;
  --tile-dark-dim: #a9a9af;
  --tile-good: #173b2c;
  --tile-good-ink: #f3f2ee;
  --tile-good-dim: #a9d8bf;
  --nav-bg: #232327;
  --nav-ring: #0f0f11;
}
