@font-face {
  font-family: "Zapus Sans";
  src: url("assets/zapus-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Rainsuit;
  src: url("assets/rainsuit.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #fdfdfd;
  --ink: #191b2f;
  --muted: #50596c;
  --outline: #84a2be;
  --line: #d3e1ed;
  --frost: #edf5fb;
  --body-font: Inter, "Segoe UI", sans-serif;
  --heading-font: "Zapus Sans", Inter, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  --grid-cell: clamp(34px, 4.25vw, 62px);
  --grid-line: clamp(1px, .12vw, 1.75px);
  --grid-color: #dcdcdc;
  min-height: 100vh;
  margin: 0;
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(to right, var(--grid-color) 0 var(--grid-line), transparent var(--grid-line) var(--grid-cell)),
    repeating-linear-gradient(to bottom, var(--grid-color) 0 var(--grid-line), transparent var(--grid-line) var(--grid-cell));
  color: var(--ink);
  font: 1rem/1.55 var(--body-font);
}
button { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #537799; outline-offset: 4px; }
.shell { width: min(100% - 48px, 1064px); margin-inline: auto; }

.site-header { padding: clamp(16px, 2.5vw, 36px) 16px 0; }
.site-header--landing { position: absolute; z-index: 10; inset: 0 0 auto; }
.site-nav {
  display: grid;
  grid-template-columns: 105fr 105fr 134fr 134fr;
  gap: clamp(10px, 1.39vw, 20px);
  align-items: center;
  width: min(100%, 640px);
  min-height: 56px;
  margin-inline: auto;
  padding-inline: clamp(15px, 3.47vw, 50px);
  border: 1px solid var(--outline);
  border-radius: 30px;
  background: var(--surface);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
}
.site-nav > * {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav [aria-disabled] { color: var(--muted); }
.site-nav a:is(:hover, [aria-current]) { text-decoration: underline; text-underline-offset: 4px; }

.landing {
  /* Keep the copy and tree at their design size on wider screens. */
  --scene-unit: min(0.069444444cqw, 1px);
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-height: 1084px;
  aspect-ratio: 1440 / 1084;
  overflow: hidden;
}
.landing-snow, .landing-tree { pointer-events: none; }
.falling-snow {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.landing-copy {
  position: absolute;
  z-index: 5;
  inset: calc(223 * var(--scene-unit)) 0 auto;
  text-align: center;
}
.landing-copy h1 {
  margin: 0;
  font: 700 calc(100 * var(--scene-unit))/1 var(--heading-font);
  letter-spacing: -.02em;
}
.landing-intro {
  width: calc(470 * var(--scene-unit));
  margin: 0 auto;
  color: #303239;
  opacity: .8;
  font: 500 calc(20 * var(--scene-unit))/1 Rainsuit, var(--body-font);
  letter-spacing: -.02em;
}
.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: calc(27 * var(--scene-unit));
  padding: calc(20 * var(--scene-unit));
  border: 1px solid var(--outline);
  border-radius: 30px;
  font: 700 calc(20 * var(--scene-unit))/1 var(--heading-font);
  letter-spacing: -.02em;
  text-decoration: none;
}
.landing-button:hover { background: var(--frost); }
.landing-snow {
  position: absolute;
  z-index: 3;
  left: -4.861111%;
  top: calc(695 * var(--scene-unit));
  width: 106.944444%;
  height: calc(388 * var(--scene-unit));
  overflow: hidden;
}
.landing-snow img {
  position: absolute;
  inset: -120.84% auto auto 0;
  max-width: none;
  width: 100%;
  height: 223.38%;
}
.landing-tree {
  position: absolute;
  z-index: 4;
  left: calc(max(0px, 50% - 720px) + var(--left) * var(--scene-unit));
  top: calc(var(--top) * var(--scene-unit));
  width: calc(var(--width) * var(--scene-unit));
  height: calc(var(--height) * var(--scene-unit));
  object-fit: cover;
}

.calendar { margin-block: clamp(46px, 6vw, 80px) 64px; scroll-margin-top: 26px; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 {
  margin: 0;
  font: 700 clamp(1.6rem, 3.5vw, 2.55rem)/1.12 var(--heading-font);
  letter-spacing: -.025em;
  text-transform: lowercase;
}
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, .8vw, 10px);
  aspect-ratio: 274.571 / 395.2;
  padding: 7.3% 3.64%;
  border: 1px solid #eaded7;
  border-radius: 20px;
  background: linear-gradient(rgb(242 226 214 / .42), rgb(242 226 214 / .42)),
    #f2e2d6 url("assets/card-01-paper.jpg") center / cover;
  color: #6c352e;
  text-decoration: none;
  overflow: hidden;
  container-type: inline-size;
}
a.card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:is(:hover, :focus-visible) {
  z-index: 1;
  border-color: #9b5d52;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgb(108 53 46 / .15);
}
.card-action {
  position: absolute;
  inset: 6% 6% auto auto;
  width: clamp(17px, 13cqw, 28px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgb(253 253 253 / .46);
  font-size: clamp(.72rem, 6.8cqw, .95rem);
  line-height: 1;
}
.card-content {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3.64cqw;
}
.card-caption {
  width: 94%;
  font: 500 clamp(.82rem, 8.9cqw, 1.43rem)/1.06 Rainsuit, var(--body-font);
  text-align: center;
  letter-spacing: -.026em;
}
.card-content--gingerbread-house { gap: 11.37cqw; }
.card-content--gingerbread-house .card-caption { width: 78%; }
@container (max-width: 160px) {
  .card-content--gingerbread-house { gap: 3.64cqw; }
}
.crop { position: relative; display: block; overflow: hidden; aspect-ratio: 1; }
.card .crop { width: 65.45%; }
.crop img {
  position: absolute;
  max-width: none;
  width: var(--crop-w, 100%);
  height: var(--crop-h, 100%);
  left: var(--crop-x, 0);
  top: var(--crop-y, 0);
  object-fit: cover;
}
/* The deer sits in a 240 by 240 pixel area of the illustration sheet. */
.crop--deer { --crop-w: 426.6667%; --crop-h: 640%; --crop-x: -299.1667%; --crop-y: -538.75%; }
.crop--contain img { object-fit: contain; }
.crop--sprite { display: grid; place-items: center; }
/* Sprite coordinates use the original 1024 by 1536 illustration sheet. */
.sprite-window {
  position: relative;
  width: var(--sprite-fit-width, 100%);
  aspect-ratio: var(--sprite-width) / var(--sprite-height);
  overflow: hidden;
  --crop-w: calc(100% * 1024 / var(--sprite-width));
  --crop-h: calc(100% * 1536 / var(--sprite-height));
  --crop-x: calc(-100% * var(--sprite-x) / var(--sprite-width));
  --crop-y: calc(-100% * var(--sprite-y) / var(--sprite-height));
}
.card-day {
  flex: none;
  font: 500 clamp(.88rem, 10.93cqw, 1.7rem)/1 Rainsuit, var(--body-font);
  text-transform: uppercase;
}
.guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
  margin-top: 27px;
  border: 1px solid var(--outline);
  border-radius: 30px;
  background-color: var(--frost);
  text-decoration: none;
}
@media (hover: hover) {
  .guide-link:hover { background-color: transparent; }
}

.crop--design { aspect-ratio: var(--art-width) / var(--art-height); }
.card .crop--design { width: calc(100% * var(--art-width) / 255); }
.crop--house img { object-fit: fill; }
.crop--candy img {
  width: 145%;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(104deg);
}

footer { padding: 21px 0 26px; font-size: .82rem; color: var(--muted); }
.site-support {
  max-width: 760px;
  margin-bottom: 16px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}
.site-support h2 { margin: 0; font: 700 1.3rem/1.2 var(--heading-font); }
.site-support p { max-width: 70ch; margin: 8px auto 0; }
.support-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  font-size: .875rem;
  text-decoration: none;
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; }
.footer-row a { text-underline-offset: 3px; }

dialog {
  width: min(600px, 100% - 28px);
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 100px rgb(25 27 47 / .34);
}
dialog::backdrop { background: rgb(25 27 47 / .55); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-inner { position: relative; padding: clamp(20px, 6vw, 34px); }
.close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--outline);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.close:hover { background: var(--frost); }
.dialog-top { display: flex; align-items: center; gap: 15px; padding-right: 40px; margin-bottom: 16px; }
.dialog-art { flex: 0 0 clamp(66px, 19vw, 104px); }
.day-kicker { margin: 0 0 4px; color: var(--muted); font-size: .81rem; font-weight: 650; }
.day-title { margin: 0; font: 700 clamp(1.32rem, 4.6vw, 2.2rem)/1.13 var(--heading-font); }
.day-title:focus { outline: none; }
.materials { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--frost); }
.steps { margin: 0; padding-left: 1.45em; }
.steps li + li { margin-top: .55em; }
.steps li::marker { color: #3d5d79; font-weight: 700; }
.recipe-heading { margin: 16px 0 6px; font-size: 1rem; }
.recipe-group { margin: 8px 0 4px; font-size: .95rem; }
.recipe-note { margin: 14px 0 0; }
.activity-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dialog-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
}
.outline-button {
  padding: 8px 14px;
  border: 1px solid var(--outline);
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
}
.outline-button:hover { background: var(--frost); }
.outline-button:disabled { color: var(--muted); border-color: var(--line); cursor: default; }

.guide-page { background: #eeeef1; }
.guide-header { margin: 40px auto 34px; text-align: center; padding: 23px 10px; }
.age { color: var(--muted); font-size: .85rem; font-weight: 600; margin: 0 0 9px; }
.guide-header h1 {
  margin: 0;
  font: 700 clamp(2.05rem, 6.2vw, 4rem)/1.04 var(--heading-font);
  letter-spacing: -.04em;
  text-transform: lowercase;
}
.guide-intro {
  max-width: 485px;
  margin: 15px auto 0;
  color: var(--muted);
  font: 500 1.15rem/1.15 Rainsuit, var(--body-font);
}
.guide-section { scroll-margin-top: 14px; }
.guide-section h2 { margin: 0; font: 700 clamp(1.5rem, 4vw, 2.1rem)/1.12 var(--heading-font); }
.guide-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin-top: 18px; }
.guide-nav a { text-underline-offset: 4px; }
.guide-downloads { max-width: 768px; margin: 0 auto 24px; padding-top: 16px; text-align: center; }
.guide-downloads-title { margin: 0 0 10px; font-weight: 650; }
.guide-download-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background-color: var(--frost);
  font-size: .88rem;
  text-decoration: none;
}
@media (hover: hover) {
  .guide-download-link:hover { background-color: transparent; }
}
.guide-list { max-width: 768px; margin: 0 auto 54px; border-top: 1px solid var(--line); }
.guide-day { border-bottom: 1px solid var(--line); scroll-margin-top: 14px; }
.guide-day summary {
  display: grid;
  grid-template-columns: 68px 1fr 18px;
  align-items: baseline;
  gap: 8px;
  padding: 15px 11px;
  list-style: none;
  cursor: pointer;
}
.guide-day summary:hover { background: var(--frost); }
summary::-webkit-details-marker { display: none; }
.guide-day summary::after { content: "+"; font-size: 1.2rem; line-height: 1; text-align: center; }
.guide-day[open] summary::after { content: "−"; }
.guide-number { font-size: .78rem; color: var(--muted); font-weight: 650; }
.guide-activity { padding: 3px 18px 22px 87px; }
.guide-day:target { background: #f4f8fc; }

@media (max-width: 800px) {
  .landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: auto;
    max-height: none;
    padding-top: 122px;
  }
  .landing-copy { position: relative; inset: auto; width: min(100% - 34px, 560px); }
  .landing-copy h1 { font-size: clamp(38px, 9vw, 64px); }
  .landing-intro { width: min(100% - 14px, 445px); margin-top: 12px; font-size: 18px; line-height: 1.12; }
  .landing-button { min-height: 48px; margin-top: 20px; padding: 12px 20px; font-size: 17px; }
  .landing-tree {
    position: relative;
    inset: auto;
    width: min(70%, 300px);
    height: auto;
    aspect-ratio: 534 / 611;
    margin: 13px auto 45px;
  }
  .landing-snow {
    inset: auto auto 0 -17%;
    width: 134%;
    height: auto;
    aspect-ratio: 1540 / 388;
  }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 30px); }
  .site-support { font-size: 8px; }
  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 10px;
    width: min(100%, 425px);
    padding: 3px 12px;
    font-size: .78rem;
  }
  .site-nav > * { min-height: 34px; }
  .landing { padding-top: 127px; }
  .calendar { margin-top: 38px; }
  .section-heading { margin-bottom: 15px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { border-radius: 16px; }
  .guide-header { margin: 20px auto; padding: 11px; }
  .guide-day summary { grid-template-columns: 54px 1fr 18px; padding-inline: 8px; }
  .guide-activity { padding: 3px 8px 20px; }
}
@media (max-width: 350px) {
  .shell { width: calc(100% - 22px); }
  .site-nav { padding-inline: 6px; font-size: .72rem; }
  .card-caption { font-size: clamp(.72rem, 9cqw, .91rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card { transition: none; }
}

