/* RuluBooks — layout: one calm column of sections; books sit on soft tinted tiles,
   the hero word is a tracing worksheet. Mobile first: big covers, big tap targets. */
:root {
  --paper: #F6F7FB;
  --surface: #FFFFFF;
  --ink: #1D2142;
  --ink-soft: #5A5F80;
  --orange: #F47A1F;          /* from the RuluBooks logo */
  --orange-deep: #C2570A;
  --sun: #FFCB3D;
  --rule-blue: #93AEEF;
  --hairline: #E3E6F0;
  --navy: #1D2142;            /* dark panels (finder, contact) in both themes */
  --navy-line: #1D2142;
  --tint-explorers: #FFEBD9;
  --tint-tracing: #E1ECFF;
  --tint-handwriting: #E4F3E7;
  --tint-holiday: #FBE4EC;
  --tint-soccer: #E6F2DC;
  --shadow-sm: 0 1px 2px rgba(29, 33, 66, .06), 0 4px 12px rgba(29, 33, 66, .05);
  --shadow: 0 2px 4px rgba(29, 33, 66, .06), 0 14px 34px rgba(29, 33, 66, .10);
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 20px;
  --radius-lg: 28px;
  --wrap: 1200px;
  --gutter: 20px;
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12142A; --surface: #1B1E38; --ink: #EEF0FA; --ink-soft: #A9AECB;
    --orange: #FF8A33; --orange-deep: #FFA45E; --sun: #FFD25A;
    --rule-blue: #5F78B8; --hairline: #2B2F52; --navy: #1B1E38; --navy-line: #2B2F52;
    --tint-explorers: #3A2B25; --tint-tracing: #232E4D; --tint-handwriting: #22362B;
    --tint-holiday: #3A2531; --tint-soccer: #283523;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 14px 34px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12142A; --surface: #1B1E38; --ink: #EEF0FA; --ink-soft: #A9AECB;
  --orange: #FF8A33; --orange-deep: #FFA45E; --sun: #FFD25A;
  --rule-blue: #5F78B8; --hairline: #2B2F52; --navy: #1B1E38; --navy-line: #2B2F52;
  --tint-explorers: #3A2B25; --tint-tracing: #232E4D; --tint-handwriting: #22362B;
  --tint-holiday: #3A2531; --tint-soccer: #283523;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 14px 34px rgba(0,0,0,.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.tint-explorers { --tint: var(--tint-explorers); }
.tint-tracing { --tint: var(--tint-tracing); }
.tint-handwriting { --tint: var(--tint-handwriting); }
.tint-holiday { --tint: var(--tint-holiday); }
.tint-soccer { --tint: var(--tint-soccer); }

.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-deep); }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--paper); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; }
.brand span b { color: var(--orange); font-weight: 600; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-soft); padding: 8px 0; }
.nav a:hover { color: var(--ink); }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  font: 500 .88rem var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 14px 6px 8px; cursor: pointer;
}
.store-btn:hover { border-color: var(--ink-soft); }
.code {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px;
  border-radius: 6px; background: var(--ink); color: var(--paper);
  font: 600 .7rem/1 var(--font-body); letter-spacing: .06em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 600 1.02rem var(--font-body); border: 0; border-radius: 999px; padding: 15px 26px; min-height: 54px;
  background: var(--orange); color: #1D2142; box-shadow: 0 6px 18px color-mix(in srgb, var(--orange) 35%, transparent);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--orange) 42%, transparent); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--hairline); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { padding-block: 56px 48px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; }
.hero .kicker { margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; }
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 33em; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.trust { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: var(--ink-soft); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--orange-deep); flex: none; }
.trust .stars-sm { color: var(--sun); letter-spacing: 1px; font-size: .95rem; }
.hero-media { position: relative; min-width: 0; }

/* tracing word */
.trace { display: block; width: calc(var(--vbw, 400) * .0135em); max-width: 100%; height: auto; margin: 14px 0 4px; overflow: visible; cursor: pointer; }
.trace .rule { stroke: var(--rule-blue); stroke-width: 2.5; }
.trace .rule-mid { stroke-dasharray: 9 8; }
.trace .guide { fill: none; stroke: var(--ink-soft); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 11; opacity: .55; }
.trace .guide-dot { fill: var(--ink-soft); opacity: .55; }
.trace .ink { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.trace .ink-dot { fill: var(--orange); transition: opacity .15s; }
.trace .pencil { pointer-events: none; }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: var(--tint-tracing); box-shadow: var(--shadow); isolation: isolate; }
.slideshow .slide-img { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s ease; }
.slideshow .slide-img.on { opacity: 1; }
.slideshow .slide-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 3.6s ease-out; }
.slideshow .slide-img.on img { transform: scale(1); }
.slideshow::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(13, 15, 30, .5), transparent); }
.cap {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 28px);
  font: 600 .86rem/1.2 var(--font-body); color: #1D2142; background: rgba(255, 255, 255, .94); border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer;
}
.cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap svg { width: 16px; height: 16px; flex: none; }
.cap:hover { background: #fff; }
.slideshow .dots { position: absolute; right: 14px; top: 14px; z-index: 2; display: flex; gap: 6px; padding: 7px 9px; border-radius: 99px; background: rgba(13, 15, 30, .35); }
.slideshow .dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.6); cursor: pointer; transition: width .3s, background .3s; }
.slideshow .dots button[aria-current="true"] { width: 22px; background: #fff; }

/* ---------- Categories ---------- */
.cats { padding-block: 24px 8px; }
.cats .section-title { margin-bottom: 22px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cat-tile {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border-radius: var(--radius);
  background: var(--tint); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-art { position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; }
.cat-art img { position: absolute; inset: 16px 16px 4px; width: calc(100% - 32px); height: calc(100% - 20px); object-fit: contain; filter: drop-shadow(0 10px 12px rgba(29,33,66,.2)); transition: transform .25s; }
.cat-tile:hover .cat-art img { transform: scale(1.05) rotate(-2deg); }
.cat-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 18px 18px; }
.cat-text strong { font: 600 1.2rem/1.2 var(--font-display); }
.cat-text small { font-size: .84rem; color: var(--ink-soft); }

/* ---------- Book finder ---------- */
.finder { padding-block: 48px 8px; }
.finder-card { background: var(--navy); color: #F5F6FB; border: 1px solid var(--navy-line); border-radius: var(--radius-lg); padding: clamp(24px, 4.5vw, 52px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px 56px; align-items: center; }
.finder-intro, .finder-body { min-width: 0; }
.finder .kicker { color: #FFCB3D; margin-bottom: 12px; }
.finder h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: #fff; }
.finder-intro p:last-child { color: rgba(245,246,251,.78); margin-top: 12px; max-width: 30em; }
.q-step { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(245,246,251,.7); display: flex; align-items: center; gap: 12px; }
.q-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(245,246,251,.18); overflow: hidden; max-width: 160px; }
.q-bar span { display: block; height: 100%; background: #FFCB3D; transition: width .35s; }
.q-title { font: 600 clamp(1.25rem, 2.3vw, 1.6rem)/1.2 var(--font-display); margin: 10px 0 16px; color: #fff; outline: none; }
.q-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.q-opt { text-align: left; font: 600 1.02rem/1.25 var(--font-body); color: #1D2142; background: #FFFFFF; border: 0; border-radius: 16px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 64px; justify-content: center; transition: transform .15s, background .15s; }
.q-opt small { font-weight: 400; font-size: .84rem; color: #5A5F80; }
.q-opt:hover { background: #FFCB3D; transform: translateY(-2px); }
.q-opt.big { font: 600 1.3rem var(--font-display); align-items: center; text-align: center; }
.q-nav { display: flex; gap: 18px; margin-top: 16px; }
.q-link { font: 500 .9rem var(--font-body); color: #F5F6FB; background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; opacity: .85; }
.q-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.q-results .card { border: 0; }
.q-results .card h3 { font-size: 1rem; }
.q-results .acts, .q-results .bonus { display: none; }
.q-results .card-body { padding: 14px; gap: 8px; }
.q-results .buy { font-size: .86rem; min-height: 42px; }
.q-results .look { min-height: 36px; font-size: .84rem; }

/* ---------- Shelves ---------- */
.shelf { padding-block: 64px 0; }
.shelf-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.shelf-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.shelf-title h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.count { font-size: .82rem; font-weight: 600; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.shelf-head p { color: var(--ink-soft); max-width: 46em; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--hairline); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cover { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--tint); font: inherit; color: inherit; }
button.cover { cursor: zoom-in; }
.cover img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; filter: drop-shadow(0 10px 12px rgba(29,33,66,.2)); transition: transform .3s; }
.card:hover .cover img { transform: scale(1.04); }
.tag {
  position: absolute; z-index: 1; top: 12px; left: 12px; font: 600 .7rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface); color: var(--ink); padding: 6px 10px; border-radius: 999px;
}
.tag.new { background: var(--sun); color: #1D2142; }
.tag.season { background: var(--ink); color: var(--paper); }
.card-body { display: flex; flex-direction: column; gap: 9px; padding: 16px 18px 18px; flex: 1; }
.card h3 { font-size: 1.18rem; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .84rem; color: var(--ink-soft); align-items: center; }
.age { font-weight: 600; color: var(--ink); background: var(--tint); padding: 2px 10px; border-radius: 999px; }
.acts { font-size: .86rem; color: var(--ink-soft); }
.bonus { font-size: .84rem; font-weight: 500; color: var(--orange-deep); display: flex; align-items: center; gap: 6px; }
.bonus svg { width: 16px; height: 16px; flex: none; }
.card-actions { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.buy {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  text-decoration: none; font: 600 .95rem var(--font-body); color: #1D2142; background: var(--orange);
  border-radius: 14px; padding: 10px 14px; transition: background .15s;
}
.buy:hover { background: var(--sun); }
.buy svg { width: 16px; height: 16px; flex: none; }
.look {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; cursor: pointer;
  font: 600 .9rem var(--font-body); color: var(--ink); background: transparent; border: 0; border-radius: 14px;
}
.look:hover { background: var(--paper); }
.look svg { width: 17px; height: 17px; }

.photo-tile { position: relative; min-height: 260px; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--tint-tracing); isolation: isolate; }
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo-tile:hover img { transform: scale(1.03); }
.photo-tile::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; z-index: 1; background: linear-gradient(to top, rgba(13, 15, 30, .5), transparent); }

/* ---------- Why ---------- */
.why { margin-top: 72px; padding-block: 64px; background: var(--surface); border-block: 1px solid var(--hairline); }
.why .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.why .section-title { margin-bottom: 28px; }
.why-list { display: flex; flex-direction: column; gap: 24px; }
.why-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 2px 18px; align-items: center; }
.why-item .ico { grid-row: span 2; align-self: center; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--tint-explorers); color: var(--orange-deep); }
.why-item:nth-child(2) .ico { background: var(--tint-tracing); color: var(--ink); }
.why-item:nth-child(3) .ico { background: var(--tint-handwriting); color: var(--ink); }
.why-item .ico svg { width: 26px; height: 26px; }
.why-item h3 { font-size: 1.25rem; align-self: end; }
.why-item p { color: var(--ink-soft); align-self: start; }

/* ---------- Free printables ---------- */
.freebies { padding-block: 72px 0; }
.freebies-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.freebies-head p { color: var(--ink-soft); }
.free-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.free-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.free-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.free-thumb { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--tint-tracing), var(--tint-explorers)); }
.free-thumb img { position: absolute; inset: 14px 0 0; margin: 0 auto; height: calc(100% - 14px); width: auto; max-width: 86%; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: 0 -2px 18px rgba(29,33,66,.14); }
.free-card-text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.free-card-text small { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.free-card-text strong { font: 600 1.08rem/1.25 var(--font-display); }
.free-cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--orange-deep); }
.free-cta svg { width: 15px; height: 15px; }

/* ---------- Reviews ---------- */
.reviews { padding-block: 72px 16px; }
.reviews-head { display: flex; justify-content: space-between; align-items: end; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 24px; }
.reviews-head p { color: var(--ink-soft); font-size: .9rem; }
.review-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.review-row::-webkit-scrollbar { display: none; }
.review { margin: 0; flex: 0 0 calc(50% - 8px); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 24px; display: flex; gap: 18px; align-items: center; min-width: 0; }
.review-cover { width: 108px; height: 100px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(29,33,66,.18)); }
.review-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stars { color: var(--sun); letter-spacing: 2px; font-size: 1rem; line-height: 1.2; }
.review blockquote { margin: 0; font: 500 1.08rem/1.4 var(--font-display); }
.review-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.rev-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.rev-arrow:hover { background: var(--tint); }
.rev-arrow svg { width: 18px; height: 18px; }
.review-dots { display: flex; gap: 8px; }
.review-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--hairline); cursor: pointer; transition: width .25s, background .25s; }
.review-dots button[aria-current="true"] { width: 26px; background: var(--orange); }
.review cite { font-style: normal; font-size: .85rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .review { flex-basis: 100%; }
}

/* ---------- Monthly free pages ---------- */
.newsletter { padding-block: 72px 0; }
.nl-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px 56px; align-items: center;
  background: var(--tint-tracing); border-radius: var(--radius-lg); padding: clamp(24px, 4.5vw, 52px); }
.nl-copy .kicker { margin-bottom: 10px; }
.nl-copy h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.nl-sub { color: var(--ink-soft); margin-top: 12px; max-width: 32em; }
.nl-perks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.nl-perks li { display: flex; gap: 10px; align-items: flex-start; }
.nl-perks svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--orange-deep); }
.nl { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.nl-ages { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nl-ages legend { font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.nl-age { flex: 1 1 0; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--hairline); background: var(--paper); color: var(--ink); font: 600 .95rem var(--font-body); cursor: pointer; white-space: nowrap; }
.nl-age:hover { border-color: var(--ink-soft); }
.nl-age[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, var(--surface)); }
.nl-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.newsletter .field { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.newsletter .field input { font: 400 1rem var(--font-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--hairline); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.newsletter .field input:focus { outline: none; border-color: var(--orange); background: var(--surface); }
.newsletter .check { display: flex; gap: 12px; align-items: flex-start; font-size: .84rem; color: var(--ink-soft); line-height: 1.45; cursor: pointer; }
.newsletter .check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--orange); }
.nl-error { color: #C2410C; font-size: .9rem; font-weight: 500; }
.nl-btn { width: 100%; }
.nl-btn:disabled { opacity: .7; transform: none; }
.nl-done { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.nl-done-title { font: 600 1.3rem/1.25 var(--font-display); margin-bottom: 6px; outline: none; }
.nl-done p:last-child { color: var(--ink-soft); }

/* ---------- Contact / footer ---------- */
.contact { padding-block: 56px 72px; }
.contact-card { background: var(--navy); color: #F5F6FB; border: 1px solid var(--navy-line); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.contact-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: #fff; }
.contact-card p { color: rgba(245,246,251,.78); margin-top: 12px; max-width: 32em; }
.contact-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.email-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.email { font: 600 clamp(1.05rem, 2.2vw, 1.3rem) var(--font-body); color: #fff; text-decoration: none; word-break: break-all; user-select: all; }
.copy { font: 500 .82rem var(--font-body); color: #F5F6FB; background: transparent; border: 1px solid rgba(245,246,251,.4); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 34px; }
.socials { display: flex; gap: 10px; align-items: center; }
.socials span { font-size: .85rem; color: rgba(245,246,251,.75); margin-right: 4px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #F5F6FB; background: rgba(245,246,251,.12); }
.socials a:hover { background: var(--orange); color: #1D2142; }
.socials svg { width: 20px; height: 20px; }

.site-footer { border-top: 1px solid var(--hairline); padding-block: 26px 34px; font-size: .84rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }

/* ---------- Store picker ---------- */
.picker[hidden] { display: none; }
.picker { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(13, 15, 30, .5); padding: 20px; }
.picker-box { background: var(--surface); color: var(--ink); border-radius: 26px; width: min(460px, 100%); padding: 26px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.picker-box h2 { font-size: 1.5rem; }
.picker-box > p { color: var(--ink-soft); font-size: .9rem; margin: 8px 0 18px; }
.store-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.store-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; min-height: 48px;
  font: 500 1rem var(--font-body); color: var(--ink); background: var(--paper); border: 2px solid transparent; border-radius: 14px; padding: 10px 14px;
}
.store-list button:hover { border-color: var(--hairline); }
.store-list button[aria-current="true"] { border-color: var(--orange); }
.store-list small { margin-left: auto; color: var(--ink-soft); font-size: .82rem; }
.picker-close { float: right; width: 40px; height: 40px; margin: -8px -8px 0 0; font: 500 1.5rem/1 var(--font-body); background: none; border: 0; color: var(--ink-soft); cursor: pointer; border-radius: 50%; }

/* ---------- Floating finder button (phones) ---------- */
.fab[hidden] { display: none; }
.fab { position: fixed; z-index: 25; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: none; align-items: center; gap: 8px; text-decoration: none; font: 600 .92rem var(--font-body);
  color: #1D2142; background: var(--orange); padding: 12px 18px; min-height: 48px; border-radius: 999px; box-shadow: 0 10px 28px rgba(29,33,66,.32); animation: rise .3s ease-out; }
.fab svg { width: 19px; height: 19px; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }

/* ---------- Look inside ---------- */
.viewer[hidden] { display: none; }
.viewer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(13, 15, 30, 0);
  transition: background .25s ease;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.viewer.is-open { background: rgba(13, 15, 30, .68); }
.viewer-box { width: min(1240px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.3,1); will-change: transform, opacity; }
.viewer.is-open .viewer-box { opacity: 1; transform: none; }
.viewer.is-closing .viewer-box { transition-duration: .2s; }
.viewer-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px 14px 24px; }
.viewer-titles { min-width: 0; flex: 1; }
.viewer-kicker { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-deep); }
.viewer-head h2 { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.viewer-buy { flex: none; }
.viewer-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); font: 500 1.6rem/1 var(--font-body); cursor: pointer; }
.viewer-close:hover { background: var(--hairline); }
.viewer-stage { position: relative; background: var(--tint); height: min(68vh, 720px); min-height: 0; overflow: hidden; }
.book-stage { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.96); transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.3,1); }
.viewer.is-ready .book-stage { opacity: 1; transform: none; }
.book { position: relative; touch-action: pan-y; }
.book.spread { filter: drop-shadow(0 18px 28px rgba(29, 33, 66, .28)); }
.book .page { background: #fff; overflow: hidden; }
.book .page img, .book .face img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* phone: one page at a time, turning on its left edge */
.book.single { perspective: 1800px; cursor: pointer; border-radius: 4px; box-shadow: 0 14px 30px rgba(29, 33, 66, .22); }
.leaf { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; transform: rotateY(0deg);
  transition: transform .7s cubic-bezier(.3,.1,.3,1), opacity .12s linear 0s; will-change: transform; }
.leaf.turned { transform: rotateY(-178deg); opacity: 0; transition: transform .7s cubic-bezier(.3,.1,.3,1), opacity .15s linear .5s; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(29, 33, 66, .06); }
.face.back { transform: rotateY(180deg); background: linear-gradient(to left, #e9e9ee 0%, #fbfbfd 14%, #ffffff 100%); }
.page-btn { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: background .15s, opacity .15s; }
.page-btn:hover { background: var(--orange); color: #1D2142; }
.page-btn:disabled { opacity: 0; pointer-events: none; }
.page-btn svg { width: 22px; height: 22px; }
.page-btn.prev { left: 14px; } .page-btn.next { right: 14px; }
.viewer-foot { display: flex; align-items: center; gap: 18px; padding: 12px 18px 16px 24px; }
.viewer-count { flex: none; font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 7.5em; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: none; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; opacity: .6; transition: opacity .15s, border-color .15s; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { border-color: var(--orange); opacity: 1; }
.thumbs img { height: 100%; width: auto; display: block; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .site-header .store-btn { margin-left: auto; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-block: 32px 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-tile { grid-column: 1 / -1 !important; min-height: 0; aspect-ratio: 16 / 9; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why .wrap { grid-template-columns: 1fr; gap: 32px; }
  .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-media { order: -1; }
  .finder-card, .contact-card, .nl-card { grid-template-columns: 1fr; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --gutter: 18px; --radius-lg: 24px; --header-h: 58px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 1.25rem; }

  .hero { padding-block: 22px 28px; }
  .hero .wrap { gap: 26px; }
  .hero .kicker { margin-bottom: 10px; font-size: .72rem; }
  .hero h1 { font-size: 2.3rem; }
  .trace { width: calc(var(--vbw, 400) * .0165em); margin-top: 10px; }
  .hero-sub { font-size: 1rem; margin-top: 12px; }
  .hero-actions { margin-top: 20px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-actions .btn-ghost { min-height: 48px; padding-block: 10px; }
  .trust { margin-top: 18px; gap: 6px 16px; font-size: .84rem; }
  .slideshow { aspect-ratio: 4 / 3.2; }

  .cats { padding-block: 16px 0; }
  .cat-grid { gap: 12px; }
  .cat-text { padding: 8px 14px 14px; }
  .cat-text strong { font-size: 1.05rem; }
  .cat-text small { font-size: .78rem; }

  .finder { padding-block: 36px 0; }
  .finder-card { padding: 24px 20px; gap: 22px; }
  .q-opts { grid-template-columns: 1fr 1fr; }
  .q-opts:has(.q-opt small) { grid-template-columns: 1fr; }
  .q-results { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 2px 20px 6px; scroll-padding-inline: 20px; scrollbar-width: none; }
  .q-results::-webkit-scrollbar { display: none; }
  .q-results .card { flex: 0 0 72%; scroll-snap-align: start; }

  /* shelves: one big book per screen, swipe sideways for the next */
  .shelf { padding-block: 44px 0; }
  .shelf-head { margin-bottom: 16px; }
  .grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none;
    margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px)));
    padding: 2px max(var(--gutter), env(safe-area-inset-left, 0px)) 10px;
    scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .grid::-webkit-scrollbar { display: none; }
  .grid > .card { flex: 0 0 80%; scroll-snap-align: start; }
  .grid > .card:only-child { flex-basis: 100%; }
  .card:hover { transform: none; box-shadow: none; }
  .photo-tile { display: none; }
  .acts { display: none; }
  .card h3 { font-size: 1.2rem; }
  .buy { min-height: 50px; font-size: 1rem; }

  .why { margin-top: 48px; padding-block: 40px; }
  .why .section-title { margin-bottom: 20px; }
  .why-list { gap: 20px; }
  .why-item { grid-template-columns: 48px minmax(0, 1fr); gap: 2px 14px; }
  .why-item .ico { width: 48px; height: 48px; border-radius: 14px; }
  .why-item h3 { font-size: 1.12rem; }
  .why-item p { font-size: .95rem; }

  .reviews { padding-block: 48px 8px; }
  .freebies { padding-block: 48px 0; }
  .free-grid { gap: 12px; }
  .free-card-text { padding: 12px; }
  .free-card-text strong { font-size: .98rem; }
  .review { padding: 18px 18px; gap: 14px; }
  .review-cover { width: 76px; height: 80px; }
  .review blockquote { font-size: 1rem; }

  .contact { padding-block: 40px 48px; }
  .newsletter { padding-block: 48px 0; }
  .nl-card { padding: 24px 18px; gap: 20px; }
  .nl { padding: 18px 16px; }
  .nl-row { grid-template-columns: 1fr; }
  .nl-age { font-size: .88rem; padding: 8px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .fab { display: inline-flex; }

  .viewer { padding: 0; }
  .viewer-box { border-radius: 0; height: 100%; }
  .viewer-head { padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 10px 18px; flex-wrap: wrap; gap: 10px 12px; }
  .viewer-buy { order: 3; width: 100%; }
  .viewer-stage { flex: 1; height: auto; }
  .page-btn { display: none; }
  .viewer-foot { padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); flex-direction: column; align-items: stretch; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
