:root {
  --green: #226E42;
  --green-dark: #17502F;
  --navy: #262C52;
  --ink: #1f2330;
  --muted: #555b6e;
  --line: #e4e6ec;
  --bg-soft: #f6f7f9;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw + 1rem, 2.8rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 2vw + .8rem, 1.8rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.1rem; margin: .75rem 0 .25rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
main { padding: 1.5rem 0 3rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.site-header nav a { font-weight: 600; text-decoration: none; color: var(--navy); }
.site-header nav a:hover { color: var(--green); }
.logo img { height: 48px; width: auto; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding-block: 1.5rem; }
.site-footer p { margin: .25rem 0; }

.btn {
  display: inline-block; background: var(--green); color: #fff; font-weight: 600; text-decoration: none;
  padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid var(--green); min-height: 44px;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--green); }
.btn-outline:hover { background: var(--bg-soft); color: var(--green-dark); }

.hero { padding: 1.5rem 0 .5rem; }
.steps { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: s; }
.steps li { counter-increment: s; background: var(--bg-soft); border-radius: var(--radius); padding: .6rem 1rem; }
.steps li::before { content: counter(s) ". "; font-weight: 700; color: var(--green); }

.book-grid, .page-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.book-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.book-card a { text-decoration: none; display: block; }
.book-card img { border-radius: 6px; box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.book-card-title { display: block; font-weight: 700; color: var(--navy); margin-top: .75rem; font-size: 1.05rem; }
.book-card a:hover .book-card-title { color: var(--green); text-decoration: underline; }
.book-card p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.breadcrumb li + li::before { content: "›"; margin: 0 .5rem; color: var(--muted); }
.breadcrumb a[aria-current] { color: var(--muted); text-decoration: none; }

.book-hero { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 18rem) 1fr; align-items: start; }
.book-cover { border-radius: 6px; box-shadow: 0 4px 18px rgb(0 0 0 / .15); }

.page-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.page-card { display: flex; flex-direction: column; }
.page-thumb img { border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: box-shadow .15s; }
.page-thumb:hover img { box-shadow: 0 4px 16px rgb(0 0 0 / .12); }
.page-card p { margin: 0 0 .75rem; color: var(--muted); font-style: italic; }
.page-card .btn { margin-top: auto; align-self: flex-start; }

.about-book { max-width: 46rem; }
.about-book ul { padding-left: 1.25rem; }

@media (max-width: 40rem) {
  .book-hero { grid-template-columns: 1fr; }
  .book-cover { max-width: 14rem; }
  .page-card .btn { align-self: stretch; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .site-footer, .btn { display: none; } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: auto; }
.page-card .actions .btn { margin-top: 0; }
.pin-link { font-weight: 600; font-size: .95rem; padding: .6rem 0; }
.page-card h3 a { color: var(--navy); text-decoration: none; }
.page-card h3 a:hover { color: var(--green); text-decoration: underline; }

.coloring-page { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 30rem) 1fr; align-items: start; }
.coloring-page .actions { margin: 1.5rem 0; }
.full-book { color: var(--muted); }
.page-grid-small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.page-grid-small a { text-decoration: none; }
.page-grid-small img { border: 1px solid var(--line); border-radius: 8px; }
.page-card-title { display: block; font-weight: 600; color: var(--navy); margin-top: .5rem; }
.page-grid-small a:hover .page-card-title { color: var(--green); text-decoration: underline; }

@media (max-width: 40rem) {
  .coloring-page { grid-template-columns: 1fr; }
  .coloring-page .actions .btn { flex: 1 1 100%; text-align: center; }
  .page-grid-small { grid-template-columns: repeat(2, 1fr); }
}
