/* Grade milestones (js/grades.mjs, js/grade-ui.mjs, 2026-10-25): grade signposts on the map, the four grade certificates,
   the optional grown-up Reading Check, the Adult Guide's Reading progress page and the grown-up encouragement notes.
   Grown-up screens use the Adult Guide's calm green (--adult); each grade has its own colour (--g). */

/* ---------------------------------------------------------------- map: grade signposts */
.signpost.grade-sign .sp-grade { position: absolute; right: -26px; top: -22px; width: 76px; height: 76px; border-radius: 50%; background: var(--g); color: #FFFFFF;
  display: grid; place-items: center; align-content: center; box-shadow: 0 0 0 5px #FFFFFF, 0 6px 0 5px rgba(20, 52, 36,.22); line-height: 1; }
.signpost.grade-sign .sp-grade b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.signpost.grade-sign .sp-grade small { font-size: 14px; font-weight: 700; margin-top: 2px; opacity: .95; }
.signpost.grade-sign.finish .sp-grade { box-shadow: 0 0 0 5px #FFD54A, 0 0 0 9px #FFFFFF, 0 6px 0 9px rgba(20, 52, 36,.22); }
.ms-grade { display: inline-block; margin-left: 10px; padding: 4px 16px 6px; border-radius: 999px; background: var(--g); color: #FFFFFF; font-size: 26px; vertical-align: 4px; }
.ms-cert { margin-top: 26px; height: 84px; padding: 0 40px; border: 0; border-radius: 999px; background: #22B46A; color: #FFFFFF; font: inherit; font-size: 32px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.16); }

/* ---------------------------------------------------------------- lesson card: the grown-up note */
.lesson-card.has-note { top: 46px; left: 290px; width: 1020px; padding-top: 86px; padding-bottom: 46px; }
.lesson-card.has-note .lc-goal { margin: 18px 0 20px; }
.lc-grownup { margin: 0 0 26px; padding: 16px 24px 18px; border-radius: 24px; background: #EAF6E7; border-left: 10px solid var(--adult, #3E8044); }
.lc-grownup b { display: block; font-size: 25px; color: #2B6B33; }
.lc-grownup p { margin: 6px 0 0; font-size: 24px; line-height: 1.4; color: #2E4A33; }

/* ---------------------------------------------------------------- Adult Guide menu: progress line */
.gg-item.gg-grade { background: #FFF6DE; color: #5A3B00; align-items: center; }
.gg-item.gg-grade > span:first-child { width: 64px; height: 64px; font-size: 38px; box-shadow: 0 0 0 4px #E8B23A; }
.gg-item.gg-grade { white-space: normal; }
.gg-item > .gg-gtext { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: auto; height: auto; min-width: 0; max-width: 320px; border-radius: 0; background: none; text-align: left; line-height: 1.15; }
.gg-gline:empty { display: none; }
.gp-line { display: flex; flex-direction: column; gap: 8px; }
.gp-line .gp-text { font-size: 28px; font-weight: 700; color: #22314F; }
.gp-line .gp-bar { display: block; width: 100%; max-width: 640px; height: 18px; border-radius: 999px; background: #E6EAE2; overflow: hidden; }
.gp-line .gp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--g); }
.gp-line.compact { gap: 5px; }
.gp-line.compact .gp-text { font-size: 19px; font-weight: 700; color: #7A5A12; }
.gp-line.compact .gp-bar { height: 10px; max-width: 300px; background: #F1E3BC; }

/* ---------------------------------------------------------------- certificates */
.gc-wrap { position: absolute; inset: 0; z-index: 478; display: grid; place-items: center; align-content: center; gap: 36px; background: rgba(16, 24, 58, .6); }
.reward-lesson .gc-wrap { z-index: 40; }
.gc-cert { position: relative; width: 1380px; box-sizing: border-box; padding: 22px 60px 14px; border-radius: 30px; background: #FFFDF6; color: #1B2440; text-align: center;
  box-shadow: 0 0 0 10px #FFC531, 0 0 0 18px #FFFFFF, 0 30px 60px rgba(0,0,0,.35); }
.gc-ribbon { display: inline-block; padding: 5px 40px 9px; border-radius: 999px; background: var(--g); color: #FFFFFF; font-size: 30px; font-weight: 700; letter-spacing: .03em; }
.gc-seal { position: absolute; right: 26px; top: 10px; }
.gc-seal svg { display: block; width: 168px; height: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.gc-kicker { margin: 8px 0 0; font-size: 23px; color: #4A5168; }
.gc-name { margin: 0; font-size: 68px; font-weight: 700; color: #3E8044; line-height: 1.1; }
.gc-line { margin: 4px auto 0; max-width: 1000px; font-size: 26px; color: #4A5168; }
.gc-big { display: block; margin-top: 2px; font-size: 34px; color: #C62828; }
.gc-can-h { margin: 10px 0 6px; font-size: 24px; font-weight: 700; color: #1B2440; }
.gc-can { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 34px; margin: 0 auto; padding: 0; max-width: 1220px; list-style: none; text-align: left; }
.gc-can li { position: relative; padding-left: 42px; font-size: 23px; line-height: 1.3; color: #26304A; }
.gc-can li::before { content: '✓'; position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; background: var(--g); color: #FFFFFF; font-size: 20px; font-weight: 700; display: grid; place-items: center; }
.gc-means { margin: 12px auto 0; padding: 10px 22px; border-radius: 18px; background: #EEF7EC; text-align: left; font-size: 18.5px; line-height: 1.42; color: #2E4A33; }
.gc-means b { color: #2B6B33; margin-right: 6px; }
/* Isaiah 2026-10-30: phones: "What this means" was 6.6 px on an iPhone SE: 31 stage px there (11 px) */
html.phone .gc-means { font-size: 31px; line-height: 1.3; }
.gc-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 3px dashed #E2DCC8; font-size: 22px; color: #4A5168; }
.gc-actions { display: flex; gap: 22px; }
.gc-actions button { height: 78px; padding: 0 40px; border: 0; border-radius: 28px; font: inherit; font-size: 31px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.gc-print { background: #FFFFFF; color: #3E8044; }
.gc-check { background: #FFE9A8; color: #5A3B00; }
.gc-done { background: #22B46A; color: #FFFFFF; }
@media print {
  body.printing-cert * { visibility: hidden !important; }
  body.printing-cert .gc-cert, body.printing-cert .gc-cert * { visibility: visible !important; }
  body.printing-cert .gc-cert { position: fixed; left: 0; top: 0; width: 100%; box-shadow: none; border: 8px solid #FFC531; }
  body.printing-cert .gc-ribbon, body.printing-cert .gc-can li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- Reading progress (Adult Guide) */
.gcenter { position: absolute; inset: 0; z-index: 475; overflow-y: auto; background: linear-gradient(180deg, #F2FAF0, #FFFBEF); color: #22314F; padding: 28px 110px 40px; }
.gcenter .back-arrow { position: absolute; left: 26px; top: 26px; }
.gcn-head { text-align: center; }
.gcn-head h1 { margin: 4px 0 4px; font-size: 48px; color: var(--adult, #3E8044); }
.gcn-head > p { margin: 0 auto; max-width: 1180px; font-size: 23px; line-height: 1.38; color: #4A5672; }
.gcn-now { display: flex; justify-content: center; margin: 14px auto 0; padding: 12px 30px; max-width: 760px; border-radius: 24px; background: #FFFFFF; box-shadow: 0 6px 0 rgba(0,0,0,.06); }
.gcn-now .gp-line { align-items: center; width: 100%; }
.gcn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.gcn-card { display: flex; gap: 20px; padding: 18px 22px; border-radius: 26px; background: #FFFFFF; box-shadow: 0 6px 0 rgba(0,0,0,.06); border: 4px solid transparent; }
.gcn-card.current { border-color: color-mix(in srgb, var(--g) 45%, #FFFFFF); }
.gcn-card.earned { background: #FFFDF3; }
.gcn-badge { flex: none; width: 80px; height: 80px; border-radius: 50%; background: var(--g); color: #FFFFFF; display: grid; place-items: center; font-size: 32px; font-weight: 700; }
.gcn-card:not(.earned):not(.current) .gcn-badge { background: color-mix(in srgb, var(--g) 35%, #FFFFFF); }
.gcn-body { flex: 1; min-width: 0; }
.gcn-body h2 { margin: 0; font-size: 30px; }
.gcn-range { margin: 4px 0 0; font-size: 22px; color: #5B6680; }
.gcn-pass, .gcn-try { display: block; margin-top: 6px; font-size: 21px; font-weight: 700; }
.gcn-pass { color: #9A6A00; }
.gcn-try { color: #5B6680; font-weight: 600; }
.gcn-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gcn-btns button { height: 60px; padding: 0 18px; border: 0; border-radius: 20px; font: 700 21px/1 var(--font-ui); cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.gcn-cert { background: #22B46A; color: #FFFFFF; }
.gcn-check { background: #FFE9A8; color: #5A3B00; }
.gcn-lock { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; color: #8A938A; }
.gcn-lock svg { width: 22px; height: 26px; }
.gcn-note { margin: 18px auto 0; max-width: 1100px; text-align: center; font-size: 20px; line-height: 1.4; color: #5B6680; }

/* ---------------------------------------------------------------- the Reading Check */
.rck { position: absolute; inset: 0; z-index: 490; background: linear-gradient(180deg, #F6FBF4, #FFFCF3); color: #22314F; }
.rck .back-arrow { position: absolute; left: 26px; top: 26px; }
.rck-intro { max-width: 1160px; margin: 0 auto; padding: 40px 40px 0; }
.rck-kick { margin: 0; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B7A6E; }
.rck-intro h1 { margin: 4px 0 6px; text-align: center; font-size: 54px; color: var(--adult, #3E8044); }
.rck-lead { margin: 0; text-align: center; font-size: 27px; color: #4A5672; }
.rck-steps { margin: 20px 0 0; padding: 22px 30px 22px 70px; border-radius: 26px; background: #FFFFFF; box-shadow: 0 6px 0 rgba(0,0,0,.06); }
.rck-steps li { margin: 6px 0; font-size: 25px; line-height: 1.38; }
.rck-goal { margin: 18px 0 0; font-size: 24px; line-height: 1.4; color: #4A5672; text-align: center; }
.rck-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.rck-row button { height: 84px; padding: 0 44px; border: 0; border-radius: 28px; font: 700 31px/1 var(--font-ui); cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.rck-go, .rck-back { background: var(--adult, #3E8044); color: #FFFFFF; }
.rck-later, .rck-again { background: #FFFFFF; color: #2B6B33; }
/* running */
.rck-bar { position: absolute; left: 0; right: 0; top: 0; height: 116px; display: flex; align-items: center; gap: 24px; padding: 0 36px; background: #FFFFFF; box-shadow: 0 4px 0 rgba(0,0,0,.06); z-index: 2; }
.rck-stop { flex: none; width: 70px; height: 70px; border: 0; border-radius: 50%; background: #8C94A6; display: grid; place-items: center; cursor: pointer; }
.rck-stop svg { width: 30px; height: 30px; }
.rck-clock { position: relative; flex: none; width: 64px; height: 64px; }
.rck-clock svg { position: absolute; inset: 0; }
.rck-ring { transition: stroke-dashoffset .2s linear; }
.rck-secs { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; color: #22314F; }
.rck-tip { flex: 1; margin: 0; font-size: 24px; color: #4A5672; }
.rck-tip.big { font-size: 32px; font-weight: 700; color: #2B6B33; text-align: center; }
.rck-miss { flex: none; font-size: 24px; color: #4A5672; }
.rck-miss b { color: #B03A3A; }
.rck-fin, .rck-see { flex: none; height: 76px; padding: 0 36px; border: 0; border-radius: 24px; background: var(--adult, #3E8044); color: #FFFFFF; font: 700 29px/1 var(--font-ui); cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.14); }
.rck-see:disabled { opacity: .45; cursor: default; }
.rck-bar.time { background: #FFF6DE; justify-content: center; }
.rck-bar.time .rck-tip { flex: none; }
.rck-text { position: absolute; left: 0; right: 0; top: 116px; bottom: 0; overflow-y: auto; padding: 26px 90px 60px; font-size: 38px; line-height: 1.72; color: #1B2440; overscroll-behavior: contain; }
.rck-w { display: inline; padding: 1px 3px; margin: 0 -1px; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; cursor: pointer; }
.rck-w.missed { background: #FFE1DC; color: #8E2A20; text-decoration: underline wavy #D9534F 2px; text-underline-offset: 6px; }
.rck-w.after { opacity: .3; }
.rck-w.last { box-shadow: 0 0 0 4px var(--adult, #3E8044); background: #EAF6E7; }
.rck-para { display: block; height: 14px; }
.rck-text.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; align-content: start; padding: 36px 120px; }
.rck-text.grid .rck-w { display: grid; place-items: center; height: 140px; border-radius: 28px; background: #FFFFFF; box-shadow: 0 6px 0 rgba(0,0,0,.07); font-size: 64px; font-weight: 700; margin: 0; }
.rck-text.grid .rck-w.missed { background: #FFE1DC; }
.rck-text.grid .rck-w.last { box-shadow: 0 0 0 6px var(--adult, #3E8044); }
/* result */
.rck-result { display: flex; align-items: center; justify-content: center; gap: 46px; height: 100%; padding: 30px 110px; box-sizing: border-box; }
.rck-sealbox { flex: none; }
.rck-res-text { max-width: 1000px; }
.rck-result.notyet .rck-res-text { max-width: 1180px; }
.rck-res-text h1 { margin: 0 0 16px; font-size: 46px; line-height: 1.15; color: var(--adult, #3E8044); }
.rck-result.notyet h1 { color: #22314F; }
.rck-nums { display: flex; gap: 20px; }
.rck-num { flex: 1; display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-radius: 22px; background: #FFFFFF; box-shadow: 0 6px 0 rgba(0,0,0,.06); }
.rck-num b { font-size: 58px; line-height: 1; color: var(--g); }
.rck-num span { font-size: 22px; line-height: 1.3; color: #4A5672; }
.rck-res-text p { margin: 16px 0 0; font-size: 26px; line-height: 1.42; color: #33405C; }
.rck-res-text .rck-row { justify-content: flex-start; }

/* ---------------------------------------------------------------- welcome back */
.welcome-back { position: absolute; inset: 0; z-index: 460; display: grid; place-items: center; background: rgba(16, 24, 58, .45); }
.wb-card { width: 1040px; box-sizing: border-box; padding: 46px 60px 40px; border-radius: 40px; background: #FFFFFF; box-shadow: 0 30px 80px rgba(20, 52, 36,.3); border-top: 14px solid var(--adult, #3E8044); }
.wb-card h2 { margin: 0 0 12px; font-size: 54px; color: var(--adult, #3E8044); }
.wb-card p { margin: 0; font-size: 30px; line-height: 1.42; color: #33405C; }
.wb-card p b { color: #1B2440; }
.wb-card .wb-tip { margin-top: 14px; color: #4A5672; }
.wb-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.wb-row button { height: 80px; padding: 0 28px; border: 0; border-radius: 26px; font: 700 27px/1 var(--font-ui); cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.wb-review { background: var(--adult, #3E8044); color: #FFFFFF; }
.wb-next { background: #EAF6E7; color: #2B6B33; }
.wb-close { background: #F1F1F5; color: #4A5168; }

/* 2026-10-26 mobile review F-08: body has touch-action none (no double-tap zoom) and WebKit doesn't always reset it at a
   scroll box, so the Reading Check passage (long passages scroll mid-test) and the Reading progress page say how they
   may be dragged, like the scrollers listed in phone.css */
.rck-text, .gcenter { touch-action: pan-y; }
/* the grown-up taps each missed word live: a tap in the space between two words now lands on the nearer one (the words
   already fill the line's height), and on phones the passage is bigger (short words like "a" were ~10 CSS px wide) */
.rck-text:not(.grid) .rck-w { position: relative; }
.rck-text:not(.grid) .rck-w::after { content: ''; position: absolute; inset: 0 -4px; }
html.phone .rck-text:not(.grid) { font-size: 50px; line-height: 1.8; padding-left: 70px; padding-right: 70px; }
/* 2026-10-26 mobile review F-09: grown-up buttons that measured 25-35 CSS px on a phone get an invisible hit area of
   122 stage px (44 CSS px at stage scale 0.36) tall where there is room; sideways it stops at half the gap to the next
   button. The look is unchanged. */
html.phone :is(.gc-actions button, .gcn-btns button, .wb-row button, .rck-row button, .rck-stop, .rck-fin, .rck-see, .ms-cert) { position: relative; }
html.phone .gc-actions button::after { content: ''; position: absolute; inset: -22px -11px; }
/* 2026-11-01 phone findings: Print, the Reading Check and Keep reading (the only way on from a fresh certificate) still
   measured 38 px tall at a .30 stage (iPhone with Safari bars), 33 on the longer Lesson 99 certificate, whose row sits on
   the screen's bottom edge. On the smallest stages the ring grows to at least 44 px (--tap44, js/phone.mjs placeStage;
   bigger phones keep the ring above): half the shortfall below the row, as far as the screen goes, and all of it above,
   over the certificate's foot, which takes no taps */
html.phone .gc-actions button::after { inset: min(-22px, calc(78px - var(--tap44, 0px))) -11px min(-22px, calc((78px - var(--tap44, 0px)) / 2)); }
html.phone .gcn-btns button::after { content: ''; position: absolute; inset: -31px -5px; }
html.phone .wb-row button::after { content: ''; position: absolute; inset: -21px -9px; }
html.phone .rck-row button::after { content: ''; position: absolute; inset: -19px -10px; }
html.phone .rck-stop::after { content: ''; position: absolute; inset: -26px -12px; }
html.phone :is(.rck-fin, .rck-see)::after { content: ''; position: absolute; inset: -20px -12px; }
html.phone .ms-cert::after { content: ''; position: absolute; inset: -19px -10px; }
