/* SAT Topper — the KS2 SATs plan (satprep/satprep.js) */
:root { --sp-maths: #2b5fb0; --sp-read: #1d7f74; --sp-gps: #9a4d8c; --sp-done: #2d7a55; --sp-part: #c08a1e; --sp-miss: #c25b5b; --sp-sky: #eaf2fd; }

/* sidebar: Lessons | SAT Topper */
.sp-switch { display: flex; gap: 4px; margin: 4px 12px 10px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.sp-switch button { flex: 1; border: 0; background: none; color: inherit; font: inherit; font-size: .82rem; font-weight: 600; padding: 8px 6px; border-radius: 9px; cursor: pointer; opacity: .8; white-space: nowrap; }
.sp-switch button.is-active { background: #fff; color: var(--violet-deep, #142848); opacity: 1; box-shadow: var(--shadow-sm); }
.sp-nav .sp-nav-ic { display: inline-block; width: 22px; margin-right: 8px; text-align: center; }

.sp-page { display: grid; gap: 18px; }
.sp-page > *, #spBody > * { min-width: 0; }   /* grid items may shrink to the screen (the calendar used to push the page wider on phones) */
.sp-tabs { flex-wrap: wrap; max-width: 100%; }
.sp-tabs button { white-space: nowrap; }
/* phones: one row that scrolls sideways (this file loads after studio.css, so its wrap rule must be undone here) */
@media (max-width: 600px) {
  .sp-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .sp-tabs::-webkit-scrollbar { display: none; }
  .sp-tabs button { flex: 0 0 auto; }
}
.sp-kicker { margin: 0 0 2px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sp-note { color: var(--ink-soft); font-size: .9rem; margin: 10px 0 0; }
.sp-muted { color: var(--muted); }
.sp-lead { color: var(--ink-soft); }

/* hero: countdown and the mountain */
.sp-hero { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr); gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--r-xl); color: #fff;
  background: linear-gradient(135deg, #142848 0%, #234a86 55%, #2f6fb8 100%); box-shadow: var(--shadow-md); overflow: hidden; }
.sp-hero h2 { margin: 2px 0 6px; font-size: 2rem; font-family: var(--font-display); color: #fff; }
.sp-hero p { margin: 0; color: rgba(255, 255, 255, .86); font-size: .92rem; }
.sp-hero .sp-kicker { color: #f6d77a; }
.sp-mountain { width: 100%; height: auto; }
.sp-mt-fill { fill: rgba(255, 255, 255, .1); }
.sp-mt-path { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 3; stroke-dasharray: 6 6; }
.sp-mt-done { fill: none; stroke: #f6d77a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sp-mt-mark circle { fill: #fff; }
.sp-mt-mark text { fill: rgba(255, 255, 255, .85); font-size: 11px; text-anchor: middle; font-weight: 600; }
.sp-mt-flag line { stroke: #fff; stroke-width: 2; }
.sp-mt-flag path { fill: #f6d77a; }
.sp-mt-flag circle { fill: #f6d77a; stroke: #fff; stroke-width: 2; }
.sp-hero .sp-hero-goal { margin-top: 8px; color: #f6d77a; font-weight: 600; }
.sp-hero .sp-hero-goal strong { color: #fff; }

.sp-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--sun-soft); border: 1px solid #f0dcae; }
.sp-banner span { flex: 1; }

/* the day */
.sp-day-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.sp-day-head h2 { margin: 0; font-family: var(--font-display); }
.sp-day-title { margin: 2px 0 0; color: var(--ink-soft); }
.sp-ring { --p: 0; width: 70px; height: 70px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--sp-done) calc(var(--p) * 1%), #e6ebf1 0); }
.sp-ring strong { font-size: 1.05rem; line-height: 1; }
.sp-ring span { font-size: .7rem; color: var(--muted); }
.sp-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sp-task { border: 1px solid var(--line); border-left: 5px solid #cfd6e0; border-radius: var(--r-md); padding: 12px 14px; background: #fff; transition: box-shadow .15s; }
.sp-task:hover { box-shadow: var(--shadow-sm); }
.sp-task.sp-subj-maths { border-left-color: var(--sp-maths); }
.sp-task.sp-subj-english { border-left-color: var(--sp-read); }
.sp-task.is-done { background: #f5fbf7; }
.sp-task.is-soft { background: #fbfbfd; }
/* "Extra, if you have time": folded under the day's core tasks */
.sp-extra { margin-top: 14px; border: 1px dashed #c9d2de; border-radius: var(--r-md); background: #fafbfd; }
.sp-extra > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; }
.sp-extra > summary::-webkit-details-marker { display: none; }
.sp-extra > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.sp-extra[open] > summary::after { transform: rotate(180deg); }
.sp-extra-h { font-weight: 700; color: var(--ink); }
.sp-extra > summary small { color: var(--muted); font-size: .84rem; }
.sp-extra > .sp-note { margin: 0 14px 10px; }
.sp-extra > .sp-tasks { padding: 0 10px 10px; }
.sp-task.is-extra { border-left-style: dashed; }
.sp-steps li.is-extra .sp-dot { border-style: dotted; }
.sp-task-head { display: flex; align-items: center; gap: 12px; }
.sp-task-ic { font-size: 1.4rem; width: 34px; text-align: center; flex: none; }
.sp-task-main { flex: 1; min-width: 0; }
.sp-task-main strong { display: block; }
.sp-task-main small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.sp-from { display: inline-block; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--sp-miss); margin-right: 6px; text-transform: uppercase; }
.sp-tick { min-width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center; font-weight: 700; font-size: .8rem; color: var(--muted); border: 2px solid #dfe4eb; }
.is-done > .sp-task-head .sp-tick { background: var(--sp-done); border-color: var(--sp-done); color: #fff; font-size: 1rem; }
.is-part > .sp-task-head .sp-tick { border-color: var(--sp-part); color: var(--sp-part); }
.sp-score { font-weight: 700; font-size: .85rem; padding: 3px 8px; border-radius: 99px; background: #eef1f5; }
.sp-score.is-good { background: var(--go-soft); color: var(--go-deep); }
.sp-score.is-ok { background: var(--sun-soft); color: #8a5a10; }
.sp-score.is-low { background: var(--coral-soft); color: var(--coral); }
.sp-scaled { font-weight: 800; color: var(--violet); font-size: .9rem; }
.sp-chip { margin-top: 6px; border: 1px solid var(--line); background: var(--sp-sky); color: var(--violet); font: inherit; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; cursor: pointer; }
.sp-subs { list-style: none; margin: 10px 0 0 46px; padding: 0; display: grid; gap: 6px; }
.sp-subs li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: #f7f9fb; }
.sp-sub-main { flex: 1; min-width: 0; }
.sp-sub-main strong { display: block; font-size: .9rem; font-weight: 600; }
.sp-sub-main small { color: var(--muted); font-size: .78rem; }
.sp-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #c6cfdb; flex: none; }
.is-secure > .sp-dot { background: var(--sp-done); border-color: var(--sp-done); }
.is-tried > .sp-dot { background: var(--sp-part); border-color: var(--sp-part); }
.is-gap > .sp-dot, .is-late > .sp-dot { border-color: var(--sp-miss); }
.sp-steps li.is-before { color: var(--muted); }
.sp-steps li.is-before .link-btn { color: var(--ink-soft); }
.is-before > .sp-dot { border-style: dashed; }
.sp-done-msg { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--go-soft); color: var(--go-deep); font-weight: 600; }
.sp-tutor-note { background: var(--sun-soft); border-color: #f0dcae; }
.sp-tutor-note p { margin: 4px 0 0; }

/* calendar */
.sp-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--ink-soft); margin-bottom: 12px; }
.sp-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: #eef1f5; }
.sp-legend .s-done::before { background: var(--sp-done); }
.sp-legend .s-part::before { background: var(--sp-part); }
.sp-legend .s-missed::before { background: #f4d4d4; border: 1px solid var(--sp-miss); }
.sp-legend [class^="k-"]::before { display: none; }
.sp-legend .s-before::before { background: repeating-linear-gradient(135deg, #eef1f5 0 3px, #dfe4eb 3px 6px); }
.sp-phases { display: flex; gap: 3px; margin-bottom: 14px; border-radius: 10px; overflow: hidden; }
.sp-phases span { padding: 6px 8px; color: #fff; font-size: .76rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-phases b { display: block; }
.sp-phases small { opacity: .85; }
.ph-launch { background: #6b7a90; } .ph-learn { background: #2b5fb0; } .ph-revise { background: #1d7f74; } .ph-final { background: #9a4d8c; } .ph-exam { background: #c08a1e; }
.sp-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sp-month h3 { margin: 0 0 6px; font-size: .95rem; }
.sp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.sp-cal-grid > b { font-size: .68rem; color: var(--muted); text-align: center; font-weight: 600; }
.sp-cal-day { position: relative; aspect-ratio: 1; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: .78rem; background: #eef2f7; color: var(--ink); cursor: pointer; padding: 0; display: grid; place-content: center; }
.sp-cal-day i { position: absolute; right: 1px; bottom: -1px; font-style: normal; font-size: .58rem; }
.sp-cal-day.is-blank, .sp-cal-day.is-off { background: none; cursor: default; color: #c3cad4; }
.sp-cal-day.is-future { background: #f3f6fa; }
.sp-cal-day.k-learn.is-future { background: #e8f0fb; }
.sp-cal-day.k-mock.is-future, .sp-cal-day.k-checkpoint.is-future { background: #e3f3f0; }
.sp-cal-day.k-exam { background: #fbefd6; font-weight: 700; }
.sp-cal-day.k-rest { background: #f4f1fb; }
.sp-cal-day.s-done { background: var(--sp-done); color: #fff; }
.sp-cal-day.s-part { background: #f6e1b2; }
.sp-cal-day.s-missed { background: #f8e1e1; border-color: #e9b9b9; }
.sp-cal-day.s-before { background: repeating-linear-gradient(135deg, #f3f5f8 0 4px, #e9edf2 4px 8px); color: var(--muted); }
.sp-cal-day.is-today { outline: 3px solid #f6b21b; outline-offset: 1px; font-weight: 800; }
.sp-cal-day.is-sel { box-shadow: 0 0 0 2px var(--violet); }
.sp-cal-detail .st-card-head { align-items: flex-start; }

/* the climb */
.sp-climb { display: grid; gap: 10px; }
.sp-strand summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 16px; align-items: center; }
.sp-strand summary::-webkit-details-marker { display: none; }
.sp-strand-head small { display: block; color: var(--muted); font-size: .8rem; }
.sp-ladder { position: relative; display: flex; gap: 4px; height: 26px; }
.sp-rung { position: relative; background: #e9eef5; border-radius: 6px; overflow: hidden; }
.sp-rung b { position: absolute; left: 8px; top: 4px; font-size: .72rem; color: var(--ink-soft); }
.sp-rung-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6fbf92, var(--sp-done)); }
.sp-subj-english .sp-rung-fill { background: linear-gradient(90deg, #6cc2b7, var(--sp-read)); }
.sp-ladder-before { position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; border-radius: 6px 0 0 6px; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .6) 0 4px, rgba(120, 132, 150, .14) 4px 8px); }
.sp-rung b, .sp-rung-fill { z-index: 2; }
.sp-ladder-now { position: absolute; top: -4px; bottom: -4px; width: 3px; background: #f6b21b; border-radius: 2px; }
.sp-steps { margin: 12px 0 0; padding: 0; list-style: none; columns: 2 320px; column-gap: 20px; }
.sp-steps li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; break-inside: avoid; font-size: .88rem; }
.sp-steps small { color: var(--muted); margin-left: auto; white-space: nowrap; }

/* tests and scores */
.sp-est-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.sp-est strong { display: block; font-size: 2rem; font-family: var(--font-display); color: var(--violet); }
.sp-est small { color: var(--muted); }
.sp-est-maths { border-top: 4px solid var(--sp-maths); } .sp-est-reading { border-top: 4px solid var(--sp-read); } .sp-est-gps { border-top: 4px solid var(--sp-gps); }
.sp-tests { list-style: none; margin: 0; padding: 0; }
.sp-test { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.sp-test:first-child { border-top: 0; }
.sp-test-date { width: 92px; flex: none; font-size: .8rem; color: var(--muted); font-weight: 600; }
.sp-test-main { flex: 1; min-width: 0; }
.sp-test-main small { display: block; color: var(--muted); font-size: .8rem; }
.sp-test.is-missed .sp-test-date { color: var(--sp-miss); }
.sp-chart { width: 100%; height: auto; }
.sp-ax { stroke: #e8ecf2; } .sp-ax-exp { stroke: #9fb2cc; stroke-dasharray: 4 4; } .sp-ax-high { stroke: #8fc5a6; stroke-dasharray: 4 4; }
.sp-ax-goal { stroke: #f6b21b; stroke-width: 2; } .sp-ax-now { stroke: #c7cfda; stroke-dasharray: 2 3; }
.sp-ax-t { font-size: 11px; fill: var(--muted); text-anchor: end; } .sp-ax-t.is-goal { fill: #a87200; font-weight: 700; }
.sp-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }
.sp-key span::before { content: ""; display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: 3px; }
.sp-key .is-line::before { display: none; }
.sp-bars { display: grid; gap: 8px; }
.sp-bar-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 54px; gap: 10px; align-items: center; font-size: .88rem; }
.sp-bar { height: 12px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.sp-bar span { display: block; height: 100%; background: linear-gradient(90deg, #6fbf92, var(--sp-done)); }
.sp-bar-row b { text-align: right; font-size: .8rem; color: var(--ink-soft); }
.sp-cols { display: flex; align-items: flex-end; gap: 5px; height: 140px; padding-top: 6px; }
.sp-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.sp-col span { width: 100%; max-width: 26px; background: var(--sp-maths); border-radius: 5px 5px 0 0; min-height: 3px; }
.sp-col span.is-eng { background: var(--sp-read); } .sp-col span.is-time { background: #8a7bd1; }
.sp-col small { font-size: .62rem; color: var(--muted); margin-top: 3px; }

/* ask */
.sp-ask h2 { margin-top: 0; }
.sp-field { display: grid; gap: 6px; margin: 12px 0; font-weight: 600; font-size: .9rem; }
.sp-field textarea, .sp-field input, .sp-field select { font: inherit; font-weight: 400; }
.sp-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); resize: vertical; }
.sp-help-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.sp-way { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); background: #f8fafc; border-radius: var(--r-md); padding: 12px; font: inherit; cursor: pointer; }
.sp-way:hover { border-color: var(--violet); background: var(--sp-sky); }
.sp-way span { font-size: 1.4rem; }
.sp-way small { color: var(--muted); }
.sp-ask-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp-ask-btns small { font-weight: 400; opacity: .85; }
.sp-status { color: var(--ink-soft); font-size: .88rem; }
.sp-safe { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.sp-qa { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sp-qa-item { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sp-qa-q { padding: 10px 14px; background: #f7f9fb; }
.sp-qa-q p, .sp-qa-a p { margin: 4px 0 0; }
.sp-qa-a { padding: 10px 14px; }
.sp-who { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.is-coach .sp-qa-a .sp-who { color: var(--sp-gps); }
.sp-answer { margin-top: 4px; line-height: 1.55; }
.sp-tnote { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--sun-soft); }
.sp-qa-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sp-thinking { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.sp-spin { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #d9e1ec; border-top-color: var(--sp-gps); animation: sp-spin 1s linear infinite; }
@keyframes sp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sp-spin { animation: none; } }

/* play & watch */
.sp-games, .sp-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sp-game, .sp-video { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); padding: 12px; font: inherit; cursor: pointer; }
.sp-game:hover, .sp-video:hover { border-color: var(--violet); box-shadow: var(--shadow-sm); }
.sp-game small, .sp-video small { color: var(--muted); font-size: .8rem; }
.sp-game span { font-size: .75rem; color: var(--ink-soft); }
.sp-play { width: 34px; height: 34px; border-radius: 50%; background: #c0392b; color: #fff; display: grid; place-content: center; font-size: .9rem; }

/* dialogs */
.sp-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.sp-dialog { background: #fff; border-radius: var(--r-xl); padding: 24px; width: min(540px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.sp-dialog h2 { margin: 0 0 6px; font-family: var(--font-display); }
.sp-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.sp-danger { margin-left: auto; color: var(--coral); }
.sp-tour { padding-left: 20px; line-height: 1.6; }
.sp-goal-pick { display: flex; gap: 8px; margin: 12px 0; }
.sp-goal-pick button, .sp-seg button { border: 1px solid var(--line); background: #f5f7fa; font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.sp-goal-pick button.is-on, .sp-seg button.is-on { background: var(--violet); color: #fff; border-color: var(--violet); }
.sp-reflect { display: grid; gap: 8px; }
.sp-reflect-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sp-seg { display: flex; gap: 4px; }
.sp-seg button { padding: 6px 10px; font-size: .8rem; font-weight: 600; }

/* other pages */
.sp-dash { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #142848, #2b5fb0); color: #fff; border: 0; }
.sp-dash h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.sp-dash p { margin: 2px 0 0; color: rgba(255, 255, 255, .85); }
.sp-dash .sp-kicker { color: #f6d77a; }
.sp-dash > div { flex: 1; }
.sp-dash-ic { font-size: 2rem; }
.sp-join { align-items: flex-start; }
.sp-join .sp-join-list { margin: 10px 0 0; padding-left: 1.1em; color: rgba(255, 255, 255, .88); }
.sp-join .sp-join-list li { margin: 3px 0; }
.sp-join .sp-status:empty { display: none; }
.sp-join .sp-status { margin-top: 8px; color: #f6d77a; }
@media (max-width: 640px) { .sp-join { flex-wrap: wrap; } .sp-join .btn { width: 100%; } }
.sp-lesson-back { background: var(--sp-sky); border-color: #cfe0f6; }
.sp-lesson-back p { margin: 0 0 8px; font-size: .9rem; }
.sp-tcard .sp-t-actions { display: flex; gap: 8px; }
.sp-t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 6px 0; }
.sp-t-stats > div { background: #f6f8fb; border-radius: 10px; padding: 10px; text-align: center; }
.sp-t-stats b { display: block; font-size: 1.3rem; color: var(--violet); }
.sp-t-stats small { color: var(--muted); font-size: .76rem; }
.sp-t-coach { margin-top: 10px; }
.sp-t-coach ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.sp-t-coach li { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: .88rem; }
.sp-t-coach p { margin: 0 0 4px; }
.sp-t-note { display: flex; gap: 6px; margin-top: 6px; }
.sp-t-note input { flex: 1; }
.sp-flag { color: var(--coral); font-weight: 600; }

@media (max-width: 760px) {
  .sp-hero { grid-template-columns: 1fr; }
  .sp-hero h2 { font-size: 1.6rem; }
  .sp-day-head { grid-template-columns: auto 1fr auto; }
  .sp-day-head .sp-ring { grid-column: 1 / -1; justify-self: start; width: 56px; height: 56px; }
  .sp-strand summary { grid-template-columns: 1fr; }
  .sp-subs { margin-left: 0; }
  .sp-task-head { flex-wrap: wrap; }
  .sp-bar-row { grid-template-columns: 1fr 1fr 44px; }
}

/* SAT Topper tasks in Homework and the bell: a star badge */
.hw-kind-satprep { background: linear-gradient(135deg, #142848, #2b5fb0); }
.hw-kind-satprep::after { background: #f6d77a; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4L2.8 9.5l6.4-.8z'/%3E%3C/svg%3E"); }
/* Word Wizard: the SATs spelling words game */
.ww { max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.ww-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ww-progress { flex: 1; height: 10px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.ww-progress span { display: block; height: 100%; background: linear-gradient(90deg, #8a7bd1, #2b5fb0); transition: width .3s; }
.ww-stars, .ww-streak { font-weight: 800; font-size: .95rem; }
.ww-streak { color: #c0561e; }
.ww-stage { text-align: center; display: grid; gap: 12px; justify-items: center; }
.ww-kind { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b5bc4; }
.ww-ask { margin: 0; color: var(--ink-soft); }
.ww-word { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: .04em; color: var(--violet-deep, #142848); font-family: var(--font-display); }
.ww-word mark, .ww-bank mark, .ww-feedback mark, .ww-peek mark, .ww-gapword mark { background: #ffe58a; color: #8a2b00; border-radius: 6px; padding: 0 3px; }
.ww-class { margin: -6px 0 0; font-style: italic; color: var(--muted); }
.ww-audio { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ww-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; width: 100%; text-align: left; }
.ww-facts > div { background: #f6f8fb; border-radius: 12px; padding: 10px 12px; }
.ww-facts b { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ww-facts p { margin: 4px 0 0; }
.ww-tip { background: #fff7dc !important; }
.ww-hint { color: var(--muted); font-size: .88rem; margin: 0; }
.ww-clue { margin: 0; padding: 8px 14px; border-radius: 10px; background: var(--sp-sky); color: var(--violet); font-weight: 600; }
.ww-match { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; width: 100%; }
.ww-match > div { display: grid; gap: 8px; align-content: start; }
.ww-tile, .ww-mean { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; font: inherit; cursor: pointer; text-align: left; transition: transform .1s; }
.ww-tile { font-weight: 800; font-size: 1.1rem; text-align: center; }
.ww-tile.is-sel { border-color: #6b5bc4; background: #f1eefc; }
.ww-tile.is-ok, .ww-mean.is-ok { border-color: var(--sp-done); background: var(--go-soft); opacity: .7; cursor: default; }
.ww-mean.is-no, .ww-built.is-no { animation: ww-shake .4s; border-color: var(--sp-miss); }
@keyframes ww-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ww-built { min-height: 64px; min-width: 60%; display: flex; justify-content: center; align-items: center; gap: 4px; padding: 8px; border: 2px dashed #c9d2df; border-radius: 14px; font-size: 2rem; font-weight: 800; }
.ww-built span { min-width: .6em; }
.ww-built.is-ok { border-color: var(--sp-done); background: var(--go-soft); color: var(--go-deep); }
.ww-cursor { width: 3px; height: 1.2em; background: #6b5bc4; animation: ww-blink 1s steps(2) infinite; }
@keyframes ww-blink { 50% { opacity: 0; } }
.ww-letters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ww-letter { width: 52px; height: 56px; border-radius: 12px; border: 0; font: inherit; font-size: 1.6rem; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(160deg, #8a7bd1, #4b3ba3); box-shadow: 0 4px 0 #33287a; }
.ww-letter:active { transform: translateY(3px); box-shadow: 0 1px 0 #33287a; }
.ww-letter:disabled { opacity: .25; cursor: default; box-shadow: none; }
.ww-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ww-peek { font-style: normal; }
.ww-gapword { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: .04em; }
.ww-gapin { font: inherit; font-weight: 800; text-align: center; border: 0; border-bottom: 4px solid #6b5bc4; background: #f1eefc; color: #4b3ba3; border-radius: 8px 8px 0 0; margin: 0 2px; padding: 0 4px; }
.ww-sentence { font-size: 1.15rem; line-height: 1.6; margin: 0; max-width: 600px; }
.ww-blank { display: inline-block; color: #b3bccb; letter-spacing: -.05em; }
.ww-answer { font: inherit; font-size: 1.6rem; font-weight: 700; text-align: center; padding: 10px 14px; border: 2px solid #c9d2df; border-radius: 12px; width: min(360px, 90%); }
.ww-answer:focus { outline: none; border-color: #6b5bc4; box-shadow: 0 0 0 4px #e6e1fb; }
.ww-feedback { min-height: 1.4em; margin: 0; max-width: 560px; }
.ww-feedback.is-ok { color: var(--go-deep); font-weight: 700; }
.ww-feedback.is-no { color: #8a2b2b; }
.ww-end { text-align: center; }
.ww-end-stars { font-size: 3rem; letter-spacing: .1em; color: #dfe4eb; }
.ww-end-stars .is-on { color: #f6b21b; text-shadow: 0 2px 0 #c08a1e; }
.ww-end h2 { margin: 4px 0; font-family: var(--font-display); }
.ww-end-score { color: var(--ink-soft); margin: 0 0 10px; }
.ww-end-list { list-style: none; padding: 0; margin: 0 auto 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 600px; }
.ww-end-list li { padding: 6px 12px; border-radius: 99px; background: var(--go-soft); display: flex; gap: 6px; align-items: baseline; }
.ww-end-list li.is-no { background: var(--coral-soft); }
.ww-end-list small { color: var(--muted); }
.ww-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.ww-count { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 14px; font: inherit; cursor: pointer; display: grid; text-align: center; min-width: 84px; }
.ww-count b { font-size: 1.3rem; }
.ww-count span { font-size: .78rem; color: var(--muted); }
.ww-count.is-on { border-color: #6b5bc4; background: #f1eefc; }
.ww-bank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.ww-bank li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-left: 5px solid #cfd6e0; border-radius: 10px; padding: 8px 10px; }
.ww-bank li.ww-l-secure { border-left-color: var(--sp-done); } .ww-bank li.ww-l-learning { border-left-color: var(--sp-part); } .ww-bank li.ww-l-tricky { border-left-color: var(--sp-miss); }
.ww-bank-w { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
.ww-bank-w strong { display: block; font-size: 1.05rem; }
.ww-bank-w small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ww-bank-meta { font-size: .72rem; color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ww-mean.is-no, .ww-built.is-no, .ww-cursor { animation: none; } }
@media (max-width: 600px) { .ww-match { grid-template-columns: 1fr; } .ww-letter { width: 44px; height: 48px; font-size: 1.35rem; } }