/* ==========================================================================
   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) ---------------------------- */
.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: 1.5px solid rgba(201, 164, 92, .75);
  background: rgba(201, 164, 92, .10);
  color: var(--ink);
  font-family: var(--font-d); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em;
  cursor: pointer;
}
.xmas-toggle:hover { border-color: #c9a45c; }
.xmas-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xmas-toggle .xt-flake { color: #c9a45c; flex-shrink: 0; }
.xmas-toggle .xt-track {
  width: 26px; height: 15px; border-radius: 999px; flex-shrink: 0;
  background: rgba(201, 164, 92, .35); position: relative;
}
.xmas-toggle .xt-knob {
  position: absolute; top: 2px; left: 2px; width: 11px; height: 11px;
  border-radius: 50%; background: #c9a45c;
  transition: left .25s ease, background-color .25s ease;
}
.xmas-toggle[aria-pressed="true"] .xt-knob { left: 13px; }

/* --- 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; }
  .strip-cluster .xmas-toggle[aria-pressed="true"] .xt-knob { left: 10px; }
  .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: bright snow white with an icy halo (Dev, Dec 4, 11:37 PM — kept in the revert) */
.xmas-toggle .xt-flake{color:#ffffff;filter:drop-shadow(0 0 3px rgba(186,230,253,.9)) drop-shadow(0 0 1px rgba(255,255,255,.8))}
