/* ==========================================================================
   KITS — one futuristic BLENDED national theme per edition, no toggle.
   Loaded after app.css. Selected purely by html[data-edition]; a light-theme
   variant is included per edition under html[data-theme="light"][data-edition].
   Each blend fuses the nation's sporting and flag colours into a single deep
   base, one metallic primary accent (the most iconic colour, 2-3 stop
   gradient), and a secondary accent used sparingly for active rims, focus
   rings and the wordmark suffix. Soft corner glows in both palettes, glass
   panels tinted by the base, and a faint diagonal stripe texture.
   All combinations verified >= 4.5:1 text-on-bg and >= 3:1
   accent-contrast-on-accent (see kits contrast report).
   ========================================================================== */

/* ---------- kit stripe texture: faint diagonal on the page background ----------
   Applied on top of app.css's own radial/grid background via a ::before
   overlay on body — cheap, additive, and it never intercepts pointer
   events. Active on every edition now that there is no toggle to gate it. */
html[data-edition] body {
  position: relative;
}
html[data-edition] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--kit-stripe, none);
  opacity: var(--kit-stripe-opacity, 0.05);
}
html[data-edition] .app,
html[data-edition] .shell {
  position: relative;
  z-index: 1;
}

/* ---------- shared kit mechanics (every edition sets the tokens below) ---------- */
html[data-edition] {
  --kit-stripe: repeating-linear-gradient(
    135deg,
    rgba(var(--kit-rim-rgb, 255, 255, 255), 0.6) 0px,
    rgba(var(--kit-rim-rgb, 255, 255, 255), 0.6) 1px,
    transparent 1px,
    transparent 34px
  );
}

/* Premium glass panels tinted with the kit base, layered over app.css's --panel. */
html[data-edition] .login-card,
html[data-edition] .gov-card,
html[data-edition] .tile,
html[data-edition] .chart-card,
html[data-edition] .compare-col,
html[data-edition] .audit-ledger-head,
html[data-edition] .settings-section,
html[data-edition] .media-item,
html[data-edition] .geometry-figure {
  background: linear-gradient(165deg, rgba(var(--kit-rim-rgb, 255, 255, 255), 0.05), var(--panel) 60%);
  box-shadow: inset 0 1px 0 rgba(var(--kit-rim-rgb, 255, 255, 255), 0.09), var(--shadow-md);
}

/* Metallic accent gradient wherever app.css uses linear-gradient(135deg, var(--accent), var(--accent-2)). */
html[data-edition] .btn-primary,
html[data-edition] .send-btn,
html[data-edition] .opening-enter-btn,
html[data-edition] .opening-loader-fill,
html[data-edition] .switch[aria-checked="true"]::before,
html[data-edition] .brand-word-accent,
html[data-edition] .opening-wordmark .brand-word-accent {
  background: var(--kit-accent-grad);
}
html[data-edition] .brand-word-accent,
html[data-edition] .opening-wordmark .brand-word-accent {
  /* an edition may give its wordmark its own thread (AU: champagne on navy,
     where the claret fill gradient would not read as text) */
  background: var(--kit-word-grad, var(--kit-accent-grad));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Soft coloured page glow (two-stop, corner blooms) layered under app.css's own radials. */
html[data-edition] body {
  background:
    radial-gradient(1100px 560px at 100% -10%, var(--kit-page-glow-a), transparent 60%),
    radial-gradient(900px 520px at -10% 110%, var(--kit-page-glow-b), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
  background-attachment: fixed;
}

/* Kit rim hairline on cards, echoing the sports-team trim. */
html[data-edition] .login-card::after,
html[data-edition] .tile::after,
html[data-edition] .chart-card::after,
html[data-edition] .gov-constitution-header {
  background: linear-gradient(90deg, transparent, var(--kit-rim), transparent);
}

/* ==========================================================================
   AU — Australia · the flag, matured and made serious: one dark navy ground
   (#071531 → #0B1F4B blends, near-black at the edges), pearl and ivory ink,
   thin pearl rules, and claret held back for a single mark of authority —
   a hairline, a seal (the primary fill on press), an alert. No sporting
   green or gold; no grid, stripe, glow or sparkle. The ground is a still,
   low-saturation blend of navy and ink, dithered so it never bands, and the
   mood moves it by a few degrees of hue and light only (below).
   ========================================================================== */
html[data-edition="AU"]:not([data-theme="light"]) {
  --bg: #071531; --bg-elevated: #0d1f47; --bg-sunken: #040c20;
  --border: #1b2d58; --border-strong: #2b4179;
  --text: #f1ede4; --text-muted: #b4bdd3; --text-faint: #8b96b4;
  --accent: #d6cbb0; --accent-strong: #ece5d2; --accent-2: #8e1b2e;
  --accent-soft: rgba(214, 203, 176, 0.10); --accent-contrast: #f5f1e8;
  --danger: #e8586b; --danger-rgb: 232, 88, 107; --danger-soft: rgba(232, 88, 107, 0.12);
  --amber: #d8b46e; --amber-soft: rgba(216, 180, 110, 0.12);
  --neutral-chip: #132650; --panel: rgba(13, 31, 71, 0.62);
  --grid-line: rgba(214, 203, 176, 0);
  --claret-rgb: 142, 27, 46; --pearl-rgb: 214, 203, 176; --navy-lit-rgb: 52, 84, 160;
  --glow-rgb: 52, 84, 160;
  --kit-stripe: none;
  /* the seal: the one claret fill, used on a pressed primary and a signature */
  --kit-seal: #8e1b2e;
  --kit-accent-grad: linear-gradient(135deg, #9a2238 0%, #8e1b2e 55%, #6a1424 100%);
  /* the wordmark's suffix: flat champagne, no shimmer */
  --kit-word-grad: linear-gradient(0deg, #d6cbb0, #d6cbb0);
  --kit-page-glow-a: rgba(24, 48, 110, 0.42);
  --kit-page-glow-b: rgba(142, 27, 46, 0.06);
  --kit-rim: rgba(214, 203, 176, 0.32);
  --kit-rim-rgb: 214, 203, 176;
  /* the orb's three colours: formal navy, pearl white, deep claret */
  --edition-primary: #0b1b3f; --edition-secondary: #e9e4d8; --edition-accent: #8e1b2e;
  /* the ground's blend (registered below so a mood change glides) */
  --mood-cool: rgba(24, 48, 110, 0.50);
  --mood-warm: rgba(142, 27, 46, 0.10);
  --mood-deep: rgba(4, 12, 32, 0.90);
  --mood-pearl: rgba(214, 203, 176, 0.045);
}
/* the ground: three soft blooms, a vignette to near-black navy at the edges
   and a breath of pearl, fixed behind everything; the grain layer under it
   breaks any banding. Still — nothing here moves. */
html[data-edition="AU"]:not([data-theme="light"]) body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(60% 48% at 18% 8%, var(--mood-cool) 0%, transparent 72%),
    radial-gradient(44% 40% at 84% 20%, var(--mood-warm) 0%, transparent 72%),
    radial-gradient(50% 42% at 76% 96%, var(--mood-cool) 0%, transparent 74%),
    radial-gradient(72% 62% at 50% 50%, transparent 38%, var(--mood-deep) 100%),
    linear-gradient(160deg, var(--mood-pearl), transparent 45%);
}
html[data-edition="AU"]:not([data-theme="light"]) body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--g-noise, none);
  background-size: 160px 160px;
  mix-blend-mode: soft-light;
  opacity: 0.4;
}
@media (prefers-reduced-transparency: reduce) {
  html[data-edition="AU"]:not([data-theme="light"]) body::before,
  html[data-edition="AU"]:not([data-theme="light"]) body::after { display: none; }
}

/* ---------- AU mood: the ambience follows the reply, by degrees ----------
   The orb writes html[data-mood] (clear · calm · brisk · gentle · alert)
   the moment a reply sets its mood. The four ground colours are registered
   so a change glides over 600 ms; the glow and hairline triples switch with
   it; the orb re-reads its three colours and drifts to them on its own
   clock. Every mood stays inside the flag family and moves the room by a
   few degrees of hue and light only — nothing pulses. */
@property --mood-cool  { syntax: "<color>"; inherits: true; initial-value: rgba(24, 48, 110, 0.50); }
@property --mood-warm  { syntax: "<color>"; inherits: true; initial-value: rgba(142, 27, 46, 0.10); }
@property --mood-deep  { syntax: "<color>"; inherits: true; initial-value: rgba(4, 12, 32, 0.90); }
@property --mood-pearl { syntax: "<color>"; inherits: true; initial-value: rgba(214, 203, 176, 0.045); }
html[data-edition="AU"] {
  transition: --mood-cool 600ms ease, --mood-warm 600ms ease, --mood-deep 600ms ease, --mood-pearl 600ms ease;
}
@media (prefers-reduced-motion: reduce) {
  html[data-edition="AU"] { transition: none; }
}
/* calm — a deeper, stiller navy; the claret asleep */
html[data-edition="AU"][data-mood="calm"]:not([data-theme="light"]) {
  --mood-cool: rgba(16, 36, 92, 0.56); --mood-warm: rgba(142, 27, 46, 0.04);
  --mood-deep: rgba(3, 9, 26, 0.94); --mood-pearl: rgba(214, 203, 176, 0.03);
  --glow-rgb: 40, 68, 140; --kit-rim-rgb: 200, 206, 222;
  --kit-page-glow-a: rgba(16, 36, 92, 0.50); --kit-page-glow-b: rgba(142, 27, 46, 0.03);
  --edition-primary: #06122b; --edition-secondary: #d4dbea; --edition-accent: #23407a;
}
/* gentle — a softer pearl-blue, a little more light in the room */
html[data-edition="AU"][data-mood="gentle"]:not([data-theme="light"]) {
  --mood-cool: rgba(48, 76, 140, 0.42); --mood-warm: rgba(142, 27, 46, 0.06);
  --mood-deep: rgba(6, 16, 40, 0.88); --mood-pearl: rgba(224, 216, 200, 0.07);
  --glow-rgb: 88, 112, 170; --kit-rim-rgb: 226, 220, 206;
  --kit-page-glow-a: rgba(48, 76, 140, 0.40); --kit-page-glow-b: rgba(142, 27, 46, 0.05);
  --edition-primary: #0b1b3f; --edition-secondary: #eee9dc; --edition-accent: #3a4f86;
}
/* brisk — a clearer navy with a silver edge */
html[data-edition="AU"][data-mood="brisk"]:not([data-theme="light"]) {
  --mood-cool: rgba(36, 70, 150, 0.48); --mood-warm: rgba(142, 27, 46, 0.06);
  --mood-deep: rgba(4, 12, 32, 0.86); --mood-pearl: rgba(214, 220, 236, 0.08);
  --glow-rgb: 70, 104, 190; --kit-rim-rgb: 208, 214, 230;
  --kit-page-glow-a: rgba(36, 70, 150, 0.48); --kit-page-glow-b: rgba(142, 27, 46, 0.05);
  --edition-primary: #0b1b3f; --edition-secondary: #dde3ee; --edition-accent: #35569c;
}
/* alert — the claret comes forward a few degrees; the navy stands back */
html[data-edition="AU"][data-mood="alert"]:not([data-theme="light"]) {
  --mood-cool: rgba(24, 48, 110, 0.36); --mood-warm: rgba(142, 27, 46, 0.22);
  --mood-deep: rgba(14, 8, 26, 0.90); --mood-pearl: rgba(228, 208, 200, 0.04);
  --glow-rgb: 142, 27, 46; --kit-rim-rgb: 226, 200, 196; --kit-rim: rgba(142, 27, 46, 0.55);
  --kit-page-glow-a: rgba(142, 27, 46, 0.26); --kit-page-glow-b: rgba(24, 48, 110, 0.30);
  --edition-primary: #1a0d1c; --edition-secondary: #ecd8d0; --edition-accent: #a3273d;
}

/* light — ivory paper, navy ink, claret fills, no mesh */
html[data-edition="AU"][data-theme="light"] {
  --bg: #f3f1ea; --bg-elevated: #fbfaf6; --bg-sunken: #e9e6dc;
  --border: #d9d4c6; --border-strong: #bfb8a6;
  --text: #0b1b3f; --text-muted: #46506e; --text-faint: #5f6884;
  --accent: #0b1b3f; --accent-strong: #06122b; --accent-2: #8e1b2e;
  --accent-soft: rgba(11, 27, 63, 0.08); --accent-contrast: #f5f1e8;
  --danger: #8e1b2e; --danger-rgb: 142, 27, 46; --danger-soft: rgba(142, 27, 46, 0.10);
  --amber: #8a5a10; --amber-soft: rgba(138, 90, 16, 0.12);
  --neutral-chip: #e9e6dc; --panel: rgba(251, 250, 246, 0.72);
  --grid-line: rgba(11, 27, 63, 0.04);
  --claret-rgb: 142, 27, 46; --pearl-rgb: 255, 253, 248; --navy-lit-rgb: 28, 52, 104; --ink-rgb: 11, 27, 63;
  --glow-rgb: 11, 27, 63;
  --scrim: rgba(11, 27, 63, 0.38);
  --shadow-sm: 0 1px 2px rgba(11, 27, 63, 0.06);
  --shadow-md: 0 4px 18px rgba(11, 27, 63, 0.08);
  --shadow-lg: 0 14px 36px rgba(11, 27, 63, 0.14);
  --kit-stripe: none;
  --kit-accent-grad: linear-gradient(135deg, #a3293f 0%, #8e1b2e 50%, #661426 100%);
  --kit-seal: #8e1b2e;
  --kit-word-grad: linear-gradient(0deg, #23407a, #23407a);
  --kit-page-glow-a: rgba(11, 27, 63, 0.08);
  --kit-page-glow-b: rgba(142, 27, 46, 0.06);
  --kit-rim: rgba(142, 27, 46, 0.40);
  --kit-rim-rgb: 11, 27, 63;
  --edition-primary: #2c4a8c; --edition-secondary: #e9e4d8; --edition-accent: #3b0f1f;
  --mood-glow: rgba(11, 27, 63, 0.18);
}

/* ==========================================================================
   NZ — New Zealand · black + navy base, silver primary, flag red highlight.
   ========================================================================== */
html[data-edition="NZ"]:not([data-theme="light"]) {
  --bg: #07080d; --bg-elevated: #121620; --bg-sunken: #05060a;
  --border: #23273a; --border-strong: #323850;
  --text: #f4f5f8; --text-muted: #a7abbd; --text-faint: #6d7186;
  --accent: #c0c5c1; --accent-strong: #e6e9e7; --accent-2: #7d8a82;
  --accent-soft: rgba(192, 197, 193, 0.13); --accent-contrast: #0a0a0a;
  --glow-rgb: 192, 197, 193;
  --kit-accent-grad: linear-gradient(135deg, #e6e9e7 0%, #c0c5c1 50%, #6f7a73 100%);
  --kit-page-glow-a: rgba(192, 197, 193, 0.09);
  --kit-page-glow-b: rgba(1, 33, 105, 0.18);
  --kit-rim: rgba(226, 38, 63, 0.5);
  --kit-rim-rgb: 230, 233, 231;
}
html[data-edition="NZ"][data-theme="light"] {
  --bg: #f5f6f8; --bg-elevated: #ffffff; --bg-sunken: #eaecef;
  --border: #d9dce3; --border-strong: #b9bfcc;
  --text: #131722; --text-muted: #454b5e; --text-faint: #7f8494;
  --accent: #3a3a3a; --accent-strong: #1f1f1f; --accent-2: #012169;
  --accent-soft: #e6e6e6; --accent-contrast: #ffffff;
  --glow-rgb: 58, 58, 58;
  --kit-accent-grad: linear-gradient(135deg, #5a5a5a 0%, #2c2c2c 55%, #012169 100%);
  --kit-page-glow-a: rgba(58, 58, 58, 0.06);
  --kit-page-glow-b: rgba(200, 16, 46, 0.06);
  --kit-rim: rgba(200, 16, 46, 0.32);
  --kit-rim-rgb: 58, 58, 58;
}

/* ==========================================================================
   US — United States · navy base, red primary, white highlight.
   ========================================================================== */
html[data-edition="US"]:not([data-theme="light"]) {
  --bg: #050a17; --bg-elevated: #0b1730; --bg-sunken: #040713;
  --border: #172452; --border-strong: #213372;
  --text: #f2f5fb; --text-muted: #9aa4cc; --text-faint: #626b98;
  --accent: #c8305a; --accent-strong: #ff5d80; --accent-2: #0a3161;
  --accent-soft: rgba(200, 48, 90, 0.14); --accent-contrast: #ffffff;
  --glow-rgb: 200, 48, 90;
  --kit-accent-grad: linear-gradient(135deg, #ff5d80 0%, #c8305a 50%, #0a3161 100%);
  --kit-page-glow-a: rgba(200, 48, 90, 0.11);
  --kit-page-glow-b: rgba(10, 49, 97, 0.2);
  --kit-rim: rgba(255, 255, 255, 0.45);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="US"][data-theme="light"] {
  --bg: #f5f6fb; --bg-elevated: #ffffff; --bg-sunken: #eaecf6;
  --border: #d3d7ee; --border-strong: #b3badf;
  --text: #0a1230; --text-muted: #3d4670; --text-faint: #7b83a8;
  --accent: #0a3161; --accent-strong: #1a4d90; --accent-2: #b31942;
  --accent-soft: #e3e7f7; --accent-contrast: #ffffff;
  --glow-rgb: 10, 49, 97;
  --kit-accent-grad: linear-gradient(135deg, #1a4d90 0%, #0a3161 55%, #b31942 100%);
  --kit-page-glow-a: rgba(10, 49, 97, 0.08);
  --kit-page-glow-b: rgba(179, 25, 66, 0.06);
  --kit-rim: rgba(179, 25, 66, 0.35);
  --kit-rim-rgb: 10, 49, 97;
}

/* ==========================================================================
   GB — United Kingdom · navy base, red primary, white highlight.
   ========================================================================== */
html[data-edition="GB"]:not([data-theme="light"]) {
  --bg: #060a18; --bg-elevated: #0f1a34; --bg-sunken: #04081a;
  --border: #1c2a58; --border-strong: #283a70;
  --text: #f3f6fb; --text-muted: #a3aecb; --text-faint: #6a7495;
  --accent: #d8324a; --accent-strong: #ff6478; --accent-2: #012169;
  --accent-soft: rgba(216, 50, 74, 0.14); --accent-contrast: #ffffff;
  --glow-rgb: 216, 50, 74;
  --kit-accent-grad: linear-gradient(135deg, #ffffff 0%, #d8324a 45%, #012169 100%);
  --kit-page-glow-a: rgba(216, 50, 74, 0.10);
  --kit-page-glow-b: rgba(1, 33, 105, 0.22);
  --kit-rim: rgba(255, 255, 255, 0.42);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="GB"][data-theme="light"] {
  --bg: #f6f7fa; --bg-elevated: #ffffff; --bg-sunken: #ebeef4;
  --border: #d5dae8; --border-strong: #b6bedb;
  --text: #0e1626; --text-muted: #414c6d; --text-faint: #7d86a5;
  --accent: #012169; --accent-strong: #1e3f97; --accent-2: #c8102e;
  --accent-soft: #e3e6f4; --accent-contrast: #ffffff;
  --glow-rgb: 1, 33, 105;
  --kit-accent-grad: linear-gradient(135deg, #1e3f97 0%, #012169 55%, #c8102e 100%);
  --kit-page-glow-a: rgba(1, 33, 105, 0.08);
  --kit-page-glow-b: rgba(200, 16, 46, 0.06);
  --kit-rim: rgba(200, 16, 46, 0.35);
  --kit-rim-rgb: 200, 16, 46;
}

/* ==========================================================================
   CA — Canada · charcoal base, red primary, white highlight.
   ========================================================================== */
html[data-edition="CA"]:not([data-theme="light"]) {
  --bg: #0c0708; --bg-elevated: #17100f; --bg-sunken: #070404;
  --border: #341012; --border-strong: #481a1d;
  --text: #faeeee; --text-muted: #c2999b; --text-faint: #8c6668;
  --accent: #ff5064; --accent-strong: #ff8a97; --accent-2: #d80621;
  --accent-soft: rgba(255, 80, 100, 0.14); --accent-contrast: #2a0206;
  --glow-rgb: 216, 6, 33;
  --kit-accent-grad: linear-gradient(135deg, #ff8a97 0%, #ff5064 45%, #8a0316 100%);
  --kit-page-glow-a: rgba(216, 6, 33, 0.13);
  --kit-page-glow-b: rgba(255, 255, 255, 0.06);
  --kit-rim: rgba(255, 255, 255, 0.42);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="CA"][data-theme="light"] {
  --bg: #fbf3f4; --bg-elevated: #ffffff; --bg-sunken: #f6e6e8;
  --border: #eec7cb; --border-strong: #dea3aa;
  --text: #2b0308; --text-muted: #6c2530; --text-faint: #a1727a;
  --accent: #d80621; --accent-strong: #a80419; --accent-2: #3a3a3a;
  --accent-soft: #fbe1e4; --accent-contrast: #ffffff;
  --glow-rgb: 216, 6, 33;
  --kit-accent-grad: linear-gradient(135deg, #f04a5e 0%, #d80621 55%, #2c2c2c 100%);
  --kit-page-glow-a: rgba(216, 6, 33, 0.08);
  --kit-page-glow-b: rgba(0, 0, 0, 0.04);
  --kit-rim: rgba(216, 6, 33, 0.35);
  --kit-rim-rgb: 216, 6, 33;
}

/* ==========================================================================
   TR — Türkiye · deep crimson-black base, red primary, white highlight.
   ========================================================================== */
html[data-edition="TR"]:not([data-theme="light"]) {
  --bg: #0c0405; --bg-elevated: #190a0a; --bg-sunken: #070202;
  --border: #3a1315; --border-strong: #501c1e;
  --text: #faeeee; --text-muted: #c2999b; --text-faint: #8c6667;
  --accent: #ff5b63; --accent-strong: #ff8f94; --accent-2: #7a0610;
  --accent-soft: rgba(255, 91, 99, 0.14); --accent-contrast: #2a0206;
  --glow-rgb: 227, 10, 23;
  --kit-accent-grad: linear-gradient(135deg, #ff8f94 0%, #e30a17 50%, #7a0610 100%);
  --kit-page-glow-a: rgba(227, 10, 23, 0.14);
  --kit-page-glow-b: rgba(255, 255, 255, 0.05);
  --kit-rim: rgba(255, 255, 255, 0.42);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="TR"][data-theme="light"] {
  --bg: #fbf3f3; --bg-elevated: #ffffff; --bg-sunken: #f6e6e7;
  --border: #eec8ca; --border-strong: #dea5a8;
  --text: #2b0508; --text-muted: #6c2528; --text-faint: #a17275;
  --accent: #c60813; --accent-strong: #92060e; --accent-2: #3a3a3a;
  --accent-soft: #fbe1e2; --accent-contrast: #ffffff;
  --glow-rgb: 198, 8, 19;
  --kit-accent-grad: linear-gradient(135deg, #e3323d 0%, #c60813 55%, #7a0610 100%);
  --kit-page-glow-a: rgba(198, 8, 19, 0.08);
  --kit-page-glow-b: rgba(0, 0, 0, 0.03);
  --kit-rim: rgba(198, 8, 19, 0.35);
  --kit-rim-rgb: 198, 8, 19;
}

/* ==========================================================================
   FR — France · navy base, blue primary, red highlight.
   ========================================================================== */
html[data-edition="FR"]:not([data-theme="light"]) {
  --bg: #050c1c; --bg-elevated: #0a1930; --bg-sunken: #04081a;
  --border: #18274e; --border-strong: #223868;
  --text: #f0f4fb; --text-muted: #96a4c8; --text-faint: #5e6b93;
  --accent: #4a9bdc; --accent-strong: #8ec3ef; --accent-2: #ef4135;
  --accent-soft: rgba(74, 155, 220, 0.14); --accent-contrast: #04101f;
  --glow-rgb: 0, 85, 164;
  --kit-accent-grad: linear-gradient(135deg, #8ec3ef 0%, #0055a4 55%, #ef4135 100%);
  --kit-page-glow-a: rgba(0, 85, 164, 0.13);
  --kit-page-glow-b: rgba(239, 65, 53, 0.11);
  --kit-rim: rgba(255, 207, 92, 0.4);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="FR"][data-theme="light"] {
  --bg: #f4f7fb; --bg-elevated: #ffffff; --bg-sunken: #e9eef6;
  --border: #cbd8ec; --border-strong: #abc0e0;
  --text: #04101f; --text-muted: #384a6a; --text-faint: #7684a5;
  --accent: #0055a4; --accent-strong: #003d78; --accent-2: #ef4135;
  --accent-soft: #dde8f6; --accent-contrast: #ffffff;
  --glow-rgb: 0, 85, 164;
  --kit-accent-grad: linear-gradient(135deg, #2d77c4 0%, #0055a4 55%, #ef4135 100%);
  --kit-page-glow-a: rgba(0, 85, 164, 0.08);
  --kit-page-glow-b: rgba(239, 65, 53, 0.06);
  --kit-rim: rgba(239, 65, 53, 0.32);
  --kit-rim-rgb: 239, 65, 53;
}

/* ==========================================================================
   DE — Germany · black base, gold primary, red highlight.
   ========================================================================== */
html[data-edition="DE"]:not([data-theme="light"]) {
  --bg: #070706; --bg-elevated: #131210; --bg-sunken: #050504;
  --border: #2c2a20; --border-strong: #403c2a;
  --text: #f5f5f5; --text-muted: #b4ae9e; --text-faint: #7a7566;
  --accent: #ffce00; --accent-strong: #ffe066; --accent-2: #dd0000;
  --accent-soft: rgba(255, 206, 0, 0.14); --accent-contrast: #241a04;
  --glow-rgb: 255, 206, 0;
  --kit-accent-grad: linear-gradient(135deg, #ffe066 0%, #ffce00 50%, #b98a00 100%);
  --kit-page-glow-a: rgba(255, 206, 0, 0.10);
  --kit-page-glow-b: rgba(221, 0, 0, 0.12);
  --kit-rim: rgba(221, 0, 0, 0.45);
  --kit-rim-rgb: 255, 206, 0;
}
html[data-edition="DE"][data-theme="light"] {
  --bg: #f6f6f4; --bg-elevated: #ffffff; --bg-sunken: #ece9de;
  --border: #d9d2b6; --border-strong: #bcb08a;
  --text: #141210; --text-muted: #4a4331; --text-faint: #857c62;
  --accent: #a37a00; --accent-strong: #7a5c00; --accent-2: #dd0000;
  --accent-soft: #f2e8c9; --accent-contrast: #ffffff;
  --glow-rgb: 163, 122, 0;
  --kit-accent-grad: linear-gradient(135deg, #c99a1e 0%, #a37a00 55%, #dd0000 100%);
  --kit-page-glow-a: rgba(163, 122, 0, 0.08);
  --kit-page-glow-b: rgba(221, 0, 0, 0.06);
  --kit-rim: rgba(221, 0, 0, 0.32);
  --kit-rim-rgb: 163, 122, 0;
}

/* ==========================================================================
   SA — Saudi Arabia · deep green base, green-emerald primary, white highlight.
   ========================================================================== */
html[data-edition="SA"]:not([data-theme="light"]) {
  --bg: #020f09; --bg-elevated: #071c12; --bg-sunken: #010a06;
  --border: #123a26; --border-strong: #1c4e34;
  --text: #eef6f1; --text-muted: #8fb59d; --text-faint: #5c8069;
  --accent: #2fc989; --accent-strong: #6fe0af; --accent-2: #006c35;
  --accent-soft: rgba(47, 201, 137, 0.14); --accent-contrast: #02160d;
  --glow-rgb: 0, 108, 53;
  --kit-accent-grad: linear-gradient(135deg, #6fe0af 0%, #2fc989 45%, #006c35 100%);
  --kit-page-glow-a: rgba(47, 201, 137, 0.12);
  --kit-page-glow-b: rgba(255, 255, 255, 0.05);
  --kit-rim: rgba(255, 255, 255, 0.38);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="SA"][data-theme="light"] {
  --bg: #f3f8f5; --bg-elevated: #ffffff; --bg-sunken: #e6f2ea;
  --border: #c6e2d1; --border-strong: #a1ccb3;
  --text: #04230f; --text-muted: #305641; --text-faint: #6f9280;
  --accent: #006c35; --accent-strong: #004f26; --accent-2: #2fc989;
  --accent-soft: #dcf0e3; --accent-contrast: #ffffff;
  --glow-rgb: 0, 108, 53;
  --kit-accent-grad: linear-gradient(135deg, #1e9c58 0%, #006c35 55%, #003d1e 100%);
  --kit-page-glow-a: rgba(0, 108, 53, 0.08);
  --kit-page-glow-b: rgba(0, 0, 0, 0.03);
  --kit-rim: rgba(0, 108, 53, 0.35);
  --kit-rim-rgb: 0, 108, 53;
}

/* ==========================================================================
   AE — United Arab Emirates · black-green base, red primary, green highlight.
   ========================================================================== */
html[data-edition="AE"]:not([data-theme="light"]) {
  --bg: #08100a; --bg-elevated: #0f1d13; --bg-sunken: #060b07;
  --border: #1c3a24; --border-strong: #274e30;
  --text: #f2f7f3; --text-muted: #9fbba7; --text-faint: #67806f;
  --accent: #ff6a76; --accent-strong: #ff9aa2; --accent-2: #009739;
  --accent-soft: rgba(255, 106, 118, 0.14); --accent-contrast: #240307;
  --glow-rgb: 239, 51, 64;
  --kit-accent-grad: linear-gradient(135deg, #ff9aa2 0%, #ef3340 45%, #0a0a0a 100%);
  --kit-page-glow-a: rgba(239, 51, 64, 0.12);
  --kit-page-glow-b: rgba(0, 151, 57, 0.14);
  --kit-rim: rgba(0, 151, 57, 0.45);
  --kit-rim-rgb: 0, 151, 57;
}
html[data-edition="AE"][data-theme="light"] {
  --bg: #fbf4f4; --bg-elevated: #ffffff; --bg-sunken: #f5e6e6;
  --border: #ecc9ca; --border-strong: #dba6a8;
  --text: #280408; --text-muted: #642a2e; --text-faint: #9c7274;
  --accent: #c22530; --accent-strong: #931b23; --accent-2: #009739;
  --accent-soft: #fbe1e3; --accent-contrast: #ffffff;
  --glow-rgb: 194, 37, 48;
  --kit-accent-grad: linear-gradient(135deg, #db4650 0%, #c22530 55%, #1a1a1a 100%);
  --kit-page-glow-a: rgba(194, 37, 48, 0.08);
  --kit-page-glow-b: rgba(0, 151, 57, 0.06);
  --kit-rim: rgba(0, 151, 57, 0.32);
  --kit-rim-rgb: 0, 151, 57;
}

/* ==========================================================================
   SG — Singapore · charcoal base, red primary, white highlight.
   ========================================================================== */
html[data-edition="SG"]:not([data-theme="light"]) {
  --bg: #0b0607; --bg-elevated: #17100f; --bg-sunken: #060404;
  --border: #35181a; --border-strong: #472224;
  --text: #f8eeef; --text-muted: #cc9ba0; --text-faint: #92676c;
  --accent: #ff6a76; --accent-strong: #ff9aa2; --accent-2: #ffffff;
  --accent-soft: rgba(255, 106, 118, 0.14); --accent-contrast: #240307;
  --glow-rgb: 239, 51, 64;
  --kit-accent-grad: linear-gradient(135deg, #ffffff 0%, #ff9aa2 45%, #ef3340 100%);
  --kit-page-glow-a: rgba(239, 51, 64, 0.13);
  --kit-page-glow-b: rgba(255, 255, 255, 0.05);
  --kit-rim: rgba(255, 255, 255, 0.42);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="SG"][data-theme="light"] {
  --bg: #fbf4f4; --bg-elevated: #ffffff; --bg-sunken: #f5e6e6;
  --border: #ecc9ca; --border-strong: #dba6a8;
  --text: #280408; --text-muted: #642a2e; --text-faint: #9c7274;
  --accent: #c22530; --accent-strong: #931b23; --accent-2: #3a3f42;
  --accent-soft: #fbe1e3; --accent-contrast: #ffffff;
  --glow-rgb: 194, 37, 48;
  --kit-accent-grad: linear-gradient(135deg, #db4650 0%, #c22530 55%, #6b0209 100%);
  --kit-page-glow-a: rgba(194, 37, 48, 0.08);
  --kit-page-glow-b: rgba(0, 0, 0, 0.03);
  --kit-rim: rgba(194, 37, 48, 0.32);
  --kit-rim-rgb: 194, 37, 48;
}

/* ==========================================================================
   JP — Japan · deep indigo base, crimson primary, white highlight.
   ========================================================================== */
html[data-edition="JP"]:not([data-theme="light"]) {
  --bg: #05070f; --bg-elevated: #0e1120; --bg-sunken: #04050c;
  --border: #211c2c; --border-strong: #302a3e;
  --text: #f5f4fa; --text-muted: #a89fbf; --text-faint: #6e6787;
  --accent: #ff5670; --accent-strong: #ff90a3; --accent-2: #1a2470;
  --accent-soft: rgba(255, 86, 112, 0.14); --accent-contrast: #220208;
  --glow-rgb: 188, 0, 45;
  --kit-accent-grad: linear-gradient(135deg, #ff90a3 0%, #bc002d 55%, #1a2470 100%);
  --kit-page-glow-a: rgba(188, 0, 45, 0.12);
  --kit-page-glow-b: rgba(26, 36, 112, 0.16);
  --kit-rim: rgba(255, 255, 255, 0.38);
  --kit-rim-rgb: 255, 255, 255;
}
html[data-edition="JP"][data-theme="light"] {
  --bg: #fbf5f6; --bg-elevated: #ffffff; --bg-sunken: #f4e6e8;
  --border: #e4c6cb; --border-strong: #cfa2a9;
  --text: #240309; --text-muted: #5f272e; --text-faint: #976e74;
  --accent: #bc002d; --accent-strong: #8a0021; --accent-2: #1a2470;
  --accent-soft: #f8dee2; --accent-contrast: #ffffff;
  --glow-rgb: 188, 0, 45;
  --kit-accent-grad: linear-gradient(135deg, #d43a5b 0%, #bc002d 55%, #1a2470 100%);
  --kit-page-glow-a: rgba(188, 0, 45, 0.08);
  --kit-page-glow-b: rgba(26, 36, 112, 0.06);
  --kit-rim: rgba(26, 36, 112, 0.32);
  --kit-rim-rgb: 26, 36, 112;
}
