/* Christmas touch, site-wide: option B "Modern festive" (owner, 27 Nov 2026; preview research/christmas-2026/b/, replaces
   the garland line, holly and corner snowflakes of 26 Nov). Loaded by _layout.html on every page while build.py
   season_promo() says the Christmas occasion runs (Thanksgiving Day to 25 Dec); the body carries class "xmas" and the
   inline script adds html.promo-off once the date has passed, so nothing stays after 25 Dec even before the next build.
   Brand navy (var(--ember); the source magenta below is mapped to navy on .com and teal on .ca by build.py), one bold red,
   oversized type, frosted glass. CSS and inline SVG only: every accent is absolutely positioned, a pseudo-element or sits
   where the old pill sat, so there is no layout shift. backdrop-filter has a solid fallback, contrast AA on the card,
   prefers-reduced-motion respected. */
:root { --xm-red: #D7263D; --xm-red-d: #B01D31;
  --xm-flake: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%231E3A8A' stroke-width='1' stroke-linecap='round'><path d='M60 30v60M34 45l52 30M34 75l52-30M60 30l-5 6M60 30l5 6M60 90l-5-6M60 90l5-6M34 45l1 8M34 45l7-2M86 75l-1-8M86 75l-7 2M86 45l-1 8M86 45l-7-2M34 75l1-8M34 75l7 2'/></svg>"); }

/* Site-wide touch: a 3 px red edge at the very top of every page and over the footer, the header hairline in navy, the
   snowflake grid ghosted into the footer's top-right corner. */
html:not(.promo-off) body.xmas .announce { position: relative; }
html:not(.promo-off) body.xmas .announce::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--xm-red); pointer-events: none; z-index: 1; }
html:not(.promo-off) body.xmas .site-header { border-bottom-color: var(--ember, #1E3A8A); }
html:not(.promo-off) body.xmas .site-footer { position: relative; }
html:not(.promo-off) body.xmas .site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--xm-red); pointer-events: none; }
html:not(.promo-off) body.xmas .site-footer::after { content: ""; position: absolute; right: 0; top: 3px; width: min(46vw, 520px); height: 260px; pointer-events: none; opacity: .16;
  background: var(--xm-flake) 0 0 / 120px 120px; filter: invert(1) brightness(2);
  -webkit-mask: radial-gradient(90% 90% at 100% 0, #000 30%, transparent 100%); mask: radial-gradient(90% 90% at 100% 0, #000 30%, transparent 100%); }

/* Homepage hero (both themes, .com and .ca): stays white, the headline grows a size and tightens, a fine-line snowflake
   grid sits behind the copy at low opacity and fades out toward the photo. */
html:not(.promo-off) body.xmas .cr-hero { background: linear-gradient(180deg, #fff 0%, var(--bone, #F4F6FB) 100%); }
html:not(.promo-off) body.xmas.theme-crisp .cr-hero::before, html:not(.promo-off) body.xmas.theme-atelier .cr-hero::before { content: ""; display: block; position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; pointer-events: none;
  background: var(--xm-flake) 0 0 / 120px 120px; opacity: .13;
  -webkit-mask: linear-gradient(90deg, #000 0, #000 20%, transparent 50%); mask: linear-gradient(90deg, #000 0, #000 20%, transparent 50%); }
html:not(.promo-off) body.xmas .cr-hero h1 { font-size: clamp(2.6rem, 5.3vw, 4.5rem); letter-spacing: -.045em; line-height: .98; font-weight: 800; }
html:not(.promo-off) body.xmas .cr-hero .lead { font-size: 1.08rem; }
html:not(.promo-off) body.xmas .cr-hero + .cr-cutline { border-color: var(--xm-red); }
@media (max-width: 520px) { html:not(.promo-off) body.xmas .cr-hero h1 { font-size: clamp(2.1rem, 9.4vw, 2.6rem); } html:not(.promo-off) body.xmas .cr-hero .lead { font-size: 1rem; } }

/* The occasion card where the pill sat (a block on its own line, so the eyebrow sits below it, above the H1): a floating frosted-glass card (red percentage block, "Christmas packaging is
   here", the live offer line from data/sales.json, arrow) with a soft lift on hover. Solid white by default, frosted
   where backdrop-filter exists. Text ink on white: AA; white on the red: 4.9:1. */
.xm-card { display: grid; width: max-content; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 14px; row-gap: 1px;
  max-width: 100%; margin: 0 0 20px; padding: 12px 16px 12px 14px; border-radius: 12px; vertical-align: top; text-align: left;
  background: rgba(255, 255, 255, .94); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, .06), 0 24px 48px -28px rgba(17, 24, 39, .35); text-decoration: none; color: var(--ink, #111827);
  transition: transform .25s, box-shadow .25s; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .xm-card { background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); } }
.xm-card:hover, .xm-card:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(17, 24, 39, .06), 0 30px 54px -28px rgba(17, 24, 39, .4); color: var(--ink, #111827); text-decoration: none; }
.xm-card:focus-visible { outline: 2px solid var(--ember, #1E3A8A); outline-offset: 3px; }
.xm-card .xm-pct { grid-row: 1 / span 2; display: grid; place-items: center; align-content: center; min-width: 52px; height: 52px; padding: 0 7px; white-space: nowrap; border-radius: 10px;
  background: var(--xm-red); color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em; line-height: 1; }
.xm-card .xm-pct small { font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; display: block; text-align: center; line-height: 1.2; margin-top: 2px; }
.xm-card .xm-k { grid-column: 2; font-size: 1rem; font-weight: 700; line-height: 1.2; min-width: 0; }
.xm-card .xm-o { grid-column: 2; font-size: .84rem; color: var(--muted, #5C636D); line-height: 1.3; min-width: 0; }
.xm-card .xm-arr { grid-column: 3; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--ember, #1E3A8A); transition: transform .2s; }
.xm-card:hover .xm-arr, .xm-card:focus-visible .xm-arr { transform: translateX(3px); }
@media (max-width: 520px) { .xm-card { width: 100%; margin: 0 0 16px; padding: 10px 12px 10px 10px; column-gap: 12px; }
  .xm-card .xm-pct { min-width: 46px; height: 46px; font-size: .95rem; } .xm-card .xm-k { font-size: .95rem; } .xm-card .xm-o { font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) { .xm-card, .xm-card .xm-arr { transition: none; }
  .xm-card:hover, .xm-card:focus-visible, .xm-card:hover .xm-arr, .xm-card:focus-visible .xm-arr { transform: none; } }

/* Santa hat on the top-right corner of the red percentage block (owner, 27 Nov 2026; markup _xm_hat.html, inline SVG with
   literal reds, so it stays red on .ca). Absolutely positioned and sized from the block, so the card's box never changes:
   52 px block -> 43 px hat, 46 px (phone) -> 38 px, 64 px (Christmas page) -> 52 px; the brim may touch the top-right of the digits (owner, 27 Nov 2026: bigger, more overhang). */
.xm-pct { position: relative; overflow: visible; }
.xm-hat { position: absolute; right: -24%; top: -40%; width: 82%; height: auto; transform: rotate(12deg); transform-origin: 40% 80%;
  filter: drop-shadow(0 1.5px 1.5px rgba(17, 24, 39, .3)); pointer-events: none; }
@media (max-width: 520px) { .xm-hat { right: -18%; } } /* phone: the pompom stays inside the 12 px column gap, off the headline */

/* Snowfall from the header to the bottom of the hero (owner, 27 Nov 2026: "very moderate with small flakes so it looks
   cool"). Two tiled layers (480 px tiles, four 2-5 px dots each: about 16 + 14 flakes at 1280 x 720, 6 + 5 at 390 wide)
   fall with translateY on the <i> and sway with translateX on its ::before: transforms only, nothing repaints. The hero
   layer (.xm-snow in .cr-hero, both home themes) sits behind .cr-hero-grid (z-index 1) and is clipped by the hero; the
   header layer (.xm-snow-h, first child of header.site-header on the home only, themes/crisp/base.html) is clipped by its
   own overflow and sits at z-index -1 inside the header's stacking context: above the header background, under the logo,
   menus, dropdowns and buttons, so nothing becomes unclickable and no dropdown is covered. Its tiles are offset by the
   header height so a flake crossing the header's bottom edge continues into the hero. Dot colour = the brand accent
   (source magenta, mapped to navy on .com and teal on .ca by build.py). Static faint flakes under prefers-reduced-motion. */
:root { --xm-snow-a: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 480' fill='%231E3A8A'><circle cx='42' cy='28' r='1.2'/><circle cx='296' cy='118' r='1.6'/><circle cx='152' cy='262' r='1'/><circle cx='418' cy='384' r='1.4'/></svg>");
  --xm-snow-b: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 480' fill='%231E3A8A'><circle cx='112' cy='72' r='2'/><circle cx='378' cy='204' r='1.5'/><circle cx='64' cy='334' r='2.5'/><circle cx='262' cy='402' r='1.8'/></svg>"); }
html:not(.promo-off) body.xmas .xm-snow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
html:not(.promo-off) body.xmas .site-header .xm-snow-h { z-index: -1; }
html:not(.promo-off) body.xmas .xm-snow i { position: absolute; left: 0; right: 0; top: -480px; bottom: 0; display: block; animation: xm-fall 17s linear infinite; }
html:not(.promo-off) body.xmas .xm-snow i::before { content: ""; position: absolute; inset: 0 -24px; background: var(--xm-snow-a) 0 0 / 480px 480px repeat; animation: xm-sway 6.5s ease-in-out infinite alternate; }
html:not(.promo-off) body.xmas .xm-snow i.xm-snow-a { opacity: .34; }
html:not(.promo-off) body.xmas .xm-snow i.xm-snow-b { opacity: .44; animation-duration: 13s; animation-delay: -5s; }
html:not(.promo-off) body.xmas .xm-snow i.xm-snow-b::before { background-image: var(--xm-snow-b); background-position: 140px 0; animation-duration: 8s; animation-delay: -3s; }
html:not(.promo-off) body.xmas .xm-snow-h i.xm-snow-a::before { background-position: 0 -72px; }
html:not(.promo-off) body.xmas .xm-snow-h i.xm-snow-b::before { background-position: 140px -72px; }
@keyframes xm-fall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 480px, 0); } }
@keyframes xm-sway { from { transform: translate3d(-14px, 0, 0); } to { transform: translate3d(14px, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  html:not(.promo-off) body.xmas .xm-snow i { animation: none; transform: translate3d(0, 240px, 0); opacity: .22; }
  html:not(.promo-off) body.xmas .xm-snow i::before { animation: none; transform: none; } }

/* Christmas picks bar under the hero (both markets; markup in home_parts.html): navy bar, white chips, red hover. */
.xm-strip { padding: 18px 0 4px; }
.xm-strip .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 22px; border-radius: 14px; overflow: hidden;
  background: var(--ember-d, #14275E); box-shadow: 0 10px 30px -14px rgba(17, 24, 39, .6); }
.xm-strip b { font-size: .8rem; font-weight: 700; letter-spacing: .01em; color: #fff; margin-right: 6px; white-space: nowrap; }
.xm-strip a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); color: #fff; text-decoration: none;
  font-size: .875rem; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.xm-strip a:hover, .xm-strip a:focus-visible { background: var(--xm-red); border-color: var(--xm-red); color: #fff; }
.xm-strip a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 820px) { .xm-strip .wrap { padding: 14px 16px; } .xm-strip b { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .xm-strip a { transition: none; } }

/* After 25 Dec (html.promo-off from the inline script): the card, the picks bar and the old pill go; every other touch
   above is scoped to html:not(.promo-off), so nothing stays until the next build drops the stylesheet. */
html.promo-off .xm-card, html.promo-off .xm-strip, html.promo-off .tg-tag.tg-christmas, html.promo-off .xm-snow { display: none; }
