/* THE one place for colors and fonts. A recolor or a font change is an edit to THIS file only (the name/wordmark is in brand.js, the favicon is favicon.svg,
   the logos are public/brand/*.png). Every page loads brand.css before styles.css. Light theme = :root, dark theme = html[data-theme="dark"] (dark is the default).
   No other file may hold a color literal for the brand or the surfaces: tests/redesign.test.js fails if one appears. The palette is documented in docs/BRAND-COLORS.md
   (the Reboot website palette: warm grays, the #3FA37D signal green, #16634A for buttons).
   LEGACY: the --rb-* block below is the OLD steel blue. Only the public audit page and the audit PDFs still read it (api/_sm-audit/palette.js parses this file, so keep the
   names and the #RRGGBB format). Nothing in the dashboard uses it any more; it goes when those get their recolor. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ───── LEGACY steel blue: read ONLY by the public audit page (audit.html) and the audit PDFs. Not used by the dashboard. ───── */
:root {
  --rb-ink: #020C1D;
  --rb-text: #1B2A41;
  --rb-slate: #5B6B82;
  --rb-deep: #1F4057;
  --rb-accent: #2B5F80;
  --rb-light: #3B7B9C;
  --rb-tint: #E6EEF3;
  --rb-soft: #F3F7FA;
  --rb-line: #D3E0E8;
  --rb-bright: #86B6D0;
}

/* ───── The Reboot website palette (both themes). White label (api/_brand.js) overrides --br-main, --br-hover, --br-signal, --br-grad and the rgb triplets. ───── */
:root {
  --br-ink: #0B0B0C;        /* the ink of headings on the public audit page */
  --br-main: #16634A;       /* buttons, active states, links on light */
  --br-hover: #0F5440;      /* button hover on light: the live website's value (white text on #3FA37D would fail AA) */
  --br-signal: #3FA37D;     /* the signal green: logo infinity mark, links and icons on dark, charts */
  --br-signal-hover: #52B58E;
  --br-grad: var(--br-main);                  /* a flat fill; white label may set a gradient */
  --accent-rgb: 22, 99, 74;                   /* = --br-main in light; the green wash is rgba(var(--accent-rgb), .12) */
  --bright-rgb: 63, 163, 125;                 /* = --br-signal, for lines and glows */
  --shade-rgb: 11, 11, 12;                    /* ink: shadow / hairline tint on light surfaces */

  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --ease: 180ms cubic-bezier(.2,.7,.2,1);
  --side-w: 248px;
  --side-w-collapsed: 72px;
  --intro-bg: #EDEDEB;
}

/* ───── Light theme (:root) ───── */
:root {
  --bg: #EDEDEB;
  --text: #0B0B0C;
  --text-2: #3D3D42;
  --label: #5F5F64;    /* the website's muted #66666B, 6% darker: #66666B is 4.48:1 on the #E4E4E0 chip fill (AA needs 4.5) */
  --faint: #8C8C91;
  --card: #FFFFFF;
  --sidebar-bg: #FFFFFF;
  --accent: var(--br-main);
  --accent-dark: var(--br-hover);
  --link: var(--br-main);
  --tint-1: #F7F7F5;   /* quiet fills, table hover */
  --tint-2: #E4E4E0;   /* section / alt surface: chips and active rows */
  --line: #D6D6D2;     /* hairlines */
  --line-strong: #A3A3A0;
  --wash: rgba(var(--accent-rgb), .12);    /* the green wash: active sidebar item, selected rows */
  --ok: #176A4E;       --ok-bg: rgba(29, 127, 95, .06);    --ok-rgb: 29, 127, 95;
  --warn: #8A5A00;     --warn-bg: rgba(232, 180, 90, .28); --warn-rgb: 232, 180, 90;
  --bad: #B83A33;      --bad-bg: rgba(184, 58, 51, .12);   --bad-rgb: 184, 58, 51;
  --ok-ink: #1D7F5F; --bad-ink: #B83A33;  /* the light-theme status colors, for white pills that sit on the green KPI tile in BOTH themes */
  --danger: var(--bad);
  --danger-bg: var(--bad-bg);
  --shadow: 0 1px 2px rgba(var(--shade-rgb), .05), 0 8px 24px -14px rgba(var(--shade-rgb), .22);
  --solid: #161618;                        /* tooltips, "published" chips, video letterbox */
  --primary-bg: var(--br-grad);            /* the one emphasised KPI tile (the TASKS look) */
  --input-bg: #FFFFFF;
  --quiet-bg: rgba(255,255,255,.62);
  --chip-bg: rgba(255,255,255,.7);
  --topbar-bg: #FFFFFF;
  --scrim: rgba(var(--shade-rgb), .45);
  --glow: rgba(var(--bright-rgb), .28);
  --bg-b: color-mix(in srgb, var(--br-signal), #fff 88%);      /* the mint end of the page gradient */
  --bg-gradient: linear-gradient(160deg, #FFFFFF 0%, #F4F9F6 48%, var(--bg-b) 100%);
  --bg-art: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1600 900%27 preserveAspectRatio=%27xMidYMid slice%27%3E%3Cdefs%3E%3ClinearGradient id=%27a%27 x1=%270%27 y1=%270%27 x2=%271%27 y2=%271%27%3E%3Cstop offset=%270%27 stop-color=%27%233FA37D%27 stop-opacity=%27.00%27/%3E%3Cstop offset=%271%27 stop-color=%27%233FA37D%27 stop-opacity=%27.08%27/%3E%3C/linearGradient%3E%3ClinearGradient id=%27b%27 x1=%271%27 y1=%270%27 x2=%270%27 y2=%271%27%3E%3Cstop offset=%270%27 stop-color=%27%233FA37D%27 stop-opacity=%27.00%27/%3E%3Cstop offset=%271%27 stop-color=%27%233FA37D%27 stop-opacity=%27.08%27/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d=%27M0 90 C300 130 420 400 260 620 C170 750 70 810 0 830 Z%27 fill=%27url(%23a)%27/%3E%3Cpath d=%27M1600 210 C1370 250 1230 540 1370 760 C1440 860 1520 890 1600 900 Z%27 fill=%27url(%23b)%27/%3E%3Cpath d=%27M1600 0 C1500 90 1480 200 1600 300 Z%27 fill=%27url(%23a)%27/%3E%3Cg fill=%27none%27 stroke=%27%233FA37D%27 stroke-width=%271.3%27 opacity=%27.30%27%3E%3Cpath d=%27M0 120 C300 160 430 420 270 640 C180 770 80 830 0 850%27/%3E%3Cpath d=%27M0 170 C260 210 370 430 240 620 C160 735 70 790 0 808%27/%3E%3Cpath d=%27M0 230 C210 262 300 440 205 600 C145 700 70 745 0 762%27/%3E%3Cpath d=%27M1600 230 C1370 270 1240 560 1380 770 C1450 870 1530 895 1600 905%27/%3E%3Cpath d=%27M1600 290 C1410 322 1305 570 1410 735 C1465 820 1535 848 1600 858%27/%3E%3Cpath d=%27M1600 350 C1450 378 1370 580 1445 705 C1485 770 1540 798 1600 808%27/%3E%3C/g%3E%3C/svg%3E");
  --pill-bg: #FFFFFF; --pill-fg: #0B0B0C; --pill-icon: #16634A; --pill-badge: #FFFFFF; --pill-border: rgba(11, 11, 12, .05);   /* the intro pills and their lines */
  --pill-shadow: 0 6px 18px -8px rgba(11, 11, 12, .28), 0 1px 2px rgba(11, 11, 12, .06);
  --intro-line: rgba(22, 99, 74, .38); --intro-ring: rgba(22, 99, 74, .10);
  color-scheme: light;
}
html[data-theme="light"] { --intro-bg: #EDEDEB; }

/* ───── Dark theme: #0B0B0C page, #161618 cards, #1C1C1F inputs, #2C2C30 hover and strong borders. Green signal accent. ───── */
html[data-theme="dark"] {
  --bg: #0B0B0C;
  --text: #EDEDEB;
  --text-2: #BDBDC1;
  --label: #9C9CA1;    /* between the website's faint #8C8C91 (4.16:1 on the #2C2C30 chip fill) and #BDBDC1 */
  --faint: #8C8C91;
  --card: #161618;
  --sidebar-bg: #161618;
  --accent: var(--br-main);
  --accent-dark: color-mix(in srgb, var(--br-main), #fff 15%);   /* hover on dark: a little lighter than the button */
  --link: var(--br-signal);
  --tint-1: #1C1C1F;
  --tint-2: #262628;    /* chips, active rows: one step above #1C1C1F; #2C2C30 is kept for hover and strong borders (link text on it is 4.47:1) */
  --line: rgba(237, 237, 235, .09);
  --line-strong: #2C2C30;
  --accent-rgb: var(--bright-rgb);   /* on dark the wash is made from the signal green */
  --wash: rgba(var(--accent-rgb), .16);
  --ok: #4FD1A5;       --ok-bg: rgba(79, 209, 165, .14);   --ok-rgb: 79, 209, 165;
  --warn: #E8B45A;     --warn-bg: rgba(232, 180, 90, .16); --warn-rgb: 232, 180, 90;
  --bad: #F2716B;      --bad-bg: rgba(242, 113, 107, .14); --bad-rgb: 242, 113, 107;
  --shadow: 0 1px 2px rgba(0,0,0,.6), 0 10px 26px -16px rgba(0,0,0,.9);
  --solid: #2C2C30;
  --input-bg: #1C1C1F;
  --quiet-bg: rgba(255,255,255,.04);
  --chip-bg: rgba(255,255,255,.06);
  --topbar-bg: #161618;
  --scrim: rgba(0,0,0,.7);
  --glow: rgba(var(--bright-rgb), .45);
  --intro-bg: #0B0B0C;
  --bg-b: color-mix(in srgb, var(--br-main), #0B0B0C 72%);      /* the emerald end: deep green-black */
  --bg-gradient: radial-gradient(900px 600px at 86% 100%, rgba(var(--bright-rgb), .06), transparent 70%), radial-gradient(700px 520px at 0% 0%, rgba(var(--bright-rgb), .04), transparent 70%), linear-gradient(160deg, var(--bg) 0%, var(--bg-b) 100%);
  --bg-art: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 1600 900%27 preserveAspectRatio=%27xMidYMid slice%27 fill=%27none%27 stroke=%27%233FA37D%27 stroke-width=%271.3%27%3E%3Cg opacity=%27.34%27%3E%3Cpath d=%27M0 120 C300 160 430 420 270 640 C180 770 80 830 0 850%27/%3E%3Cpath d=%27M0 170 C260 210 370 430 240 620 C160 735 70 790 0 808%27/%3E%3Cpath d=%27M0 230 C210 262 300 440 205 600 C145 700 70 745 0 762%27/%3E%3C/g%3E%3Cg opacity=%27.30%27%3E%3Cpath d=%27M1600 230 C1370 270 1240 560 1380 770 C1450 870 1530 895 1600 905%27/%3E%3Cpath d=%27M1600 290 C1410 322 1305 570 1410 735 C1465 820 1535 848 1600 858%27/%3E%3Cpath d=%27M1600 350 C1450 378 1370 580 1445 705 C1485 770 1540 798 1600 808%27/%3E%3C/g%3E%3C/svg%3E");
  --pill-bg: rgba(10, 44, 34, .78); --pill-fg: #FFFFFF; --pill-icon: #5FD3A6; --pill-badge: #0B0B0C; --pill-border: rgba(63, 163, 125, .55);
  --pill-shadow: 0 0 16px rgba(63, 163, 125, .28);
  --intro-line: rgba(63, 163, 125, .55); --intro-ring: rgba(63, 163, 125, .14);
  color-scheme: dark;
}
