/* ==========================================================================
   CHRISTMAS THEME TOGGLE — 228 Neural Edge (Dec 4, 2026, v1.9.72)
   Dev's order: visitors get UI to turn the Christmas theme OFF.
   This file is ALWAYS loaded (it is not part of the Christmas dress):
   it styles the nav toggle pill and carries the off-state rules that
   hide the Christmas band and the snow canvas when a visitor opts out.
   The rest of the dress lives in christmas-2026-12-04.css, which the
   toggle disables at the <link> level — so "off" is the site's true
   standard look, not an override war.
   ========================================================================== */

/* --- off state: band + snow + lights gone ------------------------------- */
html.xmas-off .xmas-band { display: none !important; }
html.xmas-off #snow-canvas { display: none !important; }
html.xmas-off .xmas-lights { display: none !important; }

/* --- the toggle pill (nav, beside See Plans) ----------------------------
   Dec 5, 2026 (~1:38 AM, Dev's order): SHARP + CLASSY pass. The old
   translucent gold wash over the dark bar read BROWNISH — killed. The
   pill is now grounded in deep navy with a thin gold hairline border
   (Gemini's brightness take, filed in Drive), a polished gold knob on
   a dark navy inset track, and the snowflake in pure snow white with
   NO halo glow. Scoped to this button's own rules — nothing else in
   this file changed. ---------------------------------------------------- */
.xmas-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  margin-right: 10px; padding: 6px 11px; min-height: 34px;
  border-radius: 999px; flex-shrink: 0; white-space: nowrap;
  border: 1px solid rgba(201, 164, 92, .85);
  background: linear-gradient(180deg, #10264a 0%, #081831 100%);
  box-shadow: inset 0 1px 0 rgba(237, 230, 214, .10), 0 2px 10px rgba(2, 6, 16, .45);
  color: var(--ink);
  font-family: var(--font-d); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em;
  cursor: pointer;
}
.xmas-toggle:hover {
  border-color: #e3c57c;
  background: linear-gradient(180deg, #14305c 0%, #0a1e3d 100%);
}
.xmas-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xmas-toggle .xt-flake { color: #ffffff; flex-shrink: 0; }
.xmas-toggle .xt-track {
  width: 26px; height: 15px; border-radius: 999px; flex-shrink: 0;
  background: #050d1d; border: 1px solid rgba(201, 164, 92, .55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .65);
  position: relative; box-sizing: border-box;
}
.xmas-toggle .xt-knob {
  position: absolute; top: 1px; left: 1px; width: 11px; height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0dca6 0%, #c9a45c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .5);
  transition: left .25s ease, background-color .25s ease;
}
.xmas-toggle[aria-pressed="true"] .xt-knob { left: 12px; }

/* --- the pill in the off state: quiet, standard-look -------------------- */
html.xmas-off .xmas-toggle {
  border-color: var(--line); background: transparent; color: var(--ink-dim);
}
html.xmas-off .xmas-toggle .xt-flake { color: var(--ink-dim); }
html.xmas-off .xmas-toggle .xt-track { background: rgba(120, 130, 140, .35); }
html.xmas-off .xmas-toggle .xt-knob { background: #8a94a0; }

@media (prefers-reduced-motion: reduce) {
  .xmas-toggle .xt-knob { transition: none; }
}

/* --- strip placement (v1.9.75): the pill lives in the top strip beside
       the language flags — the nav's right third could not carry it next
       to See Plans at phone widths (it overlapped the Lab pill). Sized
       for the strip; below 421px it goes icon-only so nothing crowds. --- */
.strip-cluster .xmas-toggle {
  margin-right: 0; min-height: 26px; padding: 3px 9px; font-size: .72rem;
}
@media (max-width: 420px) {
  .strip-cluster .xmas-toggle .xt-word { display: none; }
  .strip-cluster .xmas-toggle { padding: 3px 7px; }
}

/* --- flaw-hunt F4 (Dec 4, 2026): at <=380px the strip's magic-number
       transforms pull the language flags 9px under this pill (measured at
       320px: pill ends x=218, flags start x=209). Shrink the pill so the
       row fits without touching the transforms' centering at wider sizes. */
@media (max-width: 380px) {
  .strip-cluster { gap: 3px; }
  .strip-cluster .xmas-toggle { padding: 3px 5px; gap: 5px; }
  .strip-cluster .xmas-toggle .xt-track { width: 20px; height: 13px; }
  .strip-cluster .xmas-toggle .xt-knob { width: 9px; height: 9px; top: 1px; left: 1px; }
  .strip-cluster .xmas-toggle[aria-pressed="true"] .xt-knob { left: 8px; }
  .topstrip .lang-switch { gap: 3px; }
}
/* F4 root cause (measured): the flags carry their own magic-number
   transform (.topstrip .lang-switch translateX(calc(50vw - 182.75px)))
   which at 320px pulls them 22.75px left, under the pill. The cluster's
   own centering transform stays; only the flags' extra shift is cancelled
   at phone-small widths, so they sit at their natural flex position. */
@media (max-width: 380px) {
  .topstrip .lang-switch { transform: none; }
}

/* Snowflake: pure snow white, NO halo glow (Dev, Dec 4, 11:37 PM — white
   stays; Dec 5 classy pass — the icy halo is killed per the luxe take:
   the flake sits clean on the deep navy pill) */
.xmas-toggle .xt-flake{color:#ffffff;filter:none}
