/* A New Page, THE READING-CHECK SAMPLE POP-UP (/css/anp-checksample.css, Joel's Part 8 "R", Oct 17 evening).
   The same cream picture book as the story samples (css/anp-sample-popup.css): paper cream #FFF8EC, navy text, 24px corners.
   One item at a time with two big buttons, then ONE gentle reveal (a sound map of round chips). It must fit without scrolling
   at 1280x800 and 390x844. Pairs (WCAG AA): navy #1F2E55 on cream/white 11 to 13:1; muted #4B5674 on cream 7:1; white on green
   #1E6B43 6.3:1; navy on gold #F2B544 7.3:1; navy on the Littles pastels (all light) above 9:1.
   Reduced motion: the chips are simply drawn in their final state (no transition at all). */
.cs-panel{width:min(760px,94vw);max-width:min(760px,94vw)}
.cs-panel .sp-title{font-size:1.375rem}
.cs-body{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:14px 20px 12px;text-align:center}
.cs-panel .sp-sub{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.cs-q,.cs-r{width:100%;max-width:560px;margin:0 auto}
.cs-q[hidden],.cs-r[hidden]{display:none}

/* ---------- the item screen ---------- */
.cs-count{margin:0;font:600 15px/1.3 var(--sp-sans);color:var(--sp-muted)}
.cs-dots{display:flex;justify-content:center;margin:8px 0 0}
.cs-dots i.done{background:#1E6B43}
.cs-prompt{margin:14px 0 0;font:500 19px/1.4 var(--sp-sans);color:var(--sp-ink)}
.cs-item{margin:14px auto 0;box-sizing:border-box;min-width:min(100%,300px);max-width:100%;padding:14px 28px;border-radius:24px;background:#fff;border:2px solid var(--sp-line);box-shadow:0 1px 2px rgba(31,46,85,.06),0 12px 28px -16px rgba(31,46,85,.3);color:var(--sp-ink);font-family:var(--font-read,"Lexend",Verdana,sans-serif);font-weight:700;line-height:1.15;overflow-wrap:anywhere}
.cs-item.cs-letter{font-size:clamp(84px,18vw,128px);letter-spacing:.02em}
.cs-item.cs-word{font-size:clamp(46px,9.5vw,84px);letter-spacing:.03em}
.cs-help{margin:12px 0 0;font:400 15px/1.4 var(--sp-sans);color:var(--sp-muted)}
.cs-marks{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px auto 0;max-width:480px}
.cs-marks button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:64px;padding:0 14px;border-radius:18px;font:700 21px/1.1 var(--sp-sans);cursor:pointer}
.cs-yes{border:2px solid #14502F;background:#1E6B43;color:#fff}
.cs-yes:hover{background:#185A38}
.cs-no{border:2px solid #C9B98F;background:#F4ECDC;color:var(--sp-ink)}
.cs-no:hover{background:#EDE2CB}
.cs-marks button:focus-visible{outline:3px solid var(--sp-ink);outline-offset:3px}

/* ---------- the reveal ---------- */
.cs-r-h{margin:0;font:600 clamp(1.5rem,1.1rem + 1.2vw,1.875rem)/1.2 var(--sp-serif);color:var(--sp-ink);outline:none}
.cs-r-lead{margin:8px 0 0;font:600 18px/1.4 var(--sp-sans);color:var(--sp-ink)}
.cs-r-lead[hidden]{display:none}
.cs-map{list-style:none;margin:14px auto 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:520px}
.cs-chip{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 10px;border-radius:999px;font:700 18px/1 var(--sp-sans);letter-spacing:.02em;transition:background-color .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease;
  background:#fff;color:var(--sp-muted);border:2px dashed #8C93A8}
/* before the reveal lands every chip is an empty outline; one step later the known ones fill and the next ones glow */
.cs-map.is-in .cs-chip.is-known{background:#F2B544;color:#1F2E55;border:2px solid #C98E1C}
.cs-map.is-in .cs-chip.is-next{background:#fff;color:#1F2E55;border:2px solid #F2B544;box-shadow:0 0 0 4px rgba(242,181,68,.45),0 0 18px 2px rgba(242,181,68,.55)}
.cs--teen .cs-map.is-in .cs-chip.is-known{background:#1F2E55;color:#fff;border-color:#1F2E55}
.cs--teen .cs-map.is-in .cs-chip.is-next{border-color:#8FA3D1;box-shadow:0 0 0 4px rgba(143,163,209,.5),0 0 18px 2px rgba(143,163,209,.65)}
.cs--littles .cs-map.is-in .cs-chip.is-known:nth-child(5n+1){background:#FFC2CF;border-color:#E58AA1}
.cs--littles .cs-map.is-in .cs-chip.is-known:nth-child(5n+2){background:#FFE29A;border-color:#E0B24A}
.cs--littles .cs-map.is-in .cs-chip.is-known:nth-child(5n+3){background:#BDE6A6;border-color:#82BE66}
.cs--littles .cs-map.is-in .cs-chip.is-known:nth-child(5n+4){background:#A9D6FF;border-color:#69AEE8}
.cs--littles .cs-map.is-in .cs-chip.is-known:nth-child(5n){background:#D9C6FF;border-color:#A98BE6}
.cs-r-begins{margin:14px 0 0;font:600 19px/1.4 var(--sp-sans);color:var(--sp-ink)}
.cs-page{margin:14px auto 0;max-width:520px;box-sizing:border-box;padding:12px 18px 14px;border-radius:16px;background:#fff;border:1px solid var(--sp-line);box-shadow:0 8px 20px -14px rgba(31,46,85,.35)}
.cs-page-k{margin:0 0 6px;font:600 14px/1.3 var(--sp-sans);letter-spacing:.04em;color:var(--sp-muted)}
.cs-page-s{margin:0;font:600 clamp(22px,4.6vw,30px)/1.45 var(--font-read,"Lexend",Verdana,sans-serif);color:var(--sp-ink);letter-spacing:.02em}
.cs-u{border-bottom:3px solid #A86A00;padding-bottom:1px}
.cs-w{white-space:nowrap}

/* ---------- the bottom bar: Back while marking; the two end buttons after the reveal ---------- */
.cs-bar{min-height:72px}
.cs-bar .cs-end{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;width:100%}
.cs-bar .cs-end[hidden]{display:none}
.cs-bar.is-end{justify-content:center}
.cs-bar.is-end .sp-prev{display:none}
.cs-go{margin-top:0!important;text-align:center}
.cs-bar .sp-end-keep{margin-top:0}
.cs-panel .sp-btn:disabled{visibility:hidden}

/* ---------- phones: the pop-up is full screen (css/anp-sample-popup.css); keep every screen within it ---------- */
@media (max-width:700px){
  .cs-panel{width:100%;max-width:none}
  .cs-body{padding:10px 16px 10px;justify-content:flex-start}
  .cs-item.cs-letter{font-size:clamp(72px,26vw,110px)}
  .cs-item.cs-word{font-size:clamp(40px,12.5vw,64px)}
  .cs-prompt{margin-top:10px;font-size:18px}
  .cs-marks button{min-height:60px}
  .cs-map{gap:6px;margin-top:10px}
  .cs-chip{min-width:36px;height:36px;font-size:16px;padding:0 8px}
  .cs-page{margin-top:10px;padding:10px 14px 12px}
  .cs-bar .cs-end{flex-direction:column;gap:6px}
  .cs-go{width:100%}
  .cs-r-begins{margin-top:10px;font-size:18px}
}
@media (max-height:700px){.cs-item{margin-top:8px;padding:8px 20px}.cs-prompt{margin-top:6px}.cs-marks{margin-top:10px}}
/* =====================================================================================================================
   Part 10b (Oct 18): the check now ends on a BRIDGE CARD that opens the sample story at the level it found (js/anp-checksample.js).
   Look and feel (Joel's spec): 5 to 10 = map parchment #F3E6C8 with ink #13294B (11.7:1); teen = navy #1F2E55 with #E4E5F0 (10.6:1) and a
   burgundy #5A1A2B case-file tab (white on it 13:1). Heading Fraunces 24px. Known chips are filled in the age accent (5 to 10 teal #0B6E6E
   with white, 6.05:1; teen sea-glass #7FD8C8 with #131C34, 10:1), the next chips are outlined, later chips are soft. One 300ms fill on
   arrival, then still; none under reduced motion. The tiny story page is a white card (teen: navy card) with the sentence in Lexend 26px
   and a 2px teal (teen sea-glass) underline under the known sounds, never a fill. The gold button is navy #1F2E55 on #F2B544 (7.26:1).
   Progress dots: map footprints (5 to 10) and case-file ticks (teen); still.
   ===================================================================================================================== */
.cs-tab{display:none}
.cs-r.is-bridge{position:relative;box-sizing:border-box;margin-top:4px;padding:16px 20px 14px;border-radius:18px;border:1px solid transparent}
.cs--kids .cs-r.is-bridge{background:#F3E6C8;color:#13294B;border-color:#D8C697}
.cs--teen .cs-r.is-bridge{background:#1F2E55;color:#E4E5F0;border-color:#3B4C7E;margin-top:30px}
.cs--teen .cs-r.is-bridge .cs-tab{display:inline-block;position:absolute;left:18px;bottom:100%;margin-bottom:-1px;padding:5px 14px 4px;border-radius:10px 10px 0 0;background:#5A1A2B;color:#fff;font:700 13px/1.2 var(--sp-sans);letter-spacing:.08em;text-transform:uppercase}
.cs-r.is-bridge .cs-r-h{font:600 24px/1.25 var(--sp-serif);color:inherit;text-wrap:balance}
.cs-r.is-bridge .cs-r-lead{margin-top:6px;color:inherit;font-size:17px}
.cs-r.is-bridge .cs-map{margin-top:12px}
/* chips: outlined before the arrival fill; after it: known = filled accent, next = outlined, later = soft */
.cs--kids .cs-r.is-bridge .cs-chip{background:transparent;color:#13294B;border:2px dashed #52607E;box-shadow:none}
.cs--kids .cs-r.is-bridge .cs-map.is-in .cs-chip.is-known{background:#0B6E6E;color:#fff;border:2px solid #0B6E6E;box-shadow:none}
.cs--kids .cs-r.is-bridge .cs-map.is-in .cs-chip.is-next{background:transparent;color:#13294B;border:2px solid #13294B;box-shadow:none}
.cs--kids .cs-r.is-bridge .cs-map.is-in .cs-chip.is-later{background:rgba(19,41,75,.09);color:#3D4A66;border:2px solid transparent;box-shadow:none}
.cs--teen .cs-r.is-bridge .cs-chip{background:transparent;color:#E4E5F0;border:2px dashed #8FA3D1;box-shadow:none}
.cs--teen .cs-r.is-bridge .cs-map.is-in .cs-chip.is-known{background:#7FD8C8;color:#131C34;border:2px solid #7FD8C8;box-shadow:none}
.cs--teen .cs-r.is-bridge .cs-map.is-in .cs-chip.is-next{background:transparent;color:#E4E5F0;border:2px solid #E4E5F0;box-shadow:none}
.cs--teen .cs-r.is-bridge .cs-map.is-in .cs-chip.is-later{background:rgba(228,229,240,.14);color:#C9CCDD;border:2px solid transparent;box-shadow:none}
/* the tiny story page */
.cs-r.is-bridge .cs-page{margin-top:12px;max-width:none}
.cs--kids .cs-r.is-bridge .cs-page{background:#fff;border:1px solid #D8C697}
.cs--teen .cs-r.is-bridge .cs-page{background:#1F2E55;border:1px solid #7384B5;box-shadow:none}
.cs--kids .cs-r.is-bridge .cs-page-k{color:#4B5674}
.cs--teen .cs-r.is-bridge .cs-page-k{color:#C9CCDD}
.cs-r.is-bridge .cs-page-s{font:600 26px/1.4 var(--font-read,"Lexend",Verdana,sans-serif)}
.cs--kids .cs-r.is-bridge .cs-page-s{color:#13294B}
.cs--teen .cs-r.is-bridge .cs-page-s{color:#E4E5F0}
.cs--kids .cs-u{border-bottom:2px solid #0B6E6E}
.cs--teen .cs-u{border-bottom:2px solid #7FD8C8}
.cs--kids .cs-go,.cs--teen .cs-go{background:#F2B544;color:#1F2E55}
/* the progress dots: map footprints (5 to 10) and case-file ticks (teen) */
.cs-feet,.cs-ticks{gap:9px;align-items:center}
.cs-feet i,.cs-ticks i{background:none!important}
.cs-feet i{width:14px;height:20px;color:rgba(31,46,85,.3)}
.cs-feet i svg{display:block;width:100%;height:100%;fill:currentColor}
.cs-feet i.on{color:#0B6E6E}
.cs-feet i.done{color:#13294B}
.cs-ticks i{box-sizing:border-box;width:16px;height:16px;border-radius:4px;border:2px solid rgba(31,46,85,.32);display:flex;align-items:center;justify-content:center}
.cs-ticks i svg{display:none;width:11px;height:11px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.cs-ticks i.on{border-color:#1F2E55;border-width:3px}
.cs-ticks i.done{background:#1F2E55!important;border-color:#1F2E55}
.cs-ticks i.done svg{display:block}
@media (max-width:700px){
  .cs-r.is-bridge{padding:12px 14px 12px}
  .cs--teen .cs-r.is-bridge{margin-top:28px}
  .cs-r.is-bridge .cs-r-h{font-size:24px}
  .cs-r.is-bridge .cs-map{margin-top:8px}
  .cs-r.is-bridge .cs-page{margin-top:8px}
  .cs-r.is-bridge .cs-page-s{font-size:24px}
}
@media (prefers-reduced-motion:reduce){.cs-chip{transition:none!important}}

/* ---------- the age question (Joel, Oct 18: the HOME page's card asks the age first; the age pages never show it) ----------
   Two big choices, each in its age's palette, 60px tall (56px+), full keyboard focus ring:
     "Ages 5 to 10": ink #13294B on parchment #F3E6C8 (11.7:1), teal #0B6E6E edge
     "Ages 11 to 18": cream #E4E5F0 on navy #1F2E55 (10.6:1), sea-glass #7FD8C8 edge
   and a quiet line for the Littles (muted #4B5674 on the cream, 7:1; its link navy, underlined). Still, nothing moves. */
.cs-age{width:100%;max-width:560px;margin:0 auto}
.cs-age[hidden]{display:none}
.cs-age-h{margin:0;font:600 clamp(1.5rem,1.1rem + 1.2vw,1.875rem)/1.2 var(--sp-serif);color:var(--sp-ink);outline:none}
.cs-age-pick{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px auto 0;max-width:500px}
.cs-age-btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:60px;padding:0 16px;border-radius:18px;font:700 20px/1.15 var(--sp-sans);cursor:pointer}
.cs-age-kids{background:#F3E6C8;color:#13294B;border:2px solid #0B6E6E}
.cs-age-kids:hover{background:#EEDDB6}
.cs-age-teen{background:#1F2E55;color:#E4E5F0;border:2px solid #7FD8C8}
.cs-age-teen:hover{background:#26386A}
.cs-age-btn:focus-visible{outline:3px solid #13294B;outline-offset:3px}
.cs-age-lit{margin:18px 0 0;font:400 15px/1.45 var(--sp-sans);color:#4B5674}
.cs-age-lit a{color:#1F2E55;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.cs-age-lit a:focus-visible{outline:3px solid #1F2E55;outline-offset:2px;border-radius:3px}
.cs-bar.is-age .sp-prev{display:none}
@media (max-width:420px){.cs-age-pick{grid-template-columns:1fr}}
