/* Content pages and printables (pages/<slug>/index.html).
   Same North Pole palette as landing.css; long-form text sits on a calm panel so it
   stays readable, and printables are drawn on a paper "sheet" that prints to A4. */

.page { max-width: 780px; margin: 0 auto; padding: 1.6rem 0 3rem; }
.crumbs { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 1rem; font-weight: 700; }
.crumbs a { color: var(--gold-soft); text-decoration: none; }
.page h1 {
  font-family: var(--display); font-weight: 900; line-height: 1.08;
  font-size: clamp(2rem, 6vw, 3.1rem); margin-bottom: 0.9rem;
}
.page p.answer {
  font-size: 1.18rem; line-height: 1.6; font-weight: 700; color: var(--text);
  background: rgba(74, 222, 156, 0.08); border-left: 4px solid var(--aurora);
  border-radius: 0 12px 12px 0; padding: 0.9rem 1.1rem; margin-bottom: 1.4rem;
}
.page .hero-img { margin: 0 0 1.6rem; }
.page .hero-img img {
  width: 100%; height: auto; display: block; border-radius: 16px;
  border: 1px solid rgba(154, 162, 216, 0.25); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.page h2 {
  font-family: var(--display); color: var(--gold-soft); font-size: 1.45rem;
  line-height: 1.25; margin: 2rem 0 0.6rem;
}
.page h3 { font-family: var(--display); color: var(--gold-soft); font-size: 1.12rem; margin: 1.2rem 0 0.4rem; }
.page p, .page li { color: #d9ddfb; font-weight: 600; line-height: 1.7; margin-bottom: 0.8rem; font-size: 1.02rem; }
.page ul, .page ol { margin: 0 0 1rem 1.4rem; }
.page a { color: var(--gold-soft); }
.page strong { color: #fff; }
.page .note {
  background: var(--panel); border: 1px solid rgba(245, 197, 66, 0.3); border-radius: 14px;
  padding: 1rem 1.2rem; margin: 1.6rem 0;
}
.page .note p:last-child { margin-bottom: 0; }
.page table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1.4rem; font-size: 0.97rem; }
.page th, .page td {
  text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid rgba(154, 162, 216, 0.22);
  color: #d9ddfb; font-weight: 600; vertical-align: top;
}
.page th { color: var(--gold-soft); font-family: var(--display); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.related { margin-top: 2.4rem; }
.related ul { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.7rem; }
.related li { margin: 0; }
.related a {
  display: block; text-decoration: none; background: var(--panel); border: 1px solid rgba(154, 162, 216, 0.22);
  border-radius: 12px; padding: 0.8rem 1rem; font-weight: 800; color: var(--gold-soft);
}
.related a:hover { border-color: var(--gold); }
.grownups-aside { border-color: rgba(154, 162, 216, 0.3); }
.grownups-aside h2 { margin-top: 0; font-size: 1.15rem; }

/* ---------- tool panel (form) ---------- */
.tool {
  background: var(--panel); border: 1px solid rgba(245, 197, 66, 0.35); border-radius: 18px;
  padding: 1.3rem 1.3rem 1.1rem; margin: 0 0 1.6rem;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
}
.tool h2 { margin-top: 0; }
.tool .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.8rem 1rem; margin-bottom: 0.9rem; }
.tool label { display: block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 0.35rem; }
.tool input[type=text], .tool select {
  width: 100%; font: 700 1.05rem var(--body); color: var(--night); background: #f7f4ff;
  border: none; border-radius: 10px; padding: 0.7rem 0.85rem; outline: 3px solid transparent;
}
.tool input[type=text]:focus, .tool select:focus { outline-color: var(--gold); }
.tool fieldset { border: none; margin: 0 0 0.9rem; }
.tool legend { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 0.4rem; }
.tool .checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.3rem 1rem; }
.tool .checks label { text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--text); font-weight: 600; display: flex; gap: 0.5rem; align-items: flex-start; }
.tool .actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.tool .hint { font-size: 0.85rem; color: var(--text-dim); margin: 0.2rem 0 0; }
.btn-print {
  font: 800 1.05rem var(--body); cursor: pointer; border: none; border-radius: 12px; padding: 0.8rem 1.4rem;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #4a3403;
  box-shadow: 0 6px 20px rgba(245, 197, 66, 0.35);
}

/* ---------- printable sheets ---------- */
.sheet-wrap { margin: 0 0 1.8rem; }
.sheet-wrap .caption { text-align: center; font-size: 0.85rem; color: var(--text-dim); margin-top: 0.5rem; }
.sheet {
  position: relative; margin: 0 auto; background: #fffaf0; color: #2b2340;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); overflow: hidden;
  font-family: var(--body);
}
.sheet.landscape { width: 100%; aspect-ratio: 297 / 210; container-type: inline-size; }
.sheet.portrait { width: min(100%, 560px); aspect-ratio: 210 / 297; container-type: inline-size; }

/* certificate: sizes in cqw so the screen preview and the printed A4 match */
.cert { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6cqw 8cqw; }
.cert .frame { position: absolute; inset: 2.2cqw; border: 0.7cqw double #b8862b; border-radius: 1.2cqw; pointer-events: none; }
.cert .frame::after { content: ""; position: absolute; inset: 1cqw; border: 0.15cqw solid #d8b25a; border-radius: 0.8cqw; }
.cert .corner { position: absolute; font-size: 3cqw; color: #b8862b; }
.cert .c1 { top: 3.4cqw; left: 3.8cqw; } .cert .c2 { top: 3.4cqw; right: 3.8cqw; }
.cert .c3 { bottom: 3.4cqw; left: 3.8cqw; } .cert .c4 { bottom: 3.4cqw; right: 3.8cqw; }
.cert .kicker { font-family: var(--mono); font-size: 1.35cqw; letter-spacing: 0.5em; color: #8a6a2a; text-transform: uppercase; }
.cert .title { font-family: var(--display); font-weight: 900; font-size: 7.4cqw; line-height: 1; color: #1f6b47; margin: 1.2cqw 0 1.4cqw; }
.cert .title .star { color: #c99a2e; }
.cert .certify { font-size: 1.9cqw; font-weight: 700; color: #4d4466; }
.cert .who {
  font-family: var(--display); font-style: italic; font-weight: 700; font-size: 6cqw; line-height: 1.15;
  color: #7a1f2b; margin: 1cqw 0 0.6cqw; min-width: 50%; border-bottom: 0.2cqw solid #d8b25a; padding: 0 2cqw 0.3cqw;
  min-height: 7.5cqw; overflow-wrap: anywhere;
}
.cert .why { font-size: 1.85cqw; font-weight: 700; color: #4d4466; max-width: 72%; line-height: 1.45; margin-top: 1.4cqw; }
.cert .foot { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; margin-top: 3cqw; }
.cert .sig { width: 30%; font-size: 1.35cqw; color: #4d4466; font-weight: 700; }
.cert .sig .ink { font-family: var(--display); font-style: italic; font-size: 3cqw; color: #1d2f63; border-bottom: 0.15cqw solid #4d4466; padding-bottom: 0.2cqw; margin-bottom: 0.5cqw; }
.cert .seal {
  width: 13cqw; height: 13cqw; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #f3d27a, #c99a2e 70%); color: #5a3d06; border: 0.5cqw dotted #fff5d6;
  font-family: var(--mono); font-size: 1.05cqw; font-weight: 600; letter-spacing: 0.12em; line-height: 1.5; transform: rotate(-8deg);
}
.cert .seal b { font-family: var(--display); font-size: 3.2cqw; letter-spacing: 0; }
.cert .recno { position: absolute; bottom: 4.4cqw; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 1cqw; color: #8a7fa8; letter-spacing: 0.2em; }
.sheet.ink-saver .title, .sheet.ink-saver .who, .sheet.ink-saver .sig .ink { color: #111; }
.sheet.ink-saver .frame { border-color: #333; }
.sheet.ink-saver .frame::after { border-color: #777; }
.sheet.ink-saver .seal { background: #fff; border: 0.4cqw solid #333; color: #111; }
.sheet.ink-saver .corner, .sheet.ink-saver .kicker { color: #333; }

/* letter from Santa */
.letter { padding: 9cqw 10cqw 8cqw; display: flex; flex-direction: column; min-height: 100%; }
.letter .lh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 0.4cqw solid #b8862b; padding-bottom: 2.4cqw; margin-bottom: 4cqw; }
.letter .lh .from { font-family: var(--display); font-weight: 900; font-size: 5.2cqw; color: #7a1f2b; line-height: 1.05; }
.letter .lh .addr { font-size: 2.2cqw; color: #6a6085; text-align: right; line-height: 1.5; font-weight: 700; }
.letter .body { font-family: var(--display); font-size: var(--lt-size, 3.35cqw); line-height: 1.62; color: #2b2340; }
.letter .body p { margin: 0 0 2.6cqw; color: #2b2340; font-weight: 500; font-size: inherit; line-height: inherit; }
.letter .body ul { margin: 0 0 2.6cqw 6cqw; }
.letter .body li { color: #2b2340; font-weight: 500; font-size: inherit; line-height: 1.5; margin: 0 0 0.8cqw; }
.letter .sign { margin-top: auto; }
.letter .sign .ink { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 7cqw; color: #1d2f63; line-height: 1; }
.letter .sign .ps { font-size: 2.4cqw; color: #6a6085; font-weight: 700; margin-top: 1.6cqw; }
.sheet.ink-saver .letter .lh .from, .sheet.ink-saver .letter .sign .ink { color: #111; }
.sheet.ink-saver .letter .lh { border-color: #333; }

/* ---------- live countdown ---------- */
.countdown-big { text-align: center; margin: 0 0 1.6rem; }
.countdown-big .num {
  display: block; font-family: var(--display); font-weight: 900; color: var(--gold);
  font-size: clamp(4.5rem, 20vw, 8rem); line-height: 1; text-shadow: 0 0 40px rgba(245, 197, 66, 0.45);
}
.countdown-big .lbl { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.countdown-big .clock { margin-top: 0.8rem; font-family: var(--mono); font-size: 1rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .page h2 { font-size: 1.28rem; }
  .tool { padding: 1rem; }
}

/* ---------- print: only the sheet, full A4 ---------- */
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.np { min-height: 0; }
  .sky, .np-head, .lights, .np-foot, .crumbs, .page > *:not(.sheet-wrap), .sheet-wrap .caption, .no-print { display: none !important; }
  main, .page { max-width: none; margin: 0; padding: 0; }
  .sheet-wrap { margin: 0; }
  .sheet { box-shadow: none; margin: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sheet.landscape { width: 297mm; height: 209mm; aspect-ratio: auto; }
  .sheet.portrait { width: 210mm; height: 296mm; aspect-ratio: auto; }
}

/* ---------- kid-first game pages (2026-11-02): pictures first, very few words, Play within one screen ---------- */
.kid-start {
  display: grid; grid-template-columns: 1fr; justify-items: center; gap: .75rem;
  text-align: center; margin: .4rem 0 1.4rem;
}
.kid-art {
  width: min(210px, 54vw); height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 28px; border: 4px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(245, 197, 66, .18), 0 14px 40px rgba(0, 0, 0, .45);
}
.kid-say { font: 700 clamp(1.35rem, 5.4vw, 1.8rem)/1.25 var(--display); color: var(--gold-soft); margin: 0; max-width: 22ch; }
.kid-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.kid-steps li {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 78px;
  font: 800 .95rem/1.2 var(--body); color: var(--text);
}
.kid-steps .kid-ico {
  width: 64px; height: 64px; padding: 12px; border-radius: 50%; color: var(--gold);
  background: rgba(12, 20, 69, .85); border: 2px solid rgba(245, 197, 66, .55);
}
.kid-steps .kid-ico-nice { color: var(--aurora); border-color: rgba(74, 222, 156, .6); }
.kid-steps .kid-ico-naughty { color: #c8a4ef; border-color: rgba(200, 164, 239, .6); }
.page a.kid-play {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 64px; padding: .5rem 2rem .5rem 1rem;
  border-radius: 999px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #302344;
  font: 900 1.6rem var(--display); text-decoration: none; box-shadow: 0 6px 0 #a8801f, 0 10px 30px rgba(245, 197, 66, .35);
}
.page a.kid-play .kid-ico { width: 44px; height: 44px; color: #302344; }
.kid-play:active { transform: translateY(3px); box-shadow: 0 3px 0 #a8801f; }
.kid-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (min-width: 760px) {
  .kid-start { grid-template-columns: auto 1fr; grid-template-areas: "art say" "art steps" "art play"; justify-items: start; text-align: left; column-gap: 2rem; }
  .kid-art { grid-area: art; width: 260px; }
  .kid-say { grid-area: say; align-self: end; }
  .kid-steps { grid-area: steps; justify-content: flex-start; }
  .kid-play { grid-area: play; align-self: start; }
}
.for-grownups {
  margin: 2rem 0 1.6rem; padding: 1.1rem 1.2rem; border-radius: 16px;
  background: rgba(12, 20, 69, .45); border: 1px solid rgba(154, 162, 216, .2);
}
.for-grownups h2 { margin-top: 0; font-size: 1.2rem; color: var(--text-dim); }
.for-grownups p.answer { font-size: 1rem; border: 0; padding: 0; background: none; }
.for-grownups .tool-facts { margin: 0; border: 0; background: none; padding: 0; }
