/* ============================================================================================
   HMS themes — Light and Dark.

   app.css declares every design token with its NATIVE value (the original look, untouched).
   This file redefines the same tokens for the two other appearances, selected by the
   data-theme attribute on <html>, which the head script in layout.ejs sets before first paint:

     native  — the original "Ocean" theme, as it always was (tokens in app.css)
     light   — cream white, dark grey and black type, dark yellow / deep orange accents, blue
               only where something must read as "primary" (buttons, links, focus)
     dark    — the light theme with its whites turned to blacks; the yellow / orange / blue
               accents stay, except that blue is lifted a step so text keeps a 4.5:1 contrast
               on a near-black ground (the dark blue that works on cream fails on black)

   "system" is a PREFERENCE, not a theme — the head script resolves it to light or dark from
   prefers-color-scheme, so this file never needs a media query.

   Rules that are not plain token swaps (icon weight, the logo plate, paper surfaces, glass)
   live at the bottom, each scoped to the theme that needs it.
   ============================================================================================ */

/* ---- Light ---------------------------------------------------------------------------------- */
html[data-theme="light"] {
  color-scheme: light;
  --theme-color: #f6f5f0;

  --bg: #f6f5f0;             /* cream white */
  --panel: #ffffff;
  --surface-2: #f1efe8;
  --surface-3: #e7e4db;
  --hover: #f3f1eb;
  --active-bg: #fdeedd;      /* warm tint under a selected row */
  --ink: #1a1a1a;
  --ink-2: #3d3d3d;          /* icons, secondary text: dark grey */
  --muted: #6b6b6b;
  --on-brand: #ffffff;
  --line: #e3e0d7;
  --line-2: #cfcabd;
  --focus: #bcd3f5;
  --scrollbar: #d8d4ca;
  --brand: #262626;          /* black fills: room pills, mobile top bar */
  --brand-2: #1f6fd0;        /* blue — primary buttons, links, focus; nowhere else */
  --brand-2-hover: #185cb0;
  --link: #1d5fc2;
  --accent: #b8860b;         /* dark yellow */
  --ok: #2e7d4f;             /* success keeps its green: a payroll status must not read as a warning */
  --ok-bg: #e6f2ea;
  --warn: #9a6b00;           /* dark yellow, darkened for text */
  --warn-bg: #fff4d6;
  --danger: #d9480f;         /* deep orange */
  --danger-bg: #fdeae0;
  --info: #1f6fd0;
  --info-bg: #e7effc;
  --paper: #ffffff;
  --paper-ink: #1a1a1a;
  --input-bg: #ffffff;
  --tooltip-bg: #1f1f1f;
  --tooltip-ink: #ffffff;
  --backdrop: rgba(20,18,10,.45);
  --shadow: 0 1px 2px rgba(20,18,10,.06), 0 1px 3px rgba(20,18,10,.04);
  --shadow-2: 0 4px 14px rgba(20,18,10,.10);

  --side-bg: #fbfaf6;
  --side-ink: #3d3d3d;
  --side-hover: #f1efe8;
  --side-active-bg: #fdeedd;
  --side-active-ink: #d9480f;
  --topbar-bg: #1f1f1f;
  --topbar-ink: #ffffff;
  --logo-plate: transparent;

  --toast-ok-bg: #e6f2ea; --toast-ok-ink: #1f5a38; --toast-ok-line: #b9dcc6;
  --toast-bad-bg: #fdeae0; --toast-bad-ink: #8a2e0a; --toast-bad-line: #f3c4ad;

  /* highlight palette, warmed to sit on cream */
  --hl-name: #ffe3c2; --hl-source: #ffd9d4; --hl-booking: #d6f1d9; --hl-arrival: #d9eaff;
  --hl-departure: #e8dffb; --hl-amount: #fff3bf; --hl-gray: #ebe8e0;

  /* enhance.css */
  --panel-glow: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0) 60%);
  --glass-bg: rgba(255,255,255,.78);
  --glass-line: rgba(255,255,255,.7);
  --fx-shadow-sm: 0 1px 2px rgba(20,18,10,.05), 0 2px 6px rgba(20,18,10,.06);
  --fx-shadow-md: 0 2px 6px rgba(20,18,10,.06), 0 10px 24px rgba(20,18,10,.08);
  --fx-shadow-lg: 0 8px 20px rgba(20,18,10,.10), 0 24px 60px rgba(20,18,10,.12);
  --glow-edge: rgba(217,72,15,.55);
  --glow-sheen: rgba(255,255,255,.26);
}

/* ---- Dark ----------------------------------------------------------------------------------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --theme-color: #121212;

  --bg: #121212;
  --panel: #1b1b1d;
  --surface-2: #252528;
  --surface-3: #303034;
  --hover: #232326;
  --active-bg: #3a2314;      /* the orange tint, darkened */
  --ink: #ececec;
  --ink-2: #c6c6c6;
  --muted: #9b9b9b;
  --on-brand: #ffffff;
  --line: #2d2d31;
  --line-2: #3d3d42;
  --focus: #2b4f80;
  --scrollbar: #3a3a3f;
  --brand: #2a2a2e;
  --brand-2: #3d8af7;        /* blue lifted one step for the black ground */
  --brand-2-hover: #2f78dd;
  --link: #6ea8f7;
  --accent: #e0a526;         /* dark yellow — the same hue, brightened a touch for black */
  --ok: #4fbf7f;
  --ok-bg: #163523;
  --warn: #e3a812;
  --warn-bg: #3a2d08;
  --danger: #ff7a45;         /* deep orange */
  --danger-bg: #3b1a0d;
  --info: #6ea8f7;
  --info-bg: #172a45;
  --paper: #ffffff;          /* email bodies / PDF / print previews stay white — they were designed for it */
  --paper-ink: #1a1a1a;
  --input-bg: #161618;
  --tooltip-bg: #f2f2f2;
  --tooltip-ink: #111111;
  --backdrop: rgba(0,0,0,.6);
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
  --shadow-2: 0 4px 14px rgba(0,0,0,.5);

  --side-bg: #161618;
  --side-ink: #c6c6c6;
  --side-hover: #232326;
  --side-active-bg: #3a2314;
  --side-active-ink: #ff8a4c;
  --topbar-bg: #1b1b1d;
  --topbar-ink: #f2f2f2;
  --logo-plate: #ffffff;     /* a tenant logo drawn for white paper keeps a small white plate */

  --toast-ok-bg: #163523; --toast-ok-ink: #a5e6c0; --toast-ok-line: #2a6a44;
  --toast-bad-bg: #3b1a0d; --toast-bad-ink: #ffc2a6; --toast-bad-line: #7a3a1e;

  --hl-name: #5a3a14; --hl-source: #5a2222; --hl-booking: #1d4a2a; --hl-arrival: #1b3a55;
  --hl-departure: #3a2d5a; --hl-amount: #5a4d12; --hl-gray: #2b2b2f;

  --panel-glow: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 60%);
  --glass-bg: rgba(27,27,29,.82);
  --glass-line: rgba(255,255,255,.08);
  --fx-shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4);
  --fx-shadow-md: 0 2px 6px rgba(0,0,0,.5), 0 10px 24px rgba(0,0,0,.5);
  --fx-shadow-lg: 0 8px 20px rgba(0,0,0,.6), 0 24px 60px rgba(0,0,0,.6);
  --glow-edge: rgba(255,255,255,.62);
  --glow-sheen: rgba(255,255,255,.12);
}

/* ---- Studio (2026-11-16) -------------------------------------------------------------------------
   The owner's reference: a crisp white workspace — a pale grey rail, white cards with soft grey
   hairlines and generous radii, black and dark-grey type, the selected row a light grey pill, ONE
   blue for the primary button and links, and near-black for dark fills. No warm accents.
   2026-11-16 later: the owner asked for black, white and grey ONLY — the blue became charcoal, and the
   status and highlight colours keep just a trace of their hue (about 15% saturation) so a success,
   a warning and an error still differ without bringing colour back. */
html[data-theme="studio"] {
  color-scheme: light;
  --theme-color: #f7f7f8;

  --bg: #f7f7f8;
  --panel: #ffffff;
  --surface-2: #f1f1f3;
  --surface-3: #e6e6e9;
  --hover: #f3f3f5;
  --active-bg: #ececef;      /* the grey pill under a selected row */
  --ink: #1f1f1f;
  --ink-2: #3c3c40;
  --muted: #6b6b70;
  --on-brand: #ffffff;
  --line: #e4e4e7;
  --line-2: #d0d0d5;
  --focus: #c9c9ce;
  --scrollbar: #d6d6db;
  --brand: #1c1c1e;          /* near-black fills */
  --brand-2: #2b2b2e;        /* charcoal: primary buttons, focus */
  --brand-2-hover: #000000;
  --link: #1f1f1f;
  --accent: #3c3c40;
  --ok: #3f5a49;  --ok-bg: #edf0ee;
  --warn: #6b5d3f; --warn-bg: #f3f1ec;
  --danger: #7a3d3b; --danger-bg: #f4eeee;
  --info: #3c3c40; --info-bg: #efeff1;
  --paper: #ffffff; --paper-ink: #1f1f1f;
  --input-bg: #ffffff;
  --tooltip-bg: #1f1f1f; --tooltip-ink: #ffffff;
  --backdrop: rgba(20,20,24,.40);
  --shadow: 0 1px 2px rgba(20,20,24,.05), 0 1px 3px rgba(20,20,24,.04);
  --shadow-2: 0 4px 14px rgba(20,20,24,.09);

  --side-bg: #f3f3f5;
  --side-ink: #3c3c40;
  --side-hover: #e9e9ec;
  --side-active-bg: #ffffff;
  --side-active-ink: #1f1f1f;
  --topbar-bg: #1c1c1e; --topbar-ink: #ffffff;
  --logo-plate: transparent;

  --toast-ok-bg: #edf0ee; --toast-ok-ink: #2f4538; --toast-ok-line: #cdd5d0;
  --toast-bad-bg: #f4eeee; --toast-bad-ink: #5e2f2d; --toast-bad-line: #dccfce;
  --hl-name: #efece8; --hl-source: #eee9e9; --hl-booking: #e8ece9; --hl-arrival: #e8eaee;
  --hl-departure: #ebe9ee; --hl-amount: #efeee6; --hl-gray: #ececef;

  --panel-glow: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0) 60%);
  --glass-bg: rgba(255,255,255,.82); --glass-line: rgba(255,255,255,.7);
  --fx-shadow-sm: 0 1px 2px rgba(20,20,24,.04), 0 2px 6px rgba(20,20,24,.05);
  --fx-shadow-md: 0 2px 6px rgba(20,20,24,.05), 0 10px 24px rgba(20,20,24,.07);
  --fx-shadow-lg: 0 8px 20px rgba(20,20,24,.09), 0 24px 60px rgba(20,20,24,.10);
  --glow-edge: rgba(40,40,44,.55);
  --glow-sheen: rgba(255,255,255,.28);
}

/* ---- Maroon (2026-11-16) -------------------------------------------------------------------------
   The owner's second light theme: body text in maroon, bold text (headings, panel titles, <strong>,
   table headers) in red, with black and grey for fills, lines and quiet text. Primary buttons are
   black (red on hover); links red. Success keeps its green, so a status never reads as an error. */
html[data-theme="maroon"] {
  color-scheme: light;
  --theme-color: #faf7f6;

  --bg: #faf7f6;
  --panel: #ffffff;
  --surface-2: #f3efee;
  --surface-3: #e8e2e1;
  --hover: #f7f2f1;
  --active-bg: #f6e3e3;
  --ink: #6b1a1f;            /* maroon — normal text */
  --ink-2: #4a4a4a;          /* grey — icons, secondary labels */
  --muted: #7a7272;
  --ink-bold: #c4161c;       /* red — bold text */
  --on-brand: #ffffff;
  --line: #e6dfde;
  --line-2: #cfc5c4;
  --focus: #f0b8ba;
  --scrollbar: #d9d0cf;
  --brand: #1a1a1a;          /* black fills */
  --brand-2: #1a1a1a;        /* primary buttons: black… */
  --brand-2-hover: #c4161c;  /* …turning red under the pointer */
  --link: #b3141a;
  --accent: #c4161c;
  --ok: #2e7d4f;  --ok-bg: #e6f2ea;
  --warn: #8a5a00; --warn-bg: #fdf1d6;
  --danger: #9e0f14; --danger-bg: #fbe4e4;
  --info: #4a4a4a; --info-bg: #f0eeee;
  --paper: #ffffff; --paper-ink: #1a1a1a;
  --input-bg: #ffffff;
  --tooltip-bg: #1a1a1a; --tooltip-ink: #ffffff;
  --backdrop: rgba(26,10,12,.45);
  --shadow: 0 1px 2px rgba(40,10,12,.06), 0 1px 3px rgba(40,10,12,.04);
  --shadow-2: 0 4px 14px rgba(40,10,12,.10);

  --side-bg: #f7f3f2;
  --side-ink: #4a4a4a;
  --side-hover: #efe8e7;
  --side-active-bg: #f6e3e3;
  --side-active-ink: #c4161c;
  --topbar-bg: #1a1a1a; --topbar-ink: #ffffff;
  --logo-plate: transparent;

  --toast-ok-bg: #e6f2ea; --toast-ok-ink: #1f5a38; --toast-ok-line: #b9dcc6;
  --toast-bad-bg: #fbe4e4; --toast-bad-ink: #7a0c10; --toast-bad-line: #efb9bb;
  --hl-name: #ffe3c2; --hl-source: #fbd6d6; --hl-booking: #d6f1d9; --hl-arrival: #dde6f5;
  --hl-departure: #e8dffb; --hl-amount: #fff3bf; --hl-gray: #ece6e5;

  --panel-glow: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0) 60%);
  --glass-bg: rgba(255,255,255,.8); --glass-line: rgba(255,255,255,.7);
  --fx-shadow-sm: 0 1px 2px rgba(40,10,12,.05), 0 2px 6px rgba(40,10,12,.06);
  --fx-shadow-md: 0 2px 6px rgba(40,10,12,.06), 0 10px 24px rgba(40,10,12,.08);
  --fx-shadow-lg: 0 8px 20px rgba(40,10,12,.10), 0 24px 60px rgba(40,10,12,.12);
  --glow-edge: rgba(196,22,28,.6);
  --glow-sheen: rgba(255,255,255,.26);
}

/* ---- Lavender (2026-11-16) -----------------------------------------------------------------------
   The owner's light purple theme, built from the whole purple family: a lilac-white page, white
   panels with lavender hairlines, deep plum text, violet buttons and links, an orchid accent, a
   mauve rail with the selected item in violet, and a deep aubergine top bar. Success keeps a green
   and errors a red (both nudged toward the purples) so a status never reads as decoration. */
html[data-theme="lavender"] {
  color-scheme: light;
  --theme-color: #f7f4fc;

  --bg: #f7f4fc;             /* lilac white */
  --panel: #ffffff;
  --surface-2: #f1ebfa;      /* lavender mist */
  --surface-3: #e5dbf5;      /* thistle */
  --hover: #f3eefb;
  --active-bg: #ece1fc;      /* pale violet pill */
  --ink: #2e1a47;            /* deep plum */
  --ink-2: #4b3570;          /* grape */
  --muted: #7a6a92;          /* dusty mauve */
  --on-brand: #ffffff;
  --line: #e6ddf3;
  --line-2: #d3c4eb;         /* wisteria */
  --focus: #d6c2f7;
  --scrollbar: #d8cbee;
  --brand: #3b1f66;          /* aubergine fills */
  --brand-2: #7c3aed;        /* violet: primary buttons, focus */
  --brand-2-hover: #6d28d9;  /* royal purple */
  --link: #6d28d9;
  --accent: #c026d3;         /* orchid */
  --ok: #2f7a55;  --ok-bg: #e6f3ec;
  --warn: #8a5a00; --warn-bg: #fbf0d9;
  --danger: #b4235a; --danger-bg: #fbe6ee;   /* raspberry */
  --info: #7c3aed; --info-bg: #f1e9fe;
  --paper: #ffffff; --paper-ink: #1f1530;
  --input-bg: #ffffff;
  --tooltip-bg: #2e1a47; --tooltip-ink: #ffffff;
  --backdrop: rgba(30,14,52,.42);
  --shadow: 0 1px 2px rgba(46,26,71,.06), 0 1px 3px rgba(46,26,71,.04);
  --shadow-2: 0 4px 14px rgba(46,26,71,.11);

  --side-bg: #efe8fa;        /* mauve rail */
  --side-ink: #4b3570;
  --side-hover: #e5daf7;
  --side-active-bg: #ffffff;
  --side-active-ink: #6d28d9;
  --topbar-bg: #3b1f66; --topbar-ink: #ffffff;
  --logo-plate: transparent;

  --toast-ok-bg: #e6f3ec; --toast-ok-ink: #1f5a3c; --toast-ok-line: #b9dcc9;
  --toast-bad-bg: #fbe6ee; --toast-bad-ink: #7c1740; --toast-bad-line: #efbcd0;
  --hl-name: #f6e3fb; --hl-source: #fbdfee; --hl-booking: #e2f1ea; --hl-arrival: #e3e4fb;
  --hl-departure: #ece0fc; --hl-amount: #f8edd2; --hl-gray: #ece6f4;

  --panel-glow: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0) 60%);
  --glass-bg: rgba(255,255,255,.82); --glass-line: rgba(255,255,255,.7);
  --fx-shadow-sm: 0 1px 2px rgba(46,26,71,.05), 0 2px 6px rgba(46,26,71,.06);
  --fx-shadow-md: 0 2px 6px rgba(46,26,71,.06), 0 10px 24px rgba(46,26,71,.09);
  --fx-shadow-lg: 0 8px 20px rgba(46,26,71,.11), 0 24px 60px rgba(46,26,71,.13);
  --glow-edge: rgba(124,58,237,.6);
  --glow-sheen: rgba(255,255,255,.28);
}

/* ---- Amethyst (2026-11-16) -----------------------------------------------------------------------
   The owner's dark theme with purple: a near-black aubergine ground, plum panels, soft lilac text,
   violet buttons, lavender links, an amethyst selected rail item and an orchid accent. */
html[data-theme="amethyst"] {
  color-scheme: dark;
  --theme-color: #130e1d;

  --bg: #130e1d;             /* midnight aubergine */
  --panel: #1c152b;          /* blackberry */
  --surface-2: #251c39;
  --surface-3: #302548;
  --hover: #261d3c;
  --active-bg: #3a2763;      /* amethyst */
  --ink: #ece6f7;            /* lilac white */
  --ink-2: #cdbfe6;          /* lavender grey */
  --muted: #9a8bb8;          /* heather */
  --on-brand: #ffffff;
  --line: #30264a;
  --line-2: #42355f;
  --focus: #5b3fa0;
  --scrollbar: #3d3159;
  --brand: #2a1f45;
  --brand-2: #7c3aed;        /* violet: white text keeps its contrast */
  --brand-2-hover: #8b5cf6;
  --link: #c4b5fd;           /* lavender */
  --accent: #e879f9;         /* orchid */
  --ok: #5fd39a;  --ok-bg: #15332a;
  --warn: #e8b23a; --warn-bg: #3a2c0c;
  --danger: #ff7aa8; --danger-bg: #3d1427;
  --info: #b69cff; --info-bg: #261a48;
  --paper: #ffffff; --paper-ink: #1a1a1a;
  --input-bg: #171024;
  --tooltip-bg: #ece6f7; --tooltip-ink: #1c152b;
  --backdrop: rgba(5,2,10,.65);
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
  --shadow-2: 0 4px 14px rgba(0,0,0,.55);

  --side-bg: #170f25;
  --side-ink: #cdbfe6;
  --side-hover: #241a38;
  --side-active-bg: #3a2763;
  --side-active-ink: #d8b4fe;
  --topbar-bg: #1c152b; --topbar-ink: #f3eefc;
  --logo-plate: #ffffff;

  --toast-ok-bg: #15332a; --toast-ok-ink: #a9ecc9; --toast-ok-line: #2a6650;
  --toast-bad-bg: #3d1427; --toast-bad-ink: #ffc0d6; --toast-bad-line: #7a2a4c;
  --hl-name: #4d2a5a; --hl-source: #5a2240; --hl-booking: #1d4a38; --hl-arrival: #262f5e;
  --hl-departure: #3d2a6a; --hl-amount: #54461a; --hl-gray: #2c2440;

  --panel-glow: linear-gradient(180deg, rgba(196,181,253,.05), rgba(196,181,253,0) 60%);
  --glass-bg: rgba(28,21,43,.84); --glass-line: rgba(196,181,253,.10);
  --fx-shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4);
  --fx-shadow-md: 0 2px 6px rgba(0,0,0,.5), 0 10px 24px rgba(0,0,0,.5);
  --fx-shadow-lg: 0 8px 20px rgba(0,0,0,.6), 0 24px 60px rgba(0,0,0,.6);
  --glow-edge: rgba(196,181,253,.7);
  --glow-sheen: rgba(196,181,253,.14);
}

/* ---- Rules that are more than a token swap -------------------------------------------------- */

/* Crisper rail icons on the two new themes: a heavier stroke and a fainter duotone fill, so the
   glyph reads as one clean line on the slim rail (the native theme keeps its softer duotone). */
html[data-tone="light"] .side-ico svg, html[data-tone="dark"] .side-ico svg {
  stroke-width: 1.9; shape-rendering: geometricPrecision;
}
html[data-tone="light"] .side-ico svg [fill-opacity], html[data-tone="dark"] .side-ico svg [fill-opacity] { fill-opacity: .08; }
html[data-tone="light"] .side-nav a.active .side-ico svg [fill-opacity],
html[data-tone="dark"] .side-nav a.active .side-ico svg [fill-opacity] { fill-opacity: .18; }
/* a left accent bar marks the selected module, as on a slim desktop rail */
html[data-tone="light"] .side-nav a.active::before, html[data-tone="dark"] .side-nav a.active::before {
  content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-active-ink);
}
html[data-tone="light"] .side-brand-name, html[data-tone="dark"] .side-brand-name { color: var(--ink-2); }
html[data-tone="light"] .side-nav a:hover, html[data-tone="dark"] .side-nav a:hover { color: var(--ink); }

/* Tenant logos are drawn for white paper; give them a plate on the dark theme. */
html[data-tone="dark"] .side-logo img, html[data-tone="dark"] .login-card > img {
  background: var(--logo-plate); border-radius: 8px; padding: 3px;
}

/* Surfaces that must stay paper-white in every theme: rendered email, PDF and print previews,
   the payslip twin. A dark page around a white document is how every mail client does it. */
.paper, html[data-tone="dark"] .mv-viewer-card iframe, html[data-tone="dark"] .mail-html, html[data-tone="dark"] .pdf-preview {
  background: var(--paper); color: var(--paper-ink);
}

/* Native form controls and scrollbars follow color-scheme; chips drawn with a hard white keep legible. */
html[data-tone="dark"] input[type=text], html[data-tone="dark"] input[type=email], html[data-tone="dark"] input[type=password],
html[data-tone="dark"] input[type=search], html[data-tone="dark"] input[type=number], html[data-tone="dark"] input[type=date],
html[data-tone="dark"] input[type=time], html[data-tone="dark"] input[type=tel], html[data-tone="dark"] input[type=url],
html[data-tone="dark"] select, html[data-tone="dark"] textarea {
  background: var(--input-bg); color: var(--ink); border-color: var(--line);
}
html[data-tone="dark"] ::placeholder { color: var(--muted); }
html[data-tone="dark"] hr { border-color: var(--line); }
html[data-tone="dark"] code, html[data-tone="dark"] pre { background: var(--surface-2); color: var(--ink); }
html[data-tone="dark"] img.inv, html[data-tone="dark"] .invert-dark { filter: invert(1) hue-rotate(180deg); }

/* The Microsoft sign-in button is a brand asset: it stays near-black on light and gets a light
   face on dark so it does not vanish into the page. */
html[data-tone="dark"] .ms-btn { background: #f2f2f2; color: #1a1a1a; }
html[data-tone="dark"] .ms-btn:hover { background: #ffffff; }

/* Light theme: headings in true black, the rail a shade warmer than the panels. */
html[data-tone="light"] h1, html[data-tone="light"] h2, html[data-tone="light"] .page-title { color: #111111; }

/* Selection colour should not stay the browser default blue on the warm themes. */
html[data-tone="light"] ::selection { background: #fde2c4; }
html[data-tone="dark"] ::selection { background: #5a3a14; }

/* Maroon: bold text in red. Headings, panel titles, table headers and <strong>/<b> — the rest of the
   type stays maroon (--ink). After the light-tone heading rule above, so it wins. */
html[data-theme="maroon"] h1, html[data-theme="maroon"] h2, html[data-theme="maroon"] h3, html[data-theme="maroon"] h4,
html[data-theme="maroon"] .page-title, html[data-theme="maroon"] .panel-head, html[data-theme="maroon"] th,
html[data-theme="maroon"] strong, html[data-theme="maroon"] b { color: var(--ink-bold); }
html[data-theme="maroon"] ::selection { background: #f6cfd0; }
/* Studio: headings in near-black, the selected rail item a white pill on the grey rail, as in the reference. */
html[data-theme="studio"] h1, html[data-theme="studio"] h2, html[data-theme="studio"] .page-title { color: #111111; }
html[data-theme="studio"] .side-nav a.active { box-shadow: 0 1px 2px rgba(20,20,24,.06); }
html[data-theme="studio"] ::selection { background: #dcdce0; }
/* links read as links by their underline, not by colour */
html[data-theme="studio"] a:not(.btn):not([class*="side"]):hover { text-decoration: underline; }

/* Lavender: headings in royal purple (after the light-tone black heading rule, so it wins), a
   violet selection, and the selected rail item lifted off the mauve rail. */
html[data-theme="lavender"] h1, html[data-theme="lavender"] h2, html[data-theme="lavender"] .page-title { color: #4c1d95; }
html[data-theme="lavender"] h3, html[data-theme="lavender"] .panel-head { color: #5b21b6; }
html[data-theme="lavender"] .side-nav a.active { box-shadow: 0 1px 3px rgba(76,29,149,.12); }
html[data-theme="lavender"] ::selection { background: #e3d3fd; }
/* Amethyst: headings in pale lavender, a violet selection. */
html[data-theme="amethyst"] h1, html[data-theme="amethyst"] h2, html[data-theme="amethyst"] .page-title { color: #e9d5ff; }
html[data-theme="amethyst"] ::selection { background: #4c2a85; }
