/* Little Sprouts — colors taken from the book covers */
:root {
  --sky: #8fd0f0;
  --sky-deep: #5fb6e4;
  --grass: #4f9a2c;
  --grass-dark: #3c7a1f;
  --label: #e2552a;      /* the orange-red "Coloring Book" band */
  --label-dark: #c4431b;
  --sun: #ffd23a;
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #eef8fd;
  --muted: #4d5a61;
  --display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: #11598a; text-underline-offset: .15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--label); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 800; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.small { font-size: .9rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- sky header, like the cover ---------- */
.sky { position: relative; background: linear-gradient(var(--sky-deep), var(--sky) 70%); overflow: hidden; padding-bottom: 70px; }
.sun {
  position: absolute; top: -70px; right: -50px; width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0 54%, transparent 55%),
              repeating-conic-gradient(from 6deg, var(--sun) 0 9deg, transparent 9deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 0 70%, transparent 71%);
          mask: radial-gradient(circle, #000 0 70%, transparent 71%);
}
.hill { position: absolute; left: 0; bottom: -1px; width: 100%; height: 90px; fill: var(--grass); }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--paper);
  font: 800 1.5rem/1 var(--display); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.brand img { background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; padding: 2px; }
.nav { display: flex; gap: 6px; margin-right: 110px; }
.nav a { font: 600 1.05rem/1 var(--display); color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.75); }
.nav a:hover { background: var(--paper); }
.hero { position: relative; padding: 28px 0 20px; display: grid; gap: 28px; }
.sky-art .hero { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 36px; }
.outline {
  font-weight: 800; color: var(--paper);
  font-size: clamp(2.3rem, 1.2rem + 4.6vw, 4.6rem); letter-spacing: .005em; line-height: 1.02;
  -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; margin-bottom: .35em; max-width: 16ch;
}
.lead { font-size: 1.2rem; max-width: 46ch; }
.hero-art { margin: 0 0 -40px; justify-self: center; width: min(360px, 80%); transform: rotate(2.5deg); position: relative; z-index: 1; }
.hero-art img { border: 4px solid var(--ink); border-radius: var(--r); background: var(--paper); box-shadow: 8px 8px 0 var(--grass-dark); }
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .95rem; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--muted); }
.crumbs a { color: var(--ink); }

/* ---------- buttons, styled after the cover's label band ---------- */
.btn { display: inline-block; font: 800 1.15rem/1.15 var(--display); color: var(--paper); background: var(--label);
  border: 3px solid var(--ink); border-radius: 12px; padding: 12px 20px 10px; text-decoration: none; box-shadow: 0 4px 0 var(--ink); }
.btn:hover { background: var(--label-dark); color: var(--paper); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-big { font-size: 1.35rem; padding: 16px 26px 13px; display: block; text-align: center; }
.btn-small { font-size: 1rem; padding: 9px 14px 7px; }
.btn-soon, .btn-soon:hover { background: #e9eef1; color: var(--muted); box-shadow: none; border-color: #b9c4ca; cursor: default; }

/* ---------- sections ---------- */
.band { padding: 56px 0; }
.band-books { background: var(--mist); }
.sect-head { margin-bottom: 26px; }

/* coloring-page tiles: framed like the cover illustration */
.sheets { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.sheets-3 { grid-template-columns: repeat(3, minmax(0, 220px)); }
.sheet { display: block; text-decoration: none; color: var(--ink); }
.sheet img { border: 3px solid var(--ink); border-radius: var(--r); background: var(--paper); }
.sheet .cap { display: block; font: 700 1.15rem/1.2 var(--display); margin-top: 8px; }
.sheet .from { display: block; font-size: .88rem; color: var(--muted); }
.sheet:hover .cap { text-decoration: underline; text-decoration-thickness: 2px; }

.books { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.books-wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px; }
.bookcard .cover-link { display: block; text-decoration: none; color: var(--ink); }
.bookcard img { border: 3px solid var(--ink); border-radius: 8px; }
.bookcard .cap { display: block; font: 700 1.1rem/1.2 var(--display); margin: 10px 0 6px; }
.bookcard .cover-link:hover .cap { text-decoration: underline; }
.buy-mini { font-weight: 700; font-size: .95rem; }
.buy-mini.soon { color: var(--muted); font-weight: 400; }

.tips ul { padding-left: 1.2em; max-width: 68ch; }
.tips li { margin-bottom: .5em; }

.group + .group { margin-top: 48px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.group-head h2 { margin: 0; font-size: 1.6rem; }

/* ---------- single printable + book pages ---------- */
.printable, .bookpage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 44px; align-items: start; }
.big-sheet, .cover-big { margin: 0; }
.big-sheet img { border: 4px solid var(--ink); border-radius: var(--r); }
.cover-big img { border: 4px solid var(--ink); border-radius: 10px; max-width: 460px; width: 100%; }
.side > .btn-big { margin-bottom: 8px; }
.fact { background: #fff7d1; border: 3px solid var(--ink); border-radius: var(--r); padding: 18px 20px 4px; margin: 28px 0; }
.fact h2 { font-size: 1.35rem; margin-bottom: .3em; }
.from-book { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.from-book img { border: 3px solid var(--ink); border-radius: 6px; }
.from-book h2 { font-size: 1.2rem; margin-bottom: .3em; }
.facts { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 8px; }
.facts li { padding-left: 30px; position: relative; font-weight: 700; }
.facts li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--grass); border: 2px solid var(--ink); }
.contents { columns: 4 170px; column-gap: 28px; padding-left: 1.6em; margin: 0; }
.contents li { break-inside: avoid; padding: 2px 0; }
.contents li::marker { color: var(--muted); font-size: .85em; }

/* ---------- footer ---------- */
.foot { background: var(--grass); color: var(--paper); padding: 34px 0 26px; border-top: 4px solid var(--grass-dark); }
.foot a { color: var(--paper); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.foot .small { color: #e6f2de; }

/* ---------- small screens ---------- */
@media (max-width: 800px) {
  .sky-art .hero, .printable, .bookpage { grid-template-columns: 1fr; }
  .hero-art { width: min(300px, 75%); margin-bottom: -20px; }
  .nav { margin-right: 70px; }
  .sun { width: 160px; height: 160px; top: -50px; right: -40px; }
  .band { padding: 40px 0; }
  .cover-big img { max-width: 320px; }
  .sheets-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .bar { justify-content: flex-start; }
  .nav { margin-right: 0; }
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sheets-3 .cap { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
@media print { .sky, .foot, .side, .band-books { display: none; } }

/* colorer:start (written by site-build-script.py) */
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.btn-pair .btn-big { font-size: 1.2rem; padding: 14px 10px 11px; }
.btn-green { background: var(--grass); }
.btn-green:hover { background: var(--grass-dark); }
@media (max-width: 380px) { .btn-pair { grid-template-columns: 1fr; } }

.sky-compact { padding-bottom: 64px; }
.sky-compact .hero { padding: 10px 0 14px; }
.sky-compact .outline { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); max-width: none; }
.sky-compact .lead { margin-bottom: 0; }
.color-band { padding-top: 28px; }
.colorer { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 26px; align-items: start; }
.stage { position: relative; margin-inline: auto; background: var(--paper); border: 5px solid var(--ink);
  border-radius: var(--r); overflow: hidden; aspect-ratio: var(--aw) / var(--ah);
  width: min(100%, calc((100vh - 40px) * var(--aw) / var(--ah)));
  width: min(100%, calc((100svh - 40px) * var(--aw) / var(--ah))); touch-action: manipulation; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage canvas.paint { cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stage canvas.lines { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; }
.stage-msg { position: absolute; inset: 0; margin: 0; max-width: none; display: grid; place-items: center; padding: 20px;
  text-align: center; font: 700 1.2rem/1.3 var(--display); background: rgba(255,255,255,.85); }
.colorer.ready .stage-msg { display: none; }
.color-tools { position: sticky; top: 12px; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sw { aspect-ratio: 1; width: 100%; border-radius: 50%; border: 3px solid var(--ink); padding: 0; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink); }
.sw[aria-pressed="true"] { outline: 4px solid var(--label); outline-offset: 3px; transform: scale(1.06); }
.sw.eraser { background: repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 50% / 14px 14px; position: relative; }
.sw.eraser::after { content: "Eraser"; position: absolute; left: 50%; bottom: -1.5em; transform: translateX(-50%);
  font: 700 .72rem/1 var(--body); color: var(--ink); white-space: nowrap; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 30px; }
.tools button { font: 700 1rem/1.1 var(--display); padding: 10px 6px 8px; border-radius: 12px; border: 3px solid var(--ink);
  background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.tools button:hover { background: var(--mist); }
.tools button:active, .sw:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.tools button:disabled { opacity: .45; cursor: default; }
.tools .main { grid-column: 1 / -1; background: var(--label); color: var(--paper); font-size: 1.1rem; }
.tools .main:hover { background: var(--label-dark); }
.tools [data-act="print"] { background: var(--grass); }
.tools [data-act="print"]:hover { background: var(--grass-dark); }
.hint { margin: 12px 0 0; }
.color-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.color-extra .fact { margin-bottom: 0; }
.print-out, .tools .short { display: none; }
/* tablets and phones: colors and buttons ride along at the top while the picture scrolls */
@media (max-width: 900px) {
  .color-band { padding-top: 0; }
  .colorer { grid-template-columns: 1fr; gap: 12px; }
  .color-tools { order: -1; top: 0; z-index: 5; background: var(--paper); margin: 0 -16px; padding: 10px 16px;
    box-shadow: 0 3px 0 rgba(31,31,31,.12); }
  .palette { grid-template-columns: repeat(9, minmax(0, 52px)); justify-content: center; gap: 7px; }
  .sw { border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
  .sw[aria-pressed="true"] { outline-width: 3px; outline-offset: 2px; }
  .sw.eraser::after { display: none; }
  .tools { grid-template-columns: repeat(4, minmax(0, 160px)); justify-content: center; margin-top: 10px; }
  .tools button, .tools .main { grid-column: auto; font-size: .95rem; padding: 9px 4px 7px; }
  .hint { display: none; }
  .stage { width: min(100%, calc((100vh - 160px) * var(--aw) / var(--ah)));
           width: min(100%, calc((100svh - 160px) * var(--aw) / var(--ah))); }
  .color-extra { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 480px) {
  .palette { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
  .tools { gap: 6px; }
  .tools .opt { display: none; }
  .tools .short { display: inline; }
  .sky-compact .crumbs { display: none; }
}
@media print {
  @page { margin: 0.4in; }
  .color-page > :not(.print-out) { display: none !important; }
  .color-page .print-out { display: block !important; width: 100%; height: auto; max-height: 10in; object-fit: contain; margin: 0 auto; }
}
/* colorer:end */
