/* Self-hosted fonts (SIL OFL 1.1). No request ever leaves this site to load them. */
@font-face{ font-family:'Atkinson Hyperlegible'; font-style:normal; font-weight:400; font-display:swap; src:url('atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face{ font-family:'Atkinson Hyperlegible'; font-style:normal; font-weight:700; font-display:swap; src:url('atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }
@font-face{ font-family:'Baloo 2'; font-style:normal; font-weight:600; font-display:swap; src:url('baloo-2-latin-600-normal.woff2') format('woff2'); }
@font-face{ font-family:'Baloo 2'; font-style:normal; font-weight:700; font-display:swap; src:url('baloo-2-latin-700-normal.woff2') format('woff2'); }
@font-face{ font-family:'Baloo 2'; font-style:normal; font-weight:800; font-display:swap; src:url('baloo-2-latin-800-normal.woff2') format('woff2'); }

  :root{
    --bg:#EDF3F8; --card:#FFFFFF; --ink:#1B2A4A; --muted:#566781; --line:#D5DFEA; --soft:#E4F3FB;
    --bar:#1B2A4A;
    /* Brand brights: decorative only (logo, dots). Never used behind text. */
    --blue-bright:#1CA7EC; --orange-bright:#FF6B35; --yellow:#FFC107;
    /* UI colors: each has at least 4.5:1 contrast with white text (checked by tests/contrast.test.js) */
    --blue:#0F6FA8; --teal:#0E7A82; --orange:#B94A14; --green:#237C42; --red:#BE2B32; --purple:#6F49BD;
    --focus:#0E6BA0; --teal-text:#0B6B72; --streak:#B4460F; --timer:#6F49BD; --errtext:#BE2B32;
    --goodbg:#E2F5E8; --goodink:#1C6134; --badbg:#FDE8E8; --badink:#8F2328;
    --head:'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
    --body:'Atkinson Hyperlegible', Verdana, system-ui, sans-serif;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --bg:#0E1828; --card:#172338; --ink:#EAF1FA; --muted:#A3B3CB; --line:#2A3B58; --soft:#1B3048;
      --bar:#0A1220; --goodbg:#163A25; --goodink:#A8E6BD; --badbg:#3E1C20; --badink:#F4B4B7;
      --focus:#1CA7EC; --teal-text:#4FC3CB; --streak:#FF6B35; --timer:#B79CF0; --errtext:#FF8A8F;
    }
  }
  :root[data-theme="dark"]{
    --bg:#0E1828; --card:#172338; --ink:#EAF1FA; --muted:#A3B3CB; --line:#2A3B58; --soft:#1B3048;
    --bar:#0A1220; --goodbg:#163A25; --goodink:#A8E6BD; --badbg:#3E1C20; --badink:#F4B4B7;
    --focus:#1CA7EC; --teal-text:#4FC3CB; --streak:#FF6B35; --timer:#B79CF0; --errtext:#FF8A8F;
  }
  :root{ box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
  html{ scroll-padding-top:env(safe-area-inset-top,0px); }
  *,*::before,*::after{ box-sizing:inherit; }
  body{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--body); font-size:18px; line-height:1.45; -webkit-font-smoothing:antialiased; }
  button{ font-family:inherit; color:inherit; }
  button:focus-visible, input:focus-visible, textarea:focus-visible{ outline:3px solid var(--focus); outline-offset:3px; }
  img{ max-width:100%; }

  /* top bar */
  .top{ position:sticky; top:0; z-index:5; background:var(--bar); color:#fff; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 18px; padding-top:calc(10px + env(safe-area-inset-top,0px)); margin-top:calc(-1 * env(safe-area-inset-top,0px)); }
  .brand{ display:flex; align-items:center; gap:10px; font-family:var(--head); font-weight:800; font-size:24px; letter-spacing:.2px; }
  .spotlogo{ width:36px; height:36px; border-radius:50%; background:var(--orange-bright); box-shadow:12px 0 0 -4px var(--yellow), 22px 0 0 -8px var(--blue-bright); margin-right:14px; }
  .toptag{ font-size:15px; opacity:.85; }
  .iconbtn{ background:rgba(255,255,255,.12); color:#fff; border:0; border-radius:12px; min-width:48px; height:48px; font-size:21px; cursor:pointer; }
  .iconbtn:hover{ background:rgba(255,255,255,.2); }

  .wrap{ max-width:960px; margin:0 auto; padding:22px 18px 48px; }
  h1{ font-family:var(--head); font-weight:800; font-size:34px; line-height:1.1; margin:4px 0 6px; }
  h2{ font-family:var(--head); font-weight:800; font-size:24px; margin:0 0 10px; }
  .sub{ color:var(--muted); margin:0 0 18px; }
  .card{ background:var(--card); border:1px solid var(--line); border-radius:22px; padding:20px; margin-bottom:16px; }
  .hint{ color:var(--muted); font-size:15px; margin:8px 0 0; }
  .err{ color:var(--errtext); font-weight:700; font-size:15px; margin:8px 0 0; }

  /* chips & tiles */
  .chips{ display:flex; flex-wrap:wrap; gap:10px; }
  .chip{ border:2px solid var(--line); background:var(--card); border-radius:999px; padding:10px 18px; font-weight:700; font-size:17px; cursor:pointer; min-height:48px; }
  .chip.on{ background:var(--ink); border-color:var(--ink); color:var(--card); }
  .group{ font-family:var(--head); font-weight:800; font-size:19px; margin:14px 0 8px; }
  .units{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
  .unit{ display:flex; align-items:center; gap:12px; text-align:left; border:2px solid var(--line); background:var(--card); border-radius:16px; padding:12px 14px; font-weight:700; font-size:16px; cursor:pointer; min-height:64px; }
  .unit .ic{ font-size:26px; width:34px; text-align:center; flex-shrink:0; }
  .unit .sol{ display:block; font-weight:400; font-size:13px; color:var(--muted); margin-top:2px; }
  .unit.on{ border-color:var(--teal); background:var(--soft); box-shadow:inset 0 0 0 1px var(--teal); }

  .btn{ border:0; border-radius:16px; padding:15px 22px; font-weight:700; font-size:19px; cursor:pointer; min-height:58px; }
  .btn.go{ background:var(--green); color:#fff; }
  .btn.blue{ background:var(--blue); color:#fff; }
  .btn.plain{ background:var(--card); border:2px solid var(--line); }
  .btn.warn{ background:var(--red); color:#fff; }
  .row{ display:flex; gap:12px; flex-wrap:wrap; }
  .row .btn{ flex:1; min-width:190px; }
  input.text, textarea{ width:100%; font:inherit; font-size:19px; padding:14px 16px; border-radius:14px; border:2px solid var(--line); background:var(--card); color:var(--ink); }
  textarea{ min-height:150px; resize:vertical; }
  .pinset{ max-width:170px; letter-spacing:6px; font-weight:700; }

  /* student home */
  .court{ position:relative; overflow:hidden; background:var(--bar); color:#fff; border-radius:26px; padding:26px 24px 30px; margin-bottom:18px; }
  .court::before{ content:""; position:absolute; right:-70px; top:50%; width:240px; height:240px; transform:translateY(-50%); border:4px solid rgba(255,255,255,.14); border-radius:50%; }
  .court::after{ content:""; position:absolute; right:48px; top:0; bottom:0; width:4px; background:rgba(255,255,255,.14); }
  .court .uic{ font-size:44px; line-height:1; }
  .court h1{ margin-top:8px; }
  .court .band{ opacity:.85; font-size:17px; }
  .court .best{ margin-top:12px; display:inline-block; background:rgba(255,255,255,.12); border-radius:999px; padding:6px 14px; font-size:16px; }
  .modes{ display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:16px; }
  .mode{ border:0; border-radius:26px; padding:26px 22px; text-align:left; color:#fff; cursor:pointer; min-height:200px; display:flex; flex-direction:column; justify-content:flex-end; gap:6px; position:relative; overflow:hidden; }
  .mode .big{ font-size:52px; line-height:1; margin-bottom:auto; }
  .mode .t{ font-family:var(--head); font-size:30px; font-weight:800; line-height:1.05; }
  .mode .d{ font-size:17px; opacity:.95; }
  .mode.quiz{ background:var(--blue); }
  .mode.rep{ background:var(--orange); }
  .mode:hover{ filter:brightness(1.05); }

  /* quiz */
  .qbar{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; font-weight:700; font-size:18px; }
  .streak{ color:var(--streak); }
  .track{ display:flex; gap:6px; margin-bottom:18px; }
  .track i{ flex:1; height:12px; border-radius:99px; background:var(--line); }
  .track i.ok{ background:var(--green); } .track i.no{ background:var(--red); } .track i.now{ background:var(--blue); }
  .qcard{ padding:24px; }
  .qhead{ display:flex; gap:14px; align-items:flex-start; justify-content:space-between; }
  .qtag{ display:inline-block; background:var(--soft); color:var(--teal-text); font-weight:700; font-size:15px; border-radius:99px; padding:4px 12px; margin-bottom:10px; }
  .qtext{ font-family:var(--head); font-size:30px; font-weight:700; line-height:1.2; margin:0; }
  .speak{ flex-shrink:0; width:56px; height:56px; border-radius:16px; border:2px solid var(--line); background:var(--card); font-size:25px; cursor:pointer; }
  .answers{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
  @media (max-width:640px){ .answers{ grid-template-columns:minmax(0,1fr); } }   /* minmax(0,..) lets a long answer wrap instead of widening the page */
  .ans{ border:0; border-radius:20px; padding:16px 18px 16px 14px; min-height:88px; font-weight:700; font-size:21px; line-height:1.25; color:#fff; cursor:pointer; text-align:left; display:flex; align-items:center; gap:14px; }
  .ans .spot{ width:44px; height:44px; border-radius:50%; background:rgba(0,0,0,.24); border:3px solid rgba(255,255,255,.8); display:grid; place-items:center; flex-shrink:0; font-family:var(--head); font-size:20px; }
  .a0{ background:var(--blue); } .a1{ background:var(--orange); } .a2{ background:var(--teal); } .a3{ background:var(--purple); }
  .ans.dim{ opacity:.32; }
  .ans.right{ background:var(--green); opacity:1; }
  .ans.wrong{ background:var(--red); opacity:1; }
  .ans:disabled{ cursor:default; }
  .feedback{ margin-top:16px; border-radius:18px; padding:16px 20px; font-size:19px; }
  .feedback.good{ background:var(--goodbg); color:var(--goodink); }
  .feedback.bad{ background:var(--badbg); color:var(--badink); }
  .feedback strong{ display:block; font-family:var(--head); font-size:24px; margin-bottom:2px; }
  .nextrow{ margin-top:14px; }
  .band-k2 .qtext{ font-size:36px; }
  .band-k2 .ans{ font-size:27px; min-height:100px; }

  /* results */
  .stars{ font-size:66px; letter-spacing:8px; text-align:center; margin:6px 0; }
  .stars span{ display:inline-block; animation:pop .5s both; }
  .stars span:nth-child(2){ animation-delay:.18s; } .stars span:nth-child(3){ animation-delay:.36s; }
  .stars .off{ filter:grayscale(1); opacity:.28; }
  @keyframes pop{ 0%{ transform:scale(0); } 70%{ transform:scale(1.25); } 100%{ transform:scale(1); } }
  .center{ text-align:center; }
  .scoreline{ font-family:var(--head); font-size:28px; font-weight:800; }
  .newbest{ display:inline-block; background:var(--yellow); color:#3b2a00; font-weight:700; border-radius:99px; padding:4px 14px; margin-top:8px; }

  /* pin */
  .dots{ display:flex; justify-content:center; gap:16px; margin:14px 0 4px; }
  .dots i{ width:20px; height:20px; border-radius:50%; border:3px solid var(--ink); display:block; }
  .dots i.f{ background:var(--ink); }
  .pad{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; max-width:330px; margin:18px auto 0; }
  .pad button{ height:74px; font-size:30px; font-weight:700; border-radius:20px; border:2px solid var(--line); background:var(--card); cursor:pointer; }
  .shake{ animation:shake .4s; }
  @keyframes shake{ 20%,60%{ transform:translateX(-10px); } 40%,80%{ transform:translateX(10px); } }

  /* reporter */
  .choices{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-top:18px; }
  .emo{ border:2px solid var(--line); background:var(--card); border-radius:20px; padding:18px 14px; font-size:24px; font-weight:700; cursor:pointer; min-height:96px; }
  .emo:hover{ border-color:var(--orange); }
  .stepdots{ display:flex; gap:8px; margin-bottom:14px; }
  .stepdots i{ width:34px; height:10px; border-radius:99px; background:var(--line); }
  .stepdots i.done{ background:var(--orange); }

  /* reports */
  .rep-item{ border:1px solid var(--line); border-radius:18px; padding:14px 16px; margin-bottom:10px; background:var(--card); }
  .rep-item .meta{ color:var(--muted); font-size:15px; }
  .rep-item .who{ font-weight:700; font-size:19px; }
  .rep-item dl{ margin:8px 0 0; }
  .rep-item dt{ font-weight:700; margin-top:8px; font-size:16px; color:var(--muted); }
  .rep-item dd{ margin:2px 0 0; }
  .sendbox label{ font-weight:700; display:block; margin:10px 0 6px; }
  .sendbox label:first-of-type{ margin-top:0; }
  .sendok{ background:var(--goodbg); color:var(--goodink); border-radius:14px; padding:14px 16px; margin-top:14px; font-weight:700; }

  .mode{ min-height:170px; }
  .mode.lightning{ background:var(--purple); } .mode.fact{ background:var(--teal); } .mode.sort{ background:var(--green); }
  .timer{ font-family:var(--head); font-size:26px; font-weight:800; color:var(--timer); }
  .claim{ margin-top:18px; background:var(--soft); border-radius:18px; padding:14px 18px; }
  .claim small{ display:block; color:var(--muted); font-size:15px; }
  .claim strong{ font-family:var(--head); font-size:28px; line-height:1.2; }
  .answers.tf{ grid-template-columns:1fr 1fr; }
  .answers.three .ans:last-child{ grid-column:1 / -1; }
  .sortitem{ font-family:var(--head); font-size:34px; font-weight:800; text-align:center; padding:22px 8px 6px; line-height:1.15; }
  .linkbtn{ background:none; border:0; padding:10px 0; min-height:44px; font:inherit; color:var(--ink); text-decoration:underline; cursor:pointer; }

  /* ---- accessibility utilities ---- */
  .sr-only{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .skip{ position:absolute; left:-9999px; top:8px; z-index:20; background:#FFFFFF; color:#1B2A4A; padding:10px 16px; border-radius:10px; font-weight:700; text-decoration:underline; }
  .skip:focus{ left:12px; }
  #app:focus, [tabindex="-1"]:focus{ outline:none; }   /* programmatic focus targets only; real controls keep their focus ring */

  /* ---- K-2 sizing: applies to EVERY mode, not only the original quiz ---- */
  .band-k2 .qbar{ font-size:22px; }
  .band-k2 .feedback{ font-size:23px; } .band-k2 .feedback strong{ font-size:28px; }
  .band-k2 .btn{ font-size:23px; min-height:68px; }
  .band-k2 .sortitem{ font-size:46px; }
  .band-k2 .claim small{ font-size:19px; } .band-k2 .claim strong{ font-size:36px; }
  .band-k2 .timer{ font-size:32px; }
  .band-k2 .scoreline{ font-size:34px; }
  .band-k2 .mode .t{ font-size:34px; } .band-k2 .mode .d{ font-size:20px; }
  .band-k2 .emo{ font-size:28px; min-height:110px; }
  .band-k2 .hint, .band-k2 .sub{ font-size:19px; }
  .band-k2 .answers.tf .ans{ font-size:26px; }
  @media (max-width:640px){
    .band-k2 .qtext{ font-size:34px; } .band-k2 .ans{ font-size:25px; min-height:92px; }
    .band-k2 .sortitem{ font-size:40px; } .band-k2 .claim strong{ font-size:33px; }
  }



  /* Small screens: a long word (e.g. "leadership", "congratulating") must not push the read-aloud button off the edge.
     Flex items will not shrink below their longest word (min-width:auto). Letting the question text shrink, and break
     only as a last resort, changes nothing wherever the words already fit. */
  .qhead > div, .qhead > .qtext{ min-width:0; }
  .ans > span:last-child{ min-width:0; }
  .qtext, .sortitem, .claim, .ans > span:last-child{ overflow-wrap:break-word; }


  /* =====================================================================
     Student Explore (Phase 2A): grade picker, home, subject and topic screens, topic page, Back/Home row.
     Layout uses minmax(0,1fr) grids and min-width:0 so long topic names wrap inside their cards on 320px phones.
     Nothing here changes the type size of any existing screen.
     ===================================================================== */
  .top button:focus-visible{ outline-color:#FFFFFF; }               /* the header is dark navy: the blue ring would not show */
  .brandbtn{ display:flex; align-items:center; gap:10px; min-height:48px; padding:4px 8px; margin-left:-8px; background:none; border:0; border-radius:12px; color:#FFFFFF; font-family:var(--head); font-weight:800; font-size:24px; letter-spacing:.2px; cursor:pointer; }
  .brandbtn:hover{ background:rgba(255,255,255,.1); }

  .navrow{ display:flex; gap:10px; align-items:center; max-width:960px; margin:0 auto; padding:12px 18px 0; }
  .navbtn{ min-height:48px; padding:0 18px; border-radius:14px; border:2px solid var(--line); background:var(--card); color:var(--ink); font-weight:700; font-size:17px; cursor:pointer; }
  .navbtn:hover{ border-color:var(--blue); }
  .navbtn.push-right{ margin-left:auto; }

  .explore{ max-width:640px; }
  .explore.wide{ max-width:960px; }
  .explore h1{ font-size:clamp(26px,7.4vw,34px); overflow-wrap:break-word; }   /* local to these screens; the rest of the app is untouched */
  .eyebrow{ margin:4px 0 4px; font-weight:700; font-size:15px; letter-spacing:.3px; color:var(--muted); }
  .hubhead{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
  .hubhead > div{ min-width:0; }
  .hubspeak{ flex-shrink:0; }
  .gradeline{ display:flex; flex-wrap:wrap; align-items:center; gap:0 8px; margin:0 0 18px; color:var(--muted); font-size:16px; font-weight:700; }
  .linkbtn.inline{ padding:0 4px; font-weight:700; }
  .minor{ margin:26px 0 10px; font-family:var(--body); font-size:15px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); }
  .teacherline{ margin:22px 0 0; }

  /* grade picker */
  .gradegrid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:8px 0 14px; }
  .gradebtn{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:140px; padding:14px 8px; border-radius:22px; border:3px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; text-align:center; }
  .gradebtn:hover{ border-color:var(--blue); }
  .gradebtn[aria-pressed="true"]{ border-color:var(--blue); background:var(--soft); }
  .glabel{ font-family:var(--head); font-weight:800; font-size:40px; line-height:1; }
  .gsub{ font-size:15px; color:var(--muted); overflow-wrap:break-word; }
  .gcur{ font-size:14px; font-weight:700; color:var(--teal-text); }

  /* two big subject cards */
  .subjects{ display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
  .subject{ display:flex; flex-direction:column; justify-content:flex-end; gap:8px; min-height:150px; padding:22px; border:0; border-radius:26px; color:#FFFFFF; text-align:left; cursor:pointer; }
  .subject.pe{ background:var(--blue); } .subject.health{ background:var(--green); }
  .subject:hover{ filter:brightness(1.06); }
  .sicon{ font-size:48px; line-height:1; }
  .stext{ display:block; min-width:0; }
  .stitle{ display:block; font-family:var(--head); font-weight:800; font-size:30px; line-height:1.05; overflow-wrap:break-word; }
  .sdesc{ display:block; margin-top:4px; font-size:17px; overflow-wrap:break-word; }
  @media (min-width:640px){ .subjects{ grid-template-columns:repeat(2,minmax(0,1fr)); } .subject{ min-height:220px; } }

  /* quiet secondary tool row (Reporter) */
  .tool{ display:flex; align-items:center; gap:14px; width:100%; min-height:64px; padding:12px 16px; border-radius:16px; border:2px dashed var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
  .tool:hover{ border-color:var(--blue); }
  .ticon2{ font-size:28px; }
  .ttext2{ display:block; min-width:0; }
  .tname2{ display:block; font-weight:700; font-size:17px; }
  .tdesc2{ display:block; color:var(--muted); font-size:15px; }

  /* topic cards */
  .topics{ display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
  @media (min-width:640px){ .topics{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
  @media (min-width:960px){ .topics{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
  .topic{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:center; min-height:92px; padding:16px; border-radius:20px; border:2px solid var(--line); border-left-width:8px; background:var(--card); color:var(--ink); text-align:left; cursor:pointer; }
  .topic.pe{ border-left-color:var(--blue); } .topic.health{ border-left-color:var(--green); }
  .topic:hover{ border-color:var(--ink); }
  .ticon{ display:grid; place-items:center; width:56px; height:56px; border-radius:16px; background:var(--soft); font-size:30px; }
  .ttext{ display:block; min-width:0; }
  .tname{ display:block; font-family:var(--head); font-weight:800; font-size:20px; line-height:1.15; overflow-wrap:break-word; }
  .tdesc{ display:block; margin-top:3px; color:var(--muted); font-size:15.5px; overflow-wrap:break-word; }

  /* topic page */
  .topichero{ margin-bottom:18px; }
  .topichero h1{ margin-top:8px; color:#FFFFFF; }
  .tblurb{ margin:6px 0 0; font-size:17px; opacity:.92; overflow-wrap:break-word; }
  .topichero .hubspeak{ position:absolute; top:16px; right:16px; z-index:1; color:var(--ink); }   /* the banner is white-on-navy, the button is a white card: keep its glyph dark */
  .actmain{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:16px; align-items:center; width:100%; min-height:112px; padding:20px; margin:0 0 4px; border:0; border-radius:24px; background:var(--blue); color:#FFFFFF; text-align:left; cursor:pointer; }
  .actmain:hover{ filter:brightness(1.06); }
  .actmain .aicon{ font-size:44px; line-height:1; }
  .atext{ display:block; min-width:0; }
  .atitle{ display:block; font-family:var(--head); font-weight:800; font-size:30px; line-height:1.05; }
  .adesc{ display:block; margin-top:3px; font-size:17px; overflow-wrap:break-word; }
  .agot{ font-size:26px; }
  .acts{ display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
  @media (min-width:560px){ .acts{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
  @media (min-width:900px){ .acts{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
  .act{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:center; min-height:80px; padding:14px 16px; border-radius:18px; border:2px solid var(--line); background:var(--card); color:var(--ink); text-align:left; cursor:pointer; }
  .act:hover{ border-color:var(--ink); }
  .act .aicon{ display:grid; place-items:center; width:50px; height:50px; border-radius:14px; font-size:26px; color:#FFFFFF; background:var(--purple); }
  .act.fact .aicon{ background:var(--teal); } .act.sort .aicon{ background:var(--green); }
  /* future free/pro: an activity whose data-state is "locked" (Phase 2B/3) gets a quiet treatment here */
  [data-state="locked"]{ cursor:not-allowed; }

  /* K-2: bigger, simpler, icon-led */
  .band-k2 .navbtn{ min-height:60px; font-size:21px; padding:0 22px; }
  .band-k2 .explore h1{ font-size:clamp(30px,8.8vw,40px); }      /* K-2 headings stay larger than 3-5 at every width */
  .band-k2 .eyebrow, .band-k2 .gradeline{ font-size:18px; }
  .band-k2 .subject{ min-height:170px; } .band-k2 .stitle{ font-size:36px; } .band-k2 .sdesc{ font-size:21px; } .band-k2 .sicon{ font-size:60px; }
  .band-k2 .topic{ grid-template-columns:minmax(0,1fr); justify-items:center; text-align:center; padding:20px 14px; gap:10px; }
  .band-k2 .ticon{ width:80px; height:80px; font-size:46px; }
  .band-k2 .tname{ font-size:26px; } .band-k2 .tdesc{ font-size:19px; }
  .band-k2 .actmain{ min-height:132px; } .band-k2 .atitle{ font-size:38px; } .band-k2 .adesc{ font-size:21px; } .band-k2 .actmain .aicon{ font-size:56px; }
  .band-k2 .act{ min-height:96px; } .band-k2 .act .aicon{ width:64px; height:64px; font-size:34px; } .band-k2 .act .tname{ font-size:24px; } .band-k2 .act .tdesc{ font-size:19px; }
  .band-k2 .tblurb{ font-size:21px; }
  .band-k2 .tname2{ font-size:21px; }
  .band-k2 .gradeline{ margin-bottom:22px; }


  /* =====================================================================
     Phase 2B: the suggested learning path (Learn -> Quick 10 -> Challenge 20 -> Mastery), the Mastered badge,
     Learn cards, and Student Explore results. Same rules as Phase 2A: local layout fixes, no global type shrinking.
     ===================================================================== */
  .path{ list-style:none; margin:0; padding:0; display:grid; gap:12px; }
  .pstep{ position:relative; display:grid; grid-template-columns:36px minmax(0,1fr); gap:12px; align-items:center; }
  .pstep > :last-child{ min-width:0; }
  .pnum{ display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--bar); color:#FFFFFF; font-family:var(--head); font-weight:800; font-size:18px; }
  .pstep:not(:last-child)::after{ content:""; position:absolute; left:17px; top:calc(50% + 22px); height:calc(100% - 22px); width:2px; background:var(--line); }   /* decorative connector; nothing is locked */
  .act.quick10 .aicon{ background:var(--blue); } .act.challenge .aicon{ background:var(--orange); } .act.mastery .aicon{ background:var(--bar); }
  .mbadge{ display:inline-block; margin-top:6px; padding:2px 12px; border-radius:99px; background:var(--goodbg); color:var(--goodink); font-weight:700; font-size:14px; }
  .herobadge{ position:relative; margin-top:10px; }
  .modechip{ padding:2px 12px; border-radius:99px; background:var(--soft); font-size:15px; }
  .shortnote{ margin:0 0 12px; font-size:16px; }
  .ask{ margin:14px 0 0; font-family:var(--head); font-weight:800; font-size:22px; }

  /* Learn cards */
  .lcard{ padding:22px 20px; }
  .licon{ font-size:52px; line-height:1; }
  .ltitle{ margin:8px 0 12px; }
  .lbody p{ margin:0 0 10px; font-size:20px; line-height:1.45; overflow-wrap:break-word; }
  .lbody p:last-child{ margin-bottom:0; }
  .lnav{ margin-top:14px; }
  .explore .row + .row{ margin-top:12px; }   /* stacked result buttons need breathing room */
  .lnav .btn[disabled]{ opacity:.45; cursor:default; }
  .band-k2 .licon{ font-size:72px; }
  .band-k2 .lbody p{ font-size:28px; line-height:1.35; margin-bottom:14px; }
  .band-k2 .ask{ font-size:26px; }
  .band-k2 .pnum{ width:44px; height:44px; font-size:22px; }
  .band-k2 .pstep{ grid-template-columns:44px minmax(0,1fr); }
  .band-k2 .pstep:not(:last-child)::after{ left:21px; }
  /* narrow phones, K-2: the numbered path leaves the big Learn tile very little width, so drop its decorative arrow and tighten
     its padding (layout only; the text stays large) */
  @media (max-width:400px){
    .band-k2 .pstep .actmain{ grid-template-columns:auto minmax(0,1fr); padding:16px 14px; gap:12px; }
    .band-k2 .pstep .agot{ display:none; }
  }


  /* =====================================================================
     Phase 2C: brand lockup, theme control, path polish, feedback, results, Learn cards, age-band restraint.
     Colors are the existing variables only, so both themes keep their contrast. Text is never shrunk to fit.
     ===================================================================== */
  .brandtext{ display:flex; flex-direction:column; align-items:flex-start; min-width:0; line-height:1.1; text-align:left; }
  .brandname{ display:block; }
  .brandline{ display:block; margin-top:4px; font-family:var(--body); font-weight:700; font-size:15px; letter-spacing:0; color:#DCE7F5; line-height:1.2; }
  .byline{ display:block; margin-top:2px; font-family:var(--body); font-weight:400; font-size:14px; letter-spacing:0; color:#B7C7DE; line-height:1.2; }
  .parentbrand{ font-weight:700; color:#DCE7F5; }                       /* the one slot a future Evolution PE logo replaces */
  .top.lockup{ padding-top:calc(14px + env(safe-area-inset-top,0px)); padding-bottom:14px; }
  .lockup .spotlogo{ width:44px; height:44px; box-shadow:14px 0 0 -5px var(--yellow), 26px 0 0 -10px var(--blue-bright); margin-right:16px; flex-shrink:0; }
  .lockup .brandname{ font-size:28px; }
  .brandbtn{ text-align:left; }

  .homefoot{ margin-top:8px; display:flex; flex-direction:column; align-items:center; gap:6px; }
  .themepick{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin:6px 0 10px; }
  .themelabel{ font-size:14px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--muted); margin-right:2px; }
  .themeopt{ min-height:44px; min-width:64px; padding:6px 14px; border-radius:999px; border:2px solid var(--line); background:var(--card); color:var(--ink); font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
  .themeopt[aria-pressed="true"]{ background:var(--bar); border-color:var(--bar); color:#FFFFFF; }

  .pathhint{ margin:0 0 4px; color:var(--muted); font-size:16px; }
  .pnum.done{ background:var(--green); }
  .act.is-mastered{ border-color:var(--green); background:linear-gradient(0deg, var(--goodbg), var(--goodbg)); }
  .act.is-locked{ border-style:dashed; }
  .tierbadge{ display:inline-block; margin-top:6px; padding:2px 10px; border-radius:99px; font-size:13px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; background:var(--soft); color:var(--ink); }
  .tierbadge.pro{ background:var(--purple); color:#FFFFFF; }

  /* answer feedback: the explanation is the valuable part, so it gets its own panel */
  .fbhead{ display:flex; align-items:center; gap:10px; }
  .fbhead strong{ margin:0; }
  .fbicon{ display:grid; place-items:center; flex:none; width:32px; height:32px; border-radius:50%; background:currentColor; }
  .fbicon > span{ color:var(--card); font-weight:800; font-size:18px; line-height:1; }
  .fbanswer{ margin:8px 0 0; font-weight:700; }
  .why{ margin-top:12px; padding:12px 16px 14px; border-radius:14px; border-left:6px solid var(--blue); background:var(--card); color:var(--ink); }
  .whylabel{ display:block; font-size:13px; font-weight:800; letter-spacing:.7px; text-transform:uppercase; color:var(--teal-text); margin-bottom:2px; }
  .why p{ margin:0; font-size:19px; line-height:1.45; overflow-wrap:break-word; }
  .band-k2 .why p{ font-size:23px; }
  .band-k2 .whylabel{ font-size:15px; }

  /* results */
  .result .ricon{ display:grid; place-items:center; width:88px; height:88px; margin:8px auto 4px; border-radius:50%; background:var(--soft); font-size:46px; }
  .result.mastered{ border:2px solid var(--green); }
  .result.mastered .ricon{ background:var(--goodbg); }
  .primaryrow .btn{ min-height:64px; font-size:21px; }
  .quietrow{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-top:12px; }
  .quietrow .btn{ min-height:52px; font-size:17px; padding:10px 14px; }
  .emailmore{ margin-top:18px; }
  .emailmore > summary{ display:flex; align-items:center; min-height:44px; padding:6px 4px; cursor:pointer; font-weight:700; color:var(--muted); }
  .emailmore[open] > summary{ margin-bottom:8px; }
  .emailmore .sendbox h2{ display:none; }                                /* the summary already says it */

  /* Learn cards */
  .licon{ display:grid; place-items:center; width:72px; height:72px; border-radius:50%; background:var(--soft); font-size:38px; }
  .lcard{ padding:24px 22px; }
  .lhead{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }   /* icon and read-aloud share a row, so the title gets the whole card width */
  .ltitle{ margin:14px 0 10px; }
  .row.lnav{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:10px; }
  .row.lnav .btn{ min-width:0; padding-inline:10px; }
  .band-k2 .licon{ width:96px; height:96px; font-size:54px; }
  .band-k2 .row.lnav{ grid-template-columns:minmax(0,1fr); }
  @media (max-width:339px){ .row.lnav{ grid-template-columns:minmax(0,1fr); } }

  /* restrained developmental differences: older students get the same product, a little less playful */
  .band-g68 .subject, .band-g912 .subject{ border-radius:18px; min-height:132px; padding:20px; }
  .band-g68 .sicon, .band-g912 .sicon{ display:grid; place-items:center; width:56px; height:56px; border-radius:14px; background:rgba(255,255,255,.18); font-size:30px; }
  .band-g68 .court, .band-g912 .court{ border-radius:20px; }
  .band-g68 .ans, .band-g912 .ans{ border-radius:14px; }
  .band-g912 .stitle{ font-size:28px; letter-spacing:.1px; }
  .band-g912 .result .ricon{ width:72px; height:72px; font-size:38px; }
  .band-g68 .licon, .band-g912 .licon{ border-radius:16px; width:60px; height:60px; font-size:32px; }

  /* narrow screens: break long words with a hyphen at a syllable instead of mid-word. overflow-wrap stays as the safety net,
     so a word that cannot be hyphenated still wraps instead of causing sideways scrolling. */
  @media (max-width:480px){
    h1, h2, .stitle, .sdesc, .tname, .tdesc, .tblurb, .atitle, .adesc, .ltitle, .lbody p, .qtext, .claim, .sortitem, .why p, .ans > span:last-child,
    .tname2, .tdesc2, .glabel, .gsub{ -webkit-hyphens:auto; hyphens:auto; overflow-wrap:break-word; }
  }

  /* after an answer, the options that were not chosen stay READABLE (students learn from the wrong choices too): a quiet
     neutral panel instead of a faded color */
  .ans.dim{ opacity:1; background:var(--line); color:var(--ink); }
  .ans.dim .spot{ background:transparent; border-color:var(--muted); }
  .emailmore > summary::after{ content:"▾"; margin-left:8px; }
  .emailmore[open] > summary::after{ content:"▴"; }

  /* small phones: the read-aloud button moves ABOVE the question (right-aligned) instead of beside it, so long words such as
     "environment" fit without breaking mid-word. Text size is unchanged. */
  @media (max-width:400px){
    .qcard{ padding:18px; }
    .qhead{ flex-direction:column-reverse; align-items:stretch; gap:10px; }
    .qhead .speak{ align-self:flex-end; }
  }

  /* inputs inside the collapsible email section computed as content-box in Chrome; say it outright */
  input.text, textarea{ box-sizing:border-box; max-width:100%; }
  /* the unit emoji in teacher setup is wider than its 34px box in large K-2 text; let the box grow instead of bleeding into the label */
  .unit .ic{ width:auto; min-width:34px; }

  /* dark theme: the navy step badge and Mastery chip nearly match the page, so give them a quiet ring */
  .pnum, .act.mastery .aicon{ box-shadow:inset 0 0 0 2px var(--line); }
  /* very small phones: keep "Bench Boost" on one line in the home header (logo and wordmark a little smaller; still no smaller than the compact header's 24px) */
  @media (max-width:340px){
    .top.lockup{ padding-left:14px; padding-right:14px; }
    .lockup .spotlogo{ width:36px; height:36px; margin-right:12px; box-shadow:11px 0 0 -4px var(--yellow), 20px 0 0 -8px var(--blue-bright); }
    .lockup .brandname{ font-size:25px; }
  }

  @media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }
