:root {
  --ink: #20302d;
  --muted: #66736f;
  --paper: #fffaf2;
  --white: #ffffff;
  --mint: #dcefe7;
  --mint-deep: #2e7d68;
  --sun: #f7c95c;
  --coral: #ef806e;
  --blue: #78aabd;
  --line: #dce3de;
  --shadow: 0 16px 40px rgba(45, 61, 56, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { max-width: 1240px; margin: 0 auto; min-height: 84px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; letter-spacing: -.02em; }
.brand strong { color: var(--mint-deep); font-weight: 700; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); transform: rotate(-7deg); }
.brand-mark svg { width: 27px; height: 27px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark.small { width: 32px; height: 32px; font-family: sans-serif; font-size: .85rem; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { color: #43514d; text-decoration: none; font-size: .92rem; font-weight: 650; }
nav a:hover { color: var(--mint-deep); }

.hero { max-width: 1240px; margin: 0 auto; min-height: 600px; padding: 62px 28px 84px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.eyebrow { margin: 0 0 15px; color: var(--mint-deep); font-size: .78rem; line-height: 1.3; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; font-weight: 500; line-height: 1.04; }
h1 { max-width: 700px; font-size: clamp(3.2rem, 6vw, 5.7rem); }
h1 em { color: var(--coral); font-weight: 500; }
.hero-copy > p:not(.eyebrow) { max-width: 610px; margin: 24px 0 0; color: var(--muted); font-size: 1.12rem; line-height: 1.75; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; cursor: pointer; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--ink); box-shadow: 0 8px 20px rgba(32,48,45,.17); }
.button-primary:hover { background: #314640; }
.button-secondary { color: var(--ink); background: var(--mint); }
.button-ghost { color: var(--ink); background: transparent; border-color: #bfc9c4; }
.hero-note { margin-top: 23px; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 7px; }
.hero-note span { color: var(--coral); }
.hero-art { min-height: 500px; position: relative; display: grid; place-items: center; }
.paper { position: absolute; width: min(375px, 80%); aspect-ratio: 8.5 / 11; border: 12px solid white; background: white; box-shadow: var(--shadow); }
.paper-back { transform: rotate(8deg) translate(20px, 4px); background: var(--mint); }
.paper-front { overflow: hidden; transform: rotate(-4deg); }
.paper-front img { width: 100%; height: 100%; object-fit: cover; }
.scribble { position: absolute; border: 5px solid; border-color: transparent transparent var(--coral) var(--coral); border-radius: 50%; }
.scribble-one { width: 72px; height: 44px; left: 2%; bottom: 15%; transform: rotate(-18deg); }
.scribble-two { width: 62px; height: 32px; right: 2%; top: 12%; border-color: var(--blue) var(--blue) transparent transparent; transform: rotate(15deg); }

.trust-strip { background: var(--ink); color: white; display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-strip div { min-height: 118px; padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,.13); }
.trust-strip div:last-child { border: 0; }
.trust-strip span { font-family: Georgia, serif; color: var(--sun); font-size: 1.8rem; }
.trust-strip p { margin: 5px 0 0; color: #d7dfdc; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }

.library { max-width: 1240px; margin: 0 auto; padding: 110px 28px 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.section-heading h2 { font-size: clamp(2.5rem, 4vw, 4.2rem); }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.7; }
.section-heading.centered { display: block; text-align: center; }
.tool-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.search-box { width: min(390px, 100%); height: 52px; padding: 0 17px; display: flex; align-items: center; gap: 11px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 18px rgba(38, 60, 53, .05); }
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #99a39f; }
.difficulty-filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.filter-pill, .category-pill { border: 1px solid var(--line); background: rgba(255,255,255,.7); color: #596863; border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 700; }
.filter-pill { padding: 10px 15px; }
.filter-pill:hover, .filter-pill.active { color: white; background: var(--mint-deep); border-color: var(--mint-deep); }
.category-scroller { margin: 25px 0 0; padding-bottom: 5px; display: flex; gap: 9px; overflow-x: auto; scrollbar-width: thin; }
.category-pill { flex: 0 0 auto; padding: 8px 14px; }
.category-pill:hover, .category-pill.active { color: var(--ink); background: var(--sun); border-color: var(--sun); }
.results-line { min-height: 52px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.results-line p { margin: 0; }
.text-button { padding: 8px 0; border: 0; background: none; color: var(--mint-deep); font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.load-more-wrap { padding: 38px 0 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
.load-more-wrap p { margin: 0; color: var(--muted); font-size: .85rem; }
.page-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(40,60,52,.055); transition: transform .2s ease, box-shadow .2s ease; }
.page-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-image { position: relative; aspect-ratio: 8.5 / 9.3; overflow: hidden; background: #f5f3ec; cursor: zoom-in; }
.card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; transition: transform .25s ease; }
.page-card:hover .card-image img { transform: scale(1.015); }
.age-badge { position: absolute; top: 14px; left: 14px; padding: 7px 10px; border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(0,0,0,.08); font-size: .74rem; font-weight: 800; }
.pack-toggle { position: absolute; top: 13px; right: 13px; width: 39px; height: 39px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.94); cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.08); font-size: 1.45rem; line-height: 1; }
.pack-toggle.selected { color: white; background: var(--mint-deep); }
.card-body { padding: 21px; }
.card-category { margin: 0 0 7px; color: var(--mint-deep); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.card-body h3 { margin: 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.card-title-link { text-decoration-color: transparent; text-underline-offset: 4px; transition: color .18s ease, text-decoration-color .18s ease; }
.card-title-link:hover { color: var(--mint-deep); text-decoration-color: currentColor; }
.card-description { min-height: 42px; margin: 8px 0 18px; color: var(--muted); font-size: .87rem; line-height: 1.55; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; }
.card-action { min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); text-decoration: none; cursor: pointer; font-size: .8rem; font-weight: 800; }
.card-action:hover { background: var(--mint); border-color: var(--mint); }
.card-action.primary { color: white; background: var(--ink); border-color: var(--ink); }
.card-action.icon { padding: 0; font-size: 1.05rem; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state > span { font-size: 2.5rem; color: var(--coral); }
.empty-state h3 { margin: 13px 0 5px; font-family: Georgia, serif; font-size: 1.8rem; }
.empty-state p { color: var(--muted); }

.ad-slot { max-width: 1184px; min-height: 106px; margin: 0 auto 100px; border: 1px dashed #bdc7c2; background: rgba(255,255,255,.45); display: flex; align-items: center; justify-content: center; flex-direction: column; color: #8a9691; }
.ad-slot span { font-size: .65rem; letter-spacing: .17em; text-transform: uppercase; }
.ad-slot p { margin: 6px 0 0; font-family: Georgia, serif; }
.steps-section { padding: 100px 28px; background: var(--mint); }
.steps { max-width: 1080px; margin: 45px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps article { min-height: 245px; padding: 30px; background: rgba(255,255,255,.7); border: 1px solid rgba(46,125,104,.12); border-radius: var(--radius); }
.steps span { font-family: Georgia, serif; color: var(--coral); font-size: 2rem; }
.steps h3 { margin: 36px 0 10px; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.steps p { margin: 0; color: var(--muted); line-height: 1.65; }
.print-tips { max-width: 1100px; margin: 0 auto; padding: 120px 28px; display: grid; grid-template-columns: .7fr 1.3fr; gap: 90px; align-items: center; }
.print-tips h2 { font-size: clamp(2.3rem, 4vw, 3.7rem); }
.print-tips ul { margin: 28px 0 0; padding: 0; list-style: none; }
.print-tips li { position: relative; margin: 15px 0; padding-left: 29px; color: var(--muted); line-height: 1.6; }
.print-tips li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--mint-deep); font-weight: 900; }
.tips-illustration { height: 290px; position: relative; }
.pencil { position: absolute; left: 50%; bottom: 15px; width: 58px; height: 250px; border: 3px solid var(--ink); border-radius: 4px 4px 0 0; transform-origin: 50% 90%; }
.pencil::before { content: ""; position: absolute; left: -3px; top: -57px; border-left: 29px solid transparent; border-right: 29px solid transparent; border-bottom: 56px solid #e8d5b7; }
.pencil::after { content: ""; position: absolute; left: 19px; top: -48px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 20px solid var(--ink); }
.pencil-yellow { background: var(--sun); transform: translateX(-100%) rotate(-14deg); }
.pencil-coral { background: var(--coral); transform: translateX(-10%) rotate(4deg); }
.pencil-blue { background: var(--blue); transform: translateX(78%) rotate(15deg); }

footer { padding: 55px 28px 75px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.footer-brand { justify-content: center; color: var(--ink); }
footer p { margin: 16px auto 0; }
.fine-print { font-size: .78rem; }
.pack-bar { position: fixed; z-index: 30; left: 50%; bottom: 20px; width: min(620px, calc(100% - 28px)); min-height: 72px; padding: 10px 12px 10px 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 15px; color: white; background: var(--ink); border-radius: 20px; box-shadow: 0 16px 45px rgba(20,32,28,.28); }
.pack-bar div { display: flex; align-items: baseline; gap: 7px; margin-right: auto; }
.pack-bar div span { color: var(--sun); font-family: Georgia, serif; font-size: 1.5rem; }
.pack-bar p { margin: 0; color: #d7dfdc; font-size: .82rem; }
.pack-clear { color: white; background: transparent; border: 0; cursor: pointer; text-decoration: underline; }
.pack-bar .button-primary { color: var(--ink); background: var(--sun); box-shadow: none; }

.preview-dialog { width: min(1050px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 26px 80px rgba(0,0,0,.27); }
.preview-dialog::backdrop { background: rgba(24,38,34,.72); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 42px; height: 42px; border: 0; border-radius: 50%; color: var(--ink); background: white; box-shadow: 0 3px 14px rgba(0,0,0,.15); cursor: pointer; font-size: 1.5rem; }
.dialog-layout { display: grid; grid-template-columns: 1.05fr .95fr; }
.dialog-image-wrap { min-height: 680px; padding: 30px; display: grid; place-items: center; background: #ebece7; }
.dialog-image-wrap img { max-height: 620px; box-shadow: 0 10px 30px rgba(0,0,0,.13); }
.dialog-copy { padding: 65px 45px 45px; align-self: center; }
.dialog-copy h2 { font-size: 3rem; }
.dialog-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0 28px; }
.dialog-meta span { padding: 7px 10px; border-radius: 999px; background: var(--mint); font-size: .75rem; font-weight: 750; }
.dialog-actions { display: flex; flex-direction: column; gap: 9px; }
.noscript { padding: 20px; color: #721c24; background: #f8d7da; text-align: center; }

/* Search-friendly coloring page landing pages */
.detail-page { min-height: 100vh; }
.detail-main { max-width: 1240px; margin: 0 auto; padding: 34px 28px 110px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin: 8px 0 32px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--mint-deep); text-underline-offset: 3px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr); gap: 70px; align-items: center; }
.detail-artwork { padding: 24px; background: #eeeee9; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-artwork img { width: 100%; height: auto; background: white; box-shadow: 0 8px 24px rgba(25,40,35,.11); }
.detail-content h1 { font-size: clamp(3rem, 5.4vw, 5.3rem); }
.detail-content h1 em { display: block; color: var(--coral); font-weight: 500; }
.detail-description { margin: 26px 0 0; color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.5; }
.detail-content > p:not(.eyebrow):not(.detail-description) { margin: 18px 0 0; color: var(--muted); line-height: 1.75; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 30px 0; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 28px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.detail-facts div { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.55); }
.detail-facts dt { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-facts dd { margin: 5px 0 0; font-weight: 700; }
.detail-back { color: var(--mint-deep); font-weight: 750; text-underline-offset: 4px; }

@media (max-width: 900px) {
  nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 30px; padding-top: 45px; }
  .hero-art { min-height: 470px; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip div:nth-child(2) { border-right: 0; }
  .trust-strip div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.13); }
  .section-heading { align-items: start; flex-direction: column; }
  .tool-row { align-items: stretch; flex-direction: column; }
  .difficulty-filters { justify-content: flex-start; }
  .page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .print-tips { grid-template-columns: 1fr; gap: 20px; }
  .tips-illustration { width: 330px; max-width: 100%; margin: 0 auto; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-image-wrap { min-height: 400px; }
  .dialog-image-wrap img { max-height: 520px; }
  .dialog-copy { padding: 40px 30px; }
  .detail-layout { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 72px; padding: 0 18px; }
  .hero { padding: 35px 18px 65px; }
  h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .hero-art { min-height: 390px; }
  .paper { width: 275px; }
  .trust-strip span { font-size: 1.55rem; }
  .trust-strip p { font-size: .65rem; }
  .library { padding: 78px 16px 55px; }
  .page-grid { grid-template-columns: 1fr; gap: 18px; }
  .card-image { aspect-ratio: 8.5 / 8.8; }
  .steps-section { padding: 75px 18px; }
  .steps { grid-template-columns: 1fr; }
  .print-tips { padding: 80px 20px; }
  .pack-bar { align-items: center; flex-wrap: wrap; }
  .pack-bar div { flex: 1 1 180px; }
  .pack-bar .button { min-height: 43px; }
  .dialog-copy h2 { font-size: 2.3rem; }
  .detail-main { padding: 20px 16px 75px; }
  .breadcrumbs { align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
  .detail-artwork { padding: 11px; }
  .detail-content h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-facts { grid-template-columns: 1fr; }
}

@page { size: letter; margin: .28in; }

.print-stage { display: none; }

@media print {
  body:not(.detail-page) > * { display: none !important; }
  body.printing-coloring-pages > .print-stage { display: block !important; margin: 0; padding: 0; }
  body.printing-coloring-pages .print-sheet { width: 100%; height: 10.44in; display: flex; align-items: center; justify-content: center; break-after: page; page-break-after: always; }
  body.printing-coloring-pages .print-sheet:last-child { break-after: auto; page-break-after: auto; }
  body.printing-coloring-pages .print-sheet img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
  .detail-page .site-header, .detail-page .breadcrumbs, .detail-page .detail-content, .detail-page footer, .detail-page .skip-link { display: none !important; }
  .detail-page, .detail-page .detail-main, .detail-page .detail-layout, .detail-page .detail-artwork { margin: 0; padding: 0; background: white; border: 0; box-shadow: none; display: block; }
  .detail-page .detail-artwork img { width: 100%; height: auto; max-height: 10.4in; object-fit: contain; box-shadow: none; }
}

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