/* Seasonal decoration only. The site's navbar and original layout retain their own styles. */
#home .hero-bg::after {
  content: "";
  position: absolute;
  inset: -180px 0 0;
  pointer-events: none;
  opacity: .7;
  background-image:
    radial-gradient(circle at 24px 27px, #eef6ff 1.4px, transparent 2.3px),
    radial-gradient(circle at 126px 72px, #eef6ff 1.7px, transparent 2.7px),
    radial-gradient(circle at 71px 133px, #d8e9ff 1.1px, transparent 2px),
    radial-gradient(circle at 153px 155px, #f2f7ff 1.2px, transparent 2.3px);
  background-size: 180px 180px;
  animation: cspa-seasonal-snow 13s linear infinite;
}
@keyframes cspa-seasonal-snow {
  to { transform: translateY(180px); }
}
#home .cspa-seasonal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ca9e67;
  color: #ffe2b5;
  background: #12131a;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
#home .cspa-seasonal-link:hover {
  border-color: #ffe2b5;
  background: #282019;
  transform: none;
}
#home .cspa-seasonal-link:focus-visible,
.cspa-game .cspa-seasonal-return:focus-visible {
  outline: 2px solid #ffe2b5;
  outline-offset: 3px;
}
.cspa-game .cspa-site-return,
.cspa-game .cspa-seasonal-return {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: .4rem .65rem;
  border: 1px solid #698099;
  border-radius: 8px;
  background: #182639;
  color: #f6efe1;
  text-decoration: none;
}
.cspa-game .cspa-site-return:hover,
.cspa-game .cspa-seasonal-return:hover {
  background: #263a52;
  text-decoration: none;
}
.cspa-game #panelTitle[tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  #home .hero-bg::after { animation: none; }
}

/* The challenge has its own real link so the original page router stays intact. */
#navbar .cspa-challenge-nav,
#mobileMenu .cspa-challenge-nav { white-space: nowrap; }
#navbar .cspa-challenge-nav:focus-visible,
#mobileMenu .cspa-challenge-nav:focus-visible {
  outline: 2px solid #ffe2b5;
  outline-offset: 4px;
}
@media (min-width: 1081px) and (max-width: 1240px) {
  #navbar .nav-links { gap: clamp(.85rem, 1.6vw, 1.3rem); }
}
#home .hero-inner { row-gap: clamp(.9rem, 2.4vw, 1.8rem); }
#home .cspa-hero-actions {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: repeat(4, max-content);
  gap: clamp(.45rem, 1.35vw, 1rem) !important;
  align-items: stretch;
  justify-content: start;
}
#home .cspa-hero-actions > :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-height: 46px;
  max-width: 100%;
  padding: .62rem clamp(.68rem, 1.8vw, 1.65rem);
  text-align: center;
  line-height: 1.2;
}
@media (min-width: 821px) {
  #home .cspa-hero-actions > :is(button, a) { white-space: nowrap; }
}
@media (min-width: 681px) and (max-width: 820px) {
  #home .cspa-hero-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: center;
  }
}
@media (max-width: 680px) {
  #home .cspa-hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 32rem;
    margin-inline: auto;
  }
  #home .cspa-hero-actions > :is(button, a) {
    min-width: 0;
    padding: .58rem .28rem;
    font-size: clamp(.71rem, 3vw, .84rem);
    letter-spacing: .055em;
    white-space: normal;
  }
}
@media (max-width: 820px) {
  #home .cspa-hero-actions { grid-row: 2; }
}

/* Touch targets and scrollable dialogs for play on compact screens. */
@media (pointer: coarse) {
  .cspa-game .head-actions button,
  .cspa-game #panel button { min-height: 44px; }
  .cspa-game .head-actions button { min-width: 44px; }
  .cspa-game #panel .choices label,
  .cspa-game #panel label.choice { min-height: 44px; }
  .cspa-game #panel input:not([type=radio]) { font-size: 16px; }
  .cspa-game #panel .evidence { overscroll-behavior-inline: contain; }
  .cspa-game .stage-actions { right: max(.68rem, env(safe-area-inset-right)); }
  .cspa-game #touchPad { left: max(1rem, env(safe-area-inset-left)); }
}

/* Seasonal details are behind the content and ignore all pointer input. */
#home .hero { isolation: isolate; }
#home .hero-inner { position: relative; z-index: 2; }
#home .hero-grid,
#home .hero-emblem::before,
#home .hero-emblem::after,
#home .hero-emblem .scan-ring,
#home .hero-emblem .scan-line { display: none !important; }
#home .hero-logo-image {
  animation: none !important;
  transform: none !important;
  filter: none !important;
  -webkit-box-reflect: none;
}
#home .hero-pillar:hover,
#home .hero-btns > :is(button, a):hover { transform: none; }
.cspa-holiday-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.cspa-holiday-lights {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 23px;
  border-top: 1px solid #765f43;
}
.cspa-holiday-lights i {
  --bulb: hsl(var(--bulb-hue) 90% 72%);
  position: absolute;
  top: 4px;
  left: calc((var(--bulb-column) + .5) * 100% / 17);
  width: 6px;
  height: 9px;
  border-radius: 60%;
  background: var(--bulb);
  box-shadow: 0 0 10px var(--bulb);
  animation: cspa-holiday-twinkle 3.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--bulb-column) * -.31s);
}
@keyframes cspa-holiday-twinkle {
  from { opacity: .43; }
  to { opacity: 1; }
}
.cspa-holiday-trees {
  position: absolute;
  right: max(2vw, calc((100vw - 1440px) / 2));
  bottom: 1.4rem;
  width: clamp(110px, 17vw, 235px);
  height: clamp(65px, 11vw, 150px);
}
.cspa-holiday-trees i {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 38%;
  height: 74%;
  background: linear-gradient(165deg, #adceb6 8%, #38715c 36%, #153c32 76%);
  clip-path: polygon(50% 0, 73% 39%, 64% 39%, 88% 66%, 76% 66%, 100% 91%, 56% 91%, 56% 100%, 44% 100%, 44% 91%, 0 91%, 24% 66%, 12% 66%, 36% 39%, 27% 39%);
  opacity: .65;
}
.cspa-holiday-trees i:nth-child(2) {
  left: 29%;
  height: 100%;
  width: 46%;
  background: radial-gradient(circle at 49% 36%, #ffe9a1 1px, transparent 3px),
    radial-gradient(circle at 33% 65%, #ff9b8e 1px, transparent 3px),
    radial-gradient(circle at 62% 74%, #ffdf83 1px, transparent 3px),
    radial-gradient(circle at 68% 55%, #ffebba 1px, transparent 3px),
    linear-gradient(165deg, #9fcaaf 5%, #3d7b5a 47%, #1c4939 92%);
  opacity: .86;
}
.cspa-holiday-trees i:nth-child(3) { left: 68%; width: 32%; height: 70%; }
@media (max-width: 820px) {
  .cspa-holiday-trees { bottom: .8rem; right: .7rem; opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .cspa-holiday-lights i { animation: none; }
}
#home.page.active,
#home .hero-visual,
#home .hero-visual.reveal {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
