/*
 * AMLcenter Advent calendar 2026: page styles.
 *
 * Source: references/advent-calendar-final.html (approved design). The reference <style> block is
 * copied with unchanged declarations (except the desktop top padding of .wrap: 18px instead of 14px);
 * only the selectors are scoped for WordPress:
 *   :root / html  -> html.amlc-advent-html   (class set by templates/page-advent.php)
 *   body          -> body.amlc-advent-page   (body class set by templates/page-advent.php)
 *   *             -> .amlc-advent *
 *   all others    -> .amlc-advent <selector>
 *   @keyframes    -> prefixed with "amlc-" (and their uses in animation declarations)
 * Loaded only on pages using the "Advento kalendorius 2026" template (inc/advent-2026.php).
 * Additions that are not in the reference are at the end of this file and override it by order.
 */
html.amlc-advent-html{
  --navy:#131c7c; --navy-deep:#0d1462; --mint:#72c7b1; --mint-ink:#2b8a71; --mint-light:#bee6d9; --page:#e5f4f4;
  --grayblue:#c4cadb; --midblue:#7f8cb5; --blue1:#394893; --blue2:#5c67a5;
  --bg:var(--navy); --surface:#ffffff; --text-on-bg:#ffffff; --text:#131c7c; --text-soft:#394893;
  --ok:#2b8a71; --bad:#394893;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark){
  html.amlc-advent-html:not([data-theme="light"]){
    --bg:#0b1150; --surface:#18206e; --text-on-bg:#ffffff; --text:#e5f4f4; --text-soft:#bee6d9;
    --ok:#72c7b1; --bad:#c4cadb; color-scheme: dark;
  }
}
html.amlc-advent-html[data-theme="dark"]{
  --bg:#0b1150; --surface:#18206e; --text-on-bg:#ffffff; --text:#e5f4f4; --text-soft:#bee6d9;
  --ok:#72c7b1; --bad:#c4cadb; color-scheme: dark;
}
.amlc-advent *,.amlc-advent *::before,.amlc-advent *::after{box-sizing:border-box}
html.amlc-advent-html{scroll-padding-top:env(safe-area-inset-top,0px)}
body.amlc-advent-page{
  margin:0; min-height:100vh; color:var(--text-on-bg);
  font-family:"Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; font-size:17px; line-height:1.5;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.10) 0 2px, transparent 3px) 0 0/140px 140px,
    radial-gradient(circle at 70% 60%, rgba(114,199,177,.12) 0 1.5px, transparent 2.5px) 0 0/90px 90px,
    var(--bg);
}
.amlc-advent .wrap{max-width:1120px; margin:0 auto; padding:28px 20px 48px}
.amlc-advent header{display:grid; gap:18px; margin-bottom:28px}
.amlc-advent .brand{display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap}
.amlc-advent .brand img{height:44px; width:auto; display:block}
.amlc-advent h1{font-weight:800; font-size:clamp(34px, 6vw, 64px); line-height:.98; letter-spacing:-.02em; margin:0; max-width:15ch}
.amlc-advent h1 .slash{color:var(--mint)}
.amlc-advent h1 .ribbon{color:var(--mint)}
.amlc-advent .lede{margin:0; max-width:58ch; color:var(--text-on-bg); opacity:.9; font-size:18px}
.amlc-advent .stats{display:flex; flex-wrap:wrap; gap:10px 22px; align-items:center; font-weight:500}
.amlc-advent .bar{flex:1 1 220px; height:10px; border-radius:6px; background:rgba(255,255,255,.16); overflow:hidden; min-width:160px}
.amlc-advent .bar span{display:block; height:100%; width:0; background:var(--mint); border-radius:6px; transition:width .5s ease}
.amlc-advent .review{display:none; background:var(--mint); color:#131c7c; font-weight:700; padding:8px 14px; border-radius:10px; width:fit-content}
.amlc-advent .review.on{display:block}

.amlc-advent .grid{display:grid; grid-template-columns:repeat(6, 1fr); grid-auto-rows:118px; gap:12px; grid-auto-flow:dense}
.amlc-advent .door{position:relative; border:0; padding:0; cursor:pointer; border-radius:14px; perspective:900px; background:var(--navy-deep); color:inherit; font:inherit; text-align:left}
.amlc-advent .door.w2{grid-column:span 2}
.amlc-advent .door.h2{grid-row:span 2}
.amlc-advent .door:focus-visible{outline:3px solid var(--mint); outline-offset:3px}
.amlc-advent .inside{position:absolute; inset:0; border-radius:14px; background:#e5f4f4; color:#131c7c; padding:12px 14px; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; box-shadow: inset 0 0 0 2px rgba(19,28,124,.08)}
.amlc-advent .inside .t{font-weight:700; font-size:15px; line-height:1.15}
.amlc-advent .inside .row{display:flex; align-items:center; justify-content:space-between; font-size:13px; color:#394893}
.amlc-advent .inside svg{width:22px; height:22px}
.amlc-advent .front{position:absolute; inset:0; border-radius:14px; transform-origin:left center; transition:transform .55s cubic-bezier(.3,.7,.2,1); backface-visibility:hidden; display:flex; align-items:flex-start; justify-content:flex-start; padding:10px 14px; color:#fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 6px 18px rgba(0,0,0,.25)}
.amlc-advent .front::after{content:""; position:absolute; inset:6px; border-radius:10px; border:2px dashed rgba(255,255,255,.35); pointer-events:none}
.amlc-advent .num{font-weight:800; font-size:44px; line-height:1; color:currentColor; position:relative; z-index:1; letter-spacing:-.02em}
.amlc-advent .h2 .num{font-size:84px}
.amlc-advent .lock{position:absolute; right:12px; bottom:10px; width:22px; height:22px; opacity:.85; z-index:1}
.amlc-advent .door.open .front{transform:rotateY(-104deg)}
.amlc-advent .door.open .lock{display:none}

.amlc-advent .p1{background:repeating-linear-gradient(45deg,#394893 0 14px,#46559d 14px 28px)}
.amlc-advent .p2{background:radial-gradient(circle,rgba(255,255,255,.9) 0 2px,transparent 2.5px) 0 0/18px 18px,#5c67a5}
.amlc-advent .p3{background:linear-gradient(90deg,transparent 46%,#72c7b1 46% 54%,transparent 54%),linear-gradient(0deg,transparent 44%,#72c7b1 44% 56%,transparent 56%),#394893}
.amlc-advent .p4{background:radial-gradient(circle,#131c7c 0 2.5px,transparent 3px) 0 0/20px 20px,#72c7b1; color:#131c7c}
.amlc-advent .p5{background:repeating-linear-gradient(0deg,#bee6d9 0 10px,#e5f4f4 10px 20px); color:#131c7c}
.amlc-advent .p6{background:conic-gradient(#7f8cb5 25%,#8d99c0 0 50%,#7f8cb5 0 75%,#8d99c0 0) 0 0/28px 28px}
.amlc-advent .p4::after,.amlc-advent .p5::after{border-color:rgba(19,28,124,.35)}

.amlc-advent dialog{border:0; padding:0; border-radius:20px; width:min(560px, calc(100vw - 28px)); max-height:calc(100vh - 40px); background:var(--surface); color:var(--text); box-shadow:0 30px 80px rgba(0,0,0,.45)}
.amlc-advent dialog::backdrop{background:rgba(8,12,58,.66)}
.amlc-advent .card{padding:26px 26px 22px; display:grid; gap:14px}
.amlc-advent .card-top{display:flex; align-items:center; gap:12px}
.amlc-advent .badge{font-weight:800; font-size:28px; line-height:1; width:56px; height:56px; border-radius:14px; display:grid; place-items:center; background:#131c7c; color:#fff; flex-shrink:0}
.amlc-advent .tag{font-size:14px; font-weight:700; color:var(--text-soft)}
.amlc-advent .card h2{font-weight:800; font-size:clamp(24px,4.5vw,30px); line-height:1.1; margin:0; letter-spacing:-.01em}
.amlc-advent .card h2 .slash{color:var(--mint-ink)}
.amlc-advent .card p{margin:0}
.amlc-advent .scenario{background:#e5f4f4; color:#131c7c; border-radius:14px; padding:14px 16px; font-weight:500}
.amlc-advent .opts{display:grid; gap:10px}
.amlc-advent .opt{font:inherit; font-weight:600; text-align:left; padding:13px 16px; min-height:48px; border-radius:12px; cursor:pointer; border:2px solid #c4cadb; background:transparent; color:var(--text)}
.amlc-advent .opt:hover:not(:disabled){border-color:var(--mint)}
.amlc-advent .opt:focus-visible{outline:3px solid var(--mint); outline-offset:2px}
.amlc-advent .opt.right{border-color:#72c7b1; background:rgba(114,199,177,.18)}
.amlc-advent .opt.wrong{border-color:#7f8cb5; background:rgba(127,140,181,.14); text-decoration:line-through; text-decoration-color:#7f8cb5}
.amlc-advent .opt:disabled{cursor:default}
.amlc-advent .feedback{display:none; font-weight:500}
.amlc-advent .feedback.on{display:block}
.amlc-advent .feedback strong{display:block; font-size:19px; margin-bottom:2px}
.amlc-advent .feedback.good strong{color:var(--ok)} .amlc-advent .feedback.bad strong{color:var(--bad)}
.amlc-advent .actions{display:flex; justify-content:flex-end; gap:10px; padding-top:4px}
.amlc-advent .btn{font:inherit; font-weight:700; border:0; border-radius:12px; padding:12px 20px; min-height:46px; cursor:pointer; background:#131c7c; color:#fff}
.amlc-advent .btn:focus-visible{outline:3px solid var(--mint); outline-offset:2px}

.amlc-advent .toast{position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%) translateY(20px); background:#e5f4f4; color:#131c7c; font-weight:600; padding:12px 18px; border-radius:12px; opacity:0; transition:opacity .25s, transform .25s; pointer-events:none; box-shadow:0 10px 30px rgba(0,0,0,.35); max-width:calc(100vw - 32px)}
.amlc-advent .toast.on{opacity:1; transform:translateX(-50%) translateY(0)}
.amlc-advent .shake{animation:amlc-shake .4s}
@keyframes amlc-shake{20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}}

.amlc-advent footer{margin-top:30px; display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; justify-content:space-between; font-size:15px; opacity:.9}
.amlc-advent footer button{font:inherit; color:var(--text-on-bg); background:transparent; border:2px solid rgba(255,255,255,.35); border-radius:10px; padding:8px 14px; cursor:pointer; min-height:44px}
.amlc-advent .ai{font-size:13px; opacity:.7}
.amlc-advent .done{display:none; background:#72c7b1; color:#131c7c; border-radius:16px; padding:18px 20px; margin-top:22px}
.amlc-advent .done.on{display:block}
.amlc-advent .done h3{margin:0 0 4px; font-size:24px}

@media (max-width:760px){
  .amlc-advent .grid{grid-template-columns:repeat(3,1fr); grid-auto-rows:104px; gap:10px}
  .amlc-advent .num{font-size:36px} .amlc-advent .h2 .num{font-size:64px}
  .amlc-advent .brand img{height:36px}
}
@media (prefers-reduced-motion:reduce){ .amlc-advent .front,.amlc-advent .bar span,.amlc-advent .toast{transition:none} .amlc-advent .shake{animation:none} }

/* playful motion */
.amlc-advent .snow{position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:0}
.amlc-advent .snow i{position:absolute; top:-12px; border-radius:50%; background:#fff; opacity:.75; animation:amlc-fall linear infinite}
.amlc-advent .snow i.m{background:#72c7b1}
@keyframes amlc-fall{0%{transform:translate3d(0,-2vh,0)}50%{transform:translate3d(18px,50vh,0)}100%{transform:translate3d(-12px,105vh,0)}}
.amlc-advent .wrap{position:relative; z-index:1}
.amlc-advent .door:not(.open):hover .front, .amlc-advent .door:not(.open):focus-visible .front{transform:translateY(-5px) rotate(-1.5deg)}
.amlc-advent .door.today .front{animation:amlc-wiggle 2.4s ease-in-out infinite}
.amlc-advent .door.today::before{content:""; position:absolute; inset:-5px; border-radius:18px; border:3px solid #72c7b1; animation:amlc-ring 2s ease-in-out infinite}
@keyframes amlc-wiggle{0%,70%,100%{transform:rotate(0)}76%{transform:rotate(-3deg)}82%{transform:rotate(3deg)}88%{transform:rotate(-2deg)}94%{transform:rotate(1deg)}}
@keyframes amlc-ring{0%,100%{opacity:.35; transform:scale(1)}50%{opacity:1; transform:scale(1.03)}}
.amlc-advent .door .bow{position:absolute; top:-10px; left:50%; width:34px; height:20px; transform:translateX(-50%); z-index:2; display:none}
.amlc-advent .door.today .bow{display:block}
.amlc-advent .door.open .bow{display:none}
.amlc-advent .door.open .inside{animation:amlc-pop .5s cubic-bezier(.3,1.6,.5,1) both}
@keyframes amlc-pop{0%{transform:scale(.92)}100%{transform:scale(1)}}
.amlc-advent h1 .ribbon{display:inline-block; animation:amlc-float 4s ease-in-out infinite}
@keyframes amlc-float{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-6px) rotate(1deg)}}
.amlc-advent dialog[open]{animation:amlc-dlgIn .35s cubic-bezier(.3,1.4,.5,1)}
@keyframes amlc-dlgIn{0%{transform:scale(.85) translateY(20px); opacity:0}100%{transform:none; opacity:1}}
.amlc-advent .card.nope{animation:amlc-shake .4s}
.amlc-advent .confetti{position:fixed; inset:0; pointer-events:none; overflow:visible}
.amlc-advent .confetti b{position:fixed; width:10px; height:14px; border-radius:2px}
@media (prefers-reduced-motion:reduce){
  .amlc-advent .snow{display:none} .amlc-advent .door.today .front, .amlc-advent .door.today::before, .amlc-advent h1 .ribbon, .amlc-advent dialog[open], .amlc-advent .door.open .inside{animation:none}
  .amlc-advent .door:not(.open):hover .front{transform:none}
}

.amlc-advent .hero{display:grid; grid-template-columns:1fr 290px; gap:24px; align-items:center}
.amlc-advent .hero-tree{position:relative; width:290px; justify-self:end}
.amlc-advent .hero-tree svg{display:block; width:100%; height:auto; overflow:visible}
.amlc-advent .tree-note{margin:4px 0 0; font-size:14px; text-align:center; opacity:.85}
.amlc-advent .topper{filter:drop-shadow(0 0 10px rgba(190,230,217,.9))}
.amlc-advent .strings path{fill:none; stroke:#e5f4f4; stroke-width:4; stroke-linecap:round; stroke-dasharray:0 13; opacity:.55; animation:amlc-twinkle 4s linear infinite}
.amlc-advent .strings path:nth-child(2n){animation-duration:5.5s; opacity:.4}
@keyframes amlc-twinkle{to{stroke-dashoffset:-26}}
.amlc-advent .orn{transition:fill .4s, opacity .4s}
.amlc-advent .orn.off{fill:none; stroke:rgba(229,244,244,.35); stroke-width:1.5}
.amlc-advent .orn.on{stroke:none; animation:amlc-glow 3s ease-in-out infinite; filter:drop-shadow(0 0 6px rgba(229,244,244,.85))}
@keyframes amlc-glow{0%,100%{opacity:1}50%{opacity:.72}}
@media (max-width:760px){
  .amlc-advent .hero{grid-template-columns:1fr}
  .amlc-advent .hero-tree{width:190px; justify-self:center}
}
@media (prefers-reduced-motion:reduce){ .amlc-advent .strings path, .amlc-advent .orn.on{animation:none} }

.amlc-advent .forest{ margin-top:4px }
.amlc-advent .forest svg{ display:block; width:100%; max-width:640px; margin:0 auto; height:auto; overflow:visible }
.amlc-advent .forest .tree-note{ margin:6px 0 0; font-size:14px; text-align:center; opacity:.85 }
.amlc-advent .orn.off{ fill:none; stroke:rgba(229,244,244,.35); stroke-width:1.5 }
.amlc-advent .orn.on{ filter:drop-shadow(0 0 6px rgba(255,59,47,.95)) drop-shadow(0 0 12px rgba(255,107,94,.7)) }
.amlc-advent .garland{ filter:drop-shadow(0 0 5px rgba(255,59,47,.9)); animation:amlc-garl 3s ease-in-out infinite }
@keyframes amlc-garl{0%,100%{opacity:1}50%{opacity:.75}}
@media (prefers-reduced-motion:reduce){ .amlc-advent .garland{animation:none} }
.amlc-advent .sparkle{ transform-box:fill-box; transform-origin:center; animation:amlc-spark 3.2s ease-in-out infinite }
@keyframes amlc-spark{0%,100%{opacity:.15; transform:scale(.4)}50%{opacity:1; transform:scale(1)}}
.amlc-advent .shine{ animation:amlc-sheen 6s ease-in-out infinite }
@keyframes amlc-sheen{0%,100%{opacity:.25}50%{opacity:.55}}
@media (prefers-reduced-motion:reduce){ .amlc-advent .sparkle,.amlc-advent .shine{animation:none} }

.amlc-advent .topper-btn{cursor:pointer; transform-box:fill-box; transform-origin:center; transition:transform .35s cubic-bezier(.3,1.5,.5,1); outline:none}
.amlc-advent .topper-btn:hover{transform:scale(1.08)}
.amlc-advent .topper-btn.spin{animation:amlc-symspin 1.1s cubic-bezier(.3,1.3,.5,1)}
@keyframes amlc-symspin{0%{transform:rotate(0) scale(1.15)}100%{transform:rotate(360deg) scale(1)}}
.amlc-advent .topper-btn:focus-visible .plate{stroke:#72c7b1; stroke-width:3}
.amlc-advent .sym-spin{transform-box:fill-box; transform-origin:center}
.amlc-advent .sym-pulse{transform-box:fill-box; transform-origin:center; animation:amlc-sympulse 5s ease-in-out infinite}
@keyframes amlc-sympulse{0%,100%{transform:scale(.88)}50%{transform:scale(1.12)}}
@media (prefers-reduced-motion:reduce){ .amlc-advent .sym-spin,.amlc-advent .sym-pulse{animation:none} }
.amlc-advent .sym-shine{animation:amlc-shimmer 3.2s ease-in-out infinite}
@keyframes amlc-shimmer{0%{transform:translateX(-30px) skewX(-20deg)}60%,100%{transform:translateX(190px) skewX(-20deg)}}
.amlc-advent .sym-glint{transform-box:fill-box; transform-origin:center; animation:amlc-spark 2.6s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){ .amlc-advent .sym-shine,.amlc-advent .sym-glint,.amlc-advent .topper-btn.spin{animation:none} .amlc-advent .topper-btn:hover{transform:none} }

/* red baubles */
.amlc-advent #tree .tip{ transform-box:fill-box; transform-origin:center; filter:drop-shadow(0 0 3px #ff2a1f) drop-shadow(0 0 9px #ff2a1f) drop-shadow(0 0 16px rgba(255,90,77,.9)); animation:amlc-flare 1.9s ease-in-out infinite }
@media (prefers-reduced-motion:reduce){ .amlc-advent #tree .tip{ animation:none } }
.amlc-advent #tree .orn{ transform-box:fill-box; transform-origin:center; stroke:none }
.amlc-advent #tree .orn.off{ opacity:.7; animation:amlc-bulb 2.6s ease-in-out infinite; filter:drop-shadow(0 0 3px rgba(255,255,255,.95)) drop-shadow(0 0 7px rgba(229,244,244,.7)) }
.amlc-advent #tree .orn.on{ opacity:1; animation:amlc-flare 1.6s ease-in-out infinite; filter:drop-shadow(0 0 3px #ff2a1f) drop-shadow(0 0 9px #ff2a1f) drop-shadow(0 0 18px rgba(255,90,77,.95)) }
@keyframes amlc-bulb{0%,100%{opacity:.45; transform:scale(.92)}50%{opacity:.95; transform:scale(1.08)}}
@keyframes amlc-flare{0%,100%{transform:scale(1); opacity:.85}50%{transform:scale(1.4); opacity:1}}
@media (prefers-reduced-motion:reduce){ .amlc-advent #tree .orn.off, .amlc-advent #tree .orn.on{ animation:none } }
/* ===== fit the whole calendar on a desktop screen ===== */
@media (min-width:1000px){
  .amlc-advent .wrap{ max-width:1320px; padding:18px 28px 12px }
  .amlc-advent header{ display:grid; grid-template-columns:minmax(0,1fr) 500px; grid-template-areas:"brand forest" "title forest" "lede forest" "stats forest" "review forest"; column-gap:36px; row-gap:10px; align-items:start; margin-bottom:14px }
  .amlc-advent .brand{ grid-area:brand } .amlc-advent header h1{ grid-area:title; font-size:clamp(32px,3.2vw,48px); max-width:none }
  .amlc-advent .lede{ grid-area:lede; font-size:16px; max-width:52ch }
  .amlc-advent .stats{ grid-area:stats; font-size:15px } .amlc-advent .review{ grid-area:review; padding:6px 12px; font-size:14px }
  .amlc-advent .forest{ grid-area:forest; align-self:center; margin-top:0 }
  .amlc-advent .forest svg{ max-width:500px }
  .amlc-advent .forest .tree-note{ font-size:12px; margin-top:2px }
  .amlc-advent .brand img{ height:38px }
  .amlc-advent .grid{ grid-template-columns:repeat(9,1fr); grid-auto-rows:clamp(60px, calc((100vh - 360px) / 4), 128px); gap:10px }
  .amlc-advent .num{ font-size:clamp(26px, 3.2vh, 40px) } .amlc-advent .h2 .num{ font-size:clamp(48px, 7vh, 80px) }
  .amlc-advent .inside .t{ font-size:13px } .amlc-advent .inside .row{ font-size:12px }
  .amlc-advent footer{ margin-top:10px; font-size:13px } .amlc-advent footer button{ min-height:36px; padding:6px 12px }
}

/* ===== WordPress integration additions (not in the reference) ===== */
/* Footer and exit CTA. "Pradėti iš naujo" on the left, the sentence and the credit (.ai) centred, the
   exit CTA (#adventExit) on the right, in the normal flow under the calendar (never fixed), so it is
   also the last control in the tab order. The reference footer's .9 opacity moves to the text and the
   reset button, so the CTA keeps its full colour. The credit overrides the reference .ai rule: smaller
   and a little less prominent than the sentence, but still readable.
   Below 1000px (the reference's wrapping flex footer): the two lines are centred on top, the buttons
   share the row below (reset left, CTA right). Where they do not fit side by side (narrow phones, or
   while the reset button shows its longer confirmation), the CTA wraps to its own row on the right. */
.amlc-advent footer{gap:4px 10px; opacity:1}
.amlc-advent footer > span:first-child, .amlc-advent footer .ai{flex:0 0 100%; text-align:center}
.amlc-advent footer > span:first-child{opacity:.9}
.amlc-advent footer .ai{font-size:10px; opacity:.7; margin-top:16px}
.amlc-advent footer #reset{margin-top:10px; opacity:.9}
.amlc-advent .site-link{margin:10px 0 0 auto; display:inline-flex; align-items:center; font:inherit; font-size:15px; font-weight:700; line-height:1.2; color:#131c7c; text-decoration:none; background:#72c7b1; border:2px solid #72c7b1; border-radius:12px; padding:8px 16px; min-height:44px; white-space:nowrap; transition:background-color .15s, border-color .15s}
.amlc-advent .site-link:hover{text-decoration:none; background:#bee6d9; border-color:#bee6d9}
.amlc-advent .site-link:focus-visible{outline:3px solid #ffffff; outline-offset:3px}
@media (max-width:760px){
  .amlc-advent .site-link{ font-size:14px; padding:8px 14px }

  .amlc-advent footer #reset,
  .amlc-advent .site-link{ margin-top:20px }
}
/* Desktop: a two-row grid (reset | sentence over credit | CTA). The two lines slightly overlap the 36px
   button row (negative margins, mostly empty line spacing), so the footer stays 36px high and the
   calendar still fits one screen. */
@media (min-width:1000px){
  .amlc-advent footer{ display:grid; grid-template-columns:1fr auto 1fr; grid-template-areas:"reset text exit" "reset ai exit"; align-items:center; gap:2px 20px; line-height:1.25 }
  .amlc-advent footer > span:first-child{ grid-area:text; align-self:end; margin-top:-3px }
  .amlc-advent footer .ai{ grid-area:ai; align-self:start; margin-top:11px; margin-bottom:-2.75px }
  .amlc-advent footer #reset{ grid-area:reset; justify-self:start; margin-top:0 }
  .amlc-advent .site-link{ grid-area:exit; justify-self:end; margin:0; font-size:14px; min-height:36px; padding:6px 14px }
}
/* Test-date badge ("TESTAS: YYYY-MM-DD"). advent.js adds it only when the server confirms a test date
   (administrator QA, or AMLC_ADVENT_SIMULATION on a test site). Fixed, so it moves nothing. */
.amlc-advent .test-badge{position:fixed; top:calc(8px + env(safe-area-inset-top,0px)); left:50%; transform:translateX(-50%); z-index:50; background:#ff2a1f; color:#ffffff; font-size:13px; font-weight:800; line-height:1.2; letter-spacing:.04em; padding:6px 12px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.35); pointer-events:none; white-space:nowrap}
/* Phones: a little higher and smaller, so the badge does not cover the logo at scroll top. Only the
   badge changes, so the layout stays exactly what visitors see. */
@media (max-width:760px){
  .amlc-advent .test-badge{ top:calc(4px + env(safe-area-inset-top,0px)); padding:4px 10px; font-size:12px }
}
/* No element uses the .review, .lock or .shake rules above (the reference's review mode and locked
   doors are not used); they are kept so the reference CSS and the approved desktop grid stay identical. */

/* ===== Approved design corrections to the reference ===== */
/* Logo: logo-text.svg (the text-only logo). Height only; the width follows the SVG's proportions. */
.amlc-advent .brand img{height:28px; width:auto}
@media (max-width:760px){ .amlc-advent .brand img{height:28px} }
/* Below 1000px the X (44px on phones, 38px on tablets) is taller than the logo, so it alone would set
   the height of the logo row and push the heading away from the logo. The X keeps its size and place
   (phones: centred on the logo row; tablets: top-aligned with the logo), and a negative margin pulls
   the heading up by the extra height. */
@media (max-width:760px){ .amlc-advent .brand{ margin-bottom:-9.25px } }
@media (min-width:761px) and (max-width:999px){
  .amlc-advent .brand img{ align-self:flex-start }
  .amlc-advent .brand{ margin-bottom:-16px }
}
/* Narrow desktop (1000-1099px): the intro wraps to three lines and the header already uses the full
   height of the tree, so a smaller logo and tighter header rows keep the calendar on one screen
   (e.g. 1024x768). */
@media (min-width:1000px) and (max-width:1099px){
  .amlc-advent .brand img{ height:26px }
  .amlc-advent header{ row-gap:7px }
}
/* Desktop (>= 1000px): more space between the logo and the heading, without making the page taller
   than one screen:
   - The header grid's "review" row is empty, but the row gap next to it would still add height
     wherever the text column is taller than the tree, so the progress row (.stats) overlaps that gap
     with a negative margin. Keep the empty row in the grid template: where the tree is taller, it
     takes up the extra header height, which would otherwise be spread over the text rows.
   - At 1000-1109px the text column can be taller than the tree (a two-line heading, a wrapped
     progress row), so the door-row formula uses 380px instead of the reference's 360px. From 1110px
     the doors are unchanged.
   - The tree caption sits in the empty floor area at the bottom of the tree drawing, so the tree
     column, and the header wherever the tree sets its height, is 14px shorter. The footer keeps 20px
     below the doors. */
@media (min-width:1000px){
  .amlc-advent .brand{ margin-bottom:8px }
  .amlc-advent .stats{ margin-bottom:-10px }
  .amlc-advent .forest .tree-note{ margin-top:-12px }
  .amlc-advent footer{ margin-top:20px }
}
@media (min-width:1000px) and (max-width:1099px){
  .amlc-advent .brand{ margin-bottom:6px }
  .amlc-advent .stats{ margin-bottom:-7px }
}
@media (min-width:1000px) and (max-width:1109px){
  .amlc-advent .grid{ grid-auto-rows:clamp(60px, calc((100vh - 380px) / 4), 128px) }
}
/* Desktop from 1100px: the intro is wide enough for two lines, and the progress row sits at the bottom
   of the text column (the empty "review" row moves above it). It therefore keeps the same distance
   from the doors whatever the heading and intro heights: 17.23px plus the header's 14px bottom
   margin. Its negative top margin cancels the extra row gap. */
@media (min-width:1100px){
  .amlc-advent header{ grid-template-areas:"brand forest" "title forest" "lede forest" "review forest" "stats forest" }
  .amlc-advent .lede{ max-width:58ch }
  .amlc-advent .stats{ margin:-10px 0 17.23px }
}

/* Tree-top symbol: static. Its fine lines showed moiré while it was scaled, so it is never pulsed,
   zoomed or spun. Click/Enter/Space still give a tip and the particle burst. */
.amlc-advent .sym-pulse{animation:none; transform:none}
.amlc-advent .topper-btn:hover{transform:none}
.amlc-advent .topper-btn.spin{animation:none}

/* Dialog close button (.btn): visible in both colour schemes, with clear hover and focus states.
   Light scheme: navy button on the white card, lighter navy on hover, mint-ink focus ring.
   Dark scheme (the card is dark blue): light button with navy text, mint on hover and focus. */
.amlc-advent .btn{transition:background-color .15s, color .15s}
.amlc-advent .btn:hover{background:#394893}
.amlc-advent .btn:focus-visible{outline:3px solid #2b8a71; outline-offset:3px}
@media (prefers-color-scheme: dark){
  html.amlc-advent-html:not([data-theme="light"]) .amlc-advent .btn{background:#e5f4f4; color:#131c7c}
  html.amlc-advent-html:not([data-theme="light"]) .amlc-advent .btn:hover{background:#72c7b1}
  html.amlc-advent-html:not([data-theme="light"]) .amlc-advent .btn:focus-visible{outline-color:#72c7b1}
}
html.amlc-advent-html[data-theme="dark"] .amlc-advent .btn{background:#e5f4f4; color:#131c7c}
html.amlc-advent-html[data-theme="dark"] .amlc-advent .btn:hover{background:#72c7b1}
html.amlc-advent-html[data-theme="dark"] .amlc-advent .btn:focus-visible{outline-color:#72c7b1}

/* Leaving the page (advent.js "WP leave"): the whole surface fades out as one, so the animated,
   filtered tree layers cannot break up into white blocks while the browser unloads the page.
   .is-leaving fades it; .is-left hides it completely. .is-bare hides the decorative layers on their
   own (the tree SVG and the snow) and stays while only the page content is shown again after a
   cancelled navigation, so a page that is still loading the next one never draws those layers again.
   visibility keeps their space, so nothing moves. The dialog lives in the top layer, so it is faded
   explicitly. Reduced motion: hidden at once, no fade. */
.amlc-advent{transition:opacity .15s ease-out}
.amlc-advent.is-leaving, .amlc-advent.is-leaving dialog, .amlc-advent.is-leaving dialog::backdrop{opacity:0}
.amlc-advent.is-left{visibility:hidden}
.amlc-advent.is-bare #tree, .amlc-advent.is-bare .snow{visibility:hidden}
.amlc-advent dialog{transition:opacity .15s ease-out}
@media (prefers-reduced-motion:reduce){ .amlc-advent, .amlc-advent dialog{transition:none} }

/* Tip toast: above all page content in .wrap (z-index:1), below the TESTAS badge (50); an open dialog
   (top layer) still covers it. */
.amlc-advent .toast{z-index:45}
@media (max-width:760px){ .amlc-advent .toast{bottom:calc(68px + env(safe-area-inset-bottom,0px))} }

/* Dialog number tile: light mint, so it stands out from the dark-blue card (number contrast about
   10.4:1), in both colour schemes. */
.amlc-advent .badge{background:#c6e4da; color:#131c7c}

/* Exit X (#adventExitTop): a secondary exit with the same target and accessible name as the footer
   CTA, which remains the main exit (advent.js gives both the campaign return path and the fade-out).
   Never fixed, so it scrolls with the page and stays clear of the fixed TESTAS badge.
   - Phones (<= 760px): 44px, at the right end of the logo row, centred on it. Where the logo and the X
     do not fit side by side, the X takes its own row above the logo, still on the right.
   - Tablets (761-999px): 38px, at the right end of the logo row, top-aligned with the logo.
   - Desktop (>= 1000px): 38px, in the header's top right corner (above the tree's empty sky),
     top-aligned with the logo. Absolutely positioned, so it takes no layout space.
   The logo's artwork starts at the very top of its SVG, so aligning the boxes aligns the visible edges. */
.amlc-advent .site-x{display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:38px; height:38px; margin-left:auto; border-radius:50%; color:#ffffff; background:transparent; border:2px solid rgba(255,255,255,.35); text-decoration:none; transition:background-color .15s, border-color .15s, color .15s}
.amlc-advent .site-x svg{display:block; width:16px; height:16px}
.amlc-advent .site-x:hover{background:#72c7b1; border-color:#72c7b1; color:#131c7c}
.amlc-advent .site-x:focus-visible{outline:3px solid #ffffff; outline-offset:3px}
@media (max-width:760px){
  .amlc-advent .brand{ flex-wrap:wrap-reverse; column-gap:8px; row-gap:4px }
  .amlc-advent .site-x{ width:44px; height:44px }
  .amlc-advent .site-x svg{ width:18px; height:18px }
}
@media (min-width:761px) and (max-width:999px){
  .amlc-advent .site-x{ align-self:flex-start }
}
@media (min-width:1000px){
  .amlc-advent header{ position:relative }
  .amlc-advent .site-x{ position:absolute; top:0; right:0; z-index:2; margin:0 }
}

@media (max-width:760px){
  .amlc-advent .wrap{ padding-top:12px }
}

/* Calendar preloader (#adventLoading, advent.js "WP load"). It is in the template markup, so it shows
   from the first paint, before any script runs; advent.js replaces it with the doors. It spans all
   columns and as many rows as the doors use (4 on desktop, 6 on tablets, 12 on phones), so nothing
   moves when the doors appear. It is not an overlay: the header and both exit links stay usable.
   - Desktop: centred in the calendar area. Below 1000px the area is taller than the screen, so the
     indicator sits near its top and is sticky while the area is scrolled.
   - Failure: after 12 s, without any script, the text becomes a failure message with a reload link.
     advent.js shows it at once if its first render throws (.is-failed), and the advent.js tag's onerror
     does the same if the file cannot be loaded (html.amlc-advent-failed). Late doors still replace it.
   - Without JavaScript, a <noscript> rule in the template's <head> hides both texts.
   - role="status": the loading text is read in place; only the change to the failure message is
     announced. */
.amlc-advent .loading{grid-column:1 / -1; grid-row:span 6; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:36px 16px 0; text-align:center; color:var(--text-on-bg)}
@media (max-width:760px){ .amlc-advent .loading{ grid-row:span 12; padding-top:28px } }
@media (min-width:1000px){ .amlc-advent .loading{ grid-row:span 4; justify-content:center; padding-top:0 } }
.amlc-advent .loading-box{position:sticky; top:calc(50vh - 28px); display:grid; justify-items:center; max-width:100%}
.amlc-advent .loading-box > *{grid-area:1 / 1}
.amlc-advent .loading p{margin:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px 14px; font-size:15px; font-weight:500; line-height:1.35}
.amlc-advent .loading-now{opacity:.9}
.amlc-advent .spinner{display:block; width:22px; height:22px; flex:0 0 auto; border-radius:50%; border:3px solid rgba(255,255,255,.2); border-top-color:#72c7b1; animation:amlc-spin .9s linear infinite}
@keyframes amlc-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .amlc-advent .spinner{ animation:none } }
.amlc-advent .loading-retry{display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border-radius:10px; border:2px solid rgba(255,255,255,.35); color:var(--text-on-bg); font-weight:700; text-decoration:none; transition:background-color .15s, border-color .15s, color .15s}
.amlc-advent .loading-retry:hover{background:#72c7b1; border-color:#72c7b1; color:#131c7c}
.amlc-advent .loading-retry:focus-visible{outline:3px solid #ffffff; outline-offset:3px}
/* The 12 s fallback: visibility switches by a 0s animation with a delay (not motion, so reduced motion
   keeps it). */
.amlc-advent .loading-now{animation:amlc-late-hide 0s 12s forwards}
.amlc-advent .loading-fail{visibility:hidden; animation:amlc-late-show 0s 12s forwards}
@keyframes amlc-late-hide{to{visibility:hidden}}
@keyframes amlc-late-show{to{visibility:visible}}
.amlc-advent .loading.is-failed .loading-now, html.amlc-advent-failed .amlc-advent .loading-now{visibility:hidden; animation:none}
.amlc-advent .loading.is-failed .loading-fail, html.amlc-advent-failed .amlc-advent .loading-fail{visibility:visible; animation:none}