/* HomeClass Worksheets — design 2: bright, playful, comfortable.
   Hand-written CSS, no framework. Headings in Grandstander, text in Atkinson Hyperlegible Next.
   Orange leads; yellow, pink, teal, purple and blue play around it. Shapes: blobs, waves, stickers, doodles. */

@font-face { font-family: "Grandstander"; src: url("/hc-assets/fonts/grandstander.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/hc-assets/fonts/atkinson.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #fffdf8;
  --ink: #2b2540;
  --ink-2: #5b5670;
  --ink-3: #8b869c;
  --line: #ece6f2;
  --orange: #ff7a1a;
  --orange-d: #c94f00;
  --orange-l: #ffe7d1;
  --yellow: #ffc83d;
  --yellow-l: #fff3c9;
  --pink: #ff6b9a;
  --pink-l: #ffe1ea;
  --teal: #17b8a6;
  --teal-d: #0c7f73;
  --teal-l: #d3f5ef;
  --purple: #7c5cfc;
  --purple-l: #e7e0ff;
  --blue: #38a6ff;
  --blue-l: #dcefff;
  --white: #fff;
  --r: 28px;
  --shadow: 0 10px 30px -14px rgba(43, 37, 64, .28);
  --shadow-lift: 0 22px 44px -18px rgba(43, 37, 64, .38);
  --display: "Grandstander", "Comic Sans MS", ui-rounded, system-ui, sans-serif;
  --text: "Atkinson", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--orange-d); text-decoration-thickness: .09em; text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0 0 .45em; }
h1 { font-size: clamp(2.2rem, 1.3rem + 3.8vw, 3.9rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.7vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; color: var(--white); }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.narrow { max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 1rem; padding: 6px 14px; border-radius: 999px; background: var(--yellow-l); color: #7a5600; font: 700 .9rem var(--display); letter-spacing: .02em; transform: rotate(-1.5deg); }
.eyebrow::before { content: "★"; color: var(--orange); }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 46ch; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 253, 248, .93); backdrop-filter: blur(8px); }
.top::after { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--orange) 0 20%, var(--yellow) 20% 40%, var(--pink) 40% 60%, var(--teal) 60% 80%, var(--purple) 80%); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 74px; }
.brand { flex: none; display: block; transition: transform .3s var(--bounce); }
.brand:hover { transform: rotate(-2deg) scale(1.04); }
.brand img { height: 52px; width: auto; }
.nav { display: none; margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 9px 14px; border-radius: 999px; color: var(--ink); font: 650 1.02rem var(--display); text-decoration: none; white-space: nowrap; transition: background .15s, transform .25s var(--bounce); }
.nav a:hover { background: var(--yellow-l); transform: translateY(-2px); }
.nav a.is-on { background: var(--orange); color: var(--white); }
.search { display: none; position: relative; }
.search input { width: 200px; height: 44px; padding: 0 44px 0 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--white); font: inherit; font-size: .95rem; color: var(--ink); transition: border-color .15s, width .25s; }
.search input:focus { outline: none; border-color: var(--purple); width: 240px; }
.search button { position: absolute; right: 5px; top: 5px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--purple); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; width: 48px; height: 48px; border-radius: 16px; background: var(--orange); display: grid; place-content: center; gap: 4px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 21px; height: 3px; border-radius: 3px; background: var(--white); transition: transform .2s, opacity .2s; }
.menu[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu[open] summary span:nth-child(2) { opacity: 0; }
.menu[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu__panel { position: absolute; right: 0; top: calc(100% + 12px); width: min(92vw, 360px); background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-lift); padding: 18px; }
.menu__search input { width: 100%; height: 48px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; font: inherit; }
.menu__label { margin: 16px 0 8px; font: 700 .85rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.menu__grades { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; margin: 0; padding: 0; }
.menu__grades a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; color: var(--ink); font: 700 1rem var(--display); text-decoration: none; }
.menu__grades li:nth-child(1) a { background: var(--orange-l); } .menu__grades li:nth-child(2) a { background: var(--pink-l); }
.menu__grades li:nth-child(3) a { background: var(--teal-l); } .menu__grades li:nth-child(4) a { background: var(--purple-l); }
.menu__grades b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--white); font-size: 1rem; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a { display: block; padding: 10px 4px; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px dotted var(--line); }
@media (min-width: 980px) { .nav, .search { display: block; } .menu { display: none; } }

/* ---------- breadcrumbs ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 18px 0 0; font-size: .9rem; color: var(--ink-3); }
.crumbs li + li::before { content: "•"; margin: 0 9px; color: var(--yellow); }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--orange-d); text-decoration: underline; }

/* ---------- doodles and waves ---------- */
.doodle { position: absolute; pointer-events: none; animation: float 7s ease-in-out infinite; }
.doodle:nth-of-type(2n) { animation-duration: 9s; animation-delay: -3s; }
.doodle:nth-of-type(3n) { animation-duration: 11s; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(8deg); } }
.wave { display: block; width: 100%; height: clamp(28px, 5vw, 64px); margin-bottom: -1px; }
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::before { content: ""; position: absolute; z-index: -1; left: -.12em; right: -.12em; top: .12em; bottom: .02em; background: var(--yellow); border-radius: .5em .2em .55em .25em; transform: rotate(-1.6deg) scaleX(0); transform-origin: left; animation: swipe .7s .3s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes swipe { to { transform: rotate(-1.6deg) scaleX(1); } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(26px, 5vw, 64px) 0 clamp(20px, 4vw, 40px); }
.hero__in { position: relative; display: grid; gap: clamp(20px, 4vw, 48px); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero__search { display: flex; gap: 8px; max-width: 520px; margin: 28px 0 18px; padding: 7px; background: var(--white); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 6px 0 var(--yellow); }
.hero__search:focus-within { box-shadow: 0 6px 0 var(--purple); }
.hero__search input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 16px; font: inherit; font-size: 1.03rem; color: var(--ink); }
.hero__search input:focus { outline: none; }
.hero__search button { flex: none; border: 0; border-radius: 999px; padding: 12px 24px; background: var(--orange); color: var(--white); font: 750 1.08rem var(--display); cursor: pointer; transition: transform .25s var(--bounce), background .15s; }
.hero__search button:hover { background: var(--orange-d); transform: scale(1.06); }
.hero__grades { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 0; padding: 0; }
.hero__grades a { display: inline-block; padding: 9px 17px; border-radius: 999px; color: var(--ink); font: 700 1rem var(--display); text-decoration: none; transition: transform .25s var(--bounce); }
.hero__grades li:nth-child(4n+1) a { background: var(--orange-l); } .hero__grades li:nth-child(4n+2) a { background: var(--pink-l); }
.hero__grades li:nth-child(4n+3) a { background: var(--teal-l); } .hero__grades li:nth-child(4n+4) a { background: var(--purple-l); }
.hero__grades a:hover { transform: translateY(-4px) rotate(-3deg); }

.hero__art { position: relative; width: min(86%, 440px); aspect-ratio: 1 / 1; margin-inline: auto; }
.hero__blob { position: absolute; inset: 4%; background: var(--yellow); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; animation: blob 14s ease-in-out infinite; }
@keyframes blob { 0%, 100% { border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; } 50% { border-radius: 44% 56% 42% 58% / 56% 44% 58% 42%; } }
.hero__ring { position: absolute; inset: -2%; border: 4px dashed var(--orange); border-radius: 50%; opacity: .55; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__ollie { position: absolute; left: 12%; bottom: 3%; width: 78%; height: auto; filter: drop-shadow(0 16px 12px rgba(43, 37, 64, .2)); animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-2deg); } }
.sticker { position: absolute; display: grid; place-items: center; text-align: center; font: 800 1rem/1.05 var(--display); color: var(--white); box-shadow: var(--shadow); }
.sticker--free { right: -2%; top: 6%; width: 96px; height: 96px; border-radius: 50%; background: var(--pink); font-size: 1.45rem; transform: rotate(12deg); animation: wiggle 5s ease-in-out infinite; }
.sticker--pdf { left: -4%; top: 34%; padding: 10px 14px; border-radius: 16px; background: var(--teal); transform: rotate(-9deg); }
.sticker--grades { right: 0; bottom: 10%; padding: 10px 14px; border-radius: 16px; background: var(--purple); transform: rotate(6deg); }
@keyframes wiggle { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(4deg) scale(1.05); } }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.05fr .95fr; } .hero__art { width: 100%; } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(36px, 6vw, 76px) 0; }
.section--sun { background: var(--yellow-l); }
.section--sky { background: var(--blue-l); }
.section__head { max-width: 640px; margin-bottom: 30px; }
.section__head p { color: var(--ink-2); margin: 0; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.more { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 1rem var(--display); text-decoration: none; transition: transform .25s var(--bounce), background .15s; }
.more:hover { background: var(--orange); color: var(--white); transform: translateX(4px); }

/* grades: four bright tiles */
.grades { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 1020px) { .grades { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.grade a { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 200px; padding: 22px; border-radius: var(--r); color: var(--white); text-decoration: none; overflow: hidden; transition: transform .35s var(--bounce), box-shadow .3s; box-shadow: var(--shadow); }
.grade--1 a { background: var(--orange); } .grade--2 a { background: var(--pink); } .grade--3 a { background: var(--teal); } .grade--4 a { background: var(--purple); }
.grade a::before { content: ""; position: absolute; right: -34px; top: -34px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: transform .5s var(--bounce); }
.grade a::after { content: ""; position: absolute; right: 26px; bottom: -44px; width: 90px; height: 90px; border-radius: 50%; border: 10px solid rgba(255, 255, 255, .22); }
.grade a:hover { transform: translateY(-8px) rotate(-1.5deg); box-shadow: var(--shadow-lift); color: var(--white); }
.grade a:hover::before { transform: scale(1.5); }
.grade__num { position: relative; font: 900 clamp(3.4rem, 2.4rem + 4vw, 5.4rem)/.9 var(--display); margin-bottom: 8px; }
.grade__num small { font-size: .32em; font-weight: 800; margin-left: 3px; vertical-align: top; position: relative; top: .45em; }
.grade__name { position: relative; font: 750 1.35rem var(--display); }
.grade__ages { position: relative; font-size: .92rem; font-weight: 600; opacity: .9; margin-bottom: 8px; }
.grade__blurb { position: relative; font-size: .95rem; line-height: 1.45; opacity: .95; flex: 1; }
.grade__count { position: relative; align-self: flex-start; margin-top: 14px; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--ink); font: 700 .88rem var(--display); }
@media (max-width: 559px) { .grade a { padding: 16px; min-height: 0; } .grade__blurb { display: none; } .grade__name { font-size: 1.12rem; } }

/* subjects: pastel tiles */
.subjects { display: grid; gap: 14px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 620px) { .subjects { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .subjects { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.subject { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; align-items: center; padding: 16px 20px 16px 12px; background: var(--white); border-radius: var(--r); text-decoration: none; color: var(--ink); height: 100%; box-shadow: var(--shadow); transition: transform .35s var(--bounce), box-shadow .3s; }
.subject img { grid-row: span 2; width: 92px; height: 92px; object-fit: contain; padding: 6px; border-radius: 50%; transition: transform .4s var(--bounce); }
.subjects li:nth-child(6n+1) img { background: var(--orange-l); } .subjects li:nth-child(6n+2) img { background: var(--pink-l); }
.subjects li:nth-child(6n+3) img { background: var(--teal-l); } .subjects li:nth-child(6n+4) img { background: var(--purple-l); }
.subjects li:nth-child(6n+5) img { background: var(--yellow-l); } .subjects li:nth-child(6n+6) img { background: var(--blue-l); }
.subject:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); color: var(--ink); }
.subject:hover img { transform: rotate(-10deg) scale(1.12); }
.subject__name { font: 750 1.22rem var(--display); align-self: end; }
.subject__blurb { font-size: .94rem; color: var(--ink-2); align-self: start; line-height: 1.45; }

/* ---------- worksheet cards ---------- */
.grid { display: grid; gap: 34px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; } }
.card { position: relative; z-index: 0; --c: var(--orange); }
.grid .card:nth-child(5n+2) { --c: var(--pink); } .grid .card:nth-child(5n+3) { --c: var(--teal); }
.grid .card:nth-child(5n+4) { --c: var(--purple); } .grid .card:nth-child(5n+5) { --c: var(--blue); }
.card__link { display: block; text-decoration: none; color: var(--ink); }
.card__paper { position: relative; display: block; padding: 8px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow); transform: rotate(var(--tilt, 0deg)); transition: transform .4s var(--bounce), box-shadow .3s; }
.card__paper::before { content: ""; position: absolute; inset: 0; border-radius: 16px; z-index: -1; background: var(--c); transform: rotate(-5deg) translate(-5px, 6px); transition: transform .4s var(--bounce); }
.card__paper img { width: 100%; aspect-ratio: 400 / 518; object-fit: cover; object-position: top; border-radius: 10px; background: var(--line); }
.card__link:hover .card__paper { transform: rotate(0deg) translateY(-8px) scale(1.02); box-shadow: var(--shadow-lift); }
.card__link:hover .card__paper::before { transform: rotate(-9deg) translate(-10px, 10px); }
.card__body { display: block; padding: 16px 2px 0; }
.card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 1.1rem/1.25 var(--display); }
.card__link:hover .card__title { color: var(--orange-d); }
.card__meta { display: block; margin-top: 5px; font-size: .88rem; font-weight: 600; color: var(--ink-3); }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--blue-l); color: #14507f; font: 700 .78rem var(--display); text-decoration: none; white-space: nowrap; }
.tag--grade { background: var(--orange-l); color: #8a3a00; }
.tag--free { background: var(--teal-l); color: var(--teal-d); }
a.tag:hover { background: var(--ink); color: var(--white); }

/* ---------- steps ---------- */
.steps { display: grid; gap: 48px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.steps li { position: relative; padding: 26px 22px 22px; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); text-align: center; }
.steps__n { display: grid; place-items: center; width: 64px; height: 64px; margin: -52px auto 10px; border-radius: 50%; color: var(--white); font: 900 1.9rem var(--display); border: 5px solid var(--yellow-l); }
.steps li:nth-child(1) .steps__n { background: var(--orange); } .steps li:nth-child(2) .steps__n { background: var(--pink); } .steps li:nth-child(3) .steps__n { background: var(--teal); }
.steps b { display: block; font: 750 1.35rem var(--display); }
.steps span:last-child { color: var(--ink-2); font-size: .98rem; line-height: 1.5; }
.section--steps { padding-top: clamp(56px, 7vw, 90px); }

/* about strip with a speech bubble */
.about-strip { display: grid; gap: 18px; align-items: center; justify-items: center; }
.about-strip img { width: 210px; }
.bubble { position: relative; padding: clamp(22px, 4vw, 36px); background: var(--white); border: 3px solid var(--ink); border-radius: 32px; box-shadow: 8px 8px 0 var(--pink); }
.bubble::before { content: ""; position: absolute; left: 50%; top: -17px; width: 28px; height: 28px; margin-left: -14px; background: var(--white); border-left: 3px solid var(--ink); border-top: 3px solid var(--ink); transform: rotate(45deg); }
.bubble p { color: var(--ink-2); max-width: 58ch; }
@media (min-width: 760px) { .about-strip { grid-template-columns: 240px 1fr; justify-items: stretch; } .about-strip img { width: 240px; } .bubble::before { left: -17px; top: 50%; margin: -14px 0 0; border-top: 0; border-bottom: 3px solid var(--ink); } }

.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 18px; margin: 10px 0 30px; background: var(--white); border: 3px dashed var(--yellow); border-radius: 32px; color: var(--ink-2); }
.empty img { width: 160px; }
.empty p { max-width: 46ch; margin: 0; }
.empty b { color: var(--ink); display: block; font: 750 1.25rem var(--display); margin-bottom: 4px; }

/* ---------- page head ---------- */
.page-head { position: relative; padding: clamp(22px, 4vw, 44px) 0 clamp(20px, 3vw, 30px); }
.page-head__in { display: grid; grid-template-columns: 1fr; align-items: center; gap: 12px; }
.page-head__ollie { display: none; width: 200px; justify-self: end; padding: 12px; background: var(--yellow); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { margin: 0; }
.page-head--slim { margin-bottom: 28px; padding-bottom: 26px; border-bottom: 3px dotted var(--line); }
@media (min-width: 760px) { .page-head__in { grid-template-columns: 1fr auto; } .page-head__ollie { display: block; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 20px; margin-bottom: 22px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; background: var(--white); border: 2px solid var(--line); color: var(--ink); font: 700 .98rem var(--display); text-decoration: none; transition: transform .25s var(--bounce), border-color .15s; }
.chip span { font-size: .8rem; color: var(--ink-3); }
.chip:hover { border-color: var(--orange); transform: translateY(-3px); color: var(--ink); }
.chip.is-on { background: var(--orange); border-color: var(--orange); color: var(--white); }
.chip.is-on span { color: #ffe7d1; }
.chip--soft { background: var(--purple-l); border-color: transparent; }
.grid--list { margin-bottom: 34px; }
.count { color: var(--ink-3); font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 50px; font-weight: 600; color: var(--ink-3); }
.pager a { padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--white); text-decoration: none; font: 700 1rem var(--display); }
.pager a:hover { background: var(--orange); }

/* ---------- worksheet page ---------- */
.ws { padding-top: 18px; }
.ws__in { display: grid; gap: clamp(26px, 5vw, 60px); }
@media (min-width: 900px) { .ws__in { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; } }
.ws__art { position: relative; z-index: 0; padding: 22px 22px 30px; margin-bottom: 40px; }
.ws__art::before { content: ""; position: absolute; inset: 0 2% 4%; background: var(--yellow-l); border-radius: 48% 52% 46% 54% / 52% 46% 54% 48%; z-index: -1; }
.ws__paper { position: relative; margin: 0; padding: 10px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-lift); transform: rotate(-1.5deg); }
.ws__paper::before { content: ""; position: absolute; inset: 0; border-radius: 18px; z-index: -1; background: var(--orange); transform: rotate(-5deg) translate(-10px, 10px); }
.ws__paper img { width: 100%; border-radius: 10px; background: var(--line); }
.ws__ollie { position: absolute; left: -8px; bottom: -20px; width: 124px; filter: drop-shadow(0 8px 8px rgba(43, 37, 64, .22)); animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
.ws__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ws__info h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
.ws__info .lead { max-width: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 28px; background: var(--orange); color: var(--white); font: 800 1.12rem var(--display); text-decoration: none; cursor: pointer; box-shadow: 0 6px 0 var(--orange-d); transition: transform .12s, box-shadow .12s, background .15s; }
.btn:hover { background: #ff8a33; color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 0 var(--orange-d); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--orange-d); }
.btn--big { padding: 19px 36px; font-size: 1.3rem; margin-top: 8px; }
.ws__note { margin: 16px 0 26px; font-size: .93rem; font-weight: 600; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 28px; }
.facts div { padding: 12px 16px; border-radius: 18px; }
.facts div:nth-child(4n+1) { background: var(--orange-l); } .facts div:nth-child(4n+2) { background: var(--teal-l); }
.facts div:nth-child(4n+3) { background: var(--purple-l); } .facts div:nth-child(4n+4) { background: var(--pink-l); }
.facts dt { font: 700 .78rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 1px 0 0; font: 700 1.08rem var(--display); }
.facts small { font-family: var(--text); font-weight: 500; font-size: .85rem; color: var(--ink-2); }
.skills h2 { font-size: 1.35rem; margin-bottom: .6em; }
.skills ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.skills li { position: relative; padding-left: 34px; font-weight: 500; }
.skills li::before { content: ""; position: absolute; left: 0; top: 2px; width: 23px; height: 23px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; }
.ws__more { display: grid; gap: 26px; padding-top: clamp(20px, 3vw, 34px); margin-top: clamp(10px, 2vw, 20px); border-top: 3px dotted var(--line); }
@media (min-width: 900px) { .ws__more { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.tip { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 16px; background: var(--yellow-l); border-radius: var(--r); font-size: .96rem; color: var(--ink-2); transform: rotate(1deg); }
.tip img { width: 70px; }
.tip p { margin: 0; }

/* ---------- prose, tables, forms ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.55rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--orange); }
.prose--page { padding-bottom: 60px; }
.prose code { background: var(--yellow-l); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.about-hero { float: right; margin: 0 0 12px 20px; width: 180px; padding: 10px; background: var(--yellow); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; }
@media (max-width: 560px) { .about-hero { float: none; margin: 0 auto 14px; } }
.table-wrap { overflow-x: auto; margin-bottom: 1em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px dotted var(--line); vertical-align: top; }
th { font: 700 .95rem var(--display); background: var(--yellow-l); }
.form { display: grid; gap: 16px; padding: clamp(18px, 4vw, 30px); margin-bottom: 60px; background: var(--white); border: 3px solid var(--ink); border-radius: 32px; box-shadow: 8px 8px 0 var(--teal); }
.form__row { display: grid; gap: 6px; }
.form label { font: 700 1.02rem var(--display); }
.form input, .form select, .form textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--bg); font: inherit; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--purple); background: var(--white); }
.form .btn { justify-self: start; }
.form__small { margin: 0; font-size: .9rem; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 18px; border-radius: 18px; margin-bottom: 18px; }
.notice--ok { background: var(--teal-l); color: #0a5c53; }
.notice--error { background: var(--pink-l); color: #8f1239; }

/* ---------- 404 ---------- */
.lost { padding: clamp(40px, 8vw, 100px) 0; }
.lost__in { display: grid; gap: 24px; align-items: center; justify-items: center; text-align: center; }
.lost img { width: 230px; padding: 14px; background: var(--yellow); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; }
.lost .hero__grades { justify-content: center; }
@media (min-width: 760px) { .lost__in { grid-template-columns: 270px 1fr; justify-items: start; text-align: left; } .lost .hero__grades { justify-content: flex-start; } }

/* ---------- footer ---------- */
.foot { margin-top: clamp(30px, 6vw, 70px); color: #e9e4f5; }
.foot .wave { color: var(--ink); }
.foot__bg { background: var(--ink); }
.foot__in { display: grid; gap: 30px; padding-block: 30px 26px; }
.foot__logo { display: inline-block; padding: 12px 16px; background: var(--white); border-radius: 20px; margin-bottom: 14px; }
.foot__logo img { width: 170px; }
.foot__brand p { color: #cfc8e0; max-width: 34ch; font-size: .97rem; }
.foot__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.foot h2 { font: 700 .95rem var(--display); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.foot__cols div:nth-child(1) h2 { color: var(--yellow); } .foot__cols div:nth-child(2) h2 { color: #ff9dbc; } .foot__cols div:nth-child(3) h2 { color: #6fe0d3; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot a { color: var(--white); font-weight: 500; text-decoration: none; }
.foot a:hover { color: var(--yellow); text-decoration: underline; }
.foot__base { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 18px; border-top: 2px dotted rgba(255, 255, 255, .2); }
.foot__base p { margin: 0; font-size: .9rem; color: #b9b1cc; }
.foot__ollie { width: 62px; margin-top: -34px; }
@media (min-width: 760px) { .foot__in { grid-template-columns: 1.1fr 2fr; } .foot__cols { grid-template-columns: repeat(3, 1fr); } }

/* ---------- cookie notice ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 14px 16px; background: var(--white); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--yellow); font-size: .92rem; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; color: var(--ink-2); }
.cookie button { flex: none; border: 0; border-radius: 999px; padding: 9px 18px; background: var(--ink); color: var(--white); font: 700 1rem var(--display); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark::before { transform: rotate(-1.6deg) scaleX(1); }
}

/* phones: the floating shapes would sit on top of the headline */
@media (max-width: 899px) { .hero > .doodle { display: none; } }
