/* ColorNook: bright bands, torn-paper edges, chunky headlines, red buttons, Nook the hedgehog. */
:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --blue: #12a1dc;
  --blue-dark: #0b7fb3;
  --navy: #16264a;
  --red: #ef3b2d;
  --red-dark: #c42a1e;
  --yellow: #ffd23f;
  --purple: #6b3fc4;
  --green: #22b573;
  --pink: #ff5ca8;
  --ink: #16264a;
  --text: #2a3550;
  --muted: #6a7488;
  --line: #dfe5ee;
  --soft: #eef8fd;
  /* older names still used by component rules */
  --coral: var(--red);
  --coral-dark: var(--red-dark);
  --cream: var(--soft);
  --sun: var(--yellow);
  --teal: var(--green);
  --sky: var(--blue);
  --lilac: var(--purple);
  --gray: var(--muted);
  --bw: 2px;
  --radius: 16px;
  --shadow: 0 8px 22px rgba(22, 38, 74, .12);
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.06; margin: 0 0 .45em; color: var(--navy); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 48px 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 2px 0 rgba(22, 38, 74, .08); }
.hdr-in { display: flex; align-items: center; gap: 14px; min-height: 74px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.75rem var(--display); color: var(--navy); flex: none; }
.logo-mark { width: 80px; height: auto; margin: 2px 0 -36px; flex: none; transition: transform .18s; transform-origin: 50% 80%;
  filter: drop-shadow(0 3px 0 rgba(22, 38, 74, .18)); }  /* bigger than the 74px bar: Nook hangs ~20px over the hero */
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.06); }
.nav { display: flex; align-items: center; align-self: stretch; gap: 4px; margin-left: 4px; flex: none; }  /* menus never shrink; the search box gives way instead */

/* Search */
.search { display: flex; align-items: center; background: #fff; border: 2px solid #d4dce8; border-radius: 999px; padding: 3px 4px 3px 14px; }
.hdr-in > .search { flex: 0 1 220px; min-width: 44px; margin-left: auto; }
.search:focus-within { border-color: var(--blue); }
.search input { border: 0; outline: 0; background: none; font: 600 .95rem var(--body); color: var(--text); width: 100%; min-width: 0; padding: 7px 0; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; background: var(--red); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.search button:hover { background: var(--red-dark); }
.search-big { margin: 0; max-width: 520px; padding: 4px 6px 4px 18px; }
.search-big input { font-size: 1.05rem; padding: 9px 0; }
.search-big button { width: 40px; height: 40px; }
.footer-search { margin: 18px 0 0; max-width: 320px; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); }
.footer-search input { color: #fff; }
.footer-search input::placeholder { color: #aab6cc; }

/* Mega menu (sitenav.py) */
.hdr-in { position:relative }
.menu-toggle { display:none }
.nav .search { display:none }
.mm-bar { list-style:none; margin:0 0 0 6px; padding:0; display:flex; gap:2px; align-self:stretch }
.mm { display:flex; align-items:center }  /* full header height: no hover gap between button and panel */
.mm-btn { position:relative }
/* caret under the open button, centred on the panel's top border: header 74px, button 36px -> 19px below the button + half the caret */
.mm.open .mm-btn::after { content:""; position:absolute; left:50%; bottom:-26px; width:14px; height:14px; background:#fff; border-left:var(--bw) solid var(--ink);
  border-top:var(--bw) solid var(--ink); transform:translateX(-50%) rotate(45deg); z-index:31; pointer-events:none }
.mm-btn { display:flex; align-items:center; gap:6px; white-space:nowrap; font:700 .98rem var(--body); color:var(--ink); background:none; cursor:pointer;
  padding:8px 11px; border:var(--bw) solid transparent; border-radius:999px }
.mm-btn svg { width:12px; height:8px; transition:transform .15s }
.mm-btn:hover, .mm.open .mm-btn { border-color:var(--ink); background:var(--cream) }
.mm.open .mm-btn svg { transform:rotate(180deg) }
.mm-panel { display:none; position:absolute; left:0; right:0; top:100%; background:#fff; border:var(--bw) solid var(--ink);
  border-radius:0 0 20px 20px; box-shadow:8px 8px 0 var(--ink); padding:26px 28px 24px; gap:28px; z-index:30 }
.mm.open .mm-panel { display:flex }
@media (hover:hover) and (min-width:1001px) { .mm:hover .mm-btn { border-color:var(--ink); background:var(--cream) } }
.mm-cols { display:flex; gap:30px; flex:1 }
.mm-col { min-width:170px; flex:1 }
.mm-col ul { list-style:none; margin:0; padding:0 }
.mm-col li a { display:flex; justify-content:space-between; gap:10px; text-decoration:none; font-weight:600; padding:5px 8px; margin:0 -8px; border-radius:8px }
.mm-col li a:hover { background:var(--cream); color:var(--coral-dark) }
.mm-col .n { font-size:.78rem; font-weight:800; color:var(--gray); background:#f3eee6; border-radius:999px; padding:1px 8px; align-self:center }
.mm-col li.more a { color:var(--coral-dark); font-weight:800; margin-top:6px }
.mm-h { font-family:var(--display); font-size:1.15rem; margin:0 0 8px; color:var(--ink) }
.mm-wide { flex:3 }
.mm-grid { display:grid; grid-template-columns:repeat(4, 1fr); column-gap:24px }
.mm-side { width:260px; flex:none; display:flex; flex-direction:column; gap:14px }
.mm-feature { display:flex; gap:14px; align-items:center; text-decoration:none; border:var(--bw) solid var(--ink); border-radius:16px; padding:12px;
  background:var(--cream); box-shadow:5px 5px 0 var(--coral) }
.mm-feature img { width:84px; height:auto; border:2px solid var(--ink); border-radius:6px; background:#fff }
.mm-feature b { display:block; font-family:var(--display); font-weight:400; font-size:1.2rem; line-height:1.1; margin:6px 0 2px }
.mm-feature span span { font-size:.9rem; color:var(--gray) }
.mm-all { font-weight:800; color:var(--coral-dark); text-decoration:none }
.mm-note { margin:0; color:#555; font-size:.95rem }
.nav-season { margin-left:6px; white-space:nowrap; text-decoration:none; font-weight:800; color:#fff; background:var(--coral); border:var(--bw) solid var(--ink);
  border-radius:999px; padding:6px 14px; box-shadow:3px 3px 0 var(--ink); transform:rotate(-2deg) }

@media (max-width:1000px) {
  .menu-toggle { display:flex; align-items:center; gap:8px; margin-left:auto; font:800 1rem var(--body); color:var(--ink); background:#fff;
    border:var(--bw) solid var(--ink); border-radius:999px; padding:7px 14px; box-shadow:3px 3px 0 var(--ink); cursor:pointer }
  .nav { display:none !important }
  .hdr.drawer .nav { display:flex !important; flex-direction:column; align-items:stretch; justify-content:flex-start; position:fixed; inset:72px 0 0 0; background:#fff; overflow:auto;
    padding:12px 16px 40px; margin:0; z-index:40; border-top:var(--bw) solid var(--ink) }
  .mm-bar { flex-direction:column; margin:0; gap:0 }
  .mm { border-bottom:2px dashed #e5ddd2 }
  .mm-btn { width:100%; justify-content:space-between; font-size:1.2rem; padding:16px 4px; border:0; border-radius:0 }
  .mm-btn:hover, .mm.open .mm-btn { background:none; border:0 }
  .mm { display:block }
  .mm.open .mm-btn::after { display:none }
  .mm-panel { position:static; border:0; box-shadow:none; padding:0 0 16px; flex-direction:column; gap:16px }
  .mm-cols { flex-direction:column; gap:14px }
  .mm-grid { grid-template-columns:repeat(2, 1fr) }
  .mm-side { width:auto }
  .nav-season { align-self:flex-start; margin:18px 0 0 }
  .hdr-in > .search { display:none }
  .nav .search { display:flex !important; flex:0 0 auto !important; width:100%; max-width:none; margin:4px 0 10px }
  body.lock { overflow:hidden }
}

/* Print: just the content, no chrome */
@media print {
  .hdr, .site-footer, .menu-toggle, .filters, .gcard-dl, .downloads, .pager, .show-more, .skip, .topic-links { display: none !important; }
  body { background: #fff; color: #000; }
  .grid .card.more { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
  font: 800 1rem var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--coral); }
.btn-primary:hover { box-shadow: 6px 6px 0 var(--coral); }
.btn-ghost { background: #fff; }
.btn-link { border-color: transparent; text-decoration: underline; padding-inline: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1.08rem; }

/* Hero */
.hero { padding: 56px 0 24px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 800; color: var(--teal); background: #e3f7f3; padding: 4px 12px; border-radius: 999px; margin: 0 0 16px; font-size: .9rem; }
.hl { background: linear-gradient(transparent 60%, var(--sun) 60%); padding: 0 .1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-art { position: relative; height: 440px; }
.hero-art img {
  position: absolute; width: 56%; border-radius: 12px; background: #fff;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero-art img:nth-child(1) { left: 0; top: 40px; transform: rotate(-7deg); }
.hero-art img:nth-child(2) { left: 22%; top: 0; transform: rotate(2deg); z-index: 2; }
.hero-art img:nth-child(3) { right: 0; top: 60px; transform: rotate(8deg); }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.grid:not(.expanded) .gcard.more { display: none; }
.show-more { text-align: center; margin: 28px 0 0; }
.cat-card {
  --accent: var(--coral);
  display: block; text-decoration: none; background: var(--paper); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s;
}
.cat-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.cat-img { background: var(--accent); padding: 18px 18px 0; height: 200px; overflow: hidden; }
.cat-img img { border-radius: 8px 8px 0 0; }
.cat-body { padding: 14px 18px 18px; }
.cat-body h3 { margin: 0; font-size: 1.3rem; }
.cat-body span { color: var(--muted); font-weight: 700; font-size: .92rem; }
.accent-coral { --accent: #ffd9d4; }
.accent-teal { --accent: #cdf1ea; }
.accent-sky { --accent: #d6ebff; }
.accent-sun { --accent: #ffefc2; }
.accent-lilac { --accent: #e6dcff; }

/* Printable cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(42, 36, 64, .14); }
.card-img { aspect-ratio: 8.5 / 11; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.card-title { font-weight: 800; line-height: 1.25; }

.badge { flex: none; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: #eee; }
.badge-easy { background: #d8f5e6; color: #0f7a48; }
.badge-medium { background: #fff0c9; color: #8a5a00; }
.badge-detailed { background: #d6ebff; color: #0b5cad; }
.badge-hard { background: #ffe7cf; color: #9a4b00; }
.badge[class*="badge-grade"], .badge-pre-k { background: #e6dcff; color: #4b2bb3; }

/* Category page */
.cat-hero { background: var(--accent); padding: 36px 0 40px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.intro { max-width: 46em; }
.intro p { margin: 0 0 .7em; }
.cat-actions { margin-top: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: 700 .95rem var(--body); padding: 8px 18px; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Item page */
.item { padding: 28px 0 8px; }
.item-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.item-preview { background: var(--accent); border-radius: 24px; padding: 28px; }
.item-preview img { background: #fff; border-radius: 6px; box-shadow: var(--shadow); width: 100%; }
.item-info h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 14px; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; align-items: center; }
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 90px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-weight: 800; }
.specs dd { margin: 0; color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .82rem; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }
.pager { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: .95rem; }
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--ink); }

/* How to */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding: 0; list-style: none; counter-reset: s; }
.steps li { background: #fff; border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; box-shadow: var(--shadow); counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sun); display: grid; place-items: center; font: 700 1.1rem var(--display);
}

.prose { max-width: 720px; padding: 48px 0; }

/* Footer */
.site-footer { margin-top: 48px; background: var(--ink); color: #d9d4ea; padding: 48px 0 20px; }
.site-footer .logo { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr .8fr; gap: 32px 28px; }
.footer-inner p { max-width: 30em; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.footer-links strong { color: #fff; font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.footer-links a { text-decoration: none; color: #d9d4ea; }
.footer-links a:hover { color: #fff; }
.copyright { font-size: .85rem; color: #9a93b5; margin-top: 32px; }
.copyright a { color: #b7b0d0; }
@media (max-width: 1000px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

@media (max-width: 860px) {
  .hero-inner, .item-grid { grid-template-columns: 1fr; }
  .hero-art { height: 300px; max-width: 420px; }
  .item-grid { gap: 24px; }
  .item-preview { padding: 16px; }
}
@media (max-width: 600px) {
  .logo span { font-size: 1.25rem; }
  .logo-mark { width: 64px; margin-bottom: -26px; }
  .search { flex: 1 1 90px; min-width: 90px; padding-left: 10px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .topic-links a, .pill-links a { padding: 9px 14px; }
  .topic-links.compact a { padding: 7px 12px; }
  .chip { padding: 9px 18px; }
  .crumbs { font-size: .95rem; line-height: 1.9; }
  .pager a { padding: 8px 0; }
  .footer-links { gap: 10px; }
  .footer-links a { padding: 3px 0; }
  .copyright a { padding: 6px 2px; display: inline-block; }
  .card-body { flex-direction: column; align-items: flex-start; padding: 10px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-img { height: 140px; padding: 10px 10px 0; }
  .section { padding: 32px 0; }
  .downloads .btn-lg { flex: 1 1 100%; }
}

/* How to draw */
.card-img.square { aspect-ratio: 1; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { font-weight: 800; }
.muted { color: var(--muted); }
.red { color: #ff4d3d; font-weight: 800; }
.step-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.step { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.step-img { aspect-ratio: 1; border-bottom: 1px solid var(--line); }
.step-text { padding: 16px 20px 20px; }
.step-text p { margin: 6px 0 0; }
.step-num { font: 600 1.15rem var(--display); color: var(--coral); }
.worksheet { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 40px; align-items: center; }
.ws-img img { border-radius: 10px; box-shadow: var(--shadow); background: #fff; transform: rotate(-2deg); }
.tut-banner {
  display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 12px 22px 12px 12px; text-decoration: none;
  background: var(--paper); border: 2px dashed var(--coral); border-radius: var(--radius);
}
.tut-banner img { width: 84px; height: 84px; border-radius: 12px; background: #fff; flex: none; }
.tut-banner strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
@media (max-width: 860px) { .worksheet { grid-template-columns: 1fr; } .ws-img { max-width: 320px; } }

/* SEO structure: gallery cards with direct download, topic links, FAQ */
.gcard { margin: 0; position: relative; }
.gcard .card-img { display: block; }
.gcard .card-title { text-decoration: none; }
.gcard-dl {
  margin: 0 12px 12px; padding: 9px 12px; border-radius: 999px; text-align: center; text-decoration: none;
  font-weight: 800; font-size: .92rem; background: var(--ink); color: #fff;
}
.gcard-dl:hover { background: var(--coral); }
.updated { font-weight: 700; color: var(--muted); margin: -4px 0 14px; font-size: .95rem; }
.topic-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.topic-links span { font-weight: 800; margin-right: 4px; }
.topic-links a, .pill-links a {
  text-decoration: none; font-weight: 700; background: #fff; border: 2px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}
.topic-links a:hover, .pill-links a:hover { border-color: var(--ink); }
.topic-links small, .pill-links small { color: var(--muted); font-weight: 800; margin-left: 4px; }
.topic-links.compact { margin: 20px 0; }
.topic-links.compact a { font-size: .88rem; padding: 3px 12px; }
.pill-links { display: flex; flex-wrap: wrap; gap: 10px; }
.prose-block { max-width: 820px; }
.tips { padding-left: 1.2em; }
.tips li { margin-bottom: 6px; }
.faq { max-width: 820px; }
.faq details { background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 600 1.4rem var(--display); color: var(--coral); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Long-form text */
.article h2 { margin-top: 1.6em; }
.article h3 { margin: 0 0 .3em; font-size: 1.2rem; }
.article.narrow, .article > p, .article > ul { max-width: 820px; }
.page-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.pp-item { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; background: var(--paper); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); max-width: 900px; }
.pp-thumb img { width: 96px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.pp-item p { margin: 0 0 6px; color: var(--muted); }
.pp-links { font-size: .9rem; font-weight: 700; }
.facts { padding-left: 1.2em; }
.facts li { margin-bottom: 6px; }
h3.step-num { margin: 0; }

/* Home: theme groups, "new" pills, trust points */
.theme-group { margin-top: 26px; }
.theme-group h3 { font-size: 1.25rem; margin: 0 0 14px; color: var(--muted); }
.more-pills { margin-top: 14px; align-items: center; }
.more-pills > .muted { font-weight: 800; font-size: .92rem; margin-right: 4px; }
.more-pills a { font-size: .9rem; padding: 4px 12px; }
.pill-links em { font-style: normal; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--coral); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.section.slim { padding: 8px 0 0; }
.section.slim .eyebrow { margin: 0 6px 0 0; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.why > div { background: var(--paper); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); border-top: 5px solid var(--sun); }
.why > div:nth-child(2) { border-color: var(--coral); }
.why > div:nth-child(3) { border-color: var(--teal); }
.why > div:nth-child(4) { border-color: var(--sky); }
.why strong { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.why p { margin: 6px 0 0; color: var(--muted); font-size: .98rem; }
.prose h2 { font-size: 1.4rem; margin-top: 1.4em; }
#results:empty { display: none; }
@media (max-width: 600px) {
  .search { flex: 1 1 120px; padding-left: 10px; }
  .search input { font-size: .9rem; }
  .logo span { font-size: 1.25rem; }
  .hero-actions .btn-link { padding-inline: 0; }
}


/* ---------- ColorNook style: shared components ---------- */
.mm-panel { border: 0; border-radius: 0 0 22px 22px; box-shadow: 0 22px 50px rgba(22, 38, 74, .22); }
.mm-btn { border: 0 !important; }
.mm-btn:hover, .mm.open .mm-btn { background: var(--soft); }
.mm-col li a:hover { background: var(--soft); color: var(--red-dark); }
.mm-col li.more a, .mm-all { color: var(--red); }
.mm-h { font-weight: 800; }
.mm-feature { border: 0; box-shadow: none; background: var(--soft); }
.mm-feature b { font-weight: 800; }
.nav-season { background: var(--red); border: 0; box-shadow: 0 3px 0 var(--red-dark); transform: none; }
.menu-toggle { box-shadow: none !important; border: 2px solid #d4dce8 !important; }

.btn { border: 0; border-radius: 999px; background: #fff; color: var(--navy); box-shadow: 0 4px 0 #cfd7e3, 0 0 0 2px #d4dce8 inset;
  font-weight: 800; transition: transform .12s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-dark); }
.btn-light { background: #fff; color: var(--navy); box-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.btn-yellow { background: var(--yellow); color: var(--navy); box-shadow: 0 5px 0 #d9a900; }
.btn-ghost { background: #fff; }
.btn-link { box-shadow: none; background: none; text-decoration: underline; }
.btn-link:hover { transform: none; color: var(--red); }
.btn-lg { padding: 15px 30px; }

.kicker { display: inline-block; font: 800 .85rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.eyebrow { color: var(--navy); background: var(--yellow); border: 0; }
.muted { color: var(--muted); }

/* torn paper edges and doodles */
.band { position: relative; padding: 72px 0; }
.torn { position: absolute; left: 0; width: 100%; height: 34px; z-index: 2; pointer-events: none; }
.torn.top { top: -1px; transform: scaleY(-1); }
.torn.bot { bottom: -1px; }
.torn path { fill: #fff; }
.doodle { position: absolute; width: 28px; height: 28px; z-index: 1; }
.doodle path { fill: var(--yellow); }

/* cards */
.grid { gap: 20px; }
.card, .cat-card { border: 0; border-radius: 14px; box-shadow: var(--shadow); background: #fff; transition: transform .15s, box-shadow .15s; }
.card:hover, .cat-card:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 14px 30px rgba(22, 38, 74, .18); }
.card-img, .step-img { border-bottom: 1px solid #e5eaf2; }
.card-title { color: var(--navy); }
.cat-img { border-bottom: 0; }
.cat-img img { border: 4px solid #fff; border-bottom: 0; }
.cat-body h3 { font-weight: 800; }
.accent-coral { --accent: var(--red); }
.accent-teal { --accent: var(--green); }
.accent-sky { --accent: var(--blue); }
.accent-sun { --accent: var(--yellow); }
.accent-lilac { --accent: var(--purple); }
.gcard-dl { background: var(--red); color: #fff; border: 0; box-shadow: 0 3px 0 var(--red-dark); }
.gcard-dl:hover { background: var(--red-dark); }

.badge { border: 0; color: var(--navy) !important; text-transform: none; letter-spacing: 0; font-size: .78rem; transform: none; }
.badge-easy { background: #d7f3e4; }
.badge-medium { background: #fff1c2; }
.badge-detailed { background: #d6ecfa; }
.badge-hard { background: #ffe0d8; }
.badge[class*="badge-grade"], .badge-pre-k { background: #ebe3fb; }

.chip { border: 2px solid #d4dce8; }
.chip.active { background: #0a6f9d; border-color: #0a6f9d; }  /* 5.6:1 on white text; the brand blue was 2.9:1 */
.topic-links a, .pill-links a { border: 2px solid #d4dce8; box-shadow: none; background: #fff; }
.topic-links a:hover, .pill-links a:hover { border-color: var(--blue); background: var(--soft); }
.pill-links em { background: var(--red); border: 0; }

/* topic page header: a blue band with a torn edge */
.cat-hero { position: relative; background: var(--blue); color: #fff; padding: 36px 0 70px; border: 0; overflow: hidden; }
.cat-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 40 L0 22 L40 30 L85 14 L130 26 L170 10 L220 24 L265 12 L310 28 L360 16 L405 30 L450 12 L500 24 L545 8 L595 26 L640 14 L690 30 L735 12 L785 24 L830 10 L880 28 L925 16 L975 30 L1020 12 L1070 26 L1115 14 L1160 28 L1200 18 L1200 40 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.cat-hero h1, .cat-hero h2 { color: #fff; }
.cat-hero .crumbs, .cat-hero .crumbs a { color: #e1f4fd; }
.cat-hero .updated { color: var(--yellow); }
.cat-hero .intro, .cat-hero .intro p { color: #f1faff; }
.cat-hero a:not(.btn) { color: #fff; }
.cat-hero .btn-primary { box-shadow: 0 5px 0 var(--red-dark); }

/* topic hero: text left, a hand of "playing cards" (4 sheets fanned out) right */
.cat-in { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px 48px; align-items: center; }
.fan { position: relative; height: 330px; }
.fan a { position: absolute; left: 50%; bottom: 10px; width: 46%; margin-left: -23%; border-radius: 10px; border: 5px solid #fff;
  background: #fff; box-shadow: 0 14px 30px rgba(10, 40, 80, .38); transform-origin: 50% 175%; transform: rotate(var(--r, 0deg));
  transition: transform .2s, box-shadow .2s; }
.fan img { display: block; width: 100%; height: auto; border-radius: 6px; }
.fan .f1 { --r: -19deg; z-index: 1; } .fan .f2 { --r: -6deg; z-index: 2; } .fan .f3 { --r: 6deg; z-index: 3; } .fan .f4 { --r: 19deg; z-index: 4; }
.fan.n3 .f1 { --r: -15deg; } .fan.n3 .f2 { --r: 0deg; } .fan.n3 .f3 { --r: 15deg; }
.fan.n2 .f1 { --r: -9deg; } .fan.n2 .f2 { --r: 9deg; }
.fan.n1 .f1 { --r: 3deg; }
.fan a:hover, .fan a:focus-visible { z-index: 9; box-shadow: 0 22px 40px rgba(10, 40, 80, .45); transform: rotate(var(--r, 0deg)) translateY(-18px); }
@media (max-width: 900px) {
  .cat-in { grid-template-columns: 1fr; }
  .fan { width: 100%; height: 250px; max-width: 360px; margin: 0 auto; }
  .fan .f1 { --r: -15deg; } .fan .f2 { --r: -5deg; } .fan .f3 { --r: 5deg; } .fan .f4 { --r: 15deg; }
}
@media (max-width: 480px) { .fan { height: 210px; } .fan a { width: 48%; margin-left: -24%; } }
@media (prefers-reduced-motion: reduce) { .fan a { transition: none; } }

/* item page */
.item-preview { border: 0; background: var(--soft); }
.item-preview img { border: 0; box-shadow: var(--shadow); }
.tags li { border: 2px solid #d4dce8; color: var(--text); }
.steps li { border: 0; box-shadow: var(--shadow); }
.steps li::before { background: var(--red); color: #fff; border: 0; font-family: var(--display); }
.step, .pp-item, .why > div { border: 0; box-shadow: var(--shadow); }
.step-num { color: var(--red); }
.faq details { border: 0; box-shadow: 0 4px 14px rgba(22, 38, 74, .08); }
.faq summary { color: var(--navy); }
.faq summary::after { color: var(--red); font-family: var(--body); font-weight: 800; }
.pp-thumb img, .ws-img img { border: 1px solid #e5eaf2; box-shadow: none; }
.tut-banner { border: 2px dashed var(--blue); background: var(--soft); box-shadow: none; }
.why strong, .tut-banner strong, .footer-links strong { font-weight: 800; }

/* footer */
.site-footer { background: var(--navy); color: #b9c6de; border: 0; margin-top: 0; }
.site-footer .logo { color: #fff; }
.footer-links strong { color: #fff; }
.footer-links a { color: #b9c6de; }
.footer-links a:hover { color: #fff; }
.copyright, .copyright a { color: #8d9bb7; }
.footer-nook { width: 110px; height: auto; margin-bottom: 10px; }

/* 404 and search */
.oops { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.oops .nook { width: 220px; height: auto; }
#search-popular .nook { width: 150px; height: auto; margin: 0 0 12px; }
@media (max-width: 860px) {
  .oops { grid-template-columns: 1fr; }
  .oops .nook { width: 160px; }
}

/* ---------- home page ---------- */
.home .center { text-align: center; }
.home .lede { font-size: 1.18rem; max-width: 44rem; margin-inline: auto; }
.home .hero { background: var(--blue); color: #fff; padding: 56px 0 96px; overflow: hidden; border: 0; }
.home .hero h1 { color: #fff; }
.home .hero h1 em { font-style: normal; color: var(--yellow); }
.home .hero .kicker { color: var(--yellow); }
.home .hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.home .sub { font-size: 1.22rem; max-width: 32rem; color: #eaf7ff; }
.home .btns { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 30px; }
.home .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 560px; }
.home .stat { background: rgba(255, 255, 255, .14); border-radius: 16px; padding: 12px 10px; text-align: center; }
.home .stat b { display: block; font: 800 1.9rem/1 var(--display); color: #fff; }
.home .stat span { font-size: .82rem; font-weight: 700; color: #dff2fc; }
.home .collage { position: relative; height: 470px; }
.home .collage .photo { position: absolute; right: 0; top: 10px; width: 92%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 24px;
  border: 8px solid #fff; box-shadow: 0 22px 50px rgba(10, 40, 80, .35); transform: rotate(2deg); }
.home .collage .sheet { position: absolute; width: 30%; border-radius: 8px; border: 5px solid #fff; background: #fff; box-shadow: 0 14px 30px rgba(10, 40, 80, .35); z-index: 2; }
.home .collage .s1 { left: 0; bottom: 10px; transform: rotate(-8deg); }
.home .collage .s2 { left: 24%; bottom: -20px; transform: rotate(5deg); }
.home .collage .nook { position: absolute; right: -10px; bottom: -34px; width: 200px; height: auto; z-index: 4; filter: drop-shadow(0 10px 14px rgba(10, 40, 80, .3)); }

.home .doors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 34px; text-align: left; }
.home .door { border-radius: 22px; padding: 22px 18px 0; color: #fff; text-decoration: none; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.home .door:hover { transform: translateY(-4px); }
.home .door h3 { color: #fff; font-size: 1.45rem; margin: 0 0 6px; }
.home .door p { font-size: .95rem; }
.home .door p { margin: 0 0 14px; color: rgba(255, 255, 255, .92); }
.home .door .go { font-weight: 800; margin-bottom: 18px; }
.home .dphoto { display: block; margin: auto -18px 0; border-top: 6px solid rgba(255, 255, 255, .9); }
.home .dphoto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.home .d1 { background: var(--red); } .home .d2 { background: var(--purple); } .home .d3 { background: var(--green); } .home .d4 { background: #0a6f9d; } .home .d5 { background: #e8590c; }
.home .dcards { display: flex; gap: 8px; padding: 12px 12px 0; background: rgba(255, 255, 255, .18); }
.home .dcards img { width: 50%; aspect-ratio: 320 / 414; object-fit: cover; object-position: top; border-radius: 8px 8px 0 0; background: #fff; }
.home .games-band .lede { max-width: 720px; margin: 0 0 24px; color: #dfe7f5; }
.home .games-band .pill-links .muted { color: #b9c6e0; }
@media (max-width: 1100px) { .home .doors { grid-template-columns: repeat(2, 1fr); } }

.home .headrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.home .headrow h2 { margin: 0; }
.home .headrow a.more { font-weight: 800; color: var(--red); }
.home .navy { background: var(--navy); color: #dfe7f5; }
.home .navy h2 { color: #fff; }
.home .navy h2 em { font-style: normal; color: var(--yellow); }
.home .navy .kicker, .home .purple .kicker { color: var(--yellow); }
.home .navy .headrow a.more, .home .next a { color: var(--yellow); }
.home .next { margin: 28px 0 0; }
.home .navy .card-body { color: var(--navy); }
.home .purple { background: var(--purple); color: #efe8ff; }
.home .purple h2 { color: #fff; }
.home .soft { background: var(--soft); }

.home .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home .tile { position: relative; display: block; border-radius: 18px; overflow: hidden; text-decoration: none; background: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.home .tile:hover { transform: translateY(-4px); }
.home .tile img { aspect-ratio: 1 / 1; object-fit: cover; object-position: top; }
.home .tile b { position: absolute; left: 10px; bottom: 10px; background: var(--yellow); color: var(--navy); font: 800 1.05rem var(--display); padding: 2px 12px; border-radius: 999px; }
.home .tile i { position: absolute; right: 10px; top: 10px; font: 800 .8rem var(--body); font-style: normal; background: #fff; padding: 2px 9px; border-radius: 999px; color: var(--navy); box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }
.home .all-themes { margin-top: 22px; align-items: center; }
.home .all-themes .muted { font-weight: 800; margin-right: 4px; }
.home .all-themes a { font-size: .92rem; padding: 4px 12px; }

.home .math-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.home .gradebtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 26px; }
.home .gradebtns a { text-decoration: none; background: #fff; color: var(--purple); border-radius: 14px; padding: 12px; text-align: center; font: 800 1.15rem var(--display); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.home .gradebtns a small { display: block; font: 700 .78rem var(--body); color: var(--muted); }
.home .skillchips { display: flex; flex-wrap: wrap; gap: 8px; }
.home .skillchips a { text-decoration: none; color: #fff; border: 2px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.home .skillchips a:hover { background: rgba(255, 255, 255, .15); }
.home .math-imgs { position: relative; height: 430px; }
.home .math-imgs img { position: absolute; width: 56%; border-radius: 10px; border: 6px solid #fff; box-shadow: 0 16px 36px rgba(0, 0, 0, .3); background: #fff; }
.home .math-imgs img:nth-child(1) { left: 0; top: 20px; transform: rotate(-5deg); }
.home .math-imgs img:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); }
.home .math-imgs .nook { position: absolute; right: 22%; bottom: -20px; width: 180px; height: auto; z-index: 3; }

.home .steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 34px; }
.home .steps3 .num { display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; font: 800 2.2rem var(--display); color: #fff; margin-bottom: 14px; }
.home .s1 { background: var(--red); } .home .s2 { background: var(--blue); } .home .s3 { background: var(--green); }
.home .steps3 p { margin: 0; color: var(--muted); }

.home .split .row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.home .split .row:last-child { margin-bottom: 0; }
.home .split .rev .pic { order: 2; }
.home .split .pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: 0 18px 40px rgba(22, 38, 74, .18); transform: rotate(-1.5deg); }
.home .split .rev .pic img { transform: rotate(1.5deg); }
.home .split p { font-size: 1.12rem; margin: 0 0 22px; }

.home .promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; text-align: left; }
.home .promise { background: #fff; border-radius: 18px; padding: 22px; border-top: 6px solid var(--blue); box-shadow: 0 6px 18px rgba(22, 38, 74, .1); }
.home .promise:nth-child(2) { border-color: var(--red); } .home .promise:nth-child(3) { border-color: var(--yellow); } .home .promise:nth-child(4) { border-color: var(--green); }
.home .promise b { display: block; font: 800 1.25rem var(--display); color: var(--navy); margin-bottom: 4px; }
.home .promise p { margin: 0; color: var(--muted); }
.home .home-faq { margin: 30px auto 0; text-align: left; }

.home .final { background: var(--red); color: #fff; overflow: hidden; }
.home .final h2 { color: #fff; margin-bottom: 4px; }
.home .final p { margin: 0; font-size: 1.15rem; }
.home .final .torn path { fill: var(--soft); }
.home .final-in { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; }
.home .final .nook { width: 200px; height: auto; }

@media (max-width: 900px) {
  .band { padding: 56px 0; }
  .home .hero-in, .home .math-in, .home .final-in { grid-template-columns: 1fr; }
  .home .collage { height: 340px; }
  .home .collage .nook { width: 150px; }
  .home .doors, .home .steps3, .home .promises { grid-template-columns: 1fr; }
  .home .tiles { grid-template-columns: repeat(2, 1fr); }
  .home .stats { grid-template-columns: repeat(2, 1fr); }
  .home .math-imgs { height: 320px; }
  .home .split .row { grid-template-columns: 1fr; gap: 24px; }
  .home .split .rev .pic { order: 0; }
  .home .final .nook { width: 140px; }
}

/* ---------- mobile drawer in the house style: colored section blocks, link chips ---------- */
@media (max-width:1000px) {
  .hdr.drawer .nav { border-top: 0; padding: 14px 16px 48px; gap: 10px; background: #fff; }
  .nav .search { order: 0; margin: 0; }
  .nav-season { order: 1; align-self: stretch; margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--yellow); color: var(--navy);
    box-shadow: 0 4px 0 #d9a900; font-size: 1.05rem; }
  .nav-season::before { content: "In season: "; font-weight: 600; }
  .nav-season::after { content: " \2192"; }
  .mm-bar { order: 2; gap: 10px; }
  .mm { border: 0; }
  .mm-btn { color: #fff; border-radius: 14px !important; padding: 15px 18px; font: 800 1.25rem var(--display); }
  .mm[data-k="color"] .mm-btn { background: var(--red); }
  .mm[data-k="cbn"] .mm-btn { background: var(--blue); }
  .mm[data-k="math"] .mm-btn { background: var(--purple); }
  .mm[data-k="draw"] .mm-btn { background: var(--green); }
  .mm-btn:hover, .mm.open .mm-btn { color: #fff; filter: brightness(.95); }
  .mm[data-k="color"].open .mm-btn, .mm[data-k="color"] .mm-btn:hover { background: var(--red); }
  .mm[data-k="cbn"].open .mm-btn, .mm[data-k="cbn"] .mm-btn:hover { background: var(--blue); }
  .mm[data-k="math"].open .mm-btn, .mm[data-k="math"] .mm-btn:hover { background: var(--purple); }
  .mm[data-k="draw"].open .mm-btn, .mm[data-k="draw"] .mm-btn:hover { background: var(--green); }
  .mm.open .mm-btn { border-radius: 14px 14px 0 0 !important; }
  .mm-panel { background: var(--soft); border-radius: 0 0 14px 14px; padding: 14px 12px 16px; gap: 14px; box-shadow: none; }
  .mm-cols { gap: 16px; }
  .mm-col { min-width: 0; }
  .mm-h { font: 800 .8rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 4px; }
  .mm-col ul, .mm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mm-cols, .mm-col, .mm-panel { min-width: 0; max-width: 100%; }
  .mm-col li a { margin: 0; padding: 10px 12px; background: #fff; border-radius: 10px; font-weight: 700; color: var(--navy);
    box-shadow: 0 2px 0 #d9e3ee; align-items: center; line-height: 1.2; }
  .mm-col li a:hover { background: #fff; color: var(--red); }
  .mm-col .n { background: var(--soft); flex: none; }
  .mm-col li.more { grid-column: 1 / -1; }
  .mm-col li.more a { background: none; box-shadow: none; padding: 4px; color: var(--red); }
  .mm-side { gap: 10px; }
  .mm-feature { background: #fff; padding: 10px; }
  .mm-feature img { width: 64px; }
  .mm-note { font-size: .92rem; padding: 0 4px; }
}

/* ---------- announcement bar (rotating messages) ---------- */
.announce { position: relative; z-index: 21; display: flex; align-items: center; justify-content: center; background: var(--yellow); color: var(--navy);
  min-height: 40px; padding: 0 44px; overflow: hidden; }
.ann-track { position: relative; flex: 1; max-width: 760px; height: 40px; }
.ann { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none;
  font-weight: 800; font-size: .95rem; line-height: 1.2; opacity: 0; transform: translateX(40px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.ann.on { opacity: 1; transform: none; pointer-events: auto; }
.ann.out { opacity: 0; transform: translateX(-40px); }
.ann.back:not(.on) { transform: translateX(40px); }
.ann.on.back { animation: annBack .45s ease; }
@keyframes annBack { from { opacity: 0; transform: translateX(-40px); } }
.ann:hover { text-decoration: underline; }
.ann-prev, .ann-next { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--navy); font: 800 1.6rem/1 var(--body);
  width: 36px; height: 36px; cursor: pointer; border-radius: 50%; }
.ann-prev { left: 6px; } .ann-next { right: 6px; }
.ann-prev:hover, .ann-next:hover { background: rgba(0, 0, 0, .08); }

/* ---------- scroll reveal (only with JS, never for reduced motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(0, 0, .3, 1), transform .7s cubic-bezier(0, 0, .3, 1);
  transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover, .js .cat-card.reveal.in:hover { transform: translateY(-4px) rotate(-.5deg); transition-delay: 0s; }
.js .home .door.reveal.in:hover, .js .home .tile.reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }
@media print { .js .reveal { opacity: 1 !important; transform: none !important; } .announce { display: none; } }

/* ---------- hero seal, check row, highlighter ---------- */
.home .seal { position: absolute; left: 4%; top: -6px; width: 112px; height: 112px; z-index: 3; animation: spin 24s linear infinite;
  filter: drop-shadow(0 6px 10px rgba(10, 40, 80, .25)); }
.home .seal text { font: 800 11.2px var(--body); letter-spacing: 1.1px; fill: var(--navy); }
.home .seal .seal-mid { font: 800 22px var(--display); letter-spacing: 0; fill: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.home .checks { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.home .checks li { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--navy); }
.home .checks li::before { content: ""; width: 22px; height: 22px; border-radius: 6px; flex: none;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
mark { background: linear-gradient(transparent 12%, var(--yellow) 12%, var(--yellow) 88%, transparent 88%); color: inherit; padding: 0 .15em; }
@media (prefers-reduced-motion: reduce) { .home .seal { animation: none; } }

/* ---------- menu: thumbnails and the in-season card ---------- */
.mm-thumb { display: none; }
.nav-season .season-img, .nav-season .season-txt { display: none; }
@media (max-width:1000px) {
  .mm-btn { justify-content: flex-start; gap: 14px; padding: 10px 16px 10px 10px; }
  .mm-btn span { flex: 1; text-align: left; }
  .mm-thumb { display: block; width: 52px; height: 52px; object-fit: cover; object-position: top; border-radius: 10px; background: #fff; border: 3px solid rgba(255, 255, 255, .85); }
  .nav-season { display: flex !important; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; background: var(--navy); color: #fff; box-shadow: 0 4px 0 #0c1630; }
  .nav-season::before, .nav-season::after { content: none; }
  .nav-season .season-chip { display: none; }
  .nav-season .season-img { display: block; width: 64px; height: auto; border-radius: 8px; border: 3px solid #fff; background: #fff; transform: rotate(-4deg); }
  .nav-season .season-txt { display: flex; flex-direction: column; line-height: 1.15; }
  .nav-season small { font: 800 .72rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
  .nav-season b { font: 800 1.35rem var(--display); }
  .nav-season em { font-style: normal; font-weight: 700; font-size: .9rem; color: #c9d6ee; }
  .announce { padding: 0 38px; }
  .ann { font-size: .85rem; }
}
@media (max-width:600px) { .ann-track { height: 46px; } .announce { min-height: 46px; } .ann { font-size: .8rem; } }

/* tag rows: one swipeable line on phones instead of a tall stack of pills */
.topic-links a { font-size: .95rem; padding: 6px 14px; }
@media (max-width:700px) {
  .topic-links { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 8px; gap: 8px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .topic-links::-webkit-scrollbar { display: none; }
  .topic-links > * { flex: none; scroll-snap-align: start; }
  .topic-links span { font-size: .9rem; }
  .topic-links a { white-space: nowrap; font-size: .9rem; padding: 7px 13px; }
}
/* a nowrap tag row must never widen its grid column (item pages on phones) */
.item-grid > *, .item-info { min-width: 0; }
@media (max-width: 860px) { .item-grid { grid-template-columns: minmax(0, 1fr); } }
/* announcement: slide whole messages past each other instead of cross-fading (no overlapping text) */
.ann-track { overflow: hidden; }
.ann { transform: translateX(105%); opacity: 1; visibility: hidden; transition: transform .5s ease, visibility 0s linear .5s; }
.ann.on { transform: none; visibility: visible; transition: transform .5s ease, visibility 0s; }
.ann.out { transform: translateX(-105%); visibility: visible; transition: transform .5s ease, visibility 0s linear .5s; }
.ann.out.back { transform: translateX(105%); }
.ann.on.back { animation: annIn .5s ease; }
@keyframes annIn { from { transform: translateX(-105%); } }
.ann:not(.on):not(.out) { transition: none; }

/* ---------- home: printables by age (three big colored cards, photo on one side) ---------- */
.home .ages-band { padding-top: 8px; }
.home .ages { display: grid; gap: 24px; margin-top: 34px; }
.home .age { display: grid; grid-template-columns: 5fr 7fr; border-radius: 22px; overflow: hidden; color: #fff; min-height: 270px;
  box-shadow: 0 14px 34px rgba(22, 38, 74, .14); }
.home .age-pic { position: relative; min-height: 240px; border-right: 6px solid rgba(255, 255, 255, .9); }
.home .age-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home .age.rev .age-pic { order: 2; border-right: 0; border-left: 6px solid rgba(255, 255, 255, .9); }
.home .age-txt { padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; }
.home .age h3 { color: #fff; font-size: 2rem; margin: 0 0 8px; }
.home .age h3 small { display: inline-block; font: 800 .8rem/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle;
  margin-left: 6px; padding: 3px 11px; border-radius: 999px; background: var(--yellow); color: var(--navy); }
.home .age p { margin: 0 0 20px; font-size: 1.1rem; max-width: 36rem; color: rgba(255, 255, 255, .94); }
.home .age-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.home .age-btns a { text-decoration: none; background: #fff; color: var(--navy); border-radius: 999px; padding: 9px 16px; font: 800 1.02rem var(--body);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .2); transition: transform .15s; }
.home .age-btns a:hover { transform: translateY(-2px); color: var(--red-dark); }
.home .age-btns small { font: 700 .78rem var(--body); color: var(--muted); margin-left: 2px; }
.home .a1 { background: var(--blue-dark); }
.home .a2 { background: var(--yellow); color: var(--navy); }
.home .a2 h3, .home .a2 p { color: var(--navy); }
.home .a2 h3 small { background: var(--navy); color: #fff; }
.home .a2 .age-btns a { box-shadow: 0 4px 0 #d9a900; }
.home .a3 { background: var(--navy); }
@media (max-width: 900px) {
  .home .age { grid-template-columns: 1fr; min-height: 0; }
  .home .age-pic, .home .age.rev .age-pic { order: 0; min-height: 0; aspect-ratio: 16 / 9; border: 0; border-bottom: 6px solid rgba(255, 255, 255, .9); }
  .home .age-txt { padding: 22px 20px 24px; }
  .home .age h3 { font-size: 1.6rem; }
  .home .age h3 small { margin: 6px 0 0; }
}

/* ---------- "New" stickers: gallery cards and topic pills from the newest batch ---------- */
.card.is-new { position: relative; }
.new-tag { position: absolute; left: 10px; top: 10px; z-index: 2; pointer-events: none; background: var(--red); color: #fff;
  font: 800 .74rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px 4px; border-radius: 999px;
  box-shadow: 0 0 0 2px var(--yellow), 0 3px 8px rgba(22, 38, 74, .25); transform: rotate(-6deg); }
.pill-links em { font: 800 .68rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--red);
  padding: 3px 7px 2px; border-radius: 999px; box-shadow: 0 0 0 2px var(--yellow); margin-left: 6px; vertical-align: 2px; }
@media print { .new-tag { display: none; } }
/* mid-size screens: keep the one-line header from overlapping */
@media (min-width:1001px) and (max-width:1200px) {
  .mm-btn { padding: 8px 8px; font-size: .92rem; }
  .nav-season { display: none !important; }
}

/* Umbrella topic hubs: one card row per child topic */
.hub-group { margin-top: 28px; }
.hub-group .section-head h2 a { color: inherit; text-decoration: none; }
.hub-group .section-head h2 a:hover { color: var(--blue-dark); }

/* Activities menu (spot the difference, hidden pictures, preschool, tracing) */
@media (max-width:1000px) {
  .mm[data-k="act"] .mm-btn, .mm[data-k="act"].open .mm-btn, .mm[data-k="act"] .mm-btn:hover { background: #f07f1a; }
}
@media (min-width:1001px) and (max-width:1300px) {
  .mm-btn .mm-thumb { display: none; }
}
@media (min-width:1001px) and (max-width:1200px) {
  .mm-btn { padding: 8px 6px; font-size: .9rem; }
}
@media (min-width:1001px) and (max-width:1750px) {
  .nav-season { display: none !important; }
}
