.course-shell {
  --course-bg:#0d2431;
  --course-panel:#1d3949;
  --course-panel-alt:#163645;
  --course-stroke:#355d71;
  --course-mint:#7be8d5;
  --course-ink:#f4fafc;
  --course-muted:#b0cad5;
  max-width:1104px;
  margin:0 auto 2rem;
  padding:clamp(16px,3vw,32px);
  border:1px solid #2a4d5e;
  border-radius:26px;
  color:var(--course-ink);
  background:var(--course-bg);
  box-shadow:0 12px 45px #06141c80;
}
.course-shell h1,.course-shell h2,.course-shell h3,.course-shell p {margin:0;}
.course-shell h1 {font-size:clamp(2rem,4.2vw,3rem);line-height:1.04;letter-spacing:-.04em;}
.course-shell h2 {font-size:clamp(1.35rem,2.5vw,1.9rem);line-height:1.16;letter-spacing:-.018em;}
.course-shell h3 {font-size:clamp(1.18rem,2.1vw,1.55rem);line-height:1.25;}
.course-shell h1,.course-shell [data-course-focus] {scroll-margin-top:.75rem;}
.course-shell h1:focus-visible {outline:none;}
.course-shell h1 + p {margin-top:12px;}
.course-shell p {line-height:1.5;}
.course-shell h2 + p {margin-top:10px;}
.course-shell h2 {margin-top:20px;}
.course-shell :is(section,.course-sample,.course-tutor,.course-score) > h2:first-child {margin-top:0;}
.course-top {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;}
.course-back {background:transparent!important;color:var(--course-muted)!important;}
.course-level {display:inline-flex;align-items:center;min-height:37px;padding:4px 13px;border-radius:20px;background:#215253;color:#b1f1e5;font-size:.95rem;font-weight:700;white-space:nowrap;}
.course-muted,.course-note,.course-shell small {color:var(--course-muted);}
.course-note {font-size:.92rem;margin-top:22px!important;}
.course-note a {color:var(--course-mint);white-space:normal;}
.course-kicker {color:#b0ede2;font-size:.82rem;font-weight:760;text-transform:uppercase;letter-spacing:.075em;}
.course-accent,.course-meter strong {color:var(--course-mint)!important;}
.course-meter {display:flex;align-items:center;gap:16px;margin:12px 0 16px;}
.course-meter strong {white-space:nowrap;}
.course-meter progress {display:block;flex:1;min-width:0;height:12px;appearance:none;border:0;border-radius:999px;background:#2c4a59;overflow:hidden;}
.course-meter progress::-webkit-progress-bar {background:#2c4a59;}
.course-meter progress::-webkit-progress-value {background:var(--course-mint);border-radius:999px;}
.course-meter progress::-moz-progress-bar {background:var(--course-mint);border-radius:999px;}
.course-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.course-btn {
  display:inline-flex;align-items:center;justify-content:center;gap:.45em;
  min-height:48px;min-width:0;padding:10px 15px;border:1px solid var(--course-stroke);border-radius:13px;
  background:#244655;color:var(--course-ink);font:inherit;font-weight:700;line-height:1.25;cursor:pointer;overflow-wrap:anywhere;
}
.course-btn:hover:not(:disabled):not([aria-disabled="true"]) {border-color:#7be8d5;background:#2b5765;}
.course-shell :is(button,input,summary,a):focus-visible {outline:3px solid #92ffeb;outline-offset:3px;}
.course-btn:disabled,.course-btn[aria-disabled=true] {cursor:default;}
.course-primary,.course-primary:hover:not(:disabled) {background:#7be8d5!important;color:#08342f!important;border-color:#94f4e3;}
.course-btn[aria-pressed=true],.course-good {border-color:#80ecd8;background:#215957!important;color:#e3fffa;}
.course-try {border-color:#dea968;background:#503728;}
.course-tile {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;min-height:102px;padding:12px 18px;border:1px solid #294f65;border-radius:18px;background:var(--course-panel);text-align:left;}
.course-tile strong {font-size:clamp(1rem,2.1vw,1.24rem);line-height:1.22;}
.course-tile small {font-size:.95rem;font-weight:550;}
.course-shell svg {width:23px;height:23px;flex-shrink:0;}
.course-tile svg {width:25px;height:25px;}
.course-tone-mint svg {color:#7be8d5;}
.course-tone-violet svg {color:#ceacff;}
.course-tone-gold svg {color:#ffcb78;}
.course-tone-blue svg {color:#8accff;}
.course-tone-green svg {color:#a7e4a0;}
.course-tone-peach svg {color:#ffb48e;}
.course-spotlight {padding:clamp(16px,2.6vw,24px);margin-top:18px;border:1px solid #42737a;border-radius:19px;background:#1e474f;}
.course-spotlight h2 {margin:6px 0!important;}
.course-spotlight .course-kicker {margin-bottom:5px;}
.course-controls,.course-tools,.course-grades {display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:16px;}
.course-subjects {margin-top:15px;}
.course-unavailable {border-color:#2a4856;background:#17303e;}
.course-path {grid-template-columns:repeat(4,minmax(0,1fr));margin-top:12px;}
.course-topic {min-height:92px;display:grid;place-items:center;align-content:center;gap:7px;background:#1d354a;text-align:center;padding:8px;}
.course-topic-icon {display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#34546a;color:#c5e7f2;}
.course-mastered {background:#255b57;}
.course-mastered .course-topic-icon,.course-ready .course-topic-icon {background:#7be8d5;color:#134745;}
.course-overview section + section {margin-top:24px;padding-top:20px;border-top:1px solid #345365;}
.course-question {padding:clamp(14px,2.6vw,24px);margin-top:14px;border:1px solid #2d5264;border-radius:19px;background:var(--course-panel-alt);}
.course-question h3 {margin-bottom:12px;}
.course-sample {text-align:center;}
.course-sample .course-options {max-width:660px;margin-inline:auto;}
.course-sample .course-options .course-btn {font-size:1.55rem;}
.course-question-top {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.course-test-list {grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));margin-top:12px;}
.course-test-list .course-btn {flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;}
.course-test-list small {font-size:.82rem;font-weight:600;}
.course-question h2.course-task-title {margin:12px 0;}
.course-feedback {min-height:1.5em;margin-top:10px;}
.course-feedback p {margin:0 0 7px;}
.course-hint {margin-top:14px!important;padding:10px 12px;background:#204757;border-radius:9px;color:#dcf4fa;}
.course-options {display:flex;align-items:stretch;gap:10px;flex-wrap:wrap;margin-top:14px;}
.course-options .course-btn {flex:1 1 88px;font-size:clamp(1rem,2.25vw,1.25rem);}
.course-visual {display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:12px 0;}
.course-object-visual b {font-size:1.5rem;}
.course-objects {display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;}
.course-objects img {width:clamp(27px,5vw,50px);height:auto;object-fit:contain;}
.course-objects>span {padding:7px 12px;border:1px dashed #81aebf;border-radius:8px;}
.course-vertical {flex-direction:column;}
.course-shape {display:inline-block;width:42px;height:42px;background:#78cfff;transform:rotate(var(--course-turn));}
.course-shape.shape-circle {border-radius:50%;}
.course-shape.shape-triangle {clip-path:polygon(50% 0,100% 100%,0 100%);}
.course-shape.shape-rectangle {width:64px;}
.course-shape.shape-small {width:28px;height:28px;}
.course-shape.shape-rectangle.shape-small {width:46px;}
.course-shape.shape-red {background:#ff967e;}
.course-shape.shape-green {background:#87e392;}
.course-number-line span {min-width:34px;padding:7px 8px;border-block-end:3px solid #7be8d5;border-radius:4px;text-align:center;}
.course-tutor {display:grid;grid-template-columns:minmax(78px,150px) minmax(0,1fr);align-items:center;gap:clamp(12px,3vw,24px);margin:16px 0;padding:16px;border:1px solid #346171;border-radius:18px;background:#193d4a;}
.course-tutor > img,.course-tutor-side > img {display:block;width:100%;height:auto;}
.course-tutor .course-controls {margin-top:10px;}
.course-theory {margin:8px 0 12px!important;font-size:1.06rem;}
.course-tutor .course-visual {justify-content:flex-start;}
.course-tutor-compact {
  grid-template-columns:clamp(108px,12vw,126px) minmax(0,1fr);
  align-items:start;gap:clamp(10px,2vw,20px);
}
.course-tutor-side {display:grid;justify-items:center;gap:6px;}
.course-tutor-side > img {max-width:110px;}
.course-tutor-side .course-speech {width:100%;min-height:40px;padding:6px;gap:4px;white-space:nowrap;}
.course-tutor-copy > h2 {margin-top:0;margin-bottom:6px;}
.course-tutor-illustration {
  display:block;float:right;width:clamp(34px,6vw,56px);height:auto;margin:0 0 .4rem .65rem;
}
.course-steps {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;list-style:none;padding:0;margin:16px 0;}
.course-steps li {text-align:center;padding:8px 2px;border-radius:8px;background:#1b3b4a;color:#b8d3df;font-size:clamp(.65rem,1.7vw,.97rem);overflow-wrap:anywhere;}
.course-steps li[aria-current=step] {background:#7be8d5;color:#08342f;font-weight:750;}
.course-steps li.course-past {background:#215957;color:#d9fdf5;}
.course-speech {min-height:38px;font-size:.86rem;}
.course-speech svg {width:18px;height:18px;}
.course-week-browser {display:grid;grid-template-columns:minmax(155px,28%) minmax(0,1fr);align-items:start;gap:clamp(14px,2vw,24px);margin-top:22px;}
.course-week-picker h2 {margin:0 0 8px;font-size:.92rem;font-weight:720;letter-spacing:.025em;text-transform:uppercase;color:var(--course-muted);}
.course-week-picker select {width:100%;min-height:42px;padding:8px 10px;border:1px solid var(--course-stroke);border-radius:11px;color:var(--course-ink);background:#193648;color-scheme:dark;font:inherit;}
.course-week-options {display:grid;gap:8px;margin-top:10px;}
.course-week-choice.course-btn {display:grid;justify-items:start;justify-content:stretch;gap:5px;padding:12px;text-align:left;background:#193343;}
.course-week-choice strong {font-size:1.02rem;}
.course-week-choice[aria-pressed=true] strong {color:#b6f6e8;}
.course-week-choice > span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:.87rem;font-weight:550;color:var(--course-muted);}
.course-week-choice > small {font-size:.84rem;font-weight:620;}
.course-week-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.course-week-head h2 {margin:0;font-size:clamp(1.35rem,3vw,2rem);}
.course-week-head h2 + p {margin-top:3px;font-size:.88rem;}
.course-week-arrows {display:flex;gap:6px;flex-shrink:0;}
.course-week-arrows .course-btn {width:42px;min-height:42px;padding:6px;}
.course-week-prev svg {transform:rotate(180deg);}
.course-week-lessons {gap:10px;}
.course-week-lesson {position:relative;display:grid;grid-template-rows:auto 1fr;min-width:0;border:1px solid #3b586e;border-radius:17px;background:#233b52;}
.course-week-lesson:nth-child(4n+2) {border-color:#3a636a;background:#21464c;}
.course-week-lesson:nth-child(4n+3) {border-color:#505b81;background:#303858;}
.course-week-lesson:nth-child(4n+4) {background:#263b50;}
.course-week-lesson:hover {border-color:#7be8d5;}
.course-week-art {display:grid;place-items:center;min-height:98px;padding:10px 8px 0;}
.course-week-art > img {width:72px;height:72px;object-fit:contain;}
.course-week-art .course-visual {max-width:100%;gap:3px;margin:0;}
.course-week-art .course-number-line span {min-width:0;padding:3px clamp(2px,.55vw,8px);line-height:1.25;font-size:clamp(.65rem,1.3vw,1.1rem);}
.course-week-art .course-objects {flex-wrap:wrap;}
.course-week-art .course-objects img {width:clamp(22px,3.8vw,42px);}
.course-week-art .course-shape {width:25px;height:25px;}
.course-week-art .shape-rectangle {width:38px;}
.course-week-art .shape-small {width:18px;height:18px;}
.course-week-lesson .course-week-open.course-btn {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px;border:0;border-radius:inherit;background:transparent;padding:10px 13px 12px;text-align:left;}
.course-week-open::after {position:absolute;inset:0;border-radius:inherit;content:"";}
.course-week-open:focus-visible {outline:none!important;}
.course-week-open:focus-visible::after {outline:3px solid #92ffeb;outline-offset:3px;}
.course-week-open > small,.course-week-meta {font-size:.84rem;font-weight:550;}
.course-week-open > strong {font-size:1rem;}
.course-week-meta {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:5px;color:var(--course-muted);}
.course-week-play {display:grid;place-items:center;width:25px;height:25px;flex:none;border-radius:50%;background:#96e8d8;color:#153a42;}
.course-week-play svg {width:16px;height:16px;}
@media (max-width:650px) {
  .course-week-browser {grid-template-columns:minmax(0,1fr);gap:14px;}
  .course-week-options {display:none;}
  .course-week-art {min-height:83px;}
  .course-week-art > img {width:60px;height:60px;}
  .course-week-lesson .course-week-open.course-btn {padding:8px 10px 10px;}
}
@media (max-width:365px) {
  .course-week-lessons {grid-template-columns:minmax(0,1fr);}
}
.course-week {border-radius:13px;border:1px solid var(--course-stroke);background:var(--course-panel);}
.course-week summary {padding:13px 15px;cursor:pointer;font-weight:750;}
.course-week summary small {float:right;}
.course-week > div {display:grid;gap:5px;padding:0 9px 9px;}
.course-results small {display:block;font-size:.85rem;margin-top:4px;}
.course-stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:15px 0;}
.course-stats div {display:grid;gap:4px;padding:14px;border-radius:13px;background:var(--course-panel);}
.course-stats strong,.course-score {font-size:1.6rem;color:var(--course-mint);font-weight:770;}
.course-results {list-style:none;display:grid;gap:8px;padding:0;}
.course-results li {display:flex;justify-content:space-between;align-items:center;gap:6px;padding:10px;border-radius:10px;background:var(--course-panel);}
.course-game {background:#1b474f;}
.course-game .course-options .course-btn {border-radius:999px;min-height:58px;background:#275e68;}
.course-drop {border:1px dashed #7eb3b7;border-radius:12px;padding:12px;text-align:center;color:#d4edea;}
.course-entry {display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:15px;}
.course-entry label {display:grid;gap:4px;max-width:140px;}
.course-entry input {width:100%;min-height:48px;border:1px solid var(--course-stroke);border-radius:10px;background:#102e3e;color:var(--course-ink);padding:8px;font:inherit;}
.course-grid-task {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;}
.course-instructions {line-height:1.8;}
.course-cells {display:grid;grid-template-columns:repeat(5,minmax(34px,48px));gap:3px;max-width:100%;}
.course-cells :is(button,span) {display:grid;place-items:center;padding:0;min-height:42px;border:1px solid var(--course-stroke);border-radius:7px;background:#254753;}
.course-table-wrap {overflow-x:auto;margin:10px auto;max-width:400px;}
.course-table {width:100%;border-collapse:collapse;text-align:center;}
.course-table :is(td,th) {border:1px solid var(--course-stroke);padding:5px 8px;}
.course-rulers {margin:14px auto;max-width:430px;}
.course-ruler-track {position:relative;margin:15px 8px 0;}
.course-ruler-strip {display:block;height:8px;width:var(--course-length);margin-left:var(--course-start);border-radius:5px;background:#7be8d5;}
.course-ruler-labels {display:grid;grid-template-columns:repeat(11,1fr);padding-block:3px;background:#315160;border-radius:6px;}
.course-ruler-labels span {text-align:center;border-left:1px solid var(--course-stroke);font-size:.84rem;}
@media (max-width:600px) {
  .course-shell {border-radius:19px;}
  .course-top {margin-bottom:13px;}
  .course-tile {padding:12px;min-height:100px;border-radius:13px;}
  .course-path {grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
  .course-topic {min-height:78px;font-size:.86rem;}
  .course-topic-icon {width:34px;height:34px;}
  .course-tutor {grid-template-columns:70px minmax(0,1fr);padding:11px;}
  .course-tutor-compact {display:flow-root;}
  .course-tutor-compact .course-tutor-side {float:left;width:88px;margin:0 10px 6px 0;}
  .course-tutor-side .course-speech {min-height:42px;font-size:.78rem;}
  .course-tutor-side .course-speech svg {display:none;}
  .course-tutor h2 {font-size:1.22rem;}
  .course-tutor .course-objects img {width:25px;}
  .course-options .course-btn {flex:1 1 74px;}
  .course-grid-task {justify-content:flex-start;}
  .course-grid.course-examples {grid-template-columns:1fr;}
  .course-grid-task {gap:4px;}
  .course-note a {display:inline;}
}
@media (prefers-reduced-motion:reduce) {.course-shell * {scroll-behavior:auto!important;}}

/* Russian literacy tools share the course theme and rhythm. */
.ru-alphabet {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(45px,1fr));
  gap:8px;
  margin:16px 0;
}
.ru-alphabet .course-btn {padding:8px;font-size:1.16rem;}
.ru-callout {margin-top:16px;}
.ru-symbols {text-align:center;letter-spacing:.035em;font-weight:800;font-size:clamp(1.35rem,4vw,2.4rem);padding:10px 0;overflow-wrap:anywhere;}
.ru-picture img {width:min(100%,100px);height:auto;object-fit:contain;}
.ru-audio-options,.ru-pieces {align-items:stretch;}
.ru-audio-option {display:grid;align-content:stretch;gap:6px;min-width:80px;flex:1 1 80px;}
.ru-audio-option .course-speech {min-height:44px;font-size:.84rem;padding:5px;}
.ru-audio-option .course-speech svg {width:15px;height:15px;}
.ru-dictionary li {align-items:start;}
.ru-dictionary li strong {font-size:1.15rem;}
.ru-entry label {max-width:100%;flex:1 1 200px;}
.ru-entry input {font-size:1.15rem;}
.ru-builder {display:grid;gap:8px;}
.ru-built {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  padding:10px;
  min-height:58px;
  border:1px dashed #7eb3b7;
  border-radius:12px;
}
.ru-built span {min-width:34px;text-align:center;padding:5px 7px;background:#224451;border-radius:8px;overflow-wrap:anywhere;}
.ru-vowel {background:#9e444d!important;color:#fff4f4!important;}
.ru-hard {background:#275d91!important;color:#f3f8ff!important;}
.ru-soft {background:#28734e!important;color:#f1fff8!important;}
.course-shell .ru-sheet-pad,.course-shell .ru-exercise-guide {
  display:block;
  width:100%;
  height:clamp(164px,34vw,255px);
  margin-top:12px;
  border-radius:14px;
  background:#102d3a;
  border:1px solid #435f71;
}
.ru-sheet-pad {cursor:crosshair;touch-action:none;user-select:none;}
.course-shell .ru-exercise-guide {width:min(100%,300px);height:clamp(100px,25vw,150px);margin:12px auto;}
.ru-pad-rules {fill:none;stroke:#567486;stroke-width:.7;opacity:.8;}
.ru-guide-path,.ru-hand-ink {fill:none;stroke:#b8e3e1;stroke-width:3.3;stroke-linecap:round;stroke-linejoin:round;}
.ru-guide-path.ru-dashed {stroke:#76b3b0;stroke-dasharray:1.4 2.8;}
.ru-hand-ink {stroke:#e9ffff;stroke-width:3;}
.ru-start-point {fill:#81efda;}
.ru-start-label {fill:#a5f2e4;font-size:8px;font-weight:750;}
.ru-draw-animate {stroke:#7be8d5!important;stroke-dasharray:100!important;stroke-dashoffset:100;animation:ru-draw .74s linear var(--ru-ink-delay) forwards;}
@keyframes ru-draw {to {stroke-dashoffset:0;}}
@media (prefers-reduced-motion:reduce) {.ru-draw-animate {animation:none;stroke-dashoffset:0;}}
.ru-letter-picker {padding:10px 12px;border:1px solid var(--course-stroke);border-radius:11px;margin:14px 0 0;background:#173645;}
.ru-letter-picker summary {cursor:pointer;font-weight:700;}
.ru-letter-picker .ru-alphabet {margin-bottom:0;}
.ru-trace-screen .course-muted {margin-top:12px;}
.ru-print-sheet {display:none;}
@media (max-width:600px) {
  .ru-alphabet {grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:5px;}
  .ru-alphabet .course-btn {font-size:1.04rem;min-height:43px;padding:4px;}
  .ru-audio-option {min-width:76px;flex-basis:76px;}
  .ru-audio-option .course-btn {font-size:.84rem;min-height:44px;}
}
@media print {
  body:has(.ru-print-sheet) {background:#fff!important;color:#111!important;}
  body:has(.ru-print-sheet) :is(.sidebar,.topbar,.bottom-nav,.app-wallpaper,.course-top,.ru-alphabet,.ru-trace-screen,.ru-trace-controls,.skip) {display:none!important;}
  body:has(.ru-print-sheet) .shell {display:block!important;background:#fff!important;}
  body:has(.ru-print-sheet) .course-shell {max-width:none;padding:0;border:0;background:#fff!important;box-shadow:none;color:#111!important;}
  body:has(.ru-print-sheet) .course-shell > :not(.ru-print-sheet) {display:none!important;}
  .ru-print-sheet {display:block;}
  .ru-print-sheet .ru-exercise-guide {background:#fff;border:0;max-height:120px;}
  .ru-print-sheet .ru-guide-path {stroke:#333;stroke-dasharray:2 3;}
  .ru-print-sheet :is(.ru-start-point,.ru-start-label) {fill:#333;}
  .ru-print-line {height:43px;border-top:1px solid #aaa;border-bottom:1px solid #aaa;margin:18px 0;}
}

/* Literary reading uses the same course shell and touch targets as the other subjects. */
.reading-main-tools { margin: 18px 0 24px; }
.reading-books { grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); margin: 16px 0; }
.reading-books .course-tile { min-height: 122px; align-content: start; text-align: left; }
.reading-books .course-tile img { width: 58px; height: 58px; object-fit: contain; }
.reading-title { display: flex; align-items: center; gap: 16px; }
.reading-title > img { width: clamp(52px,12vw,90px); height: auto; object-fit: contain; flex: none; }
.reading-title > div { min-width: 0; }
.reading-title h2,.reading-title h1,.reading-title p { margin: 0 0 .25em; }
.reading-reader { margin: 12px 0; padding: 14px; border-radius: 18px; background: #102a3a; color: #f2fbff; }
.reading-reader > p { margin: 0 0 .3em; font-size: var(--reading-size); line-height: var(--reading-spacing); }
.reading-reader > p[data-reading-status] { font-size: .98rem; }
.reading-reader p[data-reading-status]:empty { display: none; }
.reading-reader.reading-contrast { background: #080d13; color: #fff; }
.reading-reader .reading-speaking { background: #85eed9; color: #102c37; border-radius: 4px; }
.reading-context .reading-passage { margin: 0 10px 10px; }
.reading-passage .reading-settings { margin-top: 12px; }
.reading-settings .reading-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.reading-settings select,.reading-entry input,.reading-entry textarea {
  width: 100%; padding: 9px 10px; border-radius: 9px; border: 1px solid #47717e;
  background: #0e2534; color: #f5fcff; font: inherit;
}
.reading-entry textarea { resize: vertical; }
.reading-entry audio { display: block; max-width: 100%; margin: 10px 0; }
.reading-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.reading-fields label { display: grid; gap: 5px; }
.reading-questions { padding-inline-start: 1.35rem; }
.reading-questions li { margin-bottom: .35rem; }
.reading-alphabet { grid-template-columns: repeat(auto-fit,minmax(min(100px,100%),1fr)); }
.reading-alphabet strong { font-size: 1.4rem; }
.reading-alphabet small { display: block; color: var(--course-muted,#afc7d4); }
.reading-drawing { display: block; width: min(100%,440px); background: #edf9f7; border-radius: 12px; touch-action: none; margin-bottom: 10px; }
.reading-drawing polyline { stroke: #147d78; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) {
  .reading-entry .reading-fields { grid-template-columns: 1fr; }
  .reading-reader { padding: 10px; }
  .reading-filters { gap: 6px; }
}

.g2-hub { grid-template-columns: repeat(auto-fit,minmax(min(223px,100%),1fr)); }
.g2-hub-links,.g2-variants { margin: 14px 0; }
.course-catalog > .course-grades .course-btn {
  background: #443568; color: #f5efff; border-color: #77669f;
}
.course-catalog > .course-grades .course-btn[aria-pressed="false"]:hover {
  background: #564582; border-color: #ac9adc;
}
.course-catalog > .course-grades .course-btn[aria-pressed="true"] {
  background: #cbbaff !important; color: #241648; border-color: #e4d8ff;
}
.course-catalog > .course-controls { font-size: 85%; gap: 8.5px; }
.course-catalog > .course-controls .course-btn {
  min-height: 40.8px; padding: 8.5px 12.75px; border-radius: 11px;
}
.g2-subject-card,.g2-tool-grid .course-tile { background: linear-gradient(145deg,#173b50,#111e35); border-color: #467180; }
.g2-subject-card { display: grid; align-content: start; gap: .55rem; }
.g2-subject-card h2,.g2-subject-card p { margin: 0; }
.g2-subject-card progress { width: 100%; height: 9px; accent-color: #79ebd3; }
.g2-subject-card small { display: block; opacity: .8; }
.course-subjects > .g2-subject-card { display: flex; align-items: stretch; justify-content: flex-start; }
.g2-subject-card .g2-card-actions { margin-top: auto; padding-top: 16px; align-items: stretch; }
.g2-subject-card :is(.g2-card-topics,.g2-card-continue) { padding-inline: 12px; }
.g2-subject-card .g2-card-topics { background: #a0ecc1; color: #12392a; border-color: #b7f4d0; }
.g2-subject-card .g2-card-topics:hover:not(:disabled) { background: #b7f4d0; border-color: #d3ffe4; }
.g2-subject-card .g2-card-continue { background: #194d3b; color: #effff5; border-color: #55977e; }
.g2-subject-card .g2-card-continue:hover:not(:disabled) { background: #236449; border-color: #85d2b3; }
.g2-tool-grid { grid-template-columns: repeat(auto-fit,minmax(min(135px,100%),1fr)); gap: 10px; }
.g2-icon,.g2-subject-card img { object-fit: contain; margin-right: .25rem; }
.g2-diagram { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0; }
.g2-diagram span { padding: .35rem .65rem; border-radius: .65rem; background: #193e50; color: #dcfcf8; }
.g2-reading { margin: 12px 0; }
.g2-reading > p { line-height: 1.65; }
.g2-word > p { margin: .3rem 0 .65rem; }
.g2-word strong { overflow-wrap: anywhere; }
.g2-select { display: grid; gap: .25rem; margin: 12px 0; max-width: 100%; }
.g2-select select,.g2-family-controls select { padding: 8px; max-width: 100%; color: #effaff; background: #142a40; border: 1px solid #47717e; border-radius: 8px; }
.g2-dialogue { display: grid; gap: 9px; }
.g2-family-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.g2-family-controls label { display: grid; gap: 4px; }
.g2-family-controls input { width: 20px; height: 20px; }
.g2-map { position: relative; overflow: hidden; border-radius: 14px; margin: 14px 0; background: #132d54; }
.g2-map img { display: block; width: 100%; height: auto; }
.g2-map .g2-pin {
  position: absolute; transform: translate(-50%,-50%); top: var(--latitude); left: var(--longitude);
  display: grid; place-items: center; min-height: 25px; width: 25px; padding: 0;
  background: #132642; color: #fff; border: 1px solid #8cecdc; border-radius: 50%; font-size: .79rem;
}
.g2-map .g2-pin.current,.g2-map .g2-pin:focus { background: #83eed7; color: #0f2638; z-index: 1; }
.g2-orbits { display: grid; gap: 8px; }
.g2-planet { display: inline-block; vertical-align: middle; margin-right: .6rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,hsl(calc(42deg + 39deg * var(--planet)) 90% 82%),
    hsl(calc(42deg + 39deg * var(--planet)) 65% 47%) 65%,#142a40 100%); }
.g2-rewards { padding-left: 1.25rem; }
@media (max-width: 520px) {
  .g2-hub .g2-subject-card { padding: 13px; }
  .g2-map .g2-pin { min-height: 21px; width: 21px; font-size: .7rem; }
}

.g5-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,235px),1fr)); gap: 12px; }
.g5-cards .course-question { margin: 0; align-content: start; }
.g5-steps { display: grid; gap: 7px; margin-block: 12px; }
.g5-steps .course-btn { text-align: left; }
.g5-steps .course-btn[aria-pressed=true] { border-color: var(--course-accent); }
.g5-atlas::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: repeating-linear-gradient(to right,#a9d9f447 0 1px,transparent 1px 8.333%),repeating-linear-gradient(to bottom,#a9d9f447 0 1px,transparent 1px 16.666%); }
.g5-globe { display: block; width: min(100%,300px); height: auto; margin: 12px auto; filter: drop-shadow(0 6px 24px #4fc4df44); }
.g5-form { grid-template-columns: repeat(auto-fit,minmax(min(100%,110px),1fr)); align-items: end; gap: 10px; }
.g5-form label { display: grid; align-content: start; gap: 6px; min-width: 0; }
.g5-form :is(input,select) { width: 100%; min-width: 0; color: var(--course-text,#f0f9ff); background: #19394b; border: 1px solid #47788c; border-radius: 8px; padding: 8px; min-height: 44px; }
.g5-fraction { display: flex; padding: 3px; border: 1px solid #47788c; border-radius: 8px; margin: 8px 0; max-width: 390px; gap: 3px; }
.g5-fraction span { flex: 1; background: #28485d; border-radius: 4px; height: 22px; }
.g5-fraction .filled { background: #79e7d0; }
.g5-lab-columns { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 14px; align-items: center; }
.g5-cell { display: grid; place-items: center; position: relative; overflow: hidden; width: min(100%,260px); height: 175px; margin: 10px auto; isolation: isolate; background: #80aeae; }
.g5-cell.plant { border: 8px solid #4a976c; border-radius: 30%; }
.g5-cell.animal { border-radius: 49% 45% 51% 42%; background: #cf91be; }
.g5-membrane { position: absolute; inset: 3%; border: 3px solid #366b64; border-radius: inherit; }
.animal .g5-membrane { border-color: #9c5e95; }
.g5-nucleus,.g5-vacuole,.g5-chloroplast { position: absolute; border-radius: 50%; }
.g5-nucleus { height: 42px; width: 44px; left: 19%; top: 28%; background: #6f4a8d; border: 4px solid #ac78bf; box-shadow: inset 0 0 0 7px #80509c; z-index: 1; }
.g5-vacuole { inset: 15% 11% 18% 33%; background: #70c4d2; border: 3px solid #4598b3; }
.g5-chloroplast { width: 18px; height: 11px; top: 25%; right: 17%; background: #42865c; box-shadow: 23px 22px #42865c,-28px 77px #42865c,-76px 89px #42865c; }
.g5-scope { display: grid; place-items: center; overflow: hidden; margin: 10px auto; width: min(100%,270px); aspect-ratio: 1; border-radius: 50%; background: #e8dfc7; border: 8px solid #284353; box-shadow: inset 0 0 25px #353549; }
.g5-prep { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 1fr; gap: 2px; width: 115%; height: 110%; transform: rotate(12deg) scale(var(--zoom)); filter: blur(var(--blur)); }
.g5-prep i { display: block; border: 2px solid #92738f; border-radius: 7px 10px 8px 5px; background: radial-gradient(ellipse at 42% 60%,#9f6099 0 12%,#e0b0c1 14% 48%,#ecc6d0); }
.g5-prep.leaf i { border-color: #658863; background: radial-gradient(at 15% 74%,#498252 5%,transparent 12%),radial-gradient(at 64% 30%,#387a55 6%,transparent 13%),radial-gradient(at 79% 63%,#4a8d60 4%,transparent 12%),#bad2a4; }
.g5-prep.soft i { border: 1px solid #b580a4; border-radius: 50%; background: radial-gradient(at 35% 50%,#854783 0 18%,#dec0d5 20% 62%,#eedce4); }
.g5-solid-stage { --depth: 88px; --height: 88px; display: grid; min-height: 190px; place-content: center; perspective: 470px; }
.g5-solid { --width: 88px; position: relative; width: var(--width); height: var(--height); transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(calc(var(--turn) + 35deg)); transition: transform .24s; }
.g5-solid.cuboid { --width: 148px; }
.g5-solid i { position: absolute; display: grid; place-items: center; inset: 0; border: 2px solid #82edd8; font: bold 1.1rem system-ui; color: #eafbfc; background: #265777; backface-visibility: hidden; }
.g5-solid .front { transform: translateZ(calc(var(--depth)/2)); }
.g5-solid .back { transform: rotateY(180deg) translateZ(calc(var(--depth)/2)); }
.g5-solid .left,.g5-solid .right { width: var(--depth); left: calc((var(--width) - var(--depth))/2); background: #387195; }
.g5-solid .left { transform: rotateY(-90deg) translateZ(calc(var(--width)/2)); }
.g5-solid .right { transform: rotateY(90deg) translateZ(calc(var(--width)/2)); }
.g5-solid .top,.g5-solid .bottom { height: var(--depth); top: calc((var(--height) - var(--depth))/2); background: #487ca0; }
.g5-solid .top { transform: rotateX(90deg) translateZ(calc(var(--height)/2)); }
.g5-solid .bottom { transform: rotateX(-90deg) translateZ(calc(var(--height)/2)); }
@media (prefers-reduced-motion: reduce) { .g5-solid { transition: none; } }

.g6-coordinate { display:grid; grid-template-columns:repeat(11,1fr); margin:14px auto; width:min(100%,420px); aspect-ratio:1; border:1px solid #47788c; background:#153344; }
.course-shell .g6-dot { display:grid; place-items:center; min-width:0; min-height:0; padding:0; border:1px solid #45708a4d; border-radius:0; font-size:clamp(.65rem,2.4vw,1.1rem); color:#a0bed0; background:transparent; }
.course-shell .g6-dot.axis { background:#294f69; color:#bcdced; }
.course-shell .g6-dot:is(:hover,.selected) { background:#83ebd4; color:#102734; }
.g6-elevator { display:grid; place-items:center; margin:14px auto; width:140px; min-height:96px; border:1px solid #50d5c7; border-radius:14px; background:linear-gradient(145deg,#244765,#10243a); }
.g6-elevator strong { color:#b4ffed; font-size:2rem; }
.g6-writing { display:grid; gap:12px; }
.g6-writing label { display:grid; gap:8px; }
.g6-writing textarea { width:100%; min-width:0; background:#173545; color:#e4f7ff; border:1px solid #47788c; border-radius:10px; padding:10px; }
.g6-table { overflow-x:auto; }
.g6-table table { width:100%; border-collapse:collapse; text-align:left; }
.g6-table caption { text-align:left; padding:10px 0; color:#aacbd8; }
.g6-table :is(td,th) { border-bottom:1px solid #416b7a; padding:7px; white-space:nowrap; }
.g6-weather-cards,.g6-wind { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,132px),1fr)); gap:8px; margin-block:12px; }
.g6-weather-cards div,.g6-wind div { display:grid; gap:5px; border:1px solid #365e71; border-radius:10px; background:#143243; padding:10px; }
.g6-weather-cards span { font-size:.89rem; color:#b5d4de; }
.g6-weather-cards meter,.g6-wind meter { width:100%; }
.g6-plant-stage { display:grid; place-items:center; height:318px; margin:12px auto; border-radius:16px; max-width:540px; perspective:620px; background:radial-gradient(ellipse at 50% 62%,#225750,#102638 76%); }
.g6-plant { width:220px; height:250px; transform-style:preserve-3d; transform:rotateY(var(--spin)); position:relative; transition:transform .28s; }
.course-shell .g6-plant .course-btn { position:absolute; border:0; min-height:0; padding:0; box-shadow:inset 0 0 0 2px #d5faff26; }
.course-shell .g6-plant .chosen { outline:3px solid #a4ffdf; outline-offset:3px; }
.g6-plant .g6-stem { left:103px; top:42px; width:14px; height:165px; border-radius:16px; background:linear-gradient(90deg,#204a28,#85dd6a,#397c48); }
.g6-plant .g6-root { left:75px; top:188px; width:72px; height:50px; border-radius:8% 8% 48% 62%; background:repeating-linear-gradient(71deg,#643f24 0 5px,#b18048 6px 9px,#5d492e 11px 15px); transform:translateZ(-4px); }
.g6-plant .g6-leaf { left:39px; top:93px; width:73px; height:31px; border-radius:90% 15% 75% 15%; background:linear-gradient(24deg,#247544,#81cd67); transform:translateZ(14px) rotate(26deg); }
.g6-plant .g6-bud { right:43px; top:77px; width:34px; height:30px; border-radius:50% 45% 30% 55%; background:#96cf65; transform:translateZ(-12px) rotate(-35deg); }
.g6-plant .g6-flower { left:75px; top:10px; width:71px; height:62px; border-radius:45%; background:radial-gradient(circle,#ffd26b 0 22%,#ea7c99 25% 63%,#a14384 85%); transform:translateZ(10px); }
.g6-plant .g6-fruit { right:47px; top:117px; width:36px; height:43px; border-radius:45% 50% 43% 30%; background:radial-gradient(circle at 30% 22%,#ffa573,#c64447 75%); transform:translateZ(8px); }
.g6-plant .g6-seed { left:43px; top:160px; width:36px; height:26px; border-radius:50%; background:radial-gradient(circle at 25% 21%,#ffe4a0,#a4794a 85%); transform:translateZ(26px); }
.g5-prep.g6-leaf i { border-color:#4c9367; background:radial-gradient(circle at 20% 30%,#348f45 2px,transparent 4px),radial-gradient(circle at 66% 63%,#308747 4px,transparent 6px),#b5daab; }
.g5-prep.g6-onion i { border:2px solid #986d91; background:radial-gradient(circle at 32% 67%,#9f6099 4px,transparent 7px),#e2b9cb; }
.g5-prep.g6-leaf-cut i { background:linear-gradient(#709f70 0 20%,#a1be78 23% 64%,#e0e9a1 65%); border-color:#668970; }
.g5-prep.g6-stem { gap:0; background:repeating-radial-gradient(circle at 46% 50%,#d1a26f 0 12px,#b68761 14px 18px); }
.g5-prep.g6-root i { height:47%; transform:rotate(22deg); border:2px solid #a1798b; background:#ddc39d; border-radius:55% 22% 55% 20%; }
.g5-prep.g6-pollen i { border:0; margin:15%; border-radius:50%; background:radial-gradient(circle,#cc9261 0 23%,#fdbf57 25% 55%,#c88a60 80%); }
@media (prefers-reduced-motion: reduce) { .g6-plant {transition:none;} }

/* Grade 7 laboratory workspaces */
.g7-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,21rem),1fr));align-items:start}
.g7-panel{margin-block:1rem;min-width:0}
.g7-panel h2{margin-block:0 .7rem}
.g7-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:.75rem;margin-block:1rem;align-items:end}
.g7-form label,.g7-color{display:grid;gap:.35rem;color:#c5e1e9;font-weight:600;min-width:0}
.g7-form input,.g7-form select,.g7-form textarea{width:100%;min-width:0;box-sizing:border-box;padding:.55rem .65rem;background:#10293b;color:#effaff;border:1px solid #617c8d;border-radius:.65rem;font:inherit;color-scheme:dark}
.g7-form textarea{min-height:6rem;resize:vertical}
.g7-form label:has(textarea){grid-column:1/-1}
.g7-form button{min-height:2.55rem}
.g7-result:empty{display:none}
.g7-table{overflow:auto}
.g7-table table{border-collapse:collapse;width:100%;margin-block:.65rem;font-size:.95rem;text-align:left}
.g7-table :is(th,td){padding:.55rem;border-bottom:1px solid #31586a;overflow-wrap:anywhere}
.g7-bars{height:8rem;background:#0e2434;display:flex;align-items:stretch;gap:.25rem;padding:.65rem;border-radius:.8rem;margin-block:.6rem;overflow:hidden}
.g7-bars>div{flex:1;min-width:0;display:grid;grid-template-rows:1fr auto;justify-items:center;align-items:end;color:#d0e7f2;font-size:.75rem}
.g7-bars i{display:block;width:75%;background:#75e9d8;border-radius:.3rem .3rem 0 0}
.g7-bars i.g7-negative{background:#ffcf79}
.g7-bars span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:.25rem}
.g7-plot{position:relative;overflow:hidden;aspect-ratio:1;max-width:34rem;margin:auto;background-color:#10293c;
  background-image:linear-gradient(90deg,transparent 49.8%,#50809c 49.8%,#50809c 50.2%,transparent 50.2%),linear-gradient(transparent 49.8%,#50809c 49.8%,#50809c 50.2%,transparent 50.2%),repeating-linear-gradient(90deg,#1d4156 0 1px,transparent 1px 5%),repeating-linear-gradient(#1d4156 0 1px,transparent 1px 5%);border-radius:.7rem}
.g7-line{display:block;position:absolute;border-top:2px solid #67e9d6;transform-origin:0 0}
.g7-circle{position:absolute;border:2px solid #ad9df6;border-radius:50%;transform:translate(-50%,-50%)}
.g7-point{position:absolute;transform:translate(-50%,-50%);background:#8ff2df;color:#092636;border-radius:50%;display:grid;place-items:center;width:1.35rem;height:1.35rem;font-size:.8rem;font-weight:800}
.g7-map{position:relative;border-radius:.7rem;overflow:hidden;background:#112c47}
.g7-map img{display:block;width:100%;height:auto}
.g7-pixels,.g7-coding-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;max-width:23rem;aspect-ratio:1;margin-block:.8rem;background:#426779;border:2px solid #426779}
.g7-pixel{padding:0;min-width:0;border:0;border-radius:0}
.g7-coding-grid{grid-template-columns:repeat(6,1fr)}
.g7-coding-grid span{display:grid;place-items:center;min-height:0;background:#163246}
.g7-coding-grid .g7-wall{background:#6b6d8b}
.g7-coding-grid .g7-trail{background:#2b7c77}
.g7-block-list{padding-inline-start:1.4rem}
.g7-block-list li{padding:.3rem;cursor:grab}
.g7-block-list .course-controls{display:inline-flex;margin-inline-start:.5rem}
.g7-code-output,.g7-doc{white-space:pre-wrap;overflow-wrap:anywhere;color:#d7e9f4;background:#121c31;padding:.75rem;border-radius:.65rem}
.g7-code-output:empty{display:none}
.g7-vector{aspect-ratio:1;max-width:18rem;display:grid;place-items:center;background:#12243a;border:1px solid #426779;border-radius:.75rem}
.g7-vector-circle{border-radius:50%}
.g7-scope{width:min(100%,20rem);aspect-ratio:1;position:relative;overflow:hidden;border:5px solid #6f98a9;border-radius:50%;background:#e8f7da;margin:1rem auto}
.g7-specimen{position:absolute;inset:10%;display:grid;grid-template-columns:repeat(4,1fr);gap:.2rem;align-content:center}
.g7-specimen i{display:block;aspect-ratio:1.4;border:.13rem solid #659a67;background:#b8d7a3;border-radius:.22rem}
.g7-specimen b{display:block;margin:20% auto;width:35%;height:43%;border-radius:50%;background:#376b47}
.g7-moss i:nth-child(odd){background:#e2f6d0}
.g7-fern i,.g7-yeast i{aspect-ratio:1;border-radius:50%;background:#d8bf9a;border-color:#a98361}
.g7-fungus i{background:transparent;border-radius:60% 0}
.g7-lichen{gap:0;grid-template-columns:repeat(6,1fr)}
.g7-lichen i:not(:nth-child(n+7):nth-child(-n+12)){background:#c9c4a4;border-color:#929270}
.g7-bacteria i{border-radius:60%;aspect-ratio:2;background:#a0d4c8;border-color:#6b99a1;transform:rotate(22deg)}
.g7-bacteria i:nth-child(odd){aspect-ratio:1}
