/* The colour styles each person picks in My account (Kyle, 1 Oct 2026).
 *
 * public/app/theme-boot.js sets two attributes on <html> before the first paint:
 *   data-theme="light" | "dark"   (none = match the phone)
 *   data-style="rose" | "gold" | "ocean" | "sage"
 *
 * Rose is the portal's first look: app.css and pickers.css as they are, so it
 * needs nothing here. Every other style redefines the same tokens, once for
 * light and once for dark (both ways dark can be asked for: the phone, or
 * the person's own choice). Status colours (red, amber, green, blue) stay the
 * same in every style: "something is wrong" always looks the same.
 *
 * Each dark block sets every token its light block sets, so a light value
 * can never leak into dark. checks/batch2 reads the tokens back in a browser.
 * The customer order page never loads this file. OWNED BY THE foundation. */

/* ---- tokens every style shares ---------------------------------------- */
:root { --on-accent: #ffffff; --brand-name: #ffffff; --brand-mark: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --on-accent: #2a0f1d; }
}
:root[data-theme="dark"] { --on-accent: #2a0f1d; }

/* ---- Black and Gold: like the QR Ph poster. A black brand bar with the logo in gold, gold accents. */
:root[data-style="gold"] {
  --ground: #f5f3ee;
  --raised: #ffffff;
  --rail: #ffffff;
  --sunk: #f7f5f0;
  --line: #e4ded2;
  --line-soft: #efebe3;
  --ink: #15130f;
  --body: #47423a;
  --muted: #878074;
  --brand-bg: #0b0b0b;
  --brand-fg: #f2e6c4;
  --brand-name: #f2e6c4;
  --brand-mark: #d4af37;
  --gold: #d4af37;
  --accent: #8a6914;
  --accent-soft: #f6efdc;
  --on-accent: #ffffff;
  --fhp-on-accent: #ffffff;
  --fhp-ring: #a9853a;
  --fhp-ring-soft: rgba(212, 175, 55, .18);
  --fhp-focus: rgba(138, 105, 20, .16);
}
@media (prefers-color-scheme: dark) {
  :root[data-style="gold"]:not([data-theme="light"]) {
    --ground: #0a0a0a;
    --raised: #141413;
    --rail: #0f0f0e;
    --sunk: #1c1b19;
    --line: #2c2a25;
    --line-soft: #201f1c;
    --ink: #f4eedf;
    --body: #cfc7b5;
    --muted: #918a7b;
    --brand-bg: #000000;
    --brand-fg: #f2e6c4;
    --brand-name: #f2e6c4;
    --brand-mark: #d4af37;
    --gold: #d4af37;
    --accent: #d9b44a;
    --accent-soft: #262012;
    --on-accent: #1a1405;
    --fhp-pop: #1a1917;
    --fhp-pop-line: #35322b;
    --fhp-hover: #24221e;
    --fhp-on-accent: #1a1405;
    --fhp-ring: #d4af37;
    --fhp-ring-soft: rgba(212, 175, 55, .16);
    --fhp-focus: rgba(217, 180, 74, .2);
  }
}
:root[data-style="gold"][data-theme="dark"] {
  --ground: #0a0a0a;
  --raised: #141413;
  --rail: #0f0f0e;
  --sunk: #1c1b19;
  --line: #2c2a25;
  --line-soft: #201f1c;
  --ink: #f4eedf;
  --body: #cfc7b5;
  --muted: #918a7b;
  --brand-bg: #000000;
  --brand-fg: #f2e6c4;
  --brand-name: #f2e6c4;
  --brand-mark: #d4af37;
  --gold: #d4af37;
  --accent: #d9b44a;
  --accent-soft: #262012;
  --on-accent: #1a1405;
  --fhp-pop: #1a1917;
  --fhp-pop-line: #35322b;
  --fhp-hover: #24221e;
  --fhp-on-accent: #1a1405;
  --fhp-ring: #d4af37;
  --fhp-ring-soft: rgba(212, 175, 55, .16);
  --fhp-focus: rgba(217, 180, 74, .2);
}

/* ---- Ocean blue: a deep navy bar, calm blue accents. */
:root[data-style="ocean"] {
  --ground: #f1f5f9;
  --raised: #ffffff;
  --rail: #ffffff;
  --sunk: #f4f7fa;
  --line: #dce4ed;
  --line-soft: #e9eff5;
  --ink: #0f1a28;
  --body: #3d4a5a;
  --muted: #788596;
  --brand-bg: #0c1f33;
  --brand-fg: #eaf2fa;
  --brand-name: #ffffff;
  --brand-mark: #ffffff;
  --gold: #8cc8f0;
  --accent: #1d5f9e;
  --accent-soft: #e3eef9;
  --on-accent: #ffffff;
  --fhp-on-accent: #ffffff;
  --fhp-ring: #3f7fbf;
  --fhp-ring-soft: rgba(63, 127, 191, .16);
  --fhp-focus: rgba(29, 95, 158, .16);
}
@media (prefers-color-scheme: dark) {
  :root[data-style="ocean"]:not([data-theme="light"]) {
    --ground: #0a1119;
    --raised: #111a24;
    --rail: #0e161f;
    --sunk: #16212d;
    --line: #23303f;
    --line-soft: #1a2532;
    --ink: #e8f0f8;
    --body: #c0ccd9;
    --muted: #8292a4;
    --brand-bg: #07121e;
    --brand-fg: #e8f0f8;
    --brand-name: #ffffff;
    --brand-mark: #ffffff;
    --gold: #8cc8f0;
    --accent: #7cb6ea;
    --accent-soft: #12263a;
    --on-accent: #06131f;
    --fhp-pop: #15202c;
    --fhp-pop-line: #2a3a4c;
    --fhp-hover: #1d2a38;
    --fhp-on-accent: #06131f;
    --fhp-ring: #8cc8f0;
    --fhp-ring-soft: rgba(140, 200, 240, .14);
    --fhp-focus: rgba(124, 182, 234, .2);
  }
}
:root[data-style="ocean"][data-theme="dark"] {
  --ground: #0a1119;
  --raised: #111a24;
  --rail: #0e161f;
  --sunk: #16212d;
  --line: #23303f;
  --line-soft: #1a2532;
  --ink: #e8f0f8;
  --body: #c0ccd9;
  --muted: #8292a4;
  --brand-bg: #07121e;
  --brand-fg: #e8f0f8;
  --brand-name: #ffffff;
  --brand-mark: #ffffff;
  --gold: #8cc8f0;
  --accent: #7cb6ea;
  --accent-soft: #12263a;
  --on-accent: #06131f;
  --fhp-pop: #15202c;
  --fhp-pop-line: #2a3a4c;
  --fhp-hover: #1d2a38;
  --fhp-on-accent: #06131f;
  --fhp-ring: #8cc8f0;
  --fhp-ring-soft: rgba(140, 200, 240, .14);
  --fhp-focus: rgba(124, 182, 234, .2);
}

/* ---- Sage green: a forest bar, soft green accents with a warm sand touch. */
:root[data-style="sage"] {
  --ground: #f3f5f0;
  --raised: #ffffff;
  --rail: #ffffff;
  --sunk: #f5f7f2;
  --line: #dde4d6;
  --line-soft: #eaefe5;
  --ink: #161e18;
  --body: #414b43;
  --muted: #7b857d;
  --brand-bg: #1b2a20;
  --brand-fg: #eef3ec;
  --brand-name: #ffffff;
  --brand-mark: #ffffff;
  --gold: #d3c28f;
  --accent: #456a50;
  --accent-soft: #e6eee5;
  --on-accent: #ffffff;
  --fhp-on-accent: #ffffff;
  --fhp-ring: #9a8a4f;
  --fhp-ring-soft: rgba(154, 138, 79, .16);
  --fhp-focus: rgba(69, 106, 80, .16);
}
@media (prefers-color-scheme: dark) {
  :root[data-style="sage"]:not([data-theme="light"]) {
    --ground: #0d120e;
    --raised: #141b16;
    --rail: #111713;
    --sunk: #19221c;
    --line: #28332b;
    --line-soft: #1e2721;
    --ink: #ecf2ea;
    --body: #c6d0c7;
    --muted: #8a978c;
    --brand-bg: #09100b;
    --brand-fg: #ecf2ea;
    --brand-name: #ffffff;
    --brand-mark: #ffffff;
    --gold: #d3c28f;
    --accent: #98c2a0;
    --accent-soft: #1a2a1f;
    --on-accent: #0b170e;
    --fhp-pop: #18201a;
    --fhp-pop-line: #2e3a31;
    --fhp-hover: #212b24;
    --fhp-on-accent: #0b170e;
    --fhp-ring: #cdbf8f;
    --fhp-ring-soft: rgba(205, 191, 143, .14);
    --fhp-focus: rgba(152, 194, 160, .2);
  }
}
:root[data-style="sage"][data-theme="dark"] {
  --ground: #0d120e;
  --raised: #141b16;
  --rail: #111713;
  --sunk: #19221c;
  --line: #28332b;
  --line-soft: #1e2721;
  --ink: #ecf2ea;
  --body: #c6d0c7;
  --muted: #8a978c;
  --brand-bg: #09100b;
  --brand-fg: #ecf2ea;
  --brand-name: #ffffff;
  --brand-mark: #ffffff;
  --gold: #d3c28f;
  --accent: #98c2a0;
  --accent-soft: #1a2a1f;
  --on-accent: #0b170e;
  --fhp-pop: #18201a;
  --fhp-pop-line: #2e3a31;
  --fhp-hover: #212b24;
  --fhp-on-accent: #0b170e;
  --fhp-ring: #cdbf8f;
  --fhp-ring-soft: rgba(205, 191, 143, .14);
  --fhp-focus: rgba(152, 194, 160, .2);
}

/* ---- what follows the tokens ------------------------------------------ */
/* The brand bar's mark is drawn in the style's own colour (gold for Black and
 * Gold) from the white mark's shape. */
.fhmark {
  display: block; flex: none; width: 32px; height: 32px; background: var(--brand-mark);
  -webkit-mask: url(/icons/fh-mark-white.png) center / contain no-repeat;
  mask: url(/icons/fh-mark-white.png) center / contain no-repeat;
}
.brandname { color: var(--brand-name); }
button.act.brand { color: var(--on-accent); }
/* A person who picked Dark on a light phone gets the white sign-in mark too. */
:root[data-theme="dark"] .mark-light { display: none !important; }
:root[data-theme="dark"] .mark-dark { display: block !important; }

/* ---- My account: the look ---------------------------------------------- */
.look-seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.look-seg button {
  font: inherit; font-size: 14px; font-weight: 550; min-height: 42px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--sunk); color: var(--ink);
}
.look-seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.look-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 2px 0 12px; }
.look-style {
  font: inherit; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); color: var(--ink);
}
.look-style[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.look-style .sw { display: flex; height: 54px; }
.look-style .sw i { flex: 1; display: block; }
.look-style .sw i:first-child { flex: 2; }
.look-style .nm { display: block; padding: 8px 10px 9px; font-size: 13.5px; font-weight: 600; }
.look-style .nm small { display: block; font-weight: 450; color: var(--muted); font-size: 12px; }
/* the swatches show each style's brand bar, accent and touch, whatever the
 * look on screen now (they are previews of the other styles) */
.look-style[data-style-pick="rose"] .sw i:nth-child(1) { background: #1a1320; }
.look-style[data-style-pick="rose"] .sw i:nth-child(2) { background: #8c3b62; }
.look-style[data-style-pick="rose"] .sw i:nth-child(3) { background: #c9a45c; }
.look-style[data-style-pick="gold"] .sw i:nth-child(1) { background: #0b0b0b; }
.look-style[data-style-pick="gold"] .sw i:nth-child(2) { background: #d4af37; }
.look-style[data-style-pick="gold"] .sw i:nth-child(3) { background: #8a6914; }
.look-style[data-style-pick="ocean"] .sw i:nth-child(1) { background: #0c1f33; }
.look-style[data-style-pick="ocean"] .sw i:nth-child(2) { background: #1d5f9e; }
.look-style[data-style-pick="ocean"] .sw i:nth-child(3) { background: #8cc8f0; }
.look-style[data-style-pick="sage"] .sw i:nth-child(1) { background: #1b2a20; }
.look-style[data-style-pick="sage"] .sw i:nth-child(2) { background: #456a50; }
.look-style[data-style-pick="sage"] .sw i:nth-child(3) { background: #d3c28f; }
