/* christmas.css — Knox's Christmas look (Dec 2026), for the web app, the
   landing page and the info pages. Turned on by html.knox-christmas
   (localStorage knoxTheme 'christmas', offered in December by theme.js).

   It is Knox's normal LIGHT look in Christmas colors: cream backgrounds,
   solid borders with the darker edge underneath, flat colors, Nunito.
   Knox orange becomes Christmas red, green becomes evergreen, gold stays.
   No glows, gradients or sparkles. A little flat snow, a tree and presents
   sit behind the app's welcome screen and the landing hero (theme.js). */

html.knox-christmas {
  --orange:        #E5383B;   /* Christmas red (Ask Knox, main buttons) */
  --orange-dark:   #B3202A;
  --orange-light:  #FFD6D8;
  --orange-cream:  #FFF4F3;
  --green:         #1FA45A;   /* evergreen (Flashcards, Plus, "right") */
  --green-dark:    #157A41;
  --green-light:   #D3F3DF;
  --red:           #E5383B;
  --cream:         #FFFAF6;   /* snowy cream */
  --cream-warm:    #FFF2EE;
  --border:        #EADFDC;
  --danger-bg:     #FFF0F0;
  /* landing.css's own names */
  --app-bg:        #FFF7F3;
  --app-line:      #F0DEDA;
  --kl-alt:        #FFF4F1;
}
html.knox-christmas, html.knox-christmas body { background: var(--cream); }

/* Knox's flat circles (mode-bg.css "Classic") in red and evergreen. */
html.knox-christmas [data-mb="classic"] { --mb-bg: var(--cream); --mb-c1: #FFE3E4; --mb-c2: #DDF4E6; }

/* Badges that said "Cozy fall…" etc. use the normal text in Christmas. */
html.knox-christmas .season-only { display: none; }

/* Calculator, Learn and the rest keep their own colors; only the warm
   accents change. The Learn purple stays purple. */

/* ── Decorations (theme.js) ──────────────────────────────────────────
   Behind the app's welcome screen and the landing hero (.xmas-deco): string
   lights, a wreath, ornaments, a stocking, and snowy hills with pines, the
   tree, candy canes, a snowman and presents. Snow falls over the whole page
   (.xmas-snow). Cards get a little snow cap. All flat Knox shapes. */
.xmas-deco { display: none; }
html.knox-christmas .xmas-deco { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
html.knox-christmas #welcomeScreen > .xmas-deco, html.knox-christmas #home > .xmas-deco { position: absolute !important; inset: 0 !important; z-index: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; }
html.knox-christmas #welcomeScreen > :not(.xmas-deco),
html.knox-christmas #home > :not(.xmas-deco) { position: relative; z-index: 1; }

/* Frosty winter background */
html.knox-christmas { --cream: #F3F8FC; --cream-warm: #EAF3FA; }
html.knox-christmas [data-mb="classic"] { --mb-bg: #F3F8FC; --mb-c1: #FFE1E2; --mb-c2: #D9F2E3; }
html.knox-christmas #home.kl-hero { background: #F3F8FC; }

/* Snow: falls inside the welcome screen / landing hero and scrolls with it. */
.xmas-snow-local { position: absolute; inset: 0; overflow: hidden; }
.xmas-flake { position: absolute; top: -30px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #FFFFFF; border: 2px solid #C9E0F0; animation: xmasFall var(--d) linear var(--delay) infinite; }
.xmas-flake.is-flake { background: none; border: 0; border-radius: 0; }
.xmas-flake svg { display: block; width: 100%; height: 100%; }
@keyframes xmasFall { from { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--drift), 52vh) rotate(160deg); } to { transform: translate(calc(var(--drift) * -.4), 106vh) rotate(320deg); } }
@media (prefers-reduced-motion: reduce) { .xmas-flake { animation: none; top: var(--rest); } }

/* String lights (drawn to the real width by theme.js) */
.xmas-lights-host { display: none; }
.xmas-lights { display: block; }
html.knox-christmas .xmas-deco > .xmas-lights-host { display: block; position: absolute; top: 0; left: 0; right: 0; }
/* The sidebar logo bar keeps its normal size; a short tangled string runs
   along its bottom edge, drawn above the tools so nothing hides the bulbs. */
html.knox-christmas .sidebar-top { position: relative; z-index: 3; }
html.knox-christmas .sidebar-top > .xmas-lights-mini { display: block; position: absolute; left: 0; right: 0; top: calc(100% - 4px); pointer-events: none; }
/* Room for the bulbs to hang between the logo bar and the tools. */
html.knox-christmas #rightSidebar .sidebar-quicknav { padding-top: 38px; }
body.app-sidebar-collapsed #rightSidebar .sidebar-quicknav { padding-top: 10px; }
body.app-sidebar-collapsed .sidebar-top > .xmas-lights-mini { display: none !important; }
/* Under the landing header: hangs just below it. */
/* (The landing's string hangs at the top of the hero, just under the header.) */

/* Top: wreath (left), ornaments (right), stocking */
.xmas-wreath { position: absolute; top: 0; left: 3%; width: 104px; }
.xmas-baubles { position: absolute; top: 0; right: 5%; width: 190px; }
.xmas-stocking { position: absolute; top: 0; right: calc(5% + 200px); width: 46px; }

/* Bottom: the snowy ground */
.xmas-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; }
.xmas-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 124px; }
.xmas-pines { position: absolute; left: 1%; bottom: 40px; width: 200px; }
.xmas-tree { position: absolute; left: 15%; bottom: 26px; width: 120px; }
.xmas-canes { position: absolute; left: calc(15% + 120px); bottom: 24px; width: 48px; }
.xmas-snowman { position: absolute; right: calc(2% + 190px); bottom: 28px; width: 84px; }
.xmas-gifts { position: absolute; right: 2%; bottom: 22px; width: 170px; }
@media (max-width: 1100px) { .xmas-pines { display: none; } .xmas-tree { left: 2%; } .xmas-canes { left: calc(2% + 120px); } .xmas-stocking { display: none; } }
@media (max-width: 768px), (max-width: 900px) and (hover: none), (max-width: 900px) and (pointer: coarse), (max-width: 900px) and (pointer: none) {
  .xmas-ground { height: 120px; } .xmas-hills { height: 70px; }
  .xmas-tree { width: 84px; } .xmas-canes { left: calc(2% + 84px); width: 34px; }
  .xmas-snowman { width: 60px; right: calc(2% + 120px); } .xmas-gifts { width: 116px; }
  .xmas-wreath { width: 72px; } .xmas-baubles { width: 130px; }
}
@media (max-width: 600px) { .xmas-snowman, .xmas-canes, .xmas-wreath, .xmas-baubles, .xmas-stocking { display: none; } }
/* (The welcome screen keeps its normal spacing: the ground scene sits behind
   the content, so Ask Knox and Learn stay exactly where they are in Light.) */

/* Snow caps on Knox's cards (app + landing) */
html.knox-christmas :is(.suggestion-chip, .sl-pick, .fc-way, .fc-deck, .pt-card, .kp-family, .kl-mode-card, .kl-card, .kl-review, details.faq-item, .kl-platform, .sidebar-extension-card, .bs-tile, .fc-quiz-q) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24V6Q18 13 12 7Q6 13 0 6Z' fill='%23fff'/%3E%3Cpath d='M0 6Q6 13 12 7Q18 13 24 6' fill='none' stroke='%23D3E4F0' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: top left; background-size: 24px 13px;
}
html.knox-christmas #pricing .kp-family { background-color: var(--surface); }

/* The "Christmas mode is here" tip reuses the fall tip's shape (seasonal.css). */
html.knox-christmas .fall-tip { border-color: var(--orange); }
/* The note floats like in Light (never moves Ask Knox or Learn), just below
   the string lights. Phones and short windows keep it in the flow. */
@media (min-width: 769px) and (min-height: 720px) {
  html.knox-christmas #welcomeScreen > .fall-tip { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 32px); z-index: 3; }
}

.xmas-hat { display: none !important; position: absolute; width: 22px; height: 18px; top: -9px; left: 9px; transform: rotate(-18deg); pointer-events: none; z-index: 2; }
html.knox-christmas #main-header { border-bottom-color: var(--orange-dark); }

/* ── Landing hero: decorations stay clear of the text and the iPhone tour ── */
html.knox-christmas #home.kl-hero { padding-bottom: 170px; }
html.knox-christmas #home .xmas-wreath, html.knox-christmas #home .xmas-baubles, html.knox-christmas #home .xmas-stocking { display: none; }
@media (min-width: 1560px) {
  /* Wide screens have empty margins beside the hero: hang them there. */
  html.knox-christmas #home .xmas-wreath { display: block; top: 30px; left: 1.5%; width: 92px; }
  html.knox-christmas #home .xmas-baubles { display: block; top: 30px; right: 1%; width: 150px; }
}
@media (max-width: 900px) { html.knox-christmas #home.kl-hero { padding-bottom: 120px; } }

/* Landing sections: a snowy edge on top. */
.xmas-edge { display: none; }
html.knox-christmas section.kl-section { position: relative; }
html.knox-christmas .xmas-edge { display: block; position: absolute; top: 0; left: 0; right: 0; height: 16px; z-index: 2; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24V6Q18 13 12 7Q6 13 0 6Z' fill='%23fff'/%3E%3Cpath d='M0 6Q6 13 12 7Q18 13 24 6' fill='none' stroke='%23D3E4F0' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-size: 28px 16px; }
html.knox-christmas #pricing.kl-pricing :is(.pt-card, .kp-family) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24V6Q18 13 12 7Q6 13 0 6Z' fill='%23fff'/%3E%3Cpath d='M0 6Q6 13 12 7Q18 13 24 6' fill='none' stroke='%23D3E4F0' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: top left; background-size: 24px 13px; }

/* The last "Stop guessing" section: snow and a snowy
   ground with pines, the tree, a snowman and presents (theme.js). */
html.knox-christmas .kl-final { position: relative; overflow: hidden; padding-bottom: 190px; }
.xmas-hat-wrap { position: relative; display: inline-block; }
html.knox-christmas .kl-final .xmas-deco .xmas-ground { height: 170px; }
@media (max-width: 900px) { html.knox-christmas .kl-final { padding-bottom: 130px; } }
html.knox-christmas .kl-final > :not(.xmas-deco):not(.xmas-edge) { position: relative; z-index: 1; }

/* String lights take turns dimming, like real ones (three groups). */
.xmas-lights .xb { animation: xmasBlink 3.6s ease-in-out infinite; }
.xmas-lights .xb1 { animation-delay: -1.2s; }
.xmas-lights .xb2 { animation-delay: -2.4s; }
@keyframes xmasBlink { 0%, 55%, 100% { opacity: 1; } 70%, 85% { opacity: .38; } }
@media (prefers-reduced-motion: reduce) { .xmas-lights .xb { animation: none; } }

/* Snow in every landing section: falls the section's full height (--fall,
   set by theme.js) and only moves while the section is on screen. */
.xmas-snow-sec { display: none; }
html.knox-christmas .xmas-snow-sec { display: block; position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
html.knox-christmas section.kl-section > .kl-wrap { position: relative; z-index: 1; }
.xmas-snow-sec .xmas-flake { animation-name: xmasFallSec; animation-duration: calc(var(--d) * var(--dm, 1)); animation-play-state: paused; }
.xmas-snow-sec.xmas-run .xmas-flake { animation-play-state: running; }
@keyframes xmasFallSec { from { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--drift), calc(var(--fall, 800px) * .5)) rotate(160deg); } to { transform: translate(calc(var(--drift) * -.4), calc(var(--fall, 800px) + 40px)) rotate(320deg); } }
@media (prefers-reduced-motion: reduce) { .xmas-snow-sec .xmas-flake { animation: none; top: var(--rest); } }

/* ── Christmas night (html.knox-christmas.knox-xmas-night, built on Dark) ──
   A night-blue sky, moonlit snow, softly glowing lights, a moon and stars.
   The exact Knox red and green of the light look; only the white and cream
   surfaces turn night blue. */
html.knox-christmas[data-theme="dark"] {
  --cream:        #0D1626;
  --cream-warm:   #132036;
  --gray:         #16233A;
  --surface:      #1A2840;
  --border:       #2C3E5A;
  --text:         #EEF4FB;
  --text-light:   #A6B8CC;
  --text-body:    #C9D6E4;
  --orange:       #E5383B;   /* the same Knox red as the light look */
  --orange-dark:  #B3202A;
  --orange-light: #4A1C26;
  --orange-cream: #2A1620;
  --red:          #E5383B;
  --green:        #1FA45A;   /* the same evergreen as the light look */
  --green-dark:   #157A41;
  --green-light:  #133A2A;
  --purple-light: #2E1F4A;
  --danger-bg:    #3A1820;
  --app-bg:       #0F1B2E;
  --app-card:     #1A2840;
  --app-line:     #2C3E5A;
  --kl-alt:       #122036;
  color-scheme: dark;
}
html.knox-christmas[data-theme="dark"], html.knox-christmas[data-theme="dark"] body { background: var(--cream); }
html.knox-christmas[data-theme="dark"] #home.kl-hero { background: var(--cream); }
/* Knox's circles glow softly at night (like Dark), in red and evergreen. */
html.knox-christmas[data-theme="dark"] [data-mb="classic"] { --mb-bg: #0D1626; --mb-c1: rgba(229,56,59,.12); --mb-g1: rgba(255,90,95,.5); --mb-c2: rgba(31,164,90,.12); --mb-g2: rgba(60,200,120,.45); }
/* Moonlit snow on the hills */
html.knox-xmas-night .xmas-hills .xh-back { fill: #5D7593; }
html.knox-xmas-night .xmas-hills .xh-mid { fill: #C9D7E6; stroke: #A9BDD3; }
html.knox-xmas-night .xmas-hills .xh-front { fill: #E8EFF7; stroke: #C2D2E3; }
/* Lights glow at night; the wire shows on the dark sky */
html.knox-xmas-night .xmas-lights > path { stroke: #7FA08A; }
html.knox-xmas-night .xmas-lights .xb { filter: drop-shadow(0 0 5px rgba(255, 235, 180, .6)); }
html.knox-xmas-night .xmas-baubles path, html.knox-xmas-night .xmas-wreath > path:first-child, html.knox-xmas-night .xmas-stocking > path:first-child { stroke: #7C8DA3; }
/* Moon and stars */
.xmas-night-sky { display: none; }
html.knox-xmas-night .xmas-night-sky { display: block; position: absolute; inset: 0; }
.xmas-moon { position: absolute; top: 64px; left: 18%; width: 64px; filter: drop-shadow(0 0 14px rgba(255, 240, 190, .45)); }
.xmas-star { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #FFF6D6; box-shadow: 0 0 6px rgba(255, 246, 214, .8); }
@media (max-width: 900px) { .xmas-moon { width: 44px; left: 6%; top: 70px; } }
/* Landing hero: the moon sits in the open sky between the headline and the
   phone, clear of the "Knox Knows for iPhone" pill. */
#home .xmas-moon { left: 40%; top: 96px; }
/* Stacked hero (centered text): up in the right corner instead. */
@media (max-width: 1060px) { #home .xmas-moon { left: auto; right: 6%; top: 84px; } }
/* Snow: brighter flakes on the dark sky */
html.knox-xmas-night .xmas-flake { border-color: #FFFFFF; }
html.knox-xmas-night .xmas-flake.is-flake svg g { stroke: #DCEBFA; }
/* Snow caps and section edges stay white (frosting on dark cards) */
html.knox-xmas-night .kb-fox { border-color: var(--orange); }
/* Christmas night: Dark's card backgrounds would drop the snow caps; keep them — in a
   moonlit blue-white, so they read as snow on the box, not as a light. */
html.knox-christmas[data-theme="dark"] :is(.suggestion-chip, .sl-pick, .fc-way, .fc-deck, .kl-card, .kl-review, .sidebar-extension-card, .bs-tile, .fc-quiz-q) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24V6Q18 13 12 7Q6 13 0 6Z' fill='%23D9E5F1'/%3E%3Cpath d='M0 6Q6 13 12 7Q18 13 24 6' fill='none' stroke='%23AFC4D8' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: top left; background-size: 24px 13px; }

/* Landing: the snow falls behind the words and cards, never over them
   (each section is its own layer, and the snow sits at its back). */
html.knox-christmas section:has(> .xmas-snow-sec), html.knox-christmas #home, html.knox-christmas .kl-final { isolation: isolate; }
html.knox-christmas section > .xmas-snow-sec, html.knox-christmas #home > .xmas-deco, html.knox-christmas .kl-final > .xmas-deco { z-index: -1 !important; }

/* Christmas looks: Knox's "thinking" dots (Ask Knox, Learn, Flashcards) are red, gold and green. */
html.knox-christmas .thinking-dot:nth-child(1), html.knox-christmas .fc-dots span:nth-child(1) { background: #E5383B; }
html.knox-christmas .thinking-dot:nth-child(2), html.knox-christmas .fc-dots span:nth-child(2) { background: #F2B705; }
html.knox-christmas .thinking-dot:nth-child(3), html.knox-christmas .fc-dots span:nth-child(3) { background: #1FA45A; }

/* ═══ Christmas night landing (Dec 2026) ══════════════════════════════════
   The same colors as the Christmas (light) look, section by section, made
   dark: each section is the night sky with a hint of its light-mode tint, and
   its two soft circles are the same pair of colors as in light mode (Ask peach +
   blue, Learn lavender + blue, Flashcards mint + gold, Streaks pink + peach, the
   top icy blue with red + lavender). White sections in light are plain night sky. */
html.knox-christmas[data-theme="dark"] #home.kl-hero { background: color-mix(in srgb, #1CB0F6 5%, var(--cream)); }
html.knox-christmas[data-theme="dark"] #home.kl-hero::before { background: rgba(229, 56, 59, .16); }
html.knox-christmas[data-theme="dark"] #home.kl-hero::after { background: rgba(165, 96, 242, .14); }
html.knox-christmas[data-theme="dark"] :is(#how-it-works, #faq) { background: color-mix(in srgb, #FF6B6B 6%, var(--cream)) !important; }
html.knox-christmas[data-theme="dark"] #ask.kl-section { background: color-mix(in srgb, #FF8A2B 10%, var(--cream)); }
html.knox-christmas[data-theme="dark"] #ask.kl-section::before { background: rgba(255, 138, 43, .17); }
html.knox-christmas[data-theme="dark"] #ask.kl-section::after { background: rgba(28, 176, 246, .12); }
html.knox-christmas[data-theme="dark"] #learn.kl-section { background: color-mix(in srgb, #A560F2 12%, var(--cream)); }
html.knox-christmas[data-theme="dark"] #learn.kl-section::before { background: rgba(165, 96, 242, .19); }
html.knox-christmas[data-theme="dark"] #learn.kl-section::after { background: rgba(28, 176, 246, .12); }
html.knox-christmas[data-theme="dark"] #flashcards.kl-section { background: color-mix(in srgb, #58CC02 9%, var(--cream)); }
html.knox-christmas[data-theme="dark"] #flashcards.kl-section::before { background: rgba(88, 204, 2, .15); }
html.knox-christmas[data-theme="dark"] #flashcards.kl-section::after { background: rgba(255, 200, 0, .11); }
html.knox-christmas[data-theme="dark"] #streaks.kl-section { background: color-mix(in srgb, #FF4B4B 10%, var(--cream)); }
html.knox-christmas[data-theme="dark"] #streaks.kl-section::before { background: rgba(255, 75, 75, .16); }
html.knox-christmas[data-theme="dark"] #streaks.kl-section::after { background: rgba(255, 138, 43, .13); }
html.knox-christmas[data-theme="dark"] .kl-app { background: color-mix(in srgb, #FF8A2B 11%, var(--cream)); }
html.knox-christmas[data-theme="dark"] .kl-app::before { background: rgba(255, 138, 43, .17); }
html.knox-christmas[data-theme="dark"] .kl-app::after { background: rgba(28, 176, 246, .12); }
html.knox-christmas[data-theme="dark"] #pricing.kl-pricing { background: color-mix(in srgb, #1CB0F6 11%, var(--cream)); }
html.knox-christmas[data-theme="dark"] :is(#tools, #subjects, #reviews, #gift-christmas, .kl-final) { background: var(--cream) !important; }
