:root {
  --navy: #002e54;
  --navy-dark: #002e54;
  --ink: #1f2933;
  --secondary: #5b6770;
  --rule: #d9e2ec;
  --paper: #ffffff;
  --surface: #f8fafc;
  --wash: #dfecf6;
  --warm: #fff4f5;
  --warm-edge: #f16876;
  --ready: #dfecf6;
  --ready-edge: #018afd;
  --correct: #e7f6ec;
  --correct-edge: #2f7d4a;
  --correct-ink: #1f6339;
  --danger: #c00000;
  --danger-wash: #fff3f3;
  --gold: #f16876;
  --gold-wash: #fff4f5;
  --accent: #018afd;
  --selected: #dfecf6;
  --lavender: #d9d2e9;
  --shadow: 0 1px 2px rgba(31, 41, 51, 0.04);
  --max-reading: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #edf1f4;
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  color: var(--navy);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.brand {
  min-width: 260px;
  padding-right: 25px;
  border-right: 1px solid var(--rule);
}

.brand-kicker {
  margin: 0 0 3px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-name {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
}

.book-switcher,
.view-switcher,
.mode-switcher {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 3px;
  background: var(--wash);
  border: 1px solid var(--rule);
}

.book-switcher button,
.view-switcher button,
.mode-switcher button {
  height: 30px;
  padding: 0 14px;
  color: var(--secondary);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 700;
}

.book-switcher button[aria-pressed="true"],
.view-switcher button[aria-pressed="true"],
.mode-switcher button[aria-pressed="true"] {
  color: var(--navy);
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--accent), var(--shadow);
}

.mode-switcher button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
}

.progress-bar {
  width: 126px;
  height: 5px;
  overflow: hidden;
  background: var(--rule);
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--ready-edge);
}

.workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f4f6f8;
  border-right: 1px solid var(--rule);
}

.sidebar-head {
  padding: 25px 22px 18px;
  border-bottom: 1px solid var(--rule);
}

.edition {
  margin: 0 0 6px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-title {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.18;
  font-weight: 700;
}

.sections-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 22px 8px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sections-label span {
  color: var(--navy);
  white-space: nowrap;
}

.question-search {
  padding: 17px 22px 0;
}

.question-search label {
  display: block;
  margin-bottom: 7px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.question-search div {
  display: flex;
  gap: 5px;
}

.question-search input {
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #afbdc9;
  background: var(--paper);
}

.question-search button {
  height: 36px;
  padding: 0 11px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.search-status {
  min-height: 15px;
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 12px;
}

.sidebar-switcher {
  width: calc(100% - 44px);
  height: 40px;
  margin: 16px 22px 0;
}

.sidebar-switcher button {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  font-size: 12px;
}

.section-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 24px;
}

.section-button {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 11px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  text-align: left;
}

.section-button:hover {
  background: #edf2f6;
}

.section-button[aria-current="true"] {
  color: var(--navy);
  background: var(--paper);
  border-left-color: var(--accent);
  font-weight: 700;
}

.progress-check {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 17px;
  accent-color: var(--accent);
}

.progress-check:disabled {
  opacity: 1;
}

.practice-group {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.practice-group:last-child {
  border-bottom: 0;
}

.practice-group-heading {
  margin: 0 0 4px;
  padding: 7px 10px;
  background: var(--selected);
  border-left: 3px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
}

.practice-group-heading::marker,
.lesson-group-title::marker {
  color: var(--accent);
}

.accordion-summary-content {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc(100% - 18px);
  vertical-align: middle;
}

.accordion-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.accordion-count {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.accordion-items {
  padding-top: 2px;
}

.practice-group[open] > .practice-group-heading,
.lesson-group[open] > .lesson-group-title {
  border-left-color: var(--navy);
}

.practice-group-heading:focus-visible,
.lesson-group-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.section-row,
.lesson-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}

.section-row > .progress-check,
.lesson-row > .progress-check {
  margin-left: 2px;
}

.section-row .section-button {
  min-width: 0;
}

.section-code {
  display: block;
  margin-bottom: 3px;
  color: var(--secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-name {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.section-total {
  display: block;
  margin-top: 5px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 400;
}

.lesson-list {
  padding-top: 4px;
}

.lesson-group {
  margin-bottom: 8px;
}

.lesson-group-title {
  margin: 0 0 4px;
  padding: 7px 8px;
  color: var(--accent);
  background: var(--selected);
  border-left: 3px solid var(--accent);
  cursor: pointer;
}

.lesson-button {
  display: block;
  width: 100%;
  margin: 2px 0;
  padding: 9px 10px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.24;
  text-align: left;
}

.lesson-row[hidden],
.lesson-group[hidden] {
  display: none;
}

.lesson-button:hover {
  background: #edf2f6;
}

.lesson-button[aria-current="true"] {
  color: var(--navy);
  background: var(--paper);
  border-left-color: var(--accent);
  font-weight: 700;
}

.lesson-kind {
  display: block;
  margin-bottom: 3px;
  color: var(--secondary);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.test-count-label {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.reader {
  min-width: 0;
  overflow-y: auto;
  background: var(--paper);
}

.reader-inner {
  max-width: var(--max-reading);
  margin: 0 auto;
  padding: 38px 40px 58px;
}

.section-header {
  padding-bottom: 17px;
  border-bottom: 2px solid var(--navy);
}

.domain {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: 27px;
  line-height: 1.16;
  font-weight: 700;
}

.test-module-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 17px;
  border-bottom: 2px solid var(--navy);
}

.test-module-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: 27px;
  line-height: 1.16;
}

.test-timer {
  display: grid;
  gap: 3px;
  min-width: 120px;
  text-align: right;
}

.test-timer span {
  color: var(--secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.test-timer strong {
  color: var(--navy);
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
}

.test-overview {
  max-width: 920px;
}

.test-structure {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 26px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.test-structure div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 126px;
  padding: 18px 14px;
  border-right: 1px solid var(--rule);
}

.test-structure div:last-child {
  border-right: 0;
}

.test-structure strong {
  color: var(--navy);
  font-size: 29px;
}

.test-structure span {
  font-size: 13px;
  font-weight: 700;
}

.test-structure small {
  color: var(--secondary);
  font-size: 11px;
}

.test-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.test-start p {
  margin: 0;
  color: var(--secondary);
}

.primary-command {
  min-height: 42px;
  padding: 0 20px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  font-weight: 700;
}

.test-start > button:not(.primary-command) {
  min-height: 42px;
  padding: 0 18px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid #afbdc9;
  font-weight: 700;
}

.break-screen {
  max-width: 700px;
  padding-top: 100px;
  text-align: center;
}

.break-screen h1 {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 34px;
}

.break-timer {
  display: block;
  margin: 0 0 18px;
  color: var(--navy);
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 64px;
  line-height: 1;
}

.break-screen > p:not(.domain) {
  margin: 0 0 24px;
  color: var(--secondary);
}

.test-results {
  max-width: 820px;
}

.results-summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 26px 0 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.results-summary strong {
  color: var(--navy);
  font-size: 40px;
}

.results-summary span {
  color: var(--secondary);
  font-size: 16px;
  font-weight: 700;
}

.module-results {
  border-top: 1px solid var(--rule);
}

.module-results div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.module-results span {
  color: var(--secondary);
}

.module-results strong {
  color: var(--navy);
}

.review-question {
  padding-top: 24px;
}

.review-answer-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0 8px;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.review-answer-line div {
  display: grid;
  gap: 4px;
}

.review-answer-line span {
  color: var(--secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.review-answer-line strong {
  color: var(--navy);
}

.review-answer-line .correct-answer {
  padding: 10px 12px;
  background: var(--correct);
  border-left: 3px solid var(--correct-edge);
}

.review-answer-line .correct-answer strong {
  color: var(--correct-ink);
}

.item-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 19px 0 25px;
}

.set-toolbar {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 70px;
  margin-top: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.set-toolbar div {
  display: grid;
  gap: 3px;
}

.set-toolbar span {
  color: var(--secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.set-toolbar strong {
  color: var(--navy);
  font-size: 15px;
}

.check-all {
  min-width: 112px;
  height: 40px;
  margin-left: auto;
  padding: 0 16px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  font-weight: 700;
}

.check-all:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.set-result {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin: 20px 0 5px;
  padding: 18px 20px;
  background: var(--surface);
  border-left: 4px solid var(--navy);
}

.set-result.strong {
  background: var(--correct);
  border-left-color: var(--correct-edge);
}

.set-result.developing {
  background: var(--gold-wash);
  border-left-color: var(--gold);
}

.set-result.review {
  background: var(--danger-wash);
  border-left-color: var(--danger);
}

.score-ring {
  display: grid;
  place-content: center;
  width: 84px;
  height: 84px;
  border: 5px solid currentColor;
  border-radius: 50%;
  color: var(--navy);
  text-align: center;
}

.strong .score-ring {
  color: var(--correct-edge);
}

.developing .score-ring {
  color: var(--gold);
}

.review .score-ring {
  color: var(--danger);
}

.score-ring strong {
  font-size: 23px;
  line-height: 1;
}

.score-ring span {
  margin-top: 3px;
  color: var(--secondary);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.score-copy .score-label {
  margin: 0 0 3px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.score-copy h2 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 21px;
}

.score-copy p:last-child {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
}

.item-pill {
  width: 34px;
  height: 34px;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--rule);
  font-size: 13px;
  font-weight: 700;
}

.item-pill[aria-current="true"] {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.item-pill.answered:not([aria-current="true"]) {
  color: var(--ready-edge);
  border-color: var(--ready-edge);
  background: var(--ready);
}

.item-pill.correct:not([aria-current="true"]) {
  color: var(--correct-ink);
  background: var(--correct);
  border-color: var(--correct-edge);
}

.item-pill.incorrect:not([aria-current="true"]) {
  color: var(--danger);
  background: var(--danger-wash);
  border-color: #d49b96;
}

.question-meta {
  margin: 0 0 15px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.question-number {
  color: var(--navy);
}

.passage {
  margin: 0 0 20px;
  padding: 13px 16px;
  color: var(--ink);
  background: var(--surface);
  border-left: 3px solid var(--navy);
  font-size: 16px;
  line-height: 1.4;
}

.passage p {
  margin: 0 0 10px;
}

.passage p:last-child {
  margin-bottom: 0;
}

.stimulus-table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 15px;
}

.stimulus-table th {
  padding: 9px 11px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  font-weight: 700;
  text-align: left;
}

.stimulus-table td {
  padding: 9px 11px;
  border: 1px solid var(--rule);
}

.question-prompt {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.question-prompt p {
  margin: 0 0 10px;
}

.question-prompt p:last-child {
  margin-bottom: 0;
}

code {
  padding: 1px 3px;
  color: var(--navy-dark);
  background: #f0f4f7;
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-size: 0.94em;
}

.math-inline {
  display: inline;
  padding: 1px 3px;
  color: var(--navy-dark);
  background: #eef4f8;
  font-family: Calibri, Arial, Helvetica, sans-serif;
  font-size: 0.96em;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: normal;
}

.math-inline sup,
.lesson-content sup,
.explanation sup,
.question-prompt sup,
.choice sup {
  position: relative;
  top: -0.15em;
  font-size: 0.7em;
  line-height: 0;
}

.math-radical {
  display: inline-flex;
  align-items: flex-start;
  white-space: nowrap;
}

.radical-symbol {
  font-size: 1.16em;
  line-height: 1;
}

.radicand {
  margin-left: -1px;
  padding: 0 2px 0 3px;
  border-top: 1px solid currentColor;
  line-height: 1.05;
}

.math-fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  margin: 0 0.12em;
  vertical-align: -0.45em;
  text-align: center;
  line-height: 1.05;
  white-space: nowrap;
}

.math-fraction > span {
  min-width: 1.1em;
  padding: 0 0.18em;
}

.math-fraction > span:first-child {
  padding-bottom: 0.06em;
  border-bottom: 1px solid currentColor;
}

.math-fraction > span:last-child {
  padding-top: 0.06em;
}

.prompt-table-wrap {
  width: 100%;
  margin: 13px 0 18px;
  overflow-x: auto;
}

.prompt-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  font-weight: 400;
}

.prompt-table th,
.prompt-table td {
  min-width: 64px;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  text-align: center;
}

.prompt-table th {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
  font-weight: 700;
}

.prompt-table tbody tr:nth-child(even) {
  background: var(--surface);
}

.stimulus-notes {
  margin: 0 0 20px;
  padding: 13px 16px 13px 32px;
  background: var(--surface);
  border-left: 3px solid var(--navy);
}

.choices {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
}

.choice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  width: 100%;
  padding: 11px 13px;
  background: var(--paper);
  border: 1px solid var(--rule);
  text-align: left;
  line-height: 1.32;
}

.choice:hover {
  border-color: #91aabd;
}

.choice.selected {
  background: var(--selected);
  border-color: var(--navy);
}

.choice.correct {
  background: var(--correct);
  border-color: var(--correct-edge);
}

.choice.incorrect {
  background: var(--warm);
  border-color: var(--warm-edge);
}

.choice-label {
  color: var(--navy);
  font-weight: 700;
}

.spr {
  margin-bottom: 18px;
}

.spr label {
  display: block;
  margin-bottom: 7px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.spr input {
  width: 196px;
  height: 44px;
  padding: 0 12px;
  background: white;
  border: 1px solid #9eafbf;
}

.spr.correct input {
  background: var(--correct);
  border-color: var(--correct-edge);
}

.spr.incorrect input {
  background: var(--danger-wash);
  border-color: var(--danger);
}

.response-feedback {
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
}

.check-message {
  margin: -9px 0 18px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.question-result {
  margin: -8px 0 20px;
  padding: 12px 15px;
  border-left: 3px solid var(--correct-edge);
  background: var(--correct);
}

.question-result.incorrect {
  border-left-color: var(--danger);
  background: var(--danger-wash);
}

.question-result strong {
  display: block;
  margin-bottom: 3px;
  color: var(--correct-ink);
  font-size: 14px;
}

.question-result.incorrect strong {
  color: var(--danger);
}

.question-result p {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.actions button {
  height: 40px;
  padding: 0 18px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid #afbdc9;
  font-weight: 700;
}

.actions .primary {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.actions .next {
  margin-left: auto;
}

.actions button:disabled,
.lesson-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.lesson-reader {
  max-width: 820px;
}

.lesson-header {
  border-bottom-color: var(--accent);
}

.lesson-complete-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.lesson-content {
  padding: 24px 0 12px;
  font-size: 17px;
  line-height: 1.48;
}

.lesson-content > p {
  margin: 0 0 18px;
}

.lesson-content > h3 {
  margin: 28px 0 12px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.22;
}

.lesson-content > ul {
  margin: 0 0 20px;
  padding-left: 24px;
}

.lesson-content li {
  margin-bottom: 8px;
}

.lesson-point {
  margin: 0 0 12px;
  padding: 14px 17px;
  background: var(--surface);
  border-left: 3px solid #9fb3c3;
}

.lesson-point.emphasis {
  background: var(--selected);
  border-left-color: var(--accent);
}

.lesson-point.student-script {
  background: var(--selected);
  border-left-color: var(--accent);
}

.lesson-point.common-mistake {
  background: var(--warm);
  border-left-color: var(--warm-edge);
}

.lesson-point.reset-move {
  background: #f7f5fb;
  border-left-color: var(--lavender);
}

.lesson-point.ready-check {
  background: var(--selected);
  border-left-color: var(--navy);
}

.lesson-point.visual-model {
  background: #f7f5fb;
  border-left-color: var(--lavender);
}

.lesson-point h3 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.lesson-point p {
  margin: 0;
}

.lesson-visual-model {
  margin: 0 0 18px;
  padding: 15px 0 17px;
  border-top: 1px solid var(--lavender);
  border-bottom: 1px solid var(--lavender);
}

.lesson-visual-model h3 {
  margin: 0 0 11px;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.visual-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.visual-steps div {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 86px;
  padding: 11px;
  background: var(--paper);
  border: 1px solid var(--lavender);
}

.visual-steps span {
  display: grid;
  place-content: center;
  width: 24px;
  height: 24px;
  color: white;
  background: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.visual-steps strong {
  color: var(--navy);
  font-size: 12px;
  line-height: 1.25;
}

.drill-completion {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 13px 0 0;
  padding: 10px 12px;
  background: #f7f5fb;
  border-left: 3px solid var(--lavender);
}

.drill-completion.complete {
  background: var(--selected);
  border-left-color: var(--accent);
}

.drill-completion div {
  display: grid;
  gap: 2px;
}

.drill-completion strong {
  color: var(--navy);
  font-size: 13px;
}

.drill-completion span {
  color: var(--secondary);
  font-size: 12px;
}

.lesson-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.lesson-actions button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid #afbdc9;
  font-weight: 700;
}

.lesson-actions .primary {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.lesson-actions button:last-child {
  justify-self: end;
}

.explanation {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 2px solid var(--navy);
}

.answer-label {
  display: inline-block;
  margin: 0 0 17px;
  padding: 7px 12px;
  color: var(--correct-ink);
  background: var(--correct);
  border-left: 3px solid var(--correct-edge);
  font-size: 13px;
  font-weight: 700;
}

.explanation h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 20px;
}

.explanation-row {
  margin: 0 0 13px;
  padding: 13px 15px;
  background: var(--surface);
  border-left: 3px solid var(--navy);
}

.explanation-row.warm {
  background: var(--warm);
  border-left-color: var(--warm-edge);
}

.explanation-row strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 12px;
  text-transform: uppercase;
}

.explanation-row p {
  margin: 0 0 8px;
}

.explanation-row p:last-child {
  margin-bottom: 0;
}

.timing {
  color: var(--secondary);
  font-size: 13px;
}

.wrong-logic {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrong-logic li {
  margin: 0 0 8px;
}

.wrong-logic li:last-child {
  margin-bottom: 0;
}

@media (max-width: 880px) {
  .app-shell {
    display: block;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding: 14px 16px;
  }

  .brand {
    flex-basis: 100%;
    min-width: 0;
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .topbar-status {
    margin-left: 0;
  }

  .mode-switcher {
    order: 3;
  }

  .workspace {
    display: block;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .sidebar-head {
    padding: 17px 16px 10px;
  }

  .sections-label {
    margin: 10px 16px 6px;
  }

  .question-search {
    padding: 12px 16px 0;
    max-width: 280px;
  }

  .sidebar-switcher {
    width: 280px;
    margin: 12px 16px 4px;
  }

  .section-list {
    display: flex;
    gap: 5px;
    padding: 0 12px 13px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lesson-list {
    display: block;
    max-height: 270px;
    overflow-y: auto;
  }

  .section-list::-webkit-scrollbar {
    display: none;
  }

  .section-button {
    min-width: 180px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .practice-group {
    min-width: 255px;
    margin-bottom: 0;
  }

  .section-row .section-button {
    min-width: 0;
  }

  .section-button[aria-current="true"] {
    border-left: 0;
    border-bottom-color: var(--navy);
  }

  .reader-inner {
    padding: 26px 18px 40px;
  }

  .test-structure {
    grid-template-columns: 1fr 1fr;
  }

  .test-structure div {
    border-bottom: 1px solid var(--rule);
  }

  .set-toolbar {
    align-items: end;
    gap: 15px;
  }
}

@media (max-width: 560px) {
  .book-switcher,
  .mode-switcher {
    width: 100%;
  }

  .mode-switcher button {
    padding: 0 7px;
    font-size: 12px;
  }

  .book-switcher button,
  .mode-switcher button {
    flex: 1;
  }

  .topbar-status {
    width: 100%;
  }

  .progress-bar {
    flex: 1;
  }

  .set-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .check-all {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .set-result {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
  }

  .score-ring {
    width: 68px;
    height: 68px;
    border-width: 4px;
  }

  .score-ring strong {
    font-size: 19px;
  }

  .lesson-actions {
    grid-template-columns: 1fr 1fr;
  }

  .visual-steps {
    grid-template-columns: 1fr 1fr;
  }

  .lesson-actions .primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .test-module-header,
  .test-start {
    align-items: stretch;
    flex-direction: column;
  }

  .review-answer-line {
    grid-template-columns: 1fr;
  }

  .test-timer {
    text-align: left;
  }

  .test-structure {
    grid-template-columns: 1fr;
  }

  .test-structure div {
    min-height: 0;
    border-right: 0;
  }

  .break-screen {
    padding-top: 52px;
  }

  .break-timer {
    font-size: 48px;
  }
}

@media print {
  body {
    background: white;
    font-size: 10.5pt;
  }

  .topbar,
  .sidebar,
  .item-navigation,
  .actions,
  .set-toolbar,
  .set-result,
  .lesson-actions {
    display: none;
  }

  .workspace {
    display: block;
  }

  .reader {
    overflow: visible;
  }

  .reader-inner {
    max-width: none;
    padding: 0;
  }

  .choice {
    break-inside: avoid;
  }
}
