/* MindCanvas Studio – mindcanvaspuzzles.com
   Hand-written stylesheet. Mobile-first, system fonts only, no external resources,
   no external files or imported sheets: textures are CSS gradients, photos are <picture> elements.

   WCAG AA colour pairs (text / background, contrast ratio):
     ink #2b1d12 on cream #fbf5e9 ............ 15.6   ink on sand #f1e6d0 ............. 13.2
     muted #5c4a3a on paper #fffdf8 .......... 7.8    muted on sand ................... 6.8
     brick #7a2e1d on cream .................. 9.0    brick on paper / sand ...... 9.2 / 7.6
     cream on brick (buttons, chips) ......... 8.7    cream on brick-dark #5e2316 ..... 11.2
     cream on hero ink #1e1108 ............... 17.0   gold-light #f2cf86 on hero ink .. 12.3
     ink on gold button #e8b958 .............. 8.9    ink on badge #e8c26e ............ 9.6
     cream on pine #1d3a2a (gift banner) ..... 11.4   gold-light on pine .............. 8.3
     gold-light on brick (CTA band) .......... 6.3    gold-text #7a5512 on paper/cream  6.6 / 6.2
     cream on ink (footer, phone frame) ...... 15.0   ink on note #fff4c7 ............. 14.8
     focus #1f4e9c on paper .................. 7.9    focus gold-light on dark areas .. 12.3
   Photo backgrounds (hero, banners) carry a baked-in dark overlay; their text regions measure
   >= 5.1:1 against cream (scripts/media_manifest.json text_regions). */

:root {
  --cream: #fbf5e9;
  --paper: #fffdf8;
  --sand: #f1e6d0;
  --ink: #2b1d12;
  --muted: #5c4a3a;
  --brick: #7a2e1d;
  --brick-dark: #5e2316;
  --gold: #b07c2e;
  --gold-btn: #e8b958;
  --gold-badge: #e8c26e;
  --gold-light: #f2cf86;
  --gold-text: #7a5512;
  --pine: #1d3a2a;
  --night: #1e1108;
  --line: #d9c7a7;
  --focus: #1f4e9c;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(60, 40, 20, .08), 0 10px 24px -14px rgba(60, 40, 20, .35);
  --shadow-lift: 0 6px 14px rgba(60, 40, 20, .12), 0 22px 40px -18px rgba(60, 40, 20, .55);
  --paper-texture:
    radial-gradient(rgba(122, 46, 29, .045) 1px, transparent 1.6px),
    radial-gradient(rgba(176, 124, 46, .05) 1px, transparent 1.6px);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chipbar: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;          /* 18 px base for older readers */
  line-height: 1.65;
}

img, video, svg { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 0 0 .5rem; }
h3 { font-size: 1.2rem; margin: 0; }

a { color: var(--brick); text-underline-offset: .18em; }
a:hover { color: var(--brick-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--gold-light); }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 46rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: var(--cream); padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: var(--cream); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  font-family: var(--serif); font-style: italic; color: var(--brick); font-size: 1.15rem; margin: 0 0 .3rem;
}
.lead { font-size: 1.25rem; }
.small { font-size: 1rem; color: var(--muted); }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .25rem 1rem; padding-block: .5rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; min-height: 48px;
}
.brand img { width: 40px; height: 40px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem;
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brick); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 52px; padding: .7rem 1.4rem; border-radius: 999px;
  background: var(--brick); color: var(--cream); font: 700 1.1rem/1.2 var(--sans);
  text-decoration: none; border: 2px solid var(--brick); text-align: center; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--brick); }
.btn-secondary:hover { background: var(--sand); color: var(--brick-dark); }
.btn-large { font-size: 1.2rem; min-height: 60px; padding-inline: 1.8rem; }
.btn-gold {
  background: var(--gold-btn); border-color: var(--gold-btn); color: var(--ink);
  box-shadow: 0 8px 22px -10px rgba(232, 185, 88, .8);
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.btn-ghost { background: rgba(30, 17, 8, .45); border-color: var(--cream); color: var(--cream); }
.btn-ghost:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.btn-quiet { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { background: var(--sand); border-color: var(--brick); color: var(--brick-dark); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.section-head { max-width: 46rem; margin: 0 auto 1.75rem; text-align: center; }
.section-head p:last-child { margin-bottom: 0; }
.section-head .intro { color: var(--muted); font-size: 1.2rem; margin: 0; }
.ornament {
  display: block; width: 7rem; height: 3px; margin: .9rem auto 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--brick) 50%, var(--gold) 80%, transparent);
}

/* ---------- hero (full-bleed scene, Ken Burns) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 46rem); display: flex; align-items: flex-end;
  background-color: var(--night); color: var(--cream);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  transform-origin: 60% 45%; animation: kenburns 28s ease-in-out 1 forwards;  /* finite: WCAG 2.2.2 */
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.5%, -1%); }
}
.hero::after {          /* soft fade into the page below */
  content: ""; position: absolute; inset: auto 0 0; height: 5rem; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(30, 17, 8, .55));
}
.hero-inner { padding-block: 7rem 2.5rem; }
.hero-copy { max-width: 36rem; }
.hero .eyebrow { color: var(--gold-light); font-size: 1.2rem; }
.hero h1 {
  color: var(--cream); font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.08; margin-bottom: .9rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
}
.hero .lead { font-size: clamp(1.2rem, 2.4vw, 1.4rem); margin: 0 0 1.6rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-play { margin: 1.3rem 0 0; font-size: 1.1rem; }
.hero-play a { color: var(--gold-light); font-weight: 700; }
.hero-play a:hover { color: #fff; }
.hero-play .arrow { display: inline-block; animation: nudge 1.8s ease-in-out 3;  /* finite: WCAG 2.2.2 */ }
@keyframes nudge { 50% { transform: translateY(4px); } }

@media (min-width: 40.0625rem) {
  .hero { align-items: center; }
  .hero-inner { padding-block: 4rem; }
}

/* ---------- gift banner ---------- */
.gift-banner {
  position: relative; background: var(--pine); color: var(--cream);
  background-image: linear-gradient(115deg, rgba(255, 255, 255, .04) 0 25%, transparent 25% 50%,
                    rgba(255, 255, 255, .04) 50% 75%, transparent 75%);
  background-size: 28px 28px;
}
.gift-banner::before {   /* candy-stripe ribbon */
  content: ""; position: absolute; inset: 0 0 auto; height: 6px;
  background: repeating-linear-gradient(135deg, var(--brick) 0 12px, var(--cream) 12px 24px);
}
.gift-banner .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; padding-block: 1.3rem 1.1rem;
}
.gift-icon { flex: 0 0 auto; align-self: flex-start; width: 3rem; height: 3rem; color: var(--gold-light); }
@media (min-width: 48rem) { .gift-icon { align-self: center; } }
.gift-text { flex: 1 1 18rem; margin: 0; }
.gift-text [data-countdown] {
  display: block; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--gold-light);
}
.gift-banner a { color: var(--gold-light); font-weight: 700; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.gift-banner a:hover { color: #fff; }

/* ---------- benefits ---------- */
.benefits {
  padding-block: 3rem; background-color: var(--paper);
  background-image: var(--paper-texture); background-size: 22px 22px, 31px 31px; background-position: 0 0, 11px 7px;
  border-bottom: 1px solid var(--line);
}
.benefit-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.benefit-list li {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.benefit-list svg {
  flex: 0 0 auto; width: 3.2rem; height: 3.2rem; padding: .6rem; border-radius: 50%;
  background: var(--sand); color: var(--brick); border: 2px solid var(--gold-badge);
}
.benefit-list strong { display: block; font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.benefit-list span { color: var(--muted); font-size: 1.05rem; }

/* ---------- mini game ---------- */
.game {
  padding-block: 3.25rem; scroll-margin-top: .5rem;
  background: linear-gradient(180deg, var(--sand), var(--cream) 18rem);
}
.game-app {
  background: var(--paper); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: 1rem; box-shadow: var(--shadow);
}
.game-loading { margin: 0; padding: 2rem 1rem; text-align: center; color: var(--muted); }
.game-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  margin-bottom: .9rem;
}
.game-title { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.game-title span { color: var(--muted); font-family: var(--sans); font-size: 1rem; display: block; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .25rem .9rem;
  border-radius: 999px; background: var(--sand); border: 1px solid var(--line);
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem;
}
.pill-found { background: var(--brick); border-color: var(--brick); color: var(--cream); }
.pill-found.bump { animation: bump .45s ease-out; }
@keyframes bump { 40% { transform: scale(1.12); } }

.game-stages { display: grid; gap: .9rem; }
@media (min-width: 60rem) { .game-stages { grid-template-columns: 1fr 1fr; } }
.stage-label {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 .35rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
}
.stage-label b {
  display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--ink); color: var(--cream); font-family: var(--sans); font-size: 1rem;
}
.game-stage {
  position: relative; aspect-ratio: 1344 / 768; border-radius: 10px; overflow: hidden;
  background: var(--sand); cursor: crosshair; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(60, 40, 20, .45);
}
.game-stage:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.game-stage picture, .game-stage img { width: 100%; height: 100%; }
.game-stage img { object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.game-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ring-outer { fill: none; stroke: #000; stroke-width: 5px; vector-effect: non-scaling-stroke; }
.ring-inner { fill: none; stroke: #fff; stroke-width: 3.5px; vector-effect: non-scaling-stroke; }
.ring { animation: ring-in .35s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes ring-in { from { opacity: 0; transform: scale(1.5); } to { opacity: 1; transform: scale(1); } }
.miss line { stroke: #fff; stroke-width: 4px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.miss .miss-shadow { stroke: #7a2e1d; stroke-width: 7px; }
.miss { animation: miss-fade .9s ease-out forwards; }
@keyframes miss-fade { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.hint circle { fill: none; vector-effect: non-scaling-stroke; }
.hint .hint-back { stroke: rgba(0, 0, 0, .75); stroke-width: 7px; }
.hint .hint-front { stroke: var(--gold-light); stroke-width: 4px; stroke-dasharray: 10 8; }
.hint { animation: hint-pulse 1s ease-in-out 2; transform-box: fill-box; transform-origin: center; }
@keyframes hint-pulse { 50% { transform: scale(1.18); opacity: .55; } }
.cross { opacity: 0; transition: opacity .15s; }
.game-stage:focus-visible .cross { opacity: 1; }
.cross line, .cross circle { fill: none; vector-effect: non-scaling-stroke; }
.cross .cross-back { stroke: #000; stroke-width: 6px; }
.cross .cross-front { stroke: var(--gold-light); stroke-width: 3px; }

.game-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.game-controls .btn { min-height: 52px; font-size: 1.05rem; padding-inline: 1.2rem; }
.game-help { margin: .8rem 0 0; font-size: 1rem; color: var(--muted); }

.game-done {
  display: grid; gap: 1rem 1.5rem; align-items: center; margin-top: 1rem; padding: 1.25rem;
  border-radius: var(--radius); background: var(--cream); border: 2px solid var(--gold);
  background-image: radial-gradient(circle at 100% 0, rgba(232, 185, 88, .28), transparent 55%);
  animation: done-in .5s ease-out;
}
.game-done[hidden] { display: none; }
@keyframes done-in { from { opacity: 0; transform: translateY(12px); } }
.game-done h3 { font-size: 1.6rem; }
.game-done h3:focus { outline: none; }
.game-done h3:focus-visible { outline: 3px solid var(--focus); }
.game-done p { margin: .3rem 0 .8rem; }
.game-done picture { width: 7.5rem; }
.game-done img { width: 7.5rem; border-radius: 6px; box-shadow: var(--shadow-lift); transform: rotate(-3deg); }
.done-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (min-width: 40rem) { .game-done { grid-template-columns: auto 1fr; } }

/* ---------- blink + video teaser ---------- */
.teaser {
  padding-block: 3.25rem; color: var(--cream); background-color: var(--night);
  background-image:
    radial-gradient(ellipse at 15% 0, rgba(232, 185, 88, .22), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(122, 46, 29, .55), transparent 60%);
}
.teaser h2, .teaser h3 { color: var(--cream); }
.teaser .eyebrow { color: var(--gold-light); }
.teaser .section-head .intro { color: var(--cream); }
.teaser-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .teaser-grid { grid-template-columns: 1.6fr 1fr; } }
.teaser figure { margin: 0; }
.teaser figcaption { margin-top: .7rem; font-size: 1.05rem; }
.blink-frame {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 960 / 549;
  box-shadow: 0 0 0 4px rgba(242, 207, 134, .5), 0 18px 40px -16px #000;
}
.blink-frame picture, .blink-frame img { width: 100%; height: 100%; }
.blink-frame img { object-fit: cover; }
.blink-b { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease-in-out; }
.show-b .blink-b { opacity: 1; }
.blink-tag {
  position: absolute; left: .7rem; top: .7rem; padding: .15rem .7rem; border-radius: 999px;
  background: var(--ink); color: var(--cream); font-weight: 700; font-size: 1rem;
}
.blink-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.blink-tools .btn { min-height: 48px; font-size: 1rem; }
.blink-tools .btn[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.phone {
  width: min(100%, 17rem); margin-inline: auto; padding: .7rem; border-radius: 2.2rem;
  background: linear-gradient(160deg, #3a2a1d, #120a05); box-shadow: 0 0 0 2px #5a4330, 0 24px 50px -18px #000;
}
.phone video { width: 100%; height: auto; border-radius: 1.6rem; background: #000; aspect-ratio: 540 / 960; }
.video-figure figcaption { text-align: center; }

/* ---------- books: heading, sticky chips, shelves ---------- */
.books-head { padding-block: 3.25rem .5rem; }
.theme-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 245, 233, .96); border-block: 1px solid var(--line);
  box-shadow: 0 6px 14px -12px rgba(60, 40, 20, .6);
}
@supports (backdrop-filter: blur(6px)) { .theme-nav { background: rgba(251, 245, 233, .88); backdrop-filter: blur(6px); } }
.theme-nav ul {
  list-style: none; margin: 0 auto; padding: .6rem 1rem; display: flex; gap: .5rem;
  width: min(100%, 74rem); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.theme-nav li { flex: 0 0 auto; scroll-snap-align: start; }
.theme-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: .3rem 1.05rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.02rem; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.theme-nav a:hover { border-color: var(--brick); color: var(--brick); }
.theme-nav a[aria-current="true"] { background: var(--brick); border-color: var(--brick); color: var(--cream); }


.shelf { padding-block: 2.25rem .5rem; scroll-margin-top: calc(var(--chipbar) + .75rem); }

.shelf-banner {
  position: relative; isolation: isolate; overflow: hidden; border-radius: calc(var(--radius) + 4px);
  min-height: clamp(220px, 30vw, 320px); display: flex; align-items: flex-end;
  background-color: var(--night); color: var(--cream); margin-bottom: 1.4rem;
  box-shadow: 0 14px 30px -18px rgba(30, 17, 8, .8);
}
.shelf-banner picture { position: absolute; inset: 0; z-index: -1; }
.shelf-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease-out; }
.shelf-banner:hover img { transform: scale(1.04); }
.shelf-banner-text { padding: 1.4rem 1.4rem 1.5rem; max-width: 40rem; }
.shelf-banner h2 { color: var(--cream); margin: 0 0 .35rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.shelf-banner .eyebrow { color: var(--gold-light); }
.shelf-intro { margin: 0 0 .8rem; font-size: 1.12rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.count-pill {
  display: inline-block; padding: .15rem .8rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  background: var(--gold-badge); color: var(--ink);
}
@media (min-width: 48rem) { .shelf-banner-text { padding: 2rem 2.2rem; } }

.book-grid {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 40rem) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; } }
@media (min-width: 72rem) { .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.book {
  position: relative; height: 100%; display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.book:hover, .book:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.book picture { display: block; background: var(--sand); aspect-ratio: 480 / 626; overflow: hidden; }
.book picture img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.book:hover picture img { transform: scale(1.03); }
.book-body { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1.15rem .85rem 1rem; flex: 1; }
.book-num {       /* gold "Book N" badge straddling the cover's bottom-left corner (keeps the title clear) */
  position: absolute; top: -.95rem; left: .6rem; margin: 0; z-index: 1;
  padding: .12rem .6rem; border-radius: 6px; background: var(--gold-badge); color: var(--ink);
  font-size: .95rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(30, 17, 8, .35);
}
.book h3 { font-size: 1.12rem; }
.price { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--brick); }
.price small { font-weight: 400; color: var(--muted); font-size: .92rem; }
.book .btn { margin-top: auto; min-height: 48px; font-size: 1rem; padding: .5rem .35rem; white-space: nowrap; }
@media (max-width: 24rem) { .book .btn { font-size: .95rem; } }
.badge {
  display: inline-block; align-self: flex-start; background: var(--gold); color: #1d1206;
  font-size: .85rem; font-weight: 700; padding: .1rem .55rem; border-radius: 6px;
}

/* Christmas picks: horizontal scroll-snap carousel */
.carousel { position: relative; }
.carousel-track {
  list-style: none; margin: 0; padding: .6rem .2rem 1.2rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: min(72%, 15rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: .2rem; overscroll-behavior-x: contain; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.carousel-track > li { scroll-snap-align: start; }
.carousel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.carousel-head .small { margin: 0; }
.carousel-buttons { display: flex; gap: .6rem; margin-left: auto; }
.carousel-btn {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--brick); background: var(--paper); color: var(--brick); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.carousel-btn:hover:not([disabled]) { background: var(--brick); color: var(--cream); }
.carousel-btn[disabled] { opacity: .4; cursor: default; }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn[hidden], .carousel-buttons[hidden] { display: none; }

.price-note { font-size: 1rem; color: var(--muted); padding-block: 1.5rem 2.5rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background-color: var(--brick); color: var(--cream); padding-block: 3rem; text-align: center;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(242, 207, 134, .18), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(30, 17, 8, .35), transparent 45%);
}
.cta-band h2 { color: var(--cream); }
.cta-band .eyebrow { color: var(--gold-light); }
.cta-band p { margin: 0 auto 1.3rem; max-width: 38rem; }

/* ---------- scroll reveal (only with JS on and motion allowed) ---------- */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity .7s ease, transform .7s ease; }
  .reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }
}

/* ---------- content pages ---------- */
.page { padding-block: 2rem 3rem; }
.page h2 { margin-top: 2.2rem; font-size: 1.6rem; }
.page h3 { margin-top: 1.4rem; }
.page li { margin-bottom: .4rem; }
.meta { color: var(--muted); font-size: 1rem; }
.box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin-block: 1.2rem;
}
.placeholder-note {
  background: #fff4c7; border: 2px dashed #8a6d00; color: var(--ink); border-radius: 8px; padding: .6rem .8rem;
}
table { width: 100%; border-collapse: collapse; font-size: 1rem; margin-block: 1rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { font-family: var(--serif); }
.table-scroll { overflow-x: auto; }

/* ---------- free puzzles page ---------- */
.free-hero {
  position: relative; isolation: isolate; overflow: hidden; background-color: var(--night); color: var(--cream);
  min-height: clamp(22rem, 52vw, 30rem); display: flex; align-items: flex-end;
}
.free-hero picture { position: absolute; inset: 0; z-index: -1; }
.free-hero img { width: 100%; height: 100%; object-fit: cover; }
.free-hero .wrap { padding-block: 4rem 2.5rem; }
.free-hero-copy { max-width: 38rem; }
.free-hero h1 { color: var(--cream); font-size: clamp(2.2rem, 5.5vw, 3.6rem); text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.free-hero .eyebrow { color: var(--gold-light); }
.free-hero .lead { text-shadow: 0 1px 10px rgba(0, 0, 0, .7); margin: 0 0 1.4rem; }

.pdf-section { padding-block: 3rem 1rem; }
.pdf-pages {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.pdf-pages figure { margin: 0; text-align: center; }
.pdf-pages img {
  width: 100%; max-width: 20rem; margin-inline: auto; background: #fff; border-radius: 4px;
  border: 1px solid var(--line); box-shadow: 0 4px 10px rgba(60, 40, 20, .12), 0 18px 30px -16px rgba(60, 40, 20, .5);
  transition: transform .3s ease;
}
.pdf-pages li:nth-child(1) img { transform: rotate(-2deg); }
.pdf-pages li:nth-child(3) img { transform: rotate(2deg); }
.pdf-pages li:hover img { transform: rotate(0) translateY(-4px); }
.pdf-pages figcaption { margin-top: 1rem; font-size: 1.02rem; color: var(--muted); }

.free-main { padding-block: 2rem 3rem; }
.free-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 56rem) { .free-grid { grid-template-columns: 1fr 1.05fr; } }
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 2.1rem; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: .1rem; display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brick); color: var(--cream);
  font-size: .9rem; font-weight: 700;
}
.signup {
  background: var(--paper); border: 2px solid var(--gold); border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow); scroll-margin-top: 1rem;
  background-image: radial-gradient(circle at 100% 0, rgba(232, 185, 88, .2), transparent 50%);
}
.signup h2 { font-size: 1.7rem; }
.signup-placeholder {
  border: 3px dashed var(--brick); border-radius: 10px; padding: 1.25rem; text-align: center;
  background: var(--cream); font-weight: 600; margin-bottom: .8rem;
}
.covers-figure { margin: 2.5rem 0 0; text-align: center; }
.covers-figure img { margin-inline: auto; width: min(100%, 34rem); }
.covers-figure figcaption { margin-top: .6rem; }
.covers-link { text-align: center; margin: 1.2rem 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #f3e9d6; padding-block: 2.2rem 2.5rem; font-size: 1rem; }
.site-footer a { color: #f3e9d6; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--gold-light); }
.site-footer h2 { color: #f3e9d6; font-size: 1.15rem; margin: 0 0 .4rem; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.copyright { margin-top: 1.5rem; color: #d8c8ad; font-size: .95rem; }

/* ---------- reduced motion: no Ken Burns, no reveal, no blink fade, no lifts ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .hero-bg img { animation: none; transform: none; }
  .hero-play .arrow { animation: none; }
  .reveal, .reveal:not(.is-visible) { opacity: 1; transform: none; transition: none; }
  .blink-b { transition: none; }
  .book:hover, .book:focus-within, .book:hover picture img, .shelf-banner:hover img,
  .pdf-pages li:hover img { transform: none; }
  .ring, .hint, .miss, .game-done, .pill-found.bump { animation: none; }
}
