/* TutorTap worksheets. Layout: a wide 1180px column of colour-blocked sections; the real worksheets are the imagery.
   Palette: TutorTap navy, teal and tag orange from the logo, plus one bright colour per Year and subject. */
:root {
  color-scheme: light;
  --paper: #FFFCF6; --paper-2: #FFF5E3; --card: #FFFEFB; --ink: #0E2B44; --muted: #4E6175; --line: #EADFCB;
  --navy: #003658; --navy-deep: #06213A; --on-navy: #F3F7FB;
  --teal: #07A2AB; --teal-ink: #05737A; --teal-soft: #DCF3F4;
  --orange: #F29A1F; --orange-ink: #3A2200; --orange-soft: #FDEBD2;
  --sun: #FFD34E; --sun-soft: #FFF2C4; --sun-ink: #4A3500;
  --coral: #E9513F; --coral-soft: #FCE3DE; --coral-ink: #92271A;
  --leaf: #23935A; --leaf-soft: #DDF2E5; --leaf-ink: #135C36;
  --sky: #2475D0; --sky-soft: #E0EDFB; --sky-ink: #11457F;
  --grape: #7353D0; --grape-soft: #EBE5FB; --grape-ink: #43299A;
  --tealk: #078A92;
  --star: #F08C00;
  --shadow: 0 1px 2px rgba(14, 43, 68, .06), 0 10px 30px rgba(14, 43, 68, .10);
  --display: "Lilita One", "Segoe UI", system-ui, sans-serif;
  --body: "Andika", "Segoe UI", system-ui, sans-serif;
  --hand: "Patrick Hand", "Segoe UI", sans-serif;
}



/* One colour per Year / subject: --k solid, --k-soft tint, --k-ink text on tint, --k-on text on solid */
.c-coral { --k: var(--coral); --k-soft: var(--coral-soft); --k-ink: var(--coral-ink); --k-on: #FFFDFB; }
.c-orange { --k: var(--orange); --k-soft: var(--orange-soft); --k-ink: #8A4B00; --k-on: var(--orange-ink); }
.c-sun { --k: var(--sun); --k-soft: var(--sun-soft); --k-ink: var(--sun-ink); --k-on: var(--sun-ink); }
.c-leaf { --k: var(--leaf); --k-soft: var(--leaf-soft); --k-ink: var(--leaf-ink); --k-on: #FBFFFC; }
.c-teal { --k: var(--teal); --k-soft: var(--teal-soft); --k-ink: var(--teal-ink); --k-on: #FBFFFF; }
.c-sky { --k: var(--sky); --k-soft: var(--sky-soft); --k-ink: var(--sky-ink); --k-on: #FBFDFF; }
.c-grape { --k: var(--grape); --k-soft: var(--grape-soft); --k-ink: var(--grape-ink); --k-on: #FDFBFF; }



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16.5px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: .2px; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 400; }
p { margin: 0; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.small { font-size: 0.9rem; color: var(--muted); }
.code { font-family: var(--display); font-weight: 800; color: var(--k-ink, var(--teal-ink)); }
.h-small { font: 600 0.8rem/1.4 var(--body); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }

/* Stars and badges */
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars svg { width: 15px; height: 15px; }
.stars .on { fill: var(--star); }
.stars .off { fill: none; stroke: var(--star); stroke-width: 1.8; opacity: .6; }
.badge { display: inline-block; font: 600 0.72rem/1 var(--body); padding: 5px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.badge.free { background: var(--leaf); color: #FBFFFC; }
.badge.pass { background: var(--navy); color: var(--on-navy); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--body); padding: 15px 22px;
  border-radius: 14px; background: var(--navy); color: var(--on-navy); text-decoration: none; border: 2px solid var(--navy);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s cubic-bezier(.22, 1, .36, 1); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -1px var(--orange); }
.btn-orange { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.btn-orange:hover { box-shadow: 0 6px 0 -1px var(--navy); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* Header and footer */
.site-head { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding-block: 12px; }
.brand img { height: 44px; width: auto; }
.brand { display: flex; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.site-head nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding-block: 6px; }
.site-head nav a:not(.nav-cta):hover, .site-head nav a[aria-current]:not(.nav-cta) { color: var(--teal-ink); }
.nav-cta { background: var(--orange); color: var(--orange-ink) !important; padding: 9px 16px !important; border-radius: 12px; font-weight: 600 !important; }
.nav-cta:hover { box-shadow: 0 4px 0 -1px var(--navy); }
.site-foot { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 0; }
.foot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px 48px; padding-block: 44px; }
.foot-brand { display: grid; gap: 10px; align-content: start; }
.foot-logo { height: 40px; width: auto; }
.foot-brand p, .legal { color: var(--muted); font-size: 0.9rem; }
.foot-links { display: grid; gap: 6px; align-content: start; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--teal-ink); }

/* Sections */
main section { padding-block: clamp(48px, 7vw, 88px); }
.sec-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 62ch; }
.sec-head p { color: var(--muted); font-size: 1.05rem; }

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 72px) clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero h1 .hl { color: var(--teal-ink); }
.hero-note { color: var(--muted); }
.hero-note b { color: var(--leaf-ink, var(--ink)); font-weight: 600; }
.search input { width: 100%; max-width: 540px; font: 400 1.05rem var(--body); padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.search input:focus { border-color: var(--teal); outline: none; }
.results { display: grid; gap: 6px; max-width: 540px; }
.result { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.result:hover { border-color: var(--teal); }
.result small { color: var(--muted); white-space: nowrap; }
.result-empty { color: var(--muted); font-size: 0.95rem; }
.hero-art { position: relative; min-height: 470px; border-radius: 36px; background: var(--teal-soft); isolation: isolate; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.hero-art::before { width: 46%; aspect-ratio: 1; background: var(--sun); right: -6%; top: -8%; opacity: .9; }
.hero-art::after { width: 30%; aspect-ratio: 1; background: var(--coral); left: 6%; bottom: -6%; opacity: .85; }
.fan { position: absolute; width: 50%; border-radius: 6px; box-shadow: var(--shadow); background: #fff; }
.fan-1 { left: 6%; top: 15%; transform: rotate(-7deg); }
.fan-2 { left: 27%; top: 6%; transform: rotate(2deg); z-index: 2; }
.fan-3 { right: 4%; top: 18%; transform: rotate(8deg); }

/* Years */
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.year-tile { position: relative; display: grid; gap: 2px; padding: 18px 18px 16px; border-radius: 22px; text-decoration: none; overflow: hidden;
  background: var(--k); color: var(--k-on); min-height: 168px; align-content: end;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s cubic-bezier(.22, 1, .36, 1); }
.year-tile .yl { font: 600 0.85rem var(--body); text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.year-tile .yn { font: 800 4.6rem/0.9 var(--display); letter-spacing: -0.04em; }
.year-tile .ys { font-size: 0.84rem; font-weight: 500; opacity: .95; }
a.year-tile:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 10px 0 -2px var(--navy); }
.year-tile.soon { background: var(--k-soft); color: var(--k-ink); }
.year-tile.soon .yn { opacity: .55; }

/* Levels */
.levels-sec { background: var(--paper-2); }
.level-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.level-steps li { display: grid; gap: 10px; padding: 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); align-content: start; }
.level-steps h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-steps p { color: var(--muted); }
.lv-stars .stars svg { width: 26px; height: 26px; }
.level-steps .lv-1 { background: var(--leaf-soft); border-color: transparent; }
.level-steps .lv-2 { background: var(--sky-soft); border-color: transparent; }
.level-steps .lv-3 { background: var(--grape-soft); border-color: transparent; }

/* Sheet cards */
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.sheet-card { display: grid; grid-template-rows: auto 1fr; background: var(--card); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s cubic-bezier(.22, 1, .36, 1); }
.sheet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sheet-thumb { position: relative; display: block; background: var(--k-soft); padding: 18px 22px 0; height: 190px; overflow: hidden; }
.sheet-thumb img { border-radius: 6px 6px 0 0; box-shadow: 0 2px 8px rgba(14, 43, 68, .15); background: #fff; }
.sheet-thumb .badge { position: absolute; top: 12px; right: 12px; }
.sheet-body { display: grid; gap: 6px; padding: 16px 18px 18px; align-content: start; }
.sheet-title { font: 700 1.15rem/1.2 var(--display); }
.level-line { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); flex-wrap: wrap; }
.level-line.big { font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.level-line.big .stars svg { width: 22px; height: 22px; }

/* Pass band and books */
.pass-band { background: var(--navy); color: var(--on-navy); }
.pass-band-row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.pass-band-row > div { display: grid; gap: 10px; max-width: 60ch; min-width: 0; }
.pass-band p { color: color-mix(in srgb, var(--on-navy) 82%, transparent); font-size: 1.05rem; }
.books-sec { padding-block: 40px !important; }
.books-row { display: grid; gap: 8px; background: var(--sun-soft); color: var(--sun-ink); border-radius: 26px; padding: 28px 32px; }
.books-row h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--ink); }
.books-row p { color: var(--muted); }

/* Year pages */
.year-head { background: var(--k-soft); padding-block: clamp(32px, 5vw, 56px) clamp(28px, 4vw, 44px) !important; overflow: hidden; }
.year-head-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.year-head-copy { display: grid; gap: 12px; min-width: 0; }
.year-head h1 { color: var(--ink); }
.year-head p { color: var(--muted); font-size: 1.1rem; }
.year-big { font: 800 clamp(7rem, 16vw, 12rem)/0.8 var(--display); color: var(--k); letter-spacing: -0.06em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border-radius: 999px; background: var(--k); color: var(--k-on); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.subject-sec { padding-block: 40px 56px !important; }
.subject-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.subject-title::before { content: ""; width: 18px; height: 18px; border-radius: 6px; background: var(--k); }
.subject-title a { color: inherit; text-decoration: none; }
.unit { margin-bottom: 30px; }
.unit-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.35rem; margin-bottom: 10px; }
.unit-n { font: 600 0.78rem var(--body); letter-spacing: .06em; text-transform: uppercase; background: var(--k-soft); color: var(--k-ink); padding: 5px 10px; border-radius: 999px; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.topic { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.topic-thumb { display: block; height: 78px; border-radius: 10px; overflow: hidden; background: var(--k-soft); }
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.topic-main { display: grid; gap: 8px; min-width: 0; }
.topic-name { font: 700 1.1rem/1.25 var(--display); }
.levels { display: flex; flex-wrap: wrap; gap: 8px; }
.level-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  text-decoration: none; color: var(--ink); font-size: 0.92rem; font-weight: 500; background: var(--paper);
  transition: border-color .2s, transform .2s cubic-bezier(.22, 1, .36, 1); }
.level-btn:hover { border-color: var(--k, var(--teal)); transform: translateY(-1px); }
.level-btn.is-free { background: var(--leaf-soft); border-color: transparent; }
.level-btn.is-current { border-color: var(--k, var(--teal)); box-shadow: inset 0 0 0 1px var(--k, var(--teal)); }

/* Worksheet page */
.ws-page { padding-top: 28px !important; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: 18px; }
.ws-info { display: grid; gap: 20px; min-width: 0; position: sticky; top: 92px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--k-soft); border-radius: 16px; padding: 12px 14px; }
.facts dt { font-size: 0.76rem; color: var(--k-ink); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.facts dd { margin: 0; font: 800 1.8rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.get { display: grid; gap: 12px; }
.get-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.other-levels { display: grid; gap: 10px; }
.next-topic { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1.5px dashed var(--line); text-decoration: none; color: var(--ink); justify-self: start; }
.next-topic:hover { border-color: var(--k, var(--teal)); }
.ws-preview { margin: 0; display: grid; gap: 10px; padding: clamp(16px, 3vw, 28px); background: var(--k-soft); border-radius: 28px; }
.ws-preview img { border-radius: 6px; box-shadow: var(--shadow); background: #fff; }
.ws-preview figcaption { font-size: 0.85rem; color: var(--k-ink); text-align: center; }

/* Pass, about, plain pages */
.page-head { padding-block: 48px 8px !important; }
.page-head .wrap { display: grid; gap: 12px; }
.pass-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.price-card { background: var(--card); border: 2px solid var(--navy); border-radius: 26px; padding: 26px; display: grid; gap: 14px; box-shadow: 8px 8px 0 var(--orange); }
.price { font: 800 2rem/1.1 var(--display); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 11px; height: 6px; border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg); }
.pay-steps { display: grid; gap: 22px; min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.step-n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 1.1rem var(--display); background: var(--sun); color: var(--sun-ink); }
.steps p { color: var(--muted); margin-top: 4px; }
.note-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; }
.note-box p { color: var(--muted); }
.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose h2 { margin-top: 12px; font-size: 1.6rem; }

@media (max-width: 880px) {
  .hero-grid, .ws-grid, .pass-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; aspect-ratio: 1.15; max-width: 520px; }
  .ws-info { position: static; }
  .year-big { font-size: 6rem; }
}
@media (max-width: 520px) {
  .brand img { height: 36px; }
  .topic { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .topic-thumb { height: 64px; }
  .year-tile .yn { font-size: 3.6rem; }
  .year-tile { min-height: 140px; }
  .facts dd { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .year-tile, .sheet-card, .level-btn { transition: none; }
  .btn:hover, a.year-tile:hover, .sheet-card:hover, .level-btn:hover { transform: none; }
}

/* ---- 14 Oct v3: Twinkl-style browsing, hover peeks, light/dark switch, pricing ---- */
.year-tile .yn, .facts dd, .price, .sheet-title, .topic-name, .step-n, .unit-title { font-weight: 400; }
.eyebrow { font-family: var(--hand); font-size: 1rem; letter-spacing: .02em; text-transform: none; }
.logo-dark { display: none !important; }

 
.theme-btn { display: inline-flex; align-items: center; gap: 6px; font: 600 .9rem var(--body); color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 8px; cursor: pointer; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-btn .i-moon { fill: currentColor; stroke: none; }
.theme-btn .i-sun { display: none; }

.year-strip { border-top: 1px solid var(--line); }
.year-strip-row { display: flex; gap: 8px; padding-block: 8px; overflow-x: auto; scrollbar-width: none; }
.ys-chip { flex: none; font: 600 .92rem var(--body); padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--k-ink); background: var(--k-soft); }
.ys-chip:hover, .ys-chip.is-on { background: var(--k); color: var(--k-on); }
.ys-chip.soon { opacity: .55; cursor: default; }
.ys-chip.free { background: var(--leaf-soft); color: var(--leaf-ink); margin-left: auto; }
/* stacked-page thumbnails */
.stack { position: relative; display: block; }
.stack::before, .stack::after { content: ""; position: absolute; inset: 0; background: #fff; border-radius: 6px 6px 0 0; box-shadow: 0 2px 6px rgba(14, 43, 68, .14); }
.stack::before { transform: rotate(-5deg) translate(-8px, 6px); } .stack::after { transform: rotate(4deg) translate(8px, 4px); }
.stack img { position: relative; z-index: 1; }
.sheet-card { position: relative; }
.sheet-card .sheet-link { display: grid; grid-template-rows: auto 1fr; height: 100%; text-decoration: none; color: var(--ink); }
.sheet-thumb { padding: 22px 28px 0 !important; }
/* hover peek: a bigger look at page 1 plus the details, like education.com */
.peek { position: absolute; z-index: 20; pointer-events: none; opacity: 0; transform: translateY(6px) scale(.98);
  transition: opacity .18s ease-out, transform .18s cubic-bezier(.22, 1, .36, 1); background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 18px 40px rgba(14, 43, 68, .25); padding: 10px; width: 300px; left: 50%; top: 10px; margin-left: -150px; }
.peek img { border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.peek p { font-size: .88rem; color: var(--muted); margin: 8px 4px 2px; line-height: 1.45; }
.peek p b { color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.sheet-card:hover .peek, .sheet-card:focus-within .peek { opacity: 1; transform: none; }
.level-btn { position: relative; }
.peek.small { width: 220px; top: auto; bottom: calc(100% + 10px); margin-left: -110px; padding: 6px; }
.level-btn:hover .peek.small, .level-btn:focus .peek.small { opacity: 1; transform: none; }
@media (hover: none) { .peek { display: none; } }
/* fresh row */
.sec-head.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 24px; max-width: none; }
.fresh-sec { background: var(--paper-2); }
.fresh-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.fresh-card { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s; }
.fresh-card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: var(--shadow); }
.fresh-card .sheet-thumb { position: relative; display: block; background: var(--sky-soft); height: 210px; overflow: hidden; }
.fresh-card:nth-child(3n+2) .sheet-thumb { background: var(--coral-soft); } .fresh-card:nth-child(3n) .sheet-thumb { background: var(--leaf-soft); }
.fresh-card .badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
.badge.new { background: var(--coral); color: #fff; }
.fresh-card .sheet-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
/* browse layout with a sticky filter panel (Twinkl style) */
.browse { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; padding-block: 28px 56px; }
.filters { position: sticky; top: 130px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.filters fieldset { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.filters legend { font: 1.05rem var(--display); margin-bottom: 4px; color: var(--ink); }
.filters label { display: flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.filters input { accent-color: var(--teal); width: 17px; height: 17px; }
.f-title { font: 1.4rem var(--display); margin: 0 0 10px; }
.dot { width: 12px; height: 12px; border-radius: 4px; background: var(--k); display: inline-block; }
.unit-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-jump a { font: .8rem var(--body); font-weight: 700; padding: 4px 8px; border-radius: 8px; background: var(--k-soft); color: var(--k-ink); text-decoration: none; }
.f-count { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.subject-sec { padding: 0 0 24px !important; }
.unit { scroll-margin-top: 140px; }
.topic.is-hidden, .level-btn.is-hidden, .unit.is-hidden, .subject-sec.is-hidden { display: none; }
/* worksheet page zoom */
.zoomable { cursor: zoom-in; }
.zoomable.is-zoomed { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; background: rgba(6, 22, 38, .82); display: grid; place-items: center; cursor: zoom-out; padding: 20px; }
.zoomable.is-zoomed img { max-height: 94vh; width: auto; max-width: 94vw; }
.zoomable.is-zoomed figcaption { color: #fff; }
/* pricing */
.pricing-head .wrap { justify-items: center; text-align: center; }
.pricing-head .lede { margin-inline: auto; }
.billing { display: inline-flex; gap: 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.bill-btn { font: 600 .95rem var(--body); border: 0; background: transparent; color: var(--ink); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.bill-btn.is-on { background: var(--navy); color: var(--on-navy); }
.save { font: .78rem var(--hand); background: var(--sun); color: var(--sun-ink); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }
.plans-sec { padding-top: 28px !important; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.plan { position: relative; display: grid; gap: 12px; align-content: start; background: var(--card); border: 1.5px solid var(--line); border-radius: 26px; padding: 28px 24px; }
.plan h2 { font-size: 1.8rem; } .plan-who { color: var(--muted); margin-top: -6px; }
.plan .price { font: 3rem/1 var(--display); display: flex; align-items: baseline; gap: 6px; }
.plan .per { font: 1rem var(--body); color: var(--muted); }
.plan .billed { font-size: .9rem; color: var(--muted); min-height: 1.4em; }
.plan .btn { margin-top: 6px; }
.plan.featured { border: 3px solid var(--orange); box-shadow: 10px 10px 0 var(--sun); transform: translateY(-8px); }
.ribbon-tag { position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: var(--coral); color: #fff; font: 1rem var(--display);
  padding: 6px 16px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1); }
  .reveal.is-in { opacity: 1; transform: none; }
  .fan { animation: floaty 6s ease-in-out infinite; } .fan-2 { animation-delay: -2s; } .fan-3 { animation-delay: -4s; }
  @keyframes floaty { 50% { translate: 0 -8px; } }
}
@media (max-width: 880px) {
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .plan.featured { transform: none; }
}

/* ---- 14 Oct v4: comparison table, hover details on hero and fresh sheets ---- */
.plan-note { background: var(--sun-soft); color: var(--sun-ink); border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.plan.featured .ticks { gap: 7px; }
.compare-sec { background: var(--paper-2); }
.cmp-scroll { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.cmp { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .98rem; }
.cmp th, .cmp td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.cmp thead th { font: 1.3rem var(--display); background: var(--card); position: sticky; top: 0; }
.cmp tbody th { text-align: left; font-weight: 400; }
.cmp .hot { background: color-mix(in srgb, var(--orange) 9%, var(--card)); }
.cmp thead th.hot { background: var(--orange); color: var(--orange-ink); border-radius: 14px 14px 0 0; }
.cmp-group th { font: 1.1rem var(--display) !important; color: var(--teal-ink); background: var(--paper) !important; text-align: left !important; }
.cmp-yes { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 700; }
.cmp-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coral-soft); color: var(--coral); font-weight: 700; }
.cmp-soon { font: .85rem var(--hand); background: var(--grape-soft); color: var(--grape-ink); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.cmp-txt { font-weight: 700; }
.cmp-cta td { border-bottom: 0; padding-block: 18px; }
.cmp-cta .btn { padding: 11px 16px; font-size: .92rem; }
.fan { position: absolute; width: 50%; display: block; border-radius: 6px; box-shadow: none !important; background: transparent !important; z-index: 1; }
.fan img { border-radius: 6px; box-shadow: var(--shadow); background: #fff; }
.fan:hover { z-index: 5; }
.fan .peek { top: 35%; left: 50%; width: 270px; margin-left: -135px; }
.fan .peek b { display: block; font: 1.1rem var(--display); color: var(--ink); margin-bottom: 4px; }
.fan:hover .peek, .fan:focus .peek { opacity: 1; transform: none; }
.fan .peek p { margin: 0; }
.fresh-card .sheet-thumb { position: relative; }
.fresh-card .desc { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--navy); color: var(--on-navy); font-size: .86rem; line-height: 1.45;
  padding: 12px 14px; transform: translateY(101%); transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.fresh-card .desc b { display: block; font: 1rem var(--display); margin-bottom: 2px; color: var(--sun); }
.fresh-card:hover .desc, .fresh-card:focus .desc { transform: none; }
@media (hover: none) { .fresh-card .desc { display: none; } }

/* v5: what the Individual plan misses */
.miss { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.miss li { position: relative; padding-left: 26px; color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--coral) 60%, transparent); }
.miss li::before { content: "\2717"; position: absolute; left: 3px; top: 0; color: var(--coral); font-weight: 700; text-decoration: none; }
.nudge { background: var(--coral-soft); color: var(--coral-ink); border-radius: 12px; padding: 10px 12px; font-size: .92rem; }
.plan s { color: var(--muted); }

/* v6: Gold / Diamond / Platinum for families, School underneath */
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gem { display: inline-block; width: 15px; height: 15px; border-radius: 3px; transform: rotate(45deg); margin-right: 12px; vertical-align: .12em; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .14); }
.gem-gold { background: var(--sun); } .gem-diamond { background: var(--sky); } .gem-platinum { background: var(--grape); } .gem-school { background: var(--teal); }
.plan.plat { border: 2px solid var(--grape); }
.ribbon-tag.alt { background: var(--grape); transform: translateX(-50%) rotate(1.5deg); }
.plat-note { background: var(--grape-soft); color: var(--grape-ink); }
.btn-grape { background: var(--grape); border-color: var(--grape); color: #FDFBFF; }
.pricing-head .lede a { color: var(--teal-ink); font-weight: 700; }
.plan-school { margin-top: 30px; grid-template-columns: minmax(220px, 1fr) 2fr auto; align-items: center; gap: 14px 32px; background: var(--teal-soft); border-color: transparent; }
.plan-school .ticks { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.plan-school .btn { margin-top: 0; }
.cmp-price th, .cmp-price td { font: 1.4rem var(--display); }
.cmp-price th { font: 1rem var(--body) !important; color: var(--muted); }
@media (max-width: 980px) {
  .plans { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; gap: 34px; }
  .plan-school { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; }
  .plan-school .ticks { grid-template-columns: 1fr; }
}
.plans .plan { display: flex; flex-direction: column; }
.plans .plan > .btn { margin-top: auto; }
.cmp thead th:first-child { text-align: left; }
.pricing-head .lede { text-wrap: pretty; }

/* v7: two switches on the pricing page, the Tanzania price, book shelf, Diamond Family gems */
.switches { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.link-btn { font: 700 .95rem var(--body); color: var(--teal-ink); background: none; border: 0; padding: 4px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gem-teal { background: var(--teal); } .gem-family { background: var(--grape); }
.gems3 { display: inline-flex; gap: 2px; margin-right: 12px; vertical-align: .1em; }
.gems3 .gem { width: 11px; height: 11px; margin: 0 2px; }
.peek-in { align-self: center; font-size: .92rem; color: var(--muted); text-underline-offset: 3px; margin-top: 4px; }
.peek-in:hover { color: var(--ink); }
.books-sec { padding-top: 10px !important; }
.shelf { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; }
.book { margin: 0; display: grid; gap: 8px; text-align: center; align-content: start; }
.book img { width: 100%; height: auto; border-radius: 4px 8px 8px 4px; box-shadow: -3px 0 0 rgba(0, 0, 0, .18) inset, var(--shadow);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.book:hover img { transform: translateY(-6px) rotate(-1.5deg); }
.book figcaption { display: grid; gap: 2px; font-size: .9rem; }
.book figcaption b { font: 1.05rem var(--display); }
.book s { color: var(--muted); }
.shelf-note { color: var(--muted); font-size: .92rem; margin-top: 12px; text-align: center; }
@media (max-width: 900px) {
  .shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shelf .book { flex: 0 0 132px; scroll-snap-align: start; }
}
.btn-navy { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn-small { padding: 10px 14px; font-size: .9rem; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn-whatsapp { background: #1F9D55; border-color: #1F9D55; color: #F7FFF9; }
.btn-whatsapp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }

/* v7: demo member accounts */
.demo-bar { background: var(--sun-soft); color: var(--sun-ink); border-bottom: 1px solid color-mix(in srgb, var(--sun) 60%, transparent); }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 10px; }
.demo-row p { margin: 0; font-size: .95rem; }
.demo-plans { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.demo-plans a { font: 600 .9rem var(--body); color: var(--sun-ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.demo-plans a[aria-current] { background: var(--navy); color: var(--on-navy); }
.demo-plans a:hover:not([aria-current]) { background: color-mix(in srgb, var(--sun) 45%, transparent); }
.demo-plans .demo-back { text-decoration: underline; text-underline-offset: 3px; }
.acct-head { padding-block: 34px 10px; }
.acct-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.acct-row h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.plan-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 18px 20px; display: grid; gap: 6px; min-width: 300px; max-width: 380px; }
.plan-card p { margin: 0; }
.plan-card-name { font: 1.5rem var(--display); }
.days-left, .pack-meter, .kid-meter { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.days-left span, .pack-meter span, .kid-meter span { display: block; height: 100%; border-radius: inherit; background: var(--leaf); }
.muted { color: var(--muted); font-size: .92rem; }
.acct-body { padding-block: 10px 70px; }
.acct-body > .wrap { display: grid; gap: 22px; }
.child-head { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.child-head h2 { font-size: 1.9rem; } .child-head p { margin: 0; }
.avatar { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--k, var(--teal)); color: var(--k-on, #fff); font: 1.6rem var(--display); }
.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 22px; }
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 20px 22px; display: grid; gap: 14px; }
.panel h2 { font-size: 1.35rem; }
.panel-head { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: flex-start; }
.panel-head p { margin: 2px 0 0; }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.day { display: grid; gap: 6px; align-content: start; }
.day-top { display: flex; justify-content: space-between; align-items: center; }
.day-name { font: 1.05rem var(--display); }
.day-flag { font: .78rem var(--hand); background: var(--orange); color: var(--orange-ink); padding: 1px 8px; border-radius: 999px; }
.day-sheet { display: block; aspect-ratio: 210 / 297; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.day-sheet img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.day.is-today .day-sheet { outline: 3px solid var(--orange); outline-offset: 2px; }
.day.is-done .day-sheet { opacity: .78; }
.day-subj { justify-self: start; font: 600 .74rem var(--body); background: var(--k-soft); color: var(--k-ink); padding: 2px 8px; border-radius: 999px; }
.day-title { font-size: .9rem; line-height: 1.3; font-weight: 700; }
.day-state { font-size: .84rem; color: var(--muted); }
.day-state .ok { color: var(--leaf); font-weight: 700; }
.day.is-late .day-state { color: var(--coral-ink); font-weight: 700; }
.mini-sheet { display: grid; align-content: start; gap: 7px; height: 100%; padding: 0 0 10px; background: #fff; }
.mini-sheet b { display: block; background: var(--k); color: var(--k-on); font: .78rem/1.2 var(--display); padding: 12px 8px 10px; }
.mini-sheet i { display: block; height: 5px; margin: 0 10px; border-radius: 3px; background: var(--k-soft); }
.mini-sheet i:nth-child(odd) { margin-right: 26px; }
.pack-foot { margin: -4px 0 0; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cert { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 18px; background: var(--k-soft); color: var(--k-ink); }
.cert small { color: var(--muted); }
.rosette { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--k); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--k); }
.rosette svg { width: 26px; height: 26px; fill: var(--k-on); }
.cert.next { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.cert.next .rosette { background: var(--paper-2); box-shadow: 0 0 0 2px var(--line); }
.cert.next .rosette svg { fill: var(--line); }
.files { list-style: none; margin: 0; padding: 0; display: grid; }
.files li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.file-tag { font: 600 .76rem var(--body); background: var(--k-soft); color: var(--k-ink); padding: 3px 9px; border-radius: 999px; }
.file-name { font-weight: 700; display: grid; } .file-name small { font-weight: 400; color: var(--muted); }
.pill-soon { font: .85rem var(--hand); background: var(--sun-soft); color: var(--sun-ink); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.stat-line { margin: 0; } .stat-line b { font: 1.5rem var(--display); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; gap: 5px; }
.bar-label { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; } .bar-label small { font-weight: 400; color: var(--muted); }
.bar { display: block; height: 12px; border-radius: 999px; background: var(--k-soft); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--k); }
.review blockquote { margin: 0; padding: 14px 16px; background: var(--paper-2); border-radius: 16px; font: 1.12rem/1.45 var(--hand); color: var(--ink); }
.review p { margin: 0; }
.help textarea { width: 100%; font: 1rem var(--body); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); resize: vertical; }
.ask { font-weight: 700; margin-top: 4px; }
.unit-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.unit-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--k-soft); color: var(--k-ink); text-decoration: none; height: 100%; }
.unit-tile:hover { background: var(--k); color: var(--k-on); }
.unit-tile .unit-n { font: .8rem var(--hand); } .unit-tile b { font-size: .95rem; line-height: 1.25; } .unit-tile small { opacity: .8; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.recent a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.recent img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; object-position: top; border-radius: 8px; box-shadow: var(--shadow); }
.recent small { color: var(--muted); }
.locked { position: relative; border-radius: 26px; overflow: hidden; }
.locked-inner { filter: blur(3px) saturate(.7); opacity: .55; pointer-events: none; user-select: none; max-height: 640px; overflow: hidden; }
.locked-card { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); width: min(520px, calc(100% - 32px)); background: var(--card);
  border: 3px solid var(--orange); border-radius: 24px; padding: 26px; display: grid; gap: 10px; justify-items: center; text-align: center; box-shadow: 10px 10px 0 var(--sun); }
.locked-card h2 { font-size: 1.6rem; } .locked-card p { margin: 0; color: var(--muted); }
.locked-card .locked-price { font: 1.3rem var(--display); color: var(--ink); }
.year-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ys-chip.is-locked { opacity: .45; cursor: not-allowed; }
.family { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kid-card { display: flex; gap: 14px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line);
  border-radius: 20px; padding: 14px 16px; cursor: pointer; }
.kid-card.is-on { border-color: var(--k); box-shadow: 6px 6px 0 var(--k-soft); }
.kid-card .avatar { background: var(--k); color: var(--k-on); }
.kid-main { display: grid; gap: 4px; flex: 1; } .kid-main b { font: 1.3rem var(--display); } .kid-main small { color: var(--muted); }
.kid-meter span { background: var(--k); }
.kid-panel { display: grid; gap: 22px; } .kid-panel[hidden] { display: none; }
.small-shelf { gap: 12px; }
.book.is-mine img { outline: 4px solid var(--orange); outline-offset: 3px; }
.book .mine { font: .82rem var(--hand); color: var(--orange-ink); background: var(--orange-soft); border-radius: 999px; padding: 1px 8px; justify-self: center; }
.demo-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; z-index: 20; max-width: min(460px, calc(100% - 32px));
  background: var(--navy); color: var(--on-navy); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); margin: 0; pointer-events: none;
  transition: opacity .25s, transform .25s cubic-bezier(.22, 1, .36, 1); }
.demo-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .family { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .days { grid-template-columns: repeat(5, 132px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .day { scroll-snap-align: start; }
  .plan-card { min-width: 0; width: 100%; }
  .files li { grid-template-columns: 1fr auto; } .files .file-tag { grid-column: 1 / -1; justify-self: start; }
  .locked-card { top: 40px; padding: 20px; }
}

/* v8: shilling calculator next to the payment steps */
.calc { display: grid; gap: 10px; }
.calc-row { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-row label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; flex: 1 1 150px; }
.calc select { font: 1rem var(--body); padding: 9px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.calc-out { font-size: 1.1rem; margin: 0; } .calc-out b { font: 1.3rem var(--display); }

/* v9: joining walk-through */
.join { padding-block: 26px 80px; overflow-x: clip; }
.join-wrap { max-width: 860px; display: grid; gap: 20px; }
.stepper { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.stepper[hidden] { display: none; }
.stepper li[data-step] { display: grid; justify-items: center; gap: 6px; position: relative; z-index: 1; font-size: .88rem; color: var(--muted); }
.stepper .dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 2px solid var(--line);
  font: 1rem var(--display); color: var(--muted); transition: background .3s, border-color .3s, color .3s, transform .3s cubic-bezier(.22, 1, .36, 1); }
.stepper li.is-on .dot { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); transform: scale(1.12); }
.stepper li.is-on { color: var(--ink); font-weight: 700; }
.stepper li.is-done .dot { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.stepper-bar { position: absolute; left: 10%; right: 10%; top: 17px; height: 4px; background: var(--line); border-radius: 999px; z-index: 0; }
.stepper-bar span { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: inherit; transition: width .5s cubic-bezier(.22, 1, .36, 1); }
.step { display: grid; gap: 16px; position: relative; }
.step[hidden] { display: none; }
.step h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.step.is-in { animation: step-in .5s cubic-bezier(.22, 1, .36, 1); }
@keyframes step-in { from { opacity: 0; transform: translateX(26px); } }
.join-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 24px; padding: 22px 24px; display: grid; gap: 14px; }
.join-plan-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.join-plan-head h2 { font-size: 1.7rem; } .join-plan-head p { margin: 0; }
.join-price { display: grid; justify-items: end; } .join-price b { font: 2.4rem/1 var(--display); } .join-price span, .join-price small { color: var(--muted); }
.per-btn { font: 600 .95rem var(--body); border: 0; background: transparent; color: var(--ink); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.per-btn.is-on { background: var(--navy); color: var(--on-navy); }
.join .billing { justify-self: start; margin: 0; }
.swap { margin: 0; }
.join-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.join-actions.center { justify-content: center; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form label small { font-weight: 400; color: var(--muted); }
.form input[type=text], .form input:not([type]), .form input[type=email], .form input[type=tel], .form input[type=password], .pay-panel input, .login-pane input:not(.otp input) {
  font: 1.05rem var(--body); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); }
.form input:focus, .pay-panel input:focus { outline: 3px solid color-mix(in srgb, var(--orange) 45%, transparent); border-color: var(--orange); }
.kid-row { border: 0; padding: 14px 0 0; margin: 0; display: grid; gap: 10px; border-top: 1px dashed var(--line); }
.kid-row:first-child { border-top: 0; padding-top: 0; }
.kid-row.is-new { animation: step-in .45s cubic-bezier(.22, 1, .36, 1); }
.year-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.year-pick label { cursor: pointer; font-weight: 600; }
.year-pick input { position: absolute; opacity: 0; pointer-events: none; }
.year-pick label:has(input:checked) { background: var(--k); color: var(--k-on); }
.year-pick label:has(input:focus-visible) { outline: 3px solid var(--orange); }
.add-kid { justify-self: start; }
.kid-limit { margin: 0; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.pay-sum { background: var(--paper-2); border-radius: 16px; padding: 12px 16px; }
.pay-sum p { margin: 0; } .pay-total b { font: 1.8rem var(--display); }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.method { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer;
  transition: border-color .2s, transform .2s cubic-bezier(.22, 1, .36, 1); }
.method small { color: var(--muted); }
.method:hover:not(:disabled) { transform: translateY(-2px); }
.method.is-on { border-color: var(--orange); background: var(--orange-soft); }
.method:disabled { opacity: .5; cursor: not-allowed; }
.pay-panel { display: grid; gap: 10px; }
.pay-panel[hidden] { display: none; }
.pay-panel label { display: grid; gap: 6px; font-weight: 700; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; } .bank dt { color: var(--muted); } .bank dd { margin: 0; font-weight: 700; }
.pay-status, .login-status { margin: 0; font-weight: 700; color: var(--teal-ink); min-height: 1.4em; }
.phone-wrap { opacity: .35; transform: translateY(10px) scale(.97); transition: opacity .5s, transform .6s cubic-bezier(.22, 1, .36, 1); }
.phone-wrap.is-on { opacity: 1; transform: none; }
.phone { width: 230px; margin-inline: auto; aspect-ratio: 9 / 18; background: var(--navy-deep); border-radius: 36px; padding: 12px; box-shadow: var(--shadow); position: relative; }
.phone-notch { position: absolute; top: 10px; left: 50%; width: 70px; height: 16px; margin-left: -35px; background: var(--navy-deep); border-radius: 0 0 12px 12px; z-index: 2; }
.phone-screen { height: 100%; border-radius: 26px; background: #EEF2F6; display: grid; align-content: center; gap: 10px; padding: 18px; text-align: center; position: relative; overflow: hidden; }
.ussd-title { font: 1.1rem var(--display); margin: 0; color: var(--ink); }
.ussd-msg { margin: 0; font-size: .92rem; color: var(--ink); } .ussd-msg.small { color: var(--muted); }
.pin { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.pin i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); transition: background .2s, transform .2s; }
.pin i.is-on { background: var(--navy); transform: scale(1.15); }
.ussd-ok { position: absolute; inset: 0; background: var(--leaf); color: #fff; display: grid; place-content: center; justify-items: center; gap: 6px; opacity: 0; transition: opacity .4s; }
.ussd-ok p { margin: 0; font: 1.6rem var(--display); }
.ussd-ok svg, .big-check svg { width: 70px; height: 70px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ussd-ok circle, .big-check circle { stroke-dasharray: 150; stroke-dashoffset: 150; }
.ussd-ok path, .big-check path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.phone-wrap.is-paid .ussd-ok { opacity: 1; }
.phone-wrap.is-paid .ussd-ok circle, .step.is-in .big-check circle { animation: draw .6s .1s forwards; }
.phone-wrap.is-paid .ussd-ok path, .step.is-in .big-check path { animation: draw .4s .55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: absolute; left: -10vw; top: -40px; width: calc(100% + 20vw); height: 620px; pointer-events: none; z-index: 3; }
.done-head { display: grid; justify-items: center; text-align: center; gap: 8px; }
.big-check { color: var(--leaf); }
.big-check svg { width: 86px; height: 86px; }
.done-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; } .receipt dt { color: var(--muted); } .receipt dd { margin: 0; font-weight: 700; }
.receipt p { margin: 0; }
.wa { background: #E7F5EC; border-color: transparent; align-content: start; }
.wa-head { margin: 0; font-weight: 700; color: #1F7A45; }
.bubble { margin: 0; background: #fff; border-radius: 4px 16px 16px 16px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); max-width: 46ch; }
.bubble.is-new, .wa .bubble { animation: pop .5s cubic-bezier(.22, 1, .36, 1) both; }
.wa .bubble { animation-delay: .6s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.login-card { max-width: 460px; margin-inline: auto; width: 100%; }
.login-card h1 { font-size: 2.2rem; }
.login-tabs { justify-self: stretch; display: flex; }
.login-tabs .per-btn { flex: 1; }
.login-pane { display: grid; gap: 12px; } .login-pane[hidden] { display: none; }
.login-pane label { display: grid; gap: 6px; font-weight: 700; }
.otp { display: flex; gap: 8px; justify-content: center; } .otp[hidden] { display: none; }
.otp input { width: 44px; height: 54px; text-align: center; font: 1.6rem var(--display); border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); transition: border-color .2s, transform .2s; }
.otp input.is-on { border-color: var(--leaf); transform: translateY(-3px); }
@media (max-width: 760px) {
  .pay-grid, .done-grid { grid-template-columns: 1fr; }
  .phone-wrap { order: -1; } .phone { width: 190px; }
  .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-plan-head { grid-template-columns: auto 1fr; } .join-price { grid-column: 1 / -1; justify-items: start; }
  .stepper .lbl { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .step.is-in, .kid-row.is-new, .bubble.is-new, .wa .bubble { animation: none; }
  .ussd-ok circle, .ussd-ok path, .big-check circle, .big-check path { stroke-dashoffset: 0; }
}

/* v10: the owner's side */
.owner-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.owner-stats li { display: grid; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 16px; min-width: 104px; }
.owner-stats b { font: 1.7rem/1.1 var(--display); } .owner-stats span { color: var(--muted); font-size: .88rem; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; }
.task { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line);
  transition: opacity .4s, background .4s; }
.task:first-child { border-top: 0; }
.task:not(:has(.task-time)) { grid-template-columns: 1fr auto; }
.task-time { font: 1rem var(--display); color: var(--muted); padding-top: 2px; }
.task-main { display: grid; gap: 3px; } .task-main small { color: var(--muted); }
.task-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.task-state { font-weight: 700; color: var(--leaf-ink); }
.task-state:empty { display: none; }
.task.is-done .task-main b, .task.is-done .task-main small { opacity: .55; }
.task.is-done .task-actions { opacity: .4; }
.tasks.compact .task { grid-template-columns: 1fr; }
.tasks.compact .task-actions { justify-content: flex-start; }
.wait { color: var(--coral-ink) !important; font-weight: 700; }
.draft { margin-top: 6px; }
textarea.draft { width: 100%; font: 1rem var(--body); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.bubble.draft[hidden], textarea.draft[hidden] { display: none; }
.members { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .93rem; }
.members th, .members td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.members thead th { font: .82rem var(--body); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.members .gem { width: 10px; height: 10px; margin-right: 8px; }
.st { font: 600 .78rem var(--body); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-active { background: var(--leaf-soft); color: var(--leaf-ink); } .st-due { background: var(--sun-soft); color: var(--sun-ink); }
.st-grace { background: var(--orange-soft); color: #8A4B00; } .st-locked { background: var(--coral-soft); color: var(--coral-ink); }
.plan-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.plan-row b { font: 1.2rem var(--display); }
.small-note { margin: 0; font-size: .82rem; }
@media (max-width: 640px) {
  .task { grid-template-columns: 1fr; } .task-actions { justify-content: flex-start; }
}
.btn-leaf { background: var(--leaf); border-color: var(--leaf); color: #FBFFFC; }
.members .code, .task .code { white-space: nowrap; }
/* Free / Members badge sits above the stacked page pictures (it was hidden behind them) */
.sheet-thumb .badge { z-index: 3; top: 10px; right: 10px; font-size: .8rem; padding: 6px 12px; box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(14, 43, 68, .2); }

/* v11: approved new-design sheets on the Year pages */
.browse.no-filters { grid-template-columns: 1fr; }
.goal-sec { display: grid; gap: 14px; margin-bottom: 34px; }
.goal-intro h2 { font-size: 1.7rem; margin: 6px 0 2px; } .goal-intro p { margin: 0; color: var(--muted); max-width: 68ch; }
.goal-unit { display: grid; gap: 10px; }
.goal-sub { font: 1.15rem var(--display); margin: 8px 0 0; display: flex; gap: 8px; align-items: baseline; }
.goal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.goal-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.goal-thumb { position: relative; display: block; aspect-ratio: 210 / 230; overflow: hidden; border-radius: 12px; background: var(--k-soft); padding: 10px 12px 0; }
.goal-thumb img { width: 100%; height: auto; border-radius: 6px 6px 0 0; box-shadow: 0 2px 8px rgba(14, 43, 68, .15); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.goal-card:hover .goal-thumb img { transform: translateY(-4px); }
.goal-thumb .badge { position: absolute; top: 8px; right: 8px; z-index: 2; box-shadow: 0 0 0 3px #fff; }
.goal-kind { font: .85rem var(--hand); color: var(--k-ink); }
.goal-card b { font-size: 1rem; line-height: 1.25; }
