.ap-shell { width: min(1100px, 100%); }
.ap-screen { padding: 12px 0 20px; font-size: 17px; line-height: 1.45; }
.ap-screen *, .ap-screen *::before, .ap-screen *::after { box-sizing: border-box; min-width: 0; }
.ap-screen h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin: 10px 0; }
.ap-screen h2 { font-size: 22px; line-height: 1.35; margin: 8px 0 14px; }
.ap-screen p { margin: 8px 0 12px; }
.ap-heading p, .ap-note { color: #526074; font-size: 16px; }
.ap-screen a { color: #275cab; text-underline-offset: 3px; }
.ap-setup, .ap-card { border: 1px solid #d9e1ec; border-radius: 16px; background: #fff; padding: 20px; margin: 12px 0; }
.ap-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 12px 0; }
.ap-screen label { display: grid; gap: 5px; font-weight: 600; }
.ap-fields label { flex: 1 1 180px; }
.ap-screen select, .ap-screen input { min-height: 44px; font: inherit; color: #182741; border: 1px solid #9cabc0; border-radius: 8px; padding: 8px 10px; background: #fff; max-width: 100%; }
.ap-screen button, .ap-screen a { touch-action: manipulation; }
.ap-screen button:focus-visible, .ap-screen a:focus-visible, .ap-screen input:focus-visible, .ap-screen select:focus-visible { outline: 3px solid #237fcd; outline-offset: 3px; }
.ap-screen button { min-height: 42px; white-space: normal; }
.ap-screen button:disabled { opacity: .5; cursor: default; }
.ap-screen progress { width: 100%; height: 8px; margin: 6px 0; accent-color: #32776a; }
.ap-topline, .ap-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ap-topline { margin: 12px 0 0; }
.ap-nav { margin: 14px 0 0; }
.ap-question-layout.has-visual { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 0 24px; grid-template-areas: "prompt visual" "controls visual"; }
.ap-question-prompt { grid-area: prompt; }
.ap-question-controls { grid-area: controls; }
.ap-question-layout.has-visual .ap-visual { grid-area: visual; }
.ap-prompt { overflow-wrap: anywhere; }
.ap-visual { display: grid; place-items: center; width: 100%; overflow-wrap: anywhere; }
.ap-visual svg { max-width: 100%; width: auto; height: auto; max-height: 240px; }
.ap-visual .ep-passage, .ap-visual .ep-text, .ap-visual blockquote { font-size: 17px; line-height: 1.45; margin: 8px 0; }
.ap-visual table { width: 100%; font-size: 16px; border-collapse: collapse; table-layout: auto; }
.ap-visual td, .ap-visual th { padding: 5px; overflow-wrap: anywhere; }
.ap-choices { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.ap-choices label { border: 1px solid #c9d4e2; border-radius: 9px; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; padding: 8px 12px; min-height: 44px; font-weight: 400; cursor: pointer; }
.ap-choices label:has(input:checked) { border-color: #32776a; background: #eef8f4; }
.ap-choices input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; }
.ap-choices b { margin-right: 8px; }
.ap-answer { margin-top: 20px; max-width: 360px; }
.ap-answer span { font-weight: 400; }
.ap-message { color: #97401b; min-height: 1.45em; font-size: 16px; }
.ap-recommendations, .ap-progress-list { list-style: none; padding: 0; margin: 12px 0; }
.ap-recommendations li, .ap-progress-list li { padding: 12px 8px; border-bottom: 1px solid #d9e1ec; }
.ap-recommendations small, .ap-progress-list small { display: block; font-size: 16px; color: #526074; }
.ap-progress-list li { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.ap-progress-list a { flex-shrink: 0; padding: 8px; }
.ap-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.ap-metrics button { display: grid; text-align: left; gap: 3px; border: 1px solid #c9d4e2; background: #fff; border-radius: 10px; padding: 10px; color: #182741; font: inherit; font-size: 16px; }
.ap-metrics strong { font-size: 25px; }
.ap-metrics [aria-pressed="true"] { border-color: #32776a; background: #eef8f4; }
.ap-entry-links { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 0; }
@media (min-width: 961px) and (max-height: 740px) { .library-content .ap-entry-links { padding: 0 0 6px; } }
@media (max-width: 700px) {
  .ap-screen { padding-top: 10px; }
  .ap-card, .ap-setup { padding: 14px; }
  .ap-question-layout.has-visual { grid-template-columns: 1fr; gap: 12px; grid-template-areas: "prompt" "visual" "controls"; }
  .ap-screen .ap-prompt { font-size: 20px; }
  .ap-fields { gap: 10px; }
  .ap-fields label { flex-basis: 100%; }
  .ap-nav { gap: 8px; }
  .ap-metrics { grid-template-columns: 1fr 1fr; }
  .ap-progress-list li { display: block; }
  .ap-progress-list a { display: inline-block; }
}

.ap-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; }
.ap-message:empty { display: none; }

.ap-head h1 { margin: 0; }
.ap-card { padding: 14px; }
.ap-screen { padding-bottom: 12px; }
.ap-visual .mv-table th[scope="row"] { white-space: nowrap; }

.ap-choices:has(.mp-pic) { grid-template-columns: 1fr 1fr; }
.ap-choices:has(.mp-pic) label { min-height: 132px; }
.ap-choices:has(.mp-pic) label > span { display: grid; justify-items: center; gap: 5px; }
.ap-choices .mp-pic { font-size: 52px; }
.ap-choices .mp-pic svg, .ap-choices .mp-pic img { width: 76px; height: 76px; }
.ap-young .ap-choices label { font-size: 20px; min-height: 52px; }
.ap-young .ap-choices:has(.mp-pic) label { min-height: 132px; }
.ap-young .ap-answer input { font-size: 20px; min-height: 48px; }
.ap-card .mp-pic { display: inline-block; vertical-align: middle; }
.ap-card .ap-choices .mp-pic { display: block; }
.ap-choices:has(.mp-pic) label { display: block; position: relative; padding: 12px 6px; }
.ap-choices:has(.mp-pic) input { position: absolute; top: 10px; left: 8px; }
@media (min-width: 701px) {
  .ap-choices:has(.mp-pic) label > span > b { position: absolute; top: 8px; left: 34px; }
}
@media (min-width: 701px) and (min-height: 650px) {
  .ap-visual .ev-text { max-height: min(360px, calc(100dvh - 390px)); overflow-y: auto; padding-right: 8px; }
  .ap-visual .ev-text:focus-visible { outline: 3px solid #237fcd; outline-offset: 3px; }
}

/* Test prep (#test-prep): plan setup, today's tasks, section progress, pet goal. */
.tp-levels { border: 0; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tp-levels legend, .tp-setup .ap-fields > label { font-weight: 700; margin-bottom: 6px; }
.tp-levels label { grid-template-columns: 22px 1fr; align-items: start; border: 1px solid #c9d4e2; border-radius: 10px; padding: 10px 12px; font-weight: 400; cursor: pointer; }
.tp-levels label:has(input:checked) { border-color: #32776a; background: #eef8f4; }
.tp-levels input, .tp-check input { width: 18px; height: 18px; min-height: 18px; margin: 3px 0 0; padding: 0; }
.tp-levels small { display: block; color: #526074; font-size: 15px; }
.tp-check { grid-template-columns: 22px 1fr; align-items: start; font-weight: 400 !important; }
.tp-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0 18px; align-items: start; }
.tp-side { display: grid; gap: 0; }
.tp-today h2, .tp-side h2 { margin-top: 0; }
.tp-tasks { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.tp-tasks li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid #d9e1ec; border-radius: 12px; padding: 10px 12px; }
.tp-tasks li.is-done { background: #f2f8f5; border-color: #b9dccd; }
.tp-tasks small { display: block; color: #526074; font-size: 15px; }
.tp-chip { font-size: 14px; font-weight: 700; color: #1f4f88; background: #e8f0fb; border-radius: 999px; padding: 3px 10px; }
.tp-done { color: #24614f; font-weight: 700; }
.tp-callout { background: #fff8e6; border: 1px solid #f0d9a2; border-radius: 10px; padding: 10px 12px; }
.tp-pet { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; border: 1px solid #d9e1ec; border-radius: 16px; background: #fffaf2; padding: 14px; margin: 12px 0; }
.tp-pet h2 { font-size: 19px; margin: 0 0 4px; }
.tp-pet p { margin: 4px 0; }
.tp-pet-icon { font-size: 34px; line-height: 1; }
.tp-screen meter { width: 100%; height: 12px; }
.tp-sections { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.tp-sections li { display: grid; grid-template-columns: minmax(7.5em, max-content) 1fr auto; gap: 10px; align-items: center; }
.tp-sections small { color: #526074; font-size: 15px; }
.ap-nav.tp-links { justify-content: flex-start; gap: 18px; }
.ap-nav.tp-links > * { flex: 0 0 auto; margin-left: 0; }
.tp-chip { justify-self: start; }
@media (max-width: 900px) { .tp-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .tp-levels { grid-template-columns: 1fr; }
  .tp-tasks li { grid-template-columns: 1fr; }
  .tp-tasks li .button { justify-self: start; }
  .tp-sections li { grid-template-columns: 1fr; gap: 2px; }
}

/* Test prep round 2: drill queue, practice tests, the sitting, results and review. */
.tp-main { display: grid; gap: 0; }
.tp-queue, .tp-history { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.tp-queue li, .tp-history li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid #e3e9f1; padding: 6px 0; }
.tp-history small { color: #526074; font-size: 15px; }
.tp-dots { display: inline-flex; gap: 4px; }
.tp-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #32776a; }
.tp-dots i.is-on { background: #32776a; }
.tp-tests h3 { font-size: 17px; margin: 12px 0 4px; }
.tp-run-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.tp-clock { font-variant-numeric: tabular-nums; font-size: 20px; color: #1f3d6b; }
.tp-grid-nav { position: relative; }
.tp-grid-nav summary { cursor: pointer; font-weight: 700; color: #275cab; min-height: 42px; display: flex; align-items: center; }
.tp-grid-nav > div { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); z-index: 5; background: #fff; border: 1px solid #c9d4e2; border-radius: 12px; padding: 10px; display: grid; grid-template-columns: repeat(8, 40px); gap: 6px; box-shadow: 0 8px 24px rgba(20, 40, 80, .15); }
.tp-grid-nav > div button { min-height: 40px; border: 1px solid #c9d4e2; border-radius: 8px; background: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.tp-grid-nav > div button.is-answered { background: #eef8f4; border-color: #32776a; }
.tp-grid-nav > div button.is-current { outline: 3px solid #237fcd; }
.tp-rules ol, .tp-rule-list { margin: 8px 0 12px; padding-left: 22px; }
.tp-rules li { margin: 4px 0; }
.tp-essay-box textarea { width: 100%; min-height: 220px; font: inherit; border: 1px solid #9cabc0; border-radius: 8px; padding: 10px; }
.tp-results { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 16px; }
.tp-results th, .tp-results td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #e3e9f1; }
.tp-results tr.is-weak th { color: #97401b; }
.tp-review-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.tp-review-bar h2 { margin: 0; }
.tp-filter { display: flex !important; align-items: center; gap: 8px; }
.tp-verdict { font-weight: 700; margin: 0 0 6px; }
.tp-verdict.is-right { color: #24614f; }
.tp-verdict.is-wrong { color: #97401b; }
.tp-mistake { background: #fff4ef; border-left: 4px solid #c8653a; padding: 6px 10px; }
.tp-review-choices { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.tp-review-choices li { border: 1px solid #c9d4e2; border-radius: 9px; padding: 7px 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tp-review-choices li.is-right { border-color: #32776a; background: #eef8f4; }
.tp-review-choices li.is-wrong { border-color: #c8653a; background: #fff4ef; }
.tp-review-choices em { margin-left: auto; font-size: 14px; font-style: normal; font-weight: 700; }
.ap-choices label.is-right { border-color: #32776a; background: #eef8f4; }
.ap-choices label.is-wrong { border-color: #c8653a; background: #fff4ef; }
.tp-why { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; font-size: 16px; }
.tp-why dt { font-weight: 700; }
.tp-why dd { margin: 0; }
.tp-skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 14px; }
@media (max-width: 700px) {
  .tp-grid-nav > div { grid-template-columns: repeat(5, 40px); position: fixed; bottom: 70px; }
  .tp-why { grid-template-columns: 1fr; }
  .tp-results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tp-results tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid #e3e9f1; }
  .tp-results th, .tp-results td { border: 0; padding: 0; }
  .tp-results th { grid-column: 1 / -1; }
  .tp-results td::before { content: attr(data-label) ": "; color: #526074; }
  .tp-skill-grid { grid-template-columns: 1fr; }
}

/* Essay feedback */
.tp-essay-prompt { background: #f5f8fc; border-radius: 10px; padding: 8px 12px; }
.tp-essay-stats { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tp-essay-notes { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.tp-essay-notes li { padding: 6px 10px; border-radius: 8px; }
.tp-essay-notes li.is-good { background: #eef8f4; }
.tp-essay-notes li.is-tip { background: #fff8e6; }
.tp-checklist { border: 0; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.tp-checklist label { grid-template-columns: 22px 1fr; align-items: start; font-weight: 400; }
.tp-checklist input { width: 18px; height: 18px; min-height: 18px; margin: 3px 0 0; padding: 0; }
.tp-plan { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.tp-plan dt { font-weight: 700; }
.tp-plan dd { margin: 0; }
.tp-essay-text p { margin: 0 0 10px; white-space: pre-wrap; }
@media (max-width: 700px) { .tp-plan { grid-template-columns: 1fr; } }
.tp-essay-good { background: #eef8f4; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.tp-essay-notes { gap: 4px; }
.tp-essay-notes li { padding: 4px 10px; }

/* Test prep round 4: Primary levels, listening, readiness, sprints, strategy lessons, pace. */
.tp-kid .ap-prompt { font-size: 24px; line-height: 1.4; }
.tp-kid .ap-choices label { font-size: 20px; min-height: 52px; }
.tp-kid .ap-choices input { width: 24px; height: 24px; min-height: 24px; }
.tp-kid .button { min-height: 48px; font-size: 18px; }
.tp-kid .tp-lesson p, .tp-kid .tp-example p { font-size: 20px; line-height: 1.5; }
.tp-listen { display: grid; gap: 4px; justify-items: start; margin: 0 0 10px; }
.tp-listen-button { font-size: 20px; min-height: 52px; padding-inline: 22px; }
.tp-listen-text { background: #f5f8fc; border-radius: 10px; padding: 8px 12px; margin: 6px 0 10px; }
.tp-listen-text summary { cursor: pointer; font-weight: 700; color: #275cab; }
.tp-listen-text p { margin: 6px 0; white-space: pre-line; }
.tp-ready-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 12px; }
.tp-ready-list li { display: grid; gap: 3px; }
.tp-ready-list li > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tp-ready-list p { margin: 0; font-size: 15px; }
.tp-ready-list small { color: #526074; font-size: 14px; }
.tp-ready-tag { font-size: 14px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: #eef1f6; color: #3d4b5f; }
.tp-ready-list li.is-ready .tp-ready-tag { background: #e3f4ec; color: #1f5c48; }
.tp-ready-list li.is-close .tp-ready-tag { background: #fff3d6; color: #7a5300; }
.tp-ready-list li.is-not-yet .tp-ready-tag { background: #fde9e1; color: #8a3a17; }
.tp-sprint-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tp-sprint-row select { max-width: 100%; }
.tp-lesson-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.tp-lesson-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #e3e9f1; padding: 4px 0; }
.tp-lesson-list li.is-done span { color: #24614f; }
.tp-lesson-list small { display: block; color: #526074; font-size: 14px; }
.tp-lessons summary { cursor: pointer; font-weight: 700; color: #275cab; min-height: 36px; display: flex; align-items: center; }
.tp-example { background: #f5f8fc; border-left: 4px solid #237fcd; border-radius: 6px; padding: 6px 12px; margin: 10px 0; }
.tp-example p { margin: 4px 0; white-space: pre-line; }
.tp-pace { font-weight: 700; }
.tp-pace.is-slow { color: #7a5300; }
.tp-pace.is-rushed { color: #97401b; }
.tp-pace-line small { display: block; color: #526074; font-size: 14px; }
.tp-week ol { margin: 6px 0; padding-left: 22px; }
.tp-week li { margin: 4px 0; }
.tp-conditions { background: #fffaf2; border-radius: 10px; padding: 8px 12px; }
.tp-parent { margin: 12px 0 18px; }
.tp-parent h3 { font-size: 17px; margin: 14px 0 4px; }
.tp-parent-facts { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tp-parent > summary { cursor: pointer; display: grid; gap: 2px; min-height: 44px; }
.tp-parent > summary strong { font-size: 18px; color: #1f3d6b; }
.tp-parent > summary small { color: #526074; font-size: 15px; }
.tp-next-lesson { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
