/* One palette contract for every surface. Existing section architecture is intact.
   Champagne is a warm neutral accent, not a yellow overlay on the content. */
:root{--accent:#795925;--section-deep:#49391f;--section-glow:#d5b77f;--soft:#f5efdf;--bg:#fbf9f3;--panel:#fffefb;--ink:#302c25;--muted:#706657;--line:#e5dfd2;--on-accent:#fff;--header-a:#71552d;--header-b:#a47c48;--brand-deep:#795925;--brand-tone:#b18a4d;--brand-light:#eddbb6;--brand-pale:#fff9eb;--brand-bg:#fbf9f3;--brand-night:#201d17}
:root[data-palette=blue]{--accent:#414bb8;--section-deep:#262f70;--section-glow:#8994f3;--soft:#eceeff;--bg:#f5f6fc;--panel:#fff;--ink:#202942;--muted:#606980;--line:#dfe3f1;--on-accent:#fff;--header-a:#4049b8;--header-b:#6d86e9}
:root[data-palette=cyan]{--accent:#08778a;--section-deep:#104854;--section-glow:#66ddee;--soft:#e0f6f9;--bg:#f3fbfc;--panel:#fff;--ink:#1c343b;--muted:#536f76;--line:#d4e9ec;--on-accent:#fff;--header-a:#086b79;--header-b:#3096a3}
:root[data-palette=magenta]{--accent:#ad2166;--section-deep:#61163f;--section-glow:#ed86b6;--soft:#fce6f1;--bg:#fff5fa;--panel:#fff;--ink:#3b2634;--muted:#7d5a70;--line:#efd9e5;--on-accent:#fff;--header-a:#ad2166;--header-b:#c7568c}
:root[data-palette=lavender]{--accent:#7150a8;--section-deep:#41345e;--section-glow:#b5a5eb;--soft:#f0eafa;--bg:#faf7ff;--panel:#fff;--ink:#322b42;--muted:#70657e;--line:#e6ddef;--on-accent:#fff;--header-a:#7150a8;--header-b:#9476c3}
:root[data-palette=sage]{--accent:#3b6b54;--section-deep:#193c30;--section-glow:#b7b9a6;--soft:#ebf1e9;--bg:#f6f8f3;--panel:#fffefb;--ink:#29392e;--muted:#627466;--line:#dce5da;--on-accent:#fff;--header-a:#3b6b54;--header-b:#6b8a71}
:root[data-palette=amber]{--accent:#795925;--section-deep:#49391f;--section-glow:#d5b77f;--soft:#f5efdf;--bg:#fbf9f3;--panel:#fffefb;--ink:#302c25;--muted:#706657;--line:#e5dfd2;--on-accent:#fff;--header-a:#71552d;--header-b:#a47c48}
:root[data-palette=orange]{--accent:#a1431a;--section-deep:#63331d;--section-glow:#ffb58b;--soft:#fff0e5;--bg:#fff8f3;--panel:#fffefc;--ink:#3f3028;--muted:#806652;--line:#efdfd2;--on-accent:#fff;--header-a:#a1431a;--header-b:#c76a48}
:root[data-theme=dark],:root[data-theme=dark][data-palette]{color-scheme:dark;--panel:color-mix(in srgb,var(--section-deep) 25%,#1a2027);--bg:color-mix(in srgb,var(--section-deep) 18%,#11161c);--ink:#f5f4f1;--muted:#c0c4c9;--line:color-mix(in srgb,var(--section-glow) 20%,#343a44);--soft:color-mix(in srgb,var(--section-glow) 15%,#252832);--accent:var(--section-glow);--on-accent:#172125;--header-a:var(--section-deep);--header-b:color-mix(in srgb,var(--section-deep) 70%,var(--section-glow))}
/* Royal Sky needs a slightly lighter night accent for small text on soft cards. */
:root[data-theme=dark][data-palette=blue]{--section-glow:#949ff8}
:root[data-theme=light]{color-scheme:light}
/* Brand hue follows the saved World preference even in Work, Heart or Family. */
:root[data-world-palette=blue]{--brand-deep:#414bb8;--brand-tone:#5270c7;--brand-light:#b9c8ff;--brand-pale:#eff3ff;--brand-bg:#f5f6fc;--brand-night:#171b2b}
:root[data-world-palette=cyan]{--brand-deep:#08778a;--brand-tone:#258d9b;--brand-light:#94e4e8;--brand-pale:#edffff;--brand-bg:#f3fbfc;--brand-night:#152429}
:root[data-world-palette=magenta]{--brand-deep:#a32b67;--brand-tone:#c76894;--brand-light:#f6bfd8;--brand-pale:#fff0f7;--brand-bg:#fff5fa;--brand-night:#281b25}
:root[data-world-palette=lavender]{--brand-deep:#7150a8;--brand-tone:#9574c2;--brand-light:#d7c6fa;--brand-pale:#f8f1ff;--brand-bg:#faf7ff;--brand-night:#201c2b}
:root[data-world-palette=sage]{--brand-deep:#3b6b54;--brand-tone:#718e74;--brand-light:#c9dcc1;--brand-pale:#f2f9ec;--brand-bg:#f6f8f3;--brand-night:#1b241d}
:root[data-world-palette=amber]{--brand-deep:#795925;--brand-tone:#b18a4d;--brand-light:#eddbb6;--brand-pale:#fff9eb;--brand-bg:#fbf9f3;--brand-night:#201d17}
:root[data-world-palette=orange]{--brand-deep:#a1431a;--brand-tone:#c5764e;--brand-light:#ffd0ad;--brand-pale:#fff4ea;--brand-bg:#fff8f3;--brand-night:#281e19}
/* Colour the actual approved raster, including its highlights and shadows.
   An alpha-mask/flat colour fill erases the dimensional ribbon, so never hide
   this image or replace it with a mask. Geometry and wordmark stay untouched. */
:root{--brand-image-filter:grayscale(1) sepia(.9) saturate(1.65) hue-rotate(-7deg) brightness(1.25)}
:root[data-world-palette=blue]{--brand-image-filter:grayscale(1) sepia(1) saturate(2.6) hue-rotate(181deg) brightness(1.2)}
:root[data-world-palette=cyan]{--brand-image-filter:grayscale(1) sepia(1) saturate(2.4) hue-rotate(132deg) brightness(1.15)}
:root[data-world-palette=magenta]{--brand-image-filter:grayscale(1) sepia(1) saturate(2.5) hue-rotate(285deg) brightness(1.2)}
:root[data-world-palette=lavender]{--brand-image-filter:grayscale(1) sepia(1) saturate(1.8) hue-rotate(218deg) brightness(1.25)}
:root[data-world-palette=sage]{--brand-image-filter:grayscale(1) sepia(.9) saturate(1.4) hue-rotate(75deg) brightness(1.2)}
:root[data-world-palette=amber]{--brand-image-filter:grayscale(1) sepia(.9) saturate(1.65) hue-rotate(-7deg) brightness(1.25)}
:root[data-world-palette=orange]{--brand-image-filter:grayscale(1) sepia(1) saturate(2.6) hue-rotate(-25deg) brightness(1.25)}
.theme-brand{position:relative;display:inline-block;vertical-align:middle;line-height:0;max-width:100%;flex:none;isolation:isolate}
.theme-brand>.brand-lockup,.theme-brand>.auth-approved-logo{display:block;visibility:visible;height:auto;max-width:100%;filter:var(--brand-image-filter) drop-shadow(0 2px 1px #281a101c) drop-shadow(0 6px 8px #281a1014)!important;aspect-ratio:1309/336;object-fit:contain;object-position:center;content:normal!important}
.initial-brand>.theme-brand .brand-lockup{width:clamp(280px,82vw,540px);height:auto}
.opening-lockup>.theme-brand .brand-lockup{width:clamp(280px,82vw,680px);height:auto}
.auth-identity>.theme-brand .brand-lockup{width:min(360px,82vw);height:auto}
.welcome-logo>.theme-brand .brand-lockup{width:min(265px,72vw);height:auto}
.auth-brand>.theme-brand{width:100%;display:block}
.auth-brand .theme-brand>.auth-approved-logo{width:100%;height:auto;animation:brand-arrive .8s cubic-bezier(.16,1,.3,1) both}
.theme-brand::after{content:none}
:root[data-theme=dark] .theme-brand>.brand-lockup,
:root[data-theme=dark] .theme-brand>.auth-approved-logo,
.sidebar .theme-brand>.brand-lockup,
.call-brand .theme-brand>.brand-lockup{content:url('/assets/brand/lockup-light.webp?v=reference-20261016')!important}
@media(max-width:760px){.reference-topbar .theme-brand>.brand-lockup{content:url('/assets/brand/lockup-light.webp?v=reference-20261016')!important}}
.brand-arrival{background:var(--brand-bg)}
:root[data-theme=dark] .brand-arrival{background:var(--brand-night)}
.opening-orbit{border-color:color-mix(in srgb,var(--brand-tone) 18%,transparent)}
.opening-orbit::before,.opening-orbit::after{border-color:color-mix(in srgb,var(--brand-tone) 12%,transparent)}
.initial-loader::after{background-image:linear-gradient(90deg,var(--brand-deep),var(--brand-light),var(--brand-deep))}
.colour-save-status{min-height:1.5em;font-size:.8rem;color:var(--muted);margin:12px 0 0}
.colour-save-status[data-save-state=saving]{color:var(--accent)}
.colour-save-status[data-save-state=error]{color:var(--danger,#a12e49)}
/* Retain legible native high-contrast fallbacks. */
@media(forced-colors:active){.theme-brand>.brand-lockup,.theme-brand>.auth-approved-logo{filter:none!important}.colour-option:has(input:checked){outline:2px solid Highlight}}
