:root {
  --navy: #132b3a;
  --navy-2: #1b3a4b;
  --teal: #278f86;
  --teal-soft: #dff3ef;
  --mango: #ffc45e;
  --mango-soft: #fff1cb;
  --coral: #e96857;
  --cream: #f7f3e9;
  --paper: #fffefa;
  --white: #ffffff;
  --ink-muted: #65757c;
  --line: #dbe2df;
  --line-dark: rgba(19, 43, 58, 0.14);
  --shadow-sm:
    0 1px 2px rgba(19, 43, 58, 0.05), 0 8px 24px rgba(19, 43, 58, 0.05);
  --shadow-md:
    0 2px 4px rgba(19, 43, 58, 0.05), 0 18px 48px rgba(19, 43, 58, 0.08);
  --font-sans: 'Avenir Next', Avenir, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-math: Georgia, 'Times New Roman', serif;
  --deep-accent: #216f70;
  --deep-support: #edf6f4;
  --learning-accent: #237c74;
  --learning-chem: #315bbb;
  --learning-bio: #6651a0;
  --learning-bio-soft: #f1eef8;
  --bio-card-border: #d8d0e6;
  --bio-art-surface: #efedf6;
  --bio-label-ink: #514178;
  --learning-chem-soft: #edf2ff;
  --learning-surface: #f7f8f7;
  --learning-border: #dce3e2;
  --chem-card-border: #cfdae5;
  --chem-art-surface: #eaf1f9;
  --chem-label-ink: #314f72;
  --memory-blue: #285e92;
  --memory-gold: #9a5c12;
  --memory-green: #1a7465;
  --memory-border: #c5d7df;
}

/* Deep understanding: readable lessons, working margins and a pocket reference. */
.quad-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px auto;
  padding: 0 16px;
  max-width: 1400px;
}
.quad-section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.quad-section-nav a[aria-current='page'] {
  color: white;
  background: var(--deep-accent);
  border-color: var(--deep-accent);
}
.deep-page {
  max-width: 1500px;
  margin: auto;
  padding: 0 clamp(14px, 3vw, 42px) 48px;
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}
.deep-page button,
.deep-page input,
.deep-page select {
  font: inherit;
}
.deep-page button,
.deep-page a,
.deep-sheet button,
.deep-sheet a {
  touch-action: manipulation;
}
.deep-page button {
  cursor: pointer;
}
.deep-page button:disabled {
  cursor: default;
  opacity: 0.62;
}
.deep-page :focus-visible,
.deep-sheet :focus-visible {
  outline: 3px solid #c68826;
  outline-offset: 4px;
}
.deep-page .quad-section-nav {
  padding: 0;
}
.deep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.deep-topbar > span:nth-child(2) {
  font-weight: 750;
}
.deep-home {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
}
.deep-sync {
  font-size: 14px;
  color: var(--deep-accent);
}
.deep-sync.pending {
  color: #8b500d;
}
.deep-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0 28px;
}
.deep-intro h1 {
  font-family: var(--font-math);
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.15;
  margin: 8px 0 12px;
  letter-spacing: -0.6px;
}
.deep-intro p {
  margin: 0;
  max-width: 630px;
}
.deep-kicker {
  color: var(--deep-accent);
  font-size: 14px;
  font-weight: 750;
  margin: 0 0 8px;
}
.deep-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.deep-intro .deep-actions {
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 auto;
}
.deep-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--deep-accent);
  border-radius: 10px;
  background: var(--deep-accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.deep-button.secondary {
  background: white;
  color: var(--navy);
  border-color: #b9ccca;
}
.deep-layout {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}
.deep-rail {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.deep-progress {
  background: var(--deep-support);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 9px;
}
.deep-progress progress {
  display: block;
  width: 100%;
  height: 10px;
  appearance: none;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #ccdfda;
  accent-color: var(--deep-accent);
}
.deep-progress progress::-webkit-progress-bar {
  background: #ccdfda;
}
.deep-progress progress::-webkit-progress-value {
  background: var(--deep-accent);
}
.deep-progress small {
  font-size: 13px;
}
.deep-desktop-menu h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  margin: 24px 8px 8px;
}
.deep-desktop-menu h2 > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #e8eef2;
  border-radius: 50%;
}
.deep-desktop-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--navy);
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
}
.deep-desktop-menu button > span:first-child {
  color: var(--deep-accent);
  font-size: 13px;
  min-width: 26px;
}
.deep-desktop-menu button > svg {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--deep-accent);
}
.deep-desktop-menu button[aria-current='step'] {
  border-color: #b2d1c9;
  background: var(--deep-support);
  font-weight: 750;
}
.deep-mobile-menu {
  display: none;
}
.deep-stage {
  min-width: 0;
}
.deep-lesson-title {
  border-left: 4px solid var(--deep-accent);
  padding: 0 0 0 22px;
  margin: 0 0 22px;
}
.deep-lesson-title h2 {
  margin: 0 0 9px;
  font-family: var(--font-math);
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.2;
}
.deep-lesson-title p:last-child {
  margin: 0;
}
.deep-tabs [data-slot='tabs-list'] {
  display: flex;
  width: 100%;
  height: auto;
  padding: 5px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef2f1;
}
.deep-tabs [data-slot='tabs-trigger'] {
  flex: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  white-space: normal;
  min-height: 48px;
  padding: 10px;
  color: #425b64;
  font-size: 14px;
  font-weight: 750;
}
.deep-tabs [data-slot='tabs-trigger'][data-active] {
  background: white;
  color: var(--deep-accent);
  box-shadow: var(--shadow-sm);
}
.deep-tabs [data-slot='tabs-content'] {
  font-size: 16px;
  line-height: 1.7;
}
.deep-card,
.deep-visual {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 28px);
  margin: 0 0 18px;
  box-shadow: 0 2px 8px #132b3a04;
}
.deep-card h3,
.deep-visual strong {
  font-size: 20px;
  line-height: 1.35;
}
.deep-card h3 {
  margin: 0 0 14px;
}
.deep-card p {
  margin: 10px 0;
}
.deep-vocabulary {
  background: #f5f9f8;
}
.deep-vocabulary dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.deep-vocabulary dl > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 3fr;
  gap: 16px;
}
.deep-vocabulary dt {
  color: var(--deep-accent);
  font-weight: 750;
}
.deep-vocabulary dd {
  margin: 0;
}
.deep-idea-number {
  display: grid;
  place-items: center;
  float: right;
  width: 32px;
  height: 32px;
  background: var(--deep-support);
  border-radius: 50%;
  color: var(--deep-accent);
  font-weight: 800;
}
.deep-equation {
  font-family: var(--font-math);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.8;
  background: #f4f7f7;
  padding: 14px 16px;
  border-radius: 10px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.deep-equation sup {
  font-size: 0.7em;
  line-height: 0;
}
.deep-mistake {
  border-left: 4px solid #c88724;
  background: #fffcf4;
}
.deep-mistake .deep-equation {
  background: #fff1d4;
}
.deep-panel-intro {
  margin: 0 0 20px;
}
.deep-worked ol {
  padding: 0;
  margin: 16px 0;
  list-style: none;
}
.deep-worked li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.deep-worked-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--deep-accent);
  color: white;
  font-size: 14px;
}
.deep-worked .deep-equation {
  margin-top: 0;
}
.deep-why {
  background: var(--deep-support);
  padding: 14px 16px;
  border-radius: 10px;
}
.deep-answer,
.deep-complete {
  background: #e5f4ef;
  border-radius: 12px;
  padding: 18px;
  color: #175a55;
}
.deep-answer p {
  font-family: var(--font-math);
  font-size: 23px;
}
.deep-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.deep-choices button {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid #bccdca;
  border-radius: 12px;
  color: var(--navy);
  background: white;
  text-align: left;
  line-height: 1.5;
  min-height: 56px;
  overflow-wrap: anywhere;
}
.deep-choices button > span:first-child {
  border-radius: 5px;
  background: #eef2f2;
  padding: 1px 6px;
  font-size: 14px;
  font-weight: 800;
}
.deep-choices button.correct {
  background: #e0f4eb;
  border-color: #2b8a74;
  opacity: 1;
}
.deep-choices button.incorrect {
  background: #fff5e8;
  border-color: #c58c3f;
  opacity: 1;
}
.deep-feedback {
  margin-top: 16px;
  border-radius: 12px;
  padding: 16px;
}
.deep-feedback.correct {
  background: #e8f5ef;
}
.deep-feedback.incorrect {
  background: #fff7e9;
}
.deep-hints {
  margin-top: 14px;
}
.deep-hints > p {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  background: #f4f7f7;
  border-radius: 9px;
}
.deep-hints svg {
  flex-shrink: 0;
  margin-top: 5px;
}
.deep-complete {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.deep-complete svg {
  flex-shrink: 0;
}
.deep-complete p {
  margin: 0;
}
.deep-recap li {
  margin-bottom: 9px;
}
.deep-footer {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding: 20px 0;
  font-size: 14px;
  color: #52656e;
}
.deep-footer a {
  display: inline-block;
  margin: 0 20px 8px 0;
  color: var(--deep-accent);
  font-weight: 700;
}
.deep-warning {
  padding: 14px;
  border: 1px solid #d7b57a;
  border-radius: 10px;
  background: #fff7e8;
}
.deep-visual figcaption p {
  margin: 10px 0 16px;
}
.deep-visual svg,
.deep-sheet svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 600px;
  margin: auto;
}
.deep-visual svg text,
.deep-sheet svg text {
  font-family: var(--font-sans);
  fill: var(--navy);
  font-size: 16px;
}
.deep-visual svg text.deep-svg-math {
  font-family: var(--font-math);
  font-size: 25px;
}
.deep-visual svg line,
.deep-visual svg path {
  vector-effect: non-scaling-stroke;
}
.deep-svg-wrap {
  overflow-x: auto;
}
.deep-svg-wrap svg {
  min-width: 330px;
}
.deep-concept-visual {
  overflow: hidden;
  border-color: #b9d4cf;
  background: linear-gradient(145deg, #fff 60%, #f1f9f7);
}
.restriction-machine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin: 18px 0;
}
.restriction-machine > div {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 13px;
  border: 1px solid #bed0cd;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.restriction-machine > div.danger {
  border-color: #d58377;
  background: #fff2ef;
}
.restriction-machine > div > span {
  color: #53666d;
  font-size: 13px;
  font-weight: 750;
}
.restriction-machine > div > strong {
  margin-top: 6px;
  font-family: var(--font-math);
}
.restriction-machine > span {
  align-self: center;
  color: var(--deep-accent);
  font-size: 25px;
  font-weight: 900;
}
.deep-plain-callout {
  padding: 14px 16px;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  background: #fff4f0;
}
.restriction-number-line line {
  stroke: #173342;
  stroke-width: 2;
}
.restriction-number-line path {
  fill: #173342;
}
.restriction-number-line circle {
  fill: #fff;
  stroke: var(--coral);
  stroke-width: 4;
}
.candidate-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.candidate-filter > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
}
.candidate-filter .rejected {
  border: 1px solid #e3a59c;
  background: #fff2ef;
}
.candidate-filter .accepted {
  border: 1px solid #9bcbbd;
  background: #ecf8f3;
}
.candidate-filter span,
.candidate-filter small {
  font-size: 14px;
}
.candidate-filter strong {
  font-size: 18px;
}
.whole-equation-map {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #b7ccc7;
  border-radius: 12px;
  background: #f3f8f7;
}
.whole-equation-map > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.whole-equation-map > div > span {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-math);
  font-size: 18px;
  text-align: center;
}
.inside-border-svg {
  max-width: 680px !important;
}
.inside-border-svg .inside-border-band {
  fill: #cfece6;
  stroke: #176d65;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.inside-border-svg .inside-border-centre {
  fill: #fff;
  stroke: #176d65;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.inside-border-svg .inside-border-measure line,
.inside-border-svg .outer-measure {
  stroke: #9b6411;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.inside-border-svg .inside-border-measure text {
  fill: #7b4f0c;
  font-family: var(--font-math);
  font-size: 20px;
  font-weight: 850;
}
.geometry-rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.geometry-rule-grid > div {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid #bdcfca;
  border-radius: 12px;
  background: #fff;
}
.geometry-rule-grid > div.limiting {
  border: 2px solid #c88724;
  background: #fff7e6;
}
.geometry-rule-grid > div > span {
  font-family: var(--font-math);
  font-size: 22px;
}
.geometry-final-rule {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 16px;
  border-radius: 12px;
  background: #e7f5f0;
  color: #175a55;
}
.geometry-final-rule > span {
  font-family: var(--font-math);
  font-size: 30px;
  font-weight: 800;
}
.geometry-final-rule p {
  margin: 0;
}
.geometry-range-line line {
  stroke: #78908d;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.geometry-range-line line.allowed {
  stroke: #14796f;
  stroke-width: 8;
}
.geometry-range-line circle {
  fill: #fff;
  stroke: #14796f;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}
.deep-example-picture {
  margin: 16px 0;
  padding: 15px;
  border: 1px solid #c8d7d4;
  border-radius: 12px;
  background: #f6faf9;
}
.deep-check-picture {
  margin: 14px 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #c8d7d4;
  border-radius: 12px;
  background: #f6faf9;
}
.deep-check-picture > svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 620px;
  margin: auto;
}
.deep-check-picture .exam-diagram-card {
  margin: 0 auto;
}
.deep-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.deep-presets button,
.deep-plot-table button {
  min-height: 44px;
  background: #eef5f3;
  border: 1px solid #bdcfca;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--navy);
  font-size: 14px;
}
.deep-graph-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.deep-graph-controls label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}
.deep-graph-controls input,
.deep-plot-table input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #afc4bd;
  border-radius: 8px;
  background: white;
  color: var(--navy);
  font-size: 16px;
}
.deep-small {
  font-size: 14px;
  color: #52656e;
}
.deep-plot-table table {
  width: 100%;
  border-collapse: collapse;
}
.deep-plot-table caption {
  text-align: left;
  font-size: 14px;
  margin: 10px 0;
}
.deep-plot-table td,
.deep-plot-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.deep-plot-table input {
  max-width: 150px;
}
.deep-sheet[data-slot='sheet-content'] {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(100vw, 620px);
  max-width: none;
  box-shadow: -12px 0 60px #132b3a30;
  background: white;
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
body:has(.deep-sheet) [data-slot='sheet-overlay'] {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #132b3a65;
}
.deep-sheet > button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
}
.deep-sheet > button svg {
  width: 20px;
  height: 20px;
}
.deep-sheet .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.deep-sheet [data-slot='sheet-header'] {
  padding: 24px 52px 12px 24px;
}
.deep-sheet [data-slot='sheet-title'] {
  font-size: 24px;
  font-family: var(--font-math);
  color: var(--navy);
}
.deep-sheet [data-slot='sheet-description'] {
  font-size: 14px;
  color: #52656e;
}
.deep-sheet-body {
  overflow-y: auto;
  padding: 0 24px 32px;
}
.deep-sheet-body h3 {
  font-size: 19px;
  margin-top: 24px;
}
.deep-sheet-body details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.deep-sheet-body summary {
  cursor: pointer;
  font-family: var(--font-math);
  font-size: 21px;
  overflow-wrap: anywhere;
}
.deep-sheet-body p {
  font-size: 16px;
}
.teacher-deep-summary {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f3f9f7;
}
.teacher-deep-summary h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.teacher-deep-summary p {
  font-size: 16px;
}
.teacher-deep-summary a {
  display: inline-block;
  margin-right: 18px;
  font-size: 16px;
  color: var(--deep-accent);
}
@media (max-width: 1050px) {
  .deep-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
  }
  .deep-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .deep-intro .deep-actions {
    flex-direction: row;
  }
}
@media (max-width: 760px) {
  .deep-layout {
    display: block;
  }
  .deep-rail {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 24px;
  }
  .deep-desktop-menu {
    display: none;
  }
  .deep-mobile-menu {
    display: grid;
    gap: 8px;
    margin-top: 14px;
  }
  .deep-mobile-menu [data-slot='native-select-wrapper'] {
    position: relative;
    width: 100%;
  }
  .deep-mobile-menu [data-slot='native-select-icon'] {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
  }
  .deep-mobile-menu select {
    appearance: none;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 10px 38px 10px 12px;
    border: 1px solid #b9ccca;
    border-radius: 10px;
    background: white;
    font-size: 16px;
  }
  .deep-topbar > span:nth-child(2) {
    display: none;
  }
  .deep-vocabulary dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .deep-choices {
    grid-template-columns: 1fr;
  }
  .deep-tabs [data-slot='tabs-trigger'] {
    padding: 9px 5px;
    font-size: 14px;
  }
  .deep-equation {
    padding: 12px;
    font-size: 21px;
  }
  .deep-worked li {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 8px;
  }
  .deep-lesson-title {
    padding-left: 15px;
  }
  .restriction-machine {
    grid-template-columns: 1fr;
  }
  .restriction-machine > span {
    transform: rotate(90deg);
    justify-self: center;
    line-height: 1;
  }
  .candidate-filter,
  .geometry-rule-grid,
  .whole-equation-map > div {
    grid-template-columns: 1fr;
  }
  .inside-border-svg text {
    font-size: 15px !important;
  }
}

/* Crisp, exam-style diagrams shared by teaching, practice and timed papers. */
.exam-diagram-card {
  width: min(100%, 680px);
  margin: 18px auto;
  overflow: hidden;
  border: 1px solid #ccd8d5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(19, 43, 58, 0.06);
}
.exam-diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
}
.exam-diagram-svg.compact {
  min-height: 175px;
}
.exam-diagram-svg text {
  fill: #173342;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 750;
}
.exam-diagram-svg .exam-shape,
.exam-diagram-svg .exam-dimension line,
.exam-diagram-svg .exam-right-angle,
.exam-diagram-svg .exam-callout,
.exam-diagram-svg .exam-axis,
.exam-diagram-svg .exam-threshold,
.exam-diagram-svg .exam-wire {
  stroke: #173342;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}
.exam-diagram-svg .exam-shape {
  fill: none;
}
.exam-diagram-svg .exam-unshaded {
  fill: #fff;
}
.exam-diagram-svg .exam-right-angle {
  fill: none;
  stroke-width: 2;
}
.exam-diagram-svg .exam-dimension line {
  stroke-width: 1.6;
}
.exam-diagram-svg .exam-dimension text,
.exam-diagram-svg .exam-side-label {
  font-family: var(--font-math);
  font-size: 16px;
  font-weight: 700;
}
.exam-diagram-svg .exam-centre-label {
  font-size: 17px;
  font-weight: 850;
}
.exam-diagram-svg .exam-area-label,
.exam-diagram-svg .exam-comparison-label {
  fill: #176d65;
  font-size: 15px;
  font-weight: 850;
}
.exam-diagram-svg .exam-callout {
  stroke-width: 1.6;
}
.exam-diagram-svg .exam-callout-label,
.exam-diagram-svg .exam-equation-label {
  font-family: var(--font-math);
  font-size: 15px;
  font-weight: 800;
}
.exam-diagram-svg .exam-wire {
  fill: none;
  stroke: #9b6411;
}
.exam-diagram-svg .exam-not-scale {
  fill: #7b878c;
  font-size: 10px;
  font-style: italic;
  font-weight: 600;
}
.exam-diagram-svg .exam-key text,
.exam-diagram-svg .exam-domain-label {
  fill: #52646b;
  font-size: 11px;
  font-weight: 700;
}
.exam-diagram-svg .exam-key rect {
  stroke: #4d8881;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.exam-diagram-svg .exam-axis {
  stroke-width: 1.8;
}
.exam-diagram-svg .exam-tunnel-fill {
  fill: #f5efe0;
  stroke: none;
}
.exam-diagram-svg .tunnel-curve {
  fill: none;
  stroke-width: 3;
}
.exam-diagram-svg .exam-threshold {
  stroke: #a25d12;
  stroke-dasharray: 7 6;
  stroke-width: 2;
}
.exam-diagram-svg .exam-threshold-shade {
  stroke: #4d8881;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.exam-diagram-svg .exam-threshold-point {
  fill: #a25d12;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.exam-diagram-svg .exam-threshold-label {
  fill: #8b500d;
  font-size: 13px;
}
.exam-diagram-svg .exam-axis-label {
  font-family: var(--font-math);
  font-size: 17px;
  font-style: italic;
}
.exam-diagram-svg .exam-axis-number {
  font-family: var(--font-math);
  font-size: 12px;
}

.working-levels-card,
.teacher-deadline-manager,
.teacher-note-manager,
.teacher-working-levels,
.teacher-course-map {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}
.working-levels-card {
  padding: 17px;
}
.working-levels-home {
  margin-top: 18px;
  padding: clamp(17px, 2.5vw, 24px);
}
.working-levels-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.working-levels-heading span {
  font-size: 10px;
  font-weight: 900;
}
.working-levels-heading h2 {
  margin: 0;
  font-family: var(--font-math);
  font-size: clamp(20px, 2.4vw, 28px);
}
.working-levels-heading small {
  color: var(--ink-muted);
  font-size: 10px;
}
.working-level-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.working-levels-home .working-level-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.working-level-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.working-grade,
.teacher-grade {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f4f1;
  color: #176d65;
  font-family: var(--font-math);
  font-size: 20px;
  font-weight: 900;
}
.working-grade {
  width: 48px;
  height: 48px;
}
.working-grade.finding,
.teacher-grade.finding {
  background: #f0eef9;
  color: #675c94;
}
.working-level-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.working-level-title-row,
.teacher-working-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.working-level-title-row b,
.teacher-working-title b {
  color: var(--teal);
  font-family: var(--font-math);
  font-size: 12px;
}
.working-level-list strong {
  font-size: 12px;
}
.working-level-list span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.35;
}
.working-level-list small {
  color: #176d65;
  font-size: 9px;
  font-weight: 800;
}
.working-level-track,
.teacher-working-track {
  overflow: hidden;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #e6ecea;
  color: var(--teal);
}
.working-level-track::-webkit-progress-bar,
.teacher-working-track::-webkit-progress-bar {
  border-radius: inherit;
  background: #e6ecea;
}
.working-level-track::-webkit-progress-value,
.teacher-working-track::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #53b8aa);
  transition: width 280ms ease;
}
.working-level-track::-moz-progress-bar,
.teacher-working-track::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #53b8aa);
}
.working-level-track.finding,
.teacher-working-track.finding {
  border: 1px dashed #c8c1df;
  background: #f5f3fb;
}
.working-level-track.finding::-webkit-progress-bar,
.teacher-working-track.finding::-webkit-progress-bar {
  background: #f5f3fb;
}
.working-levels-card > p,
.working-level-loading {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.55;
}

.teacher-deadline-manager,
.teacher-note-manager,
.teacher-working-levels,
.teacher-course-map {
  margin-bottom: 16px;
  padding: clamp(16px, 2vw, 22px);
}
.teacher-deadline-manager.overdue {
  border-color: rgba(233, 104, 87, 0.5);
  background: #fff9f6;
}
.teacher-deadline-manager.closed {
  border-style: dashed;
  background: #f7f8f6;
}
.teacher-setting-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.teacher-setting-heading > svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--teal);
}
.teacher-setting-heading > div {
  display: grid;
  gap: 3px;
}
.teacher-setting-heading h2 {
  margin: 0;
  font-size: 17px;
}
.teacher-setting-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
}
.teacher-setting-actions,
.deadline-editor-actions,
.deadline-close-confirm > div,
.teacher-note-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.teacher-setting-actions button,
.deadline-editor-actions button,
.deadline-close-confirm button,
.teacher-note-footer button {
  min-height: 42px;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.teacher-setting-actions button.secondary,
.deadline-editor-actions button.secondary,
.deadline-close-confirm button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
}
.deadline-editor {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.deadline-editor label {
  display: grid;
  gap: 5px;
}
.deadline-editor label > span,
.deadline-editor legend {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
}
.deadline-editor input,
.teacher-note-manager textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd6d3;
  border-radius: 10px;
  background: white;
  color: var(--navy);
  font-size: 16px;
}
.deadline-editor .wide,
.deadline-editor fieldset,
.deadline-editor-actions {
  grid-column: 1 / -1;
}
.deadline-editor fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.deadline-editor fieldset label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  cursor: pointer;
}
.deadline-editor fieldset input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}
.deadline-close-confirm {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #e5b3a9;
  border-radius: 12px;
  background: #fff4f0;
}
.deadline-close-confirm p {
  margin: 4px 0 0;
  color: #76564f;
  font-size: 10px;
}
.teacher-setting-error {
  margin: 10px 0 0;
  color: #aa3f32;
  font-size: 10px;
  font-weight: 750;
}
.teacher-note-manager textarea {
  min-height: 96px;
  margin-top: 14px;
  resize: vertical;
  line-height: 1.5;
}
.teacher-note-footer {
  justify-content: space-between;
}
.teacher-note-footer small {
  color: var(--ink-muted);
  font-size: 9px;
}
.teacher-note-footer button:disabled {
  opacity: 0.5;
  cursor: default;
}

.teacher-working-levels > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.teacher-working-levels article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.teacher-grade {
  width: 48px;
  height: 48px;
}
.teacher-working-levels article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.teacher-working-levels article strong {
  font-size: 11px;
}
.teacher-working-levels article small,
.teacher-working-levels article p,
.teacher-working-levels article em {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  font-style: normal;
}
.teacher-working-levels article p {
  color: #176d65;
  font-weight: 800;
}
.teacher-working-levels article em {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.teacher-working-track {
  height: 7px;
  margin: 4px 0 2px;
}

.teacher-course-map > details {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.teacher-course-map summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}
.teacher-course-map summary::-webkit-details-marker {
  display: none;
}
.teacher-course-map > details > summary > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-soft);
  color: #176d65;
  font-size: 9px;
  font-weight: 900;
}
.teacher-course-map summary > div {
  display: grid;
  gap: 2px;
}
.teacher-course-map summary strong {
  font-size: 11px;
}
.teacher-course-map summary small,
.teacher-course-map summary > span:last-child {
  color: var(--ink-muted);
  font-size: 9px;
}
.teacher-map-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px 55px;
}
.teacher-map-body details {
  border: 1px solid #e4e9e7;
  border-radius: 11px;
}
.teacher-map-body details > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 10px 10px;
}
.teacher-map-body a,
.teacher-map-test {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f5f8f7;
  color: var(--navy);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}
.teacher-map-test {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  background: var(--navy);
  color: white;
}

@media (max-width: 620px) {
  .exam-diagram-card {
    margin: 14px 0;
    border-radius: 12px;
  }
  .exam-diagram-svg {
    min-height: 180px;
  }
  .exam-diagram-svg text {
    font-size: 16px;
  }
  .exam-diagram-svg .exam-key text,
  .exam-diagram-svg .exam-domain-label,
  .exam-diagram-svg .exam-not-scale {
    font-size: 12px;
  }
  .deadline-editor {
    grid-template-columns: 1fr;
  }
  .deadline-editor label,
  .deadline-editor fieldset,
  .deadline-editor-actions {
    grid-column: 1;
  }
  .teacher-setting-actions,
  .deadline-editor-actions,
  .deadline-close-confirm > div,
  .teacher-note-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .teacher-setting-actions button,
  .deadline-editor-actions button,
  .deadline-close-confirm button,
  .teacher-note-footer button {
    width: 100%;
  }
  .teacher-working-levels > div:last-child {
    grid-template-columns: 1fr;
  }
  .teacher-map-body {
    padding-left: 10px;
  }
  .teacher-map-body details > div {
    grid-template-columns: 1fr;
  }
}

/* 2026 course-map, fair-feedback, and admin-preview additions */
.admin-preview-bar {
  position: relative;
  z-index: 25;
  top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 11px 13px;
  border: 1px solid rgba(98, 89, 201, 0.35);
  border-radius: 14px;
  background: rgba(240, 239, 255, 0.97);
  box-shadow: 0 8px 24px rgba(48, 42, 120, 0.1);
  color: #302a78;
  backdrop-filter: blur(14px);
}

.admin-preview-bar-copy,
.admin-preview-bar-copy > div,
.admin-preview-bar nav,
.admin-preview-bar a {
  display: flex;
  align-items: center;
}

.admin-preview-bar-copy {
  gap: 9px;
}
.admin-preview-bar-copy > div {
  align-items: flex-start;
  flex-direction: column;
}
.admin-preview-bar-copy strong {
  font-size: 12px;
}
.admin-preview-bar-copy span {
  font-size: 10px;
}
.admin-preview-bar nav {
  gap: 7px;
}
.admin-preview-bar a {
  gap: 6px;
  min-height: 35px;
  padding: 8px 10px;
  border: 1px solid rgba(48, 42, 120, 0.2);
  border-radius: 9px;
  background: white;
  color: inherit;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}
.admin-preview-bar .admin-exit-preview {
  background: #302a78;
  color: white;
}

.progressive-help {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e9ce86;
  border-radius: 14px;
  background: #fffbef;
}
.progressive-help-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #98600e;
}
.progressive-help-heading > div {
  display: grid;
  gap: 2px;
}
.progressive-help-heading span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.progressive-help-heading strong {
  color: var(--navy);
  font-size: 12px;
}
.progressive-help p {
  margin: 0;
  color: #4f5e64;
  font-size: 12px;
  line-height: 1.55;
}
.progressive-help ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: #4f5e64;
  font-size: 11px;
  line-height: 1.5;
}
.progressive-help button {
  justify-self: start;
  padding: 8px 10px;
  border: 1px solid #d8b668;
  border-radius: 9px;
  background: white;
  color: #7a4b08;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.grade-message {
  color: var(--ink-muted);
  font-size: 12px;
}

.curriculum-tree {
  display: grid;
  gap: 11px;
  margin-top: 17px;
}
.book-band {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--navy);
  color: white;
}
.book-band > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--mango);
  color: var(--navy);
  font-family: var(--font-math);
  font-size: 18px;
  font-weight: 900;
}
.book-band > div {
  display: grid;
  gap: 2px;
}
.book-band strong {
  font-size: 13px;
}
.book-band small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}
.chapter-folder,
.topic-folder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}
.chapter-folder > summary,
.topic-folder > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.chapter-folder > summary::-webkit-details-marker,
.topic-folder > summary::-webkit-details-marker {
  display: none;
}
.chapter-folder > summary::after,
.topic-folder > summary::after {
  content: '⌄';
  grid-column: 4;
  color: var(--ink-muted);
  font-size: 16px;
  transition: transform 160ms ease;
}
.chapter-folder:not([open]) > summary::after,
.topic-folder:not([open]) > summary::after {
  transform: rotate(-90deg);
}
.chapter-folder > summary > div,
.topic-folder > summary > div {
  display: grid;
  gap: 3px;
}
.chapter-folder > summary strong {
  font-size: 13px;
}
.topic-folder > summary strong {
  font-size: 12px;
}
.chapter-folder > summary small,
.topic-folder > summary small {
  color: var(--ink-muted);
  font-size: 9px;
}
.chapter-number,
.path-order {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
}
.chapter-number {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #edf5f3;
  color: var(--teal);
  font-size: 10px;
}
.chapter-folder-body {
  display: grid;
  gap: 9px;
  padding: 0 10px 10px 58px;
}
.topic-folder {
  border-radius: 13px;
  background: white;
}
.topic-folder > summary {
  padding: 11px;
}
.topic-folder > summary .topic-icon {
  width: 34px;
  height: 34px;
}
.folder-score,
.new-topic-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #176d65;
  font-size: 9px;
  font-weight: 900;
}
.new-topic-pill {
  background: var(--mango-soft);
  color: #9a5c05;
}
.folder-path-list {
  gap: 6px;
  margin: 0;
  padding: 0 9px 9px 54px;
}
.folder-path-list .topic-row {
  min-height: 57px;
  padding: 8px 10px;
  border-radius: 11px;
}
.path-order {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #eff3f1;
  color: var(--teal);
  font-size: 9px;
}
.locked-chapter {
  opacity: 0.7;
  background: #f1f2f0;
}
.final-assessment-row,
.mistake-fixer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(19, 43, 58, 0.18);
  border-radius: 14px;
  background: var(--navy);
  color: white;
  text-decoration: none;
}
.mistake-fixer-row {
  background: #fff4ef;
  color: var(--navy);
  border-color: rgba(233, 104, 87, 0.3);
}
.final-assessment-row > div,
.mistake-fixer-row > div {
  display: grid;
  gap: 2px;
}
.final-assessment-row strong,
.mistake-fixer-row strong {
  font-size: 12px;
}
.final-assessment-row small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}
.mistake-fixer-row small {
  color: var(--ink-muted);
  font-size: 9px;
}
.final-assessment-row > span:not(.topic-icon) {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--mango);
  color: var(--navy);
  font-size: 9px;
  font-weight: 900;
}
.final-assessment-row.assessment-locked {
  border-style: dashed;
  border-color: #d7bf87;
  background: #5d6463;
}
.final-assessment-row.assessment-locked > span:not(.topic-icon) {
  background: #f3e2b6;
}

.attempt-history-list article.form {
  border-color: rgba(181, 108, 11, 0.25);
  background: #fffaf0;
}
.attempt-history-list article.form .attempt-status-icon {
  background: #b56c0b;
}
.attempt-correction.form-note {
  border-color: #ead18f;
  background: #fff7df;
}

@media (max-width: 700px) {
  .admin-preview-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    width: calc(100% - 20px);
    margin-top: 9px;
  }
  .admin-preview-bar nav {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }
  .admin-preview-bar a {
    justify-content: center;
    text-align: center;
  }
  .chapter-folder-body {
    padding-left: 9px;
  }
  .folder-path-list {
    padding-left: 9px;
  }
  .chapter-folder > summary,
  .topic-folder > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .chapter-folder > summary::after,
  .topic-folder > summary::after {
    display: none;
  }
  .folder-path-list .topic-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .folder-path-list .topic-progress {
    display: none;
  }
  .folder-path-list .topic-arrow {
    grid-column: 3;
  }
  .final-assessment-row,
  .mistake-fixer-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .final-assessment-row > span:not(.topic-icon) {
    display: none;
  }
  .topic-copy small {
    white-space: normal;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at 7% 10%,
      rgba(255, 196, 94, 0.13),
      transparent 23rem
    ),
    radial-gradient(
      circle at 92% 8%,
      rgba(39, 143, 134, 0.11),
      transparent 25rem
    ),
    var(--cream);
  color: var(--navy);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(39, 143, 134, 0.28);
  outline-offset: 2px;
}

sup {
  position: relative;
  top: -0.42em;
  font-size: 0.62em;
  line-height: 0;
}

.study-app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(255, 254, 250, 0.9);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  box-shadow: 0 4px 0 var(--mango);
  color: var(--white);
  font-family: var(--font-math);
  font-size: 21px;
  font-weight: 700;
}

.brand-name,
.brand-subtitle,
.chapter-crumb,
.overall-copy strong,
.overall-copy span,
.rail-heading span,
.rail-heading small,
.level-label strong,
.level-label small,
.rail-note p,
.session-bar h1,
.session-bar p,
.level-score small,
.instruction,
.condition,
.paper-prompt,
.builder-heading h2,
.support-row span,
.hint-card p,
.feedback-copy h3,
.feedback-copy p,
.law-name,
.mastery-card p,
.session-card p {
  margin: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chapter-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-muted);
  font-size: 12px;
}

.chapter-crumb strong {
  color: var(--navy);
}

.overall-progress {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.progress-ring {
  --progress: 0deg;
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--progress), #e5ebe8 0);
}

.progress-ring::after {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: inherit;
  background: var(--paper);
  content: '';
}

.progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 900;
}

.overall-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overall-copy strong {
  font-size: 11px;
}

.overall-copy span {
  color: var(--ink-muted);
  font-size: 10px;
}

.study-layout {
  display: grid;
  grid-template-columns: 232px minmax(500px, 760px) 268px;
  gap: 24px;
  width: min(100%, 1370px);
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 44px) 54px;
  align-items: start;
}

.level-rail,
.study-sidebar {
  position: sticky;
  top: 100px;
}

.level-rail {
  padding: 18px 14px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.78);
  box-shadow: var(--shadow-sm);
}

.practice-picker {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}

.practice-picker button {
  display: flex;
  min-height: 50px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.practice-picker button span {
  font-size: 11px;
  font-weight: 900;
}

.practice-picker button small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.practice-picker button:hover {
  border-color: var(--teal);
}

.practice-picker button.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal);
}

.practice-picker button.challenge-option.active {
  border-color: var(--mango);
  background: var(--mango-soft);
  box-shadow: inset 3px 0 0 #d88a15;
}

.challenge-rail,
.daily-rail {
  padding: 5px 5px 2px;
}

.challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.challenge-rail h2,
.daily-rail h2 {
  margin: 12px 0 6px;
  font-family: var(--font-math);
  font-size: 22px;
  line-height: 1.05;
}

.challenge-rail p,
.daily-rail p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.challenge-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 11px;
  background: var(--mango-soft);
}

.challenge-stat strong {
  font-size: 24px;
}

.challenge-stat span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 750;
}

.daily-date-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}

.daily-date-nav button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.daily-date-nav button:disabled {
  cursor: default;
  opacity: 0.42;
}

.rail-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 6px 13px;
  border-bottom: 1px solid var(--line);
}

.rail-heading span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-heading small {
  color: var(--ink-muted);
  font-size: 11px;
}

.level-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 0;
}

.level-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.level-button:hover {
  background: rgba(39, 143, 134, 0.08);
}

.level-button.active {
  background: var(--teal-soft);
}

.level-button:active {
  transform: translateY(1px);
}

.level-number {
  --level-colour: var(--teal);
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--level-colour) 35%, white);
  border-radius: 10px;
  background: color-mix(in srgb, var(--level-colour) 10%, white);
  color: var(--level-colour);
  font-size: 11px;
  font-weight: 900;
}

.level-button.active .level-number {
  border-color: var(--level-colour);
  background: var(--level-colour);
  color: white;
}

.level-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.level-label strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-label small {
  color: var(--ink-muted);
  font-size: 10px;
}

.rail-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 11px;
  background: var(--mango-soft);
  color: var(--navy);
}

.rail-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #bb7412;
}

.rail-note p {
  font-size: 10px;
  line-height: 1.45;
}

.rail-note strong {
  display: block;
  margin-bottom: 1px;
}

.practice-column {
  min-width: 0;
}

.session-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
  padding: 4px 2px 0;
}

.eyebrow {
  display: block;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.session-bar h1 {
  margin-top: 5px;
  font-family: var(--font-math);
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.session-bar p {
  max-width: 560px;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.level-score {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
}

.level-score strong {
  font-size: 25px;
  line-height: 1;
}

.level-score strong span {
  color: var(--ink-muted);
  font-size: 13px;
}

.level-score small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.question-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.5);
}

.question-count {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.difficulty-pill,
.marks-pill,
.builder-safe {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.difficulty-pill {
  padding: 4px 8px;
  background: var(--teal-soft);
  color: #176d65;
}

.difficulty-pill.challenge {
  background: #f0e7f6;
  color: #6d4687;
}

.difficulty-pill.stretch {
  background: var(--mango-soft);
  color: #9a5d09;
}

.marks-pill {
  padding: 5px 9px;
  border: 1px solid var(--line-dark);
  background: white;
  color: var(--navy);
}

.question-body {
  position: relative;
  padding: clamp(24px, 4vw, 38px) clamp(20px, 4vw, 36px) 22px;
  background-image:
    linear-gradient(rgba(39, 143, 134, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 143, 134, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.instruction {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.question-expression {
  margin: clamp(24px, 5vw, 42px) 0;
  overflow-x: auto;
  overflow-wrap: normal;
  color: var(--navy);
  font-family: var(--font-math);
  font-size: clamp(22px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  scrollbar-width: thin;
}

.display-math-fraction {
  display: inline-flex;
  min-width: 3em;
  align-items: stretch;
  flex-direction: column;
  margin: 0 0.18em;
  vertical-align: middle;
  line-height: 1.1;
}

.display-math-fraction > span:first-child {
  padding: 0.12em 0.28em 0.2em;
  border-bottom: 0.07em solid currentColor;
}

.display-math-fraction > span:last-child {
  padding: 0.2em 0.28em 0.12em;
}

.condition {
  margin-top: -18px;
  color: var(--ink-muted);
  font-family: var(--font-math);
  font-size: 11px;
  font-style: italic;
  text-align: center;
}

.paper-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px dashed rgba(19, 43, 58, 0.18);
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.pencil-dot {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--mango-soft);
  color: var(--navy);
}

.answer-builder {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #f4f8f7;
}

.builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.builder-heading h2 {
  margin-top: 3px;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.builder-safe {
  gap: 5px;
  padding: 6px 9px;
  background: var(--teal-soft);
  color: #176d65;
  white-space: nowrap;
}

.builder-display {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px 20px;
  border: 1px solid rgba(19, 43, 58, 0.16);
  border-radius: 13px;
  background: white;
  box-shadow: inset 0 1px 0 rgba(19, 43, 58, 0.03);
  color: var(--navy);
  font-family: var(--font-math);
  font-size: clamp(24px, 5vw, 34px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
  overflow-x: auto;
}

.builder-display.correct {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(39, 143, 134, 0.12);
}

.builder-display.wrong,
.builder-display.form {
  border-color: var(--coral);
}

.answer-part {
  min-width: 90px;
  min-height: 36px;
  padding: 2px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: text;
  font-family: inherit;
  font-size: inherit;
}

.answer-part.selected {
  background: var(--mango-soft);
  box-shadow: inset 0 -2px 0 var(--mango);
}

.fraction-line {
  width: min(220px, 72%);
  height: 2px;
  margin: 3px 0;
  background: var(--navy);
}

.builder-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.keypad {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.keypad-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keypad-row button {
  display: grid;
  min-width: 34px;
  height: 33px;
  place-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 1px rgba(19, 43, 58, 0.04);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.keypad-row button:hover {
  background: var(--mango-soft);
}

.keypad-row button:active {
  transform: translateY(1px);
}

.keypad-row button.variable-key {
  border-color: rgba(39, 143, 134, 0.3);
  background: var(--teal-soft);
  color: #176d65;
  font-family: var(--font-math);
  font-size: 15px;
}

.keypad-row button.power-chip {
  min-width: 52px;
  font-family: var(--font-math);
}

.keypad-row button.active-tool {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.mini-fraction,
.math-fraction {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  line-height: 1;
}

.mini-fraction span:first-child,
.math-fraction span:first-child {
  padding: 0 5px 2px;
  border-bottom: 1px solid currentColor;
}

.mini-fraction span:last-child,
.math-fraction span:last-child {
  padding: 2px 5px 0;
}

.submit-answer {
  display: inline-flex;
  min-width: 164px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 4px 0 var(--mango);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.submit-answer:hover {
  background: var(--navy-2);
}

.submit-answer:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--mango);
}

.inline-message {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
}

.inline-message.error {
  color: var(--coral);
}

.support-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px 0;
}

.hint-button,
.feedback-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.hint-button:hover,
.feedback-actions button:hover {
  background: rgba(39, 143, 134, 0.08);
}

.support-row > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hint-card,
.feedback-card {
  margin-top: 12px;
  border-radius: 14px;
}

.hint-card {
  padding: 14px 16px;
  border: 1px solid #efd490;
  background: var(--mango-soft);
}

.hint-card > span {
  color: #946017;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hint-card p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
}

.feedback-card {
  display: flex;
  gap: 13px;
  padding: 18px;
  border: 1px solid rgba(39, 143, 134, 0.3);
  background: #eef9f6;
}

.feedback-card.wrong,
.feedback-card.form {
  border-color: rgba(233, 104, 87, 0.3);
  background: #fff5f2;
}

.feedback-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
}

.wrong .feedback-icon,
.form .feedback-icon {
  background: var(--coral);
}

.feedback-copy {
  min-width: 0;
  flex: 1;
}

.feedback-copy h3 {
  margin-top: 3px;
  font-family: var(--font-math);
  font-size: 20px;
}

.feedback-copy > p {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.worked-solution {
  margin-top: 11px;
  padding: 12px;
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-math);
  font-size: 12px;
  line-height: 1.65;
}

.worked-solution p + p {
  margin-top: 3px;
}

.final-answer-line {
  margin-top: 7px !important;
  color: var(--teal);
}

.feedback-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.feedback-actions button.next-button {
  background: var(--navy);
  color: white;
}

.study-sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.law-card,
.mastery-card,
.session-card {
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.86);
  box-shadow: var(--shadow-sm);
}

.law-card {
  overflow: hidden;
}

.law-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  background: var(--navy);
  color: var(--mango);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.law-name {
  padding: 16px 15px 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.law-example {
  margin: 0 15px 15px;
  padding: 14px 10px;
  border-radius: 10px;
  background: var(--teal-soft);
  font-family: var(--font-math);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.mastery-card,
.session-card {
  padding: 15px;
}

.mastery-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 850;
}

.mastery-topline strong {
  color: var(--teal);
  font-size: 15px;
}

.mastery-track {
  overflow: hidden;
  height: 5px;
  margin-top: 9px;
  border-radius: 99px;
  background: #e4eae7;
}

.mastery-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 300ms ease;
}

.pattern-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 13px;
}

.pattern-dots span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 850;
}

.pattern-dots span.current {
  border-color: var(--mango);
  box-shadow: 0 0 0 2px var(--mango-soft);
  color: var(--navy);
}

.pattern-dots span.passed {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.mastery-card p,
.session-card p {
  margin-top: 11px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.session-card > span {
  display: block;
  margin-bottom: 10px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-card > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.session-card strong {
  font-size: 20px;
}

.session-card small {
  color: var(--ink-muted);
  font-size: 10px;
}

a.brand-lockup {
  color: inherit;
  text-decoration: none;
}

.chapter-crumb a {
  color: inherit;
  text-decoration: none;
}

.chapter-crumb a:hover {
  color: var(--teal);
}

.learning-home {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 12% 8%,
      rgba(255, 196, 94, 0.15),
      transparent 28rem
    ),
    radial-gradient(
      circle at 88% 15%,
      rgba(39, 143, 134, 0.14),
      transparent 27rem
    ),
    var(--cream);
}

.home-topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(255, 254, 250, 0.88);
  backdrop-filter: blur(16px);
}

.home-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.profile-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.profile-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgba(39, 143, 134, 0.28);
  border-radius: 50%;
  background: var(--teal-soft);
  color: #176d65;
  font-family: var(--font-math);
  font-size: 16px;
  font-weight: 800;
}

.home-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 44px) 64px;
}

.home-welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.home-welcome h1 {
  margin: 5px 0 0;
  font-family: var(--font-math);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.home-welcome p {
  max-width: 650px;
  margin: 9px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.today-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 750;
}

.continue-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(340px, 1.22fr);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.continue-visual {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--navy);
  background-size: 24px 24px;
}

.continue-visual::before,
.continue-visual::after {
  position: absolute;
  border-radius: 50%;
  content: '';
}

.continue-visual::before {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 196, 94, 0.22);
}

.continue-visual::after {
  width: 155px;
  height: 155px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.continue-visual > span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 30px;
  background: var(--mango);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  color: var(--navy);
  font-family: var(--font-math);
  font-size: 37px;
  font-weight: 800;
}

.floating-power {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: var(--font-math);
  font-size: 16px;
  backdrop-filter: blur(6px);
}

.power-one {
  top: 40px;
  left: 34px;
}

.power-two {
  right: 30px;
  bottom: 38px;
}

.power-three {
  top: 65px;
  right: 24px;
}

.continue-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
}

.continue-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.continue-copy h2 {
  margin: 10px 0 0;
  font-family: var(--font-math);
  font-size: clamp(35px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.continue-copy > p {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 650;
}

.home-progress-row {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.home-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 99px;
  background: #e4eae7;
}

.home-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.home-progress-row strong {
  color: var(--teal);
  font-size: 13px;
}

.continue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 10px;
}

.continue-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 4px 0 var(--mango);
  color: white;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.continue-button:hover {
  background: var(--navy-2);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 20px;
  margin-top: 22px;
}

.topic-library,
.focus-card,
.tutor-card {
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.84);
  box-shadow: var(--shadow-sm);
}

.topic-library {
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-family: var(--font-math);
  font-size: 23px;
  letter-spacing: -0.025em;
}

.topic-count,
.coming-soon {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #176d65;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 17px;
}

.topic-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

a.topic-row {
  color: inherit;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

a.topic-row:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.topic-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
}

.topic-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.topic-copy strong {
  font-size: 12px;
}

.topic-copy small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
}

.topic-arrow {
  color: var(--ink-muted);
}

.upcoming-topic {
  opacity: 0.7;
}

.upcoming-topic .topic-icon {
  background: #edf0ef;
  color: var(--ink-muted);
}

.challenge-topic .topic-icon {
  background: var(--mango-soft);
  color: #b56c0b;
}

.daily-topic .topic-icon {
  background: #f0e7f6;
  color: #6d4687;
}

.coming-soon {
  background: #edf0ef;
  color: var(--ink-muted);
}

.home-side-stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.focus-card,
.tutor-card {
  padding: 20px;
}

.focus-card {
  background: var(--navy);
  color: white;
}

.focus-card > svg {
  color: var(--mango);
}

.focus-card > span,
.tutor-card > span {
  display: block;
  margin-top: 13px;
  color: var(--mango);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.focus-card h3 {
  margin: 7px 0 0;
  font-family: var(--font-math);
  font-size: 20px;
  line-height: 1.25;
}

.focus-card p,
.tutor-card p {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.focus-card p {
  color: rgba(255, 255, 255, 0.68);
}

.tutor-card > span {
  margin-top: 0;
  color: var(--teal);
}

.tutor-card p {
  color: var(--navy);
  font-family: var(--font-math);
  font-size: 13px;
  font-style: italic;
}

::selection {
  background: var(--mango);
  color: var(--navy);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(28px, 7vw, 44px);
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: var(--shadow-md);
}

.login-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 25px;
  place-items: center;
  border-radius: 15px;
  background: var(--navy);
  box-shadow: 0 5px 0 var(--mango);
  color: white;
  font-family: var(--font-math);
  font-size: 27px;
  font-weight: 700;
}

.login-card h1 {
  margin: 8px 0 7px;
  font-family: var(--font-math);
  font-size: 35px;
  line-height: 1.05;
}

.login-card > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.login-card form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.login-card label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: white;
  color: var(--navy);
  font-size: 15px;
}

.login-card input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(39, 143, 134, 0.12);
}

.login-card button {
  min-height: 49px;
  margin-top: 3px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 4px 0 var(--mango);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.login-card small {
  display: block;
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

.login-error {
  margin: 0;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
}

.login-switch {
  display: block;
  margin-top: 16px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.teacher-login-mark,
.teacher-brand-mark {
  background: var(--teal);
}

.teacher-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(39, 143, 134, 0.13),
      transparent 28rem
    ),
    var(--cream);
}

.teacher-topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(255, 254, 250, 0.9);
  backdrop-filter: blur(16px);
}

.teacher-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.teacher-actions a,
.teacher-actions button {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: white;
  color: var(--navy);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.teacher-actions form {
  margin: 0;
}

.teacher-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 50px) clamp(16px, 4vw, 42px) 64px;
}

.teacher-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.teacher-welcome h1 {
  margin: 5px 0 0;
  font-family: var(--font-math);
  font-size: clamp(31px, 5vw, 45px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.teacher-welcome p {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.teacher-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #176d65;
  font-size: 9px;
  font-weight: 850;
}

.teacher-live-status.error {
  background: #fff0ed;
  color: var(--coral);
}

.spinning {
  animation: teacher-spin 800ms linear infinite;
}

@keyframes teacher-spin {
  to {
    transform: rotate(360deg);
  }
}

.teacher-empty-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid #e9ce86;
  border-radius: 14px;
  background: var(--mango-soft);
}

.teacher-empty-state svg {
  flex: 0 0 auto;
  color: #a86812;
}

.teacher-empty-state strong {
  font-size: 12px;
}

.teacher-empty-state p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.teacher-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.teacher-summary-card {
  display: flex;
  min-height: 150px;
  align-items: flex-start;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.teacher-summary-card > svg {
  color: var(--teal);
}

.teacher-summary-card > span {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teacher-summary-card > strong {
  margin-top: 4px;
  font-family: var(--font-math);
  font-size: 26px;
  line-height: 1.15;
}

.teacher-summary-card > small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 9px;
}

.teacher-summary-card.hard-card > svg {
  color: #b56c0b;
}

.teacher-summary-card.daily-card > svg {
  color: #6d4687;
}

.teacher-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.teacher-panel {
  padding: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: rgba(255, 254, 250, 0.88);
  box-shadow: var(--shadow-sm);
}

.teacher-review-panel {
  grid-column: 1 / -1;
}

.teacher-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.teacher-panel-heading h2 {
  margin: 5px 0 0;
  font-family: var(--font-math);
  font-size: 22px;
}

.teacher-panel-heading > strong {
  color: var(--teal);
  font-size: 14px;
}

.teacher-level-list,
.daily-history-list,
.review-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.teacher-level-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.teacher-level-code {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
}

.teacher-level-row > div > strong,
.teacher-level-row > span:last-child {
  font-size: 10px;
}

.teacher-mini-track {
  overflow: hidden;
  height: 4px;
  margin-top: 7px;
  border-radius: 99px;
  background: #e5ebe8;
}

.teacher-mini-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.daily-history-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.daily-history-list span,
.daily-history-list strong {
  font-size: 10px;
}

.daily-history-list small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 9px;
}

.review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-list > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.review-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.review-list strong {
  display: block;
  font-size: 10px;
}

.review-list small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.teacher-panel-empty {
  margin: 20px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

@media (max-width: 1190px) {
  .study-layout {
    grid-template-columns: 218px minmax(0, 1fr);
    max-width: 1050px;
  }

  .study-sidebar {
    position: static;
    display: grid;
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .chapter-crumb {
    display: none;
  }

  .study-layout {
    display: block;
    max-width: 790px;
    padding-top: 18px;
  }

  .level-rail {
    position: static;
    margin-bottom: 20px;
    padding: 12px;
  }

  .practice-picker {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    overflow-x: auto;
    margin-bottom: 10px;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .practice-picker::-webkit-scrollbar {
    display: none;
  }

  .practice-picker button {
    scroll-snap-align: start;
  }

  .challenge-rail,
  .daily-rail {
    padding: 9px 6px 4px;
  }

  .challenge-stat {
    max-width: 240px;
  }

  .rail-heading,
  .rail-note {
    display: none;
  }

  .level-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    gap: 7px;
    overflow-x: auto;
    padding: 0 0 3px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

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

  .level-button {
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 9px;
    scroll-snap-align: start;
  }

  .level-label {
    width: 100%;
  }

  .level-label strong {
    max-width: 100%;
  }

  .study-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
  }

  .continue-card {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .teacher-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .teacher-review-panel {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .topbar {
    position: static;
    min-height: 64px;
    padding: 11px 15px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 13px;
  }

  .overall-copy {
    display: none;
  }

  .progress-ring {
    width: 39px;
    height: 39px;
  }

  .progress-ring::after {
    width: 31px;
    height: 31px;
  }

  .study-layout {
    padding: 12px 12px 40px;
  }

  .level-rail {
    margin-bottom: 15px;
    border-radius: 13px;
  }

  .level-list {
    grid-template-columns: repeat(5, 116px);
  }

  .level-button {
    min-height: 88px;
    border: 1px solid rgba(19, 43, 58, 0.08);
    background: rgba(255, 255, 255, 0.64);
  }

  .level-label strong {
    min-height: 27px;
    line-height: 1.15;
    white-space: normal;
  }

  .session-bar {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .session-bar p {
    display: none;
  }

  .level-score {
    padding-top: 4px;
  }

  .question-card {
    border-radius: 15px;
  }

  .question-meta,
  .answer-builder {
    padding-right: 14px;
    padding-left: 14px;
  }

  .question-body {
    padding: 24px 16px 18px;
  }

  .question-expression {
    margin: 29px 0;
  }

  .builder-heading {
    align-items: flex-start;
  }

  .builder-safe {
    display: none;
  }

  .builder-tools {
    grid-template-columns: 1fr;
  }

  .submit-answer {
    min-height: 45px;
  }

  .keypad-row button {
    min-width: 44px;
    height: 44px;
    padding: 0 7px;
  }

  .practice-picker {
    grid-template-columns: repeat(3, 142px);
  }

  .practice-picker button {
    min-height: 58px;
  }

  .daily-date-nav button {
    min-height: 46px;
  }

  .study-sidebar {
    grid-template-columns: 1fr;
  }

  .law-card,
  .mastery-card,
  .session-card {
    border-radius: 13px;
  }

  .home-topbar {
    min-height: 64px;
    padding: 11px 15px;
  }

  .profile-status {
    display: none;
  }

  .home-shell {
    padding: 28px 13px 44px;
  }

  .home-welcome {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .home-welcome p {
    font-size: 12px;
  }

  .continue-card {
    grid-template-columns: 1fr;
    border-radius: 17px;
  }

  .continue-visual {
    min-height: 188px;
  }

  .continue-visual > span {
    width: 84px;
    height: 84px;
    border-radius: 23px;
    font-size: 29px;
  }

  .continue-visual::before {
    width: 155px;
    height: 155px;
  }

  .continue-visual::after {
    width: 116px;
    height: 116px;
  }

  .floating-power {
    font-size: 13px;
  }

  .power-one {
    top: 25px;
    left: 20px;
  }

  .power-two {
    right: 20px;
    bottom: 23px;
  }

  .power-three {
    top: 30px;
    right: 18px;
  }

  .continue-copy {
    padding: 26px 20px 29px;
  }

  .continue-copy h2 {
    font-size: 36px;
  }

  .topic-library,
  .focus-card,
  .tutor-card {
    border-radius: 14px;
  }

  .topic-library {
    padding: 16px;
  }

  .topic-count {
    display: none;
  }

  .topic-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topic-progress,
  .coming-soon {
    display: none;
  }

  .topic-arrow {
    display: block;
  }

  .home-side-stack {
    grid-template-columns: 1fr;
  }

  .teacher-topbar {
    min-height: 64px;
    padding: 11px 14px;
  }

  .teacher-actions a {
    display: none;
  }

  .teacher-actions button {
    min-height: 44px;
  }

  .teacher-shell {
    padding: 27px 13px 44px;
  }

  .teacher-welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .teacher-summary-card {
    min-height: 145px;
    padding: 15px;
  }

  .teacher-summary-card > strong {
    font-size: 21px;
  }

  .teacher-panel {
    padding: 16px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Guided courses, Standard Form, deadlines and admin review */
.deadline-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 16px 19px;
  border: 1px solid rgba(233, 104, 87, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7f1, #fffdf8);
  box-shadow: var(--shadow-sm);
}

.deadline-card.compact {
  min-width: 275px;
  min-height: 74px;
  padding: 13px 15px;
}

.deadline-card.urgent,
.deadline-card.overdue {
  border-color: rgba(210, 70, 59, 0.48);
  background: linear-gradient(135deg, #fff0eb, #fff9f5);
}

.deadline-card.complete {
  border-color: rgba(39, 143, 134, 0.3);
  background: var(--teal-soft);
}

.deadline-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--coral);
  color: white;
}

.deadline-card.complete .deadline-icon {
  background: var(--teal);
}

.deadline-card > div:last-child {
  display: grid;
  gap: 2px;
}

.deadline-kicker,
.deadline-card small {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.deadline-kicker {
  color: var(--coral);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deadline-card strong {
  font-size: 15px;
}

.continue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.continue-secondary {
  min-height: 44px;
  padding: 12px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: white;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.lesson-topic .topic-icon,
.standard-topic .topic-icon,
.standard-practice-topic .topic-icon {
  background: #eeecff;
  color: #6259c9;
}

.locked-topic {
  opacity: 0.72;
  background: #f1f2f0;
}

.admin-preview-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(98, 89, 201, 0.3);
  border-radius: 16px;
  background: #f0efff;
  color: #302a78;
}

.admin-preview-banner > svg {
  flex: 0 0 auto;
}

.admin-preview-banner > div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.admin-preview-banner strong {
  font-size: 13px;
}

.admin-preview-banner span {
  font-size: 12px;
  line-height: 1.45;
}

.admin-preview-banner a {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.guided-course-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 80% 0%,
      color-mix(in srgb, var(--course-accent) 10%, transparent),
      transparent 28rem
    ),
    #f5f4ef;
}

.course-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 11px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: blur(18px);
}

.course-back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.course-sync {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.course-sync.pending {
  background: var(--mango-soft);
  color: #8a5d08;
}

.course-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  width: min(1320px, calc(100% - 38px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.course-rail {
  position: sticky;
  top: 98px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.course-rail-intro {
  display: grid;
  gap: 7px;
  padding: 20px;
  border-bottom: 1px solid var(--line-dark);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--course-accent) 10%, white),
    white
  );
}

.course-rail-intro > span,
.course-rail-intro small {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-rail-intro h2 {
  margin: 0;
  font-family: var(--font-math);
  font-size: 27px;
}

.course-progress-track,
.sf-rail-progress > div {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e6e8e5;
}

.course-progress-track span,
.sf-rail-progress > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--course-accent, #6259c9);
  transition: width 240ms ease;
}

.course-section-nav {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.course-section-nav button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.course-section-nav button:hover,
.course-section-nav button.active {
  background: color-mix(in srgb, var(--course-accent) 9%, white);
}

.course-section-nav button > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.course-section-nav strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-section-nav small {
  color: var(--ink-muted);
  font-size: 10px;
}

.course-step-dot {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: white;
  font-size: 11px;
  font-weight: 900;
}

.course-step-dot.done {
  border-color: transparent;
  background: var(--teal);
  color: white;
}

.course-practice-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 7px 10px 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.course-stage {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.course-stage-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 6px;
}

.course-stage-hero h1 {
  max-width: 730px;
  margin: 6px 0 7px;
  font-family: var(--font-math);
  font-size: clamp(31px, 4vw, 49px);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.course-stage-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.65;
}

.course-panel {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.course-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.course-panel-heading h2,
.lesson-intro-panel h2 {
  margin: 4px 0 5px;
  font-family: var(--font-math);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.025em;
}

.course-panel-heading p,
.lesson-intro-panel p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.55;
}

.course-count,
.lesson-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--course-accent) 10%, white);
  color: var(--course-accent);
  font-size: 11px;
  font-weight: 900;
}

.course-question-block {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 28px;
  border-radius: 21px;
  background: #f7f7f3;
}

.question-skill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--course-accent, #6259c9);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.course-question-block h3,
.active-worked-step h3,
.exit-question-list h3 {
  margin: 10px 0;
  font-size: 18px;
}

.course-math,
.worked-expression {
  overflow-x: auto;
  margin: 14px 0 20px;
  padding: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: white;
  font-family: var(--font-math);
  font-size: clamp(24px, 4vw, 35px);
  line-height: 1.6;
  text-align: center;
}

.course-math.small {
  padding: 13px;
  font-size: 21px;
}

.course-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.course-choice-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.course-choice-grid button > span:first-child {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #eff1ef;
  font-size: 11px;
  font-weight: 900;
}

.course-choice-grid button.correct,
.worked-choice-grid button.correct {
  border-color: rgba(39, 143, 134, 0.45);
  background: var(--teal-soft);
}

.course-choice-grid button.wrong,
.worked-choice-grid button.wrong {
  border-color: rgba(233, 104, 87, 0.44);
  background: #fff0ec;
}

.course-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 15px;
  padding: 14px;
  border-radius: 14px;
  background: #fff0ec;
}

.course-feedback.correct {
  background: var(--teal-soft);
}

.course-feedback p {
  flex: 1 0 100%;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.course-feedback button,
.diagnostic-result button,
.lesson-complete-banner button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border: 0;
  border-radius: 11px;
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.diagnostic-result {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  max-width: 800px;
  margin: 8px auto;
}

.result-orbit {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  align-content: center;
  border: 9px solid color-mix(in srgb, var(--course-accent) 25%, white);
  border-radius: 50%;
  background: white;
}

.result-orbit strong {
  font-family: var(--font-math);
  font-size: 43px;
  line-height: 1;
}

.result-orbit small {
  color: var(--ink-muted);
  font-size: 11px;
}

.diagnostic-result h2 {
  margin: 5px 0;
  font-family: var(--font-math);
  font-size: 31px;
}

.diagnostic-result p {
  margin: 0 0 16px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.lesson-intro-panel {
  position: relative;
  overflow: hidden;
  padding-left: clamp(88px, 12vw, 132px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--course-accent) 14%, white),
    white 70%
  );
}

.lesson-number-badge {
  position: absolute;
  inset: 0 auto 0 0;
  display: grid;
  width: clamp(72px, 10vw, 108px);
  place-items: center;
  background: var(--course-accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.teaching-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.teaching-grid article {
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: #fafaf7;
}

.teaching-grid article > span {
  color: var(--course-accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.teaching-formula {
  margin: 13px 0 9px;
  font-family: var(--font-math);
  font-size: 20px;
  line-height: 1.6;
}

.teaching-grid p,
.teaching-grid small {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

.teaching-grid small {
  display: block;
  margin-top: 7px;
  color: var(--coral);
  font-weight: 700;
}

.worked-expression {
  margin-top: 22px;
  background: color-mix(in srgb, var(--course-accent) 5%, white);
}

.revealed-step-list {
  display: grid;
  gap: 8px;
}

.revealed-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 12px;
  border-radius: 13px;
  background: #f1f7f5;
}

.revealed-step > span,
.worked-final > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
}

.revealed-step small,
.step-label,
.worked-final small {
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.revealed-step p,
.active-worked-step p,
.worked-final p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.active-worked-step {
  margin-top: 10px;
  padding: 20px;
  border: 2px solid color-mix(in srgb, var(--course-accent) 35%, white);
  border-radius: 17px;
  background: white;
}

.worked-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.worked-choice-grid button {
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: #fafaf8;
  cursor: pointer;
}

.worked-final {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  margin-top: 12px;
  padding: 18px;
  border-radius: 16px;
  background: var(--teal-soft);
}

.worked-final strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-math);
  font-size: 27px;
}

.admin-reveal-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(98, 89, 201, 0.28);
  border-radius: 10px;
  background: #f0efff;
  color: #4b43a8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lesson-memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.75fr);
  gap: 18px;
}

.remember-panel ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.remember-panel li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.remember-panel li svg {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--teal);
}

.mistake-panel {
  background: #fff3dd;
}

.mistake-panel > span {
  display: block;
  margin: 12px 0 6px;
  color: #9a6505;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mistake-panel p {
  margin: 0;
  font-family: var(--font-math);
  font-size: 17px;
  line-height: 1.55;
}

.exit-question-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.exit-question-list article {
  padding: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: #fafaf7;
}

.inline-course-feedback {
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #fff0ec;
  font-size: 12px;
  line-height: 1.5;
}

.inline-course-feedback.correct {
  background: var(--teal-soft);
}

.inline-course-feedback button {
  margin-left: 9px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.lesson-complete-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--teal-soft);
}

.lesson-complete-banner > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--teal);
  color: white;
}

.lesson-complete-banner > div {
  flex: 1;
}

.lesson-complete-banner p {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.theory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.theory-summary-grid article {
  padding: 17px;
  border-radius: 16px;
  background: #f7f7f3;
}

.theory-summary-grid h3 {
  margin: 0 0 12px;
  font-family: var(--font-math);
  font-size: 20px;
}

.theory-summary-grid article > div {
  padding: 10px 0;
  border-top: 1px solid var(--line-dark);
}

.theory-summary-grid strong {
  display: block;
  font-family: var(--font-math);
  font-size: 16px;
}

.theory-summary-grid p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.theory-ready-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 17px;
  background: var(--navy);
  color: white;
}

.theory-ready-card h3,
.theory-ready-card p {
  margin: 3px 0;
}

.theory-ready-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.theory-ready-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--mango);
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

/* Standard Form practice */
.sf-practice-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 88% 0%,
      rgba(98, 89, 201, 0.12),
      transparent 30rem
    ),
    #f5f4ef;
}

.sf-header {
  grid-template-columns: 1fr auto 1fr;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.header-actions a,
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.sync-status {
  background: var(--teal-soft);
  color: var(--teal);
}

.sf-practice-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 880px);
  justify-content: center;
  align-items: start;
  gap: 26px;
  width: min(1250px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.sf-practice-rail {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 13px;
}

.sf-practice-rail .deadline-card {
  min-width: 0;
}

.sf-rail-progress,
.sf-practice-rail nav {
  padding: 17px;
  border: 1px solid var(--line-dark);
  border-radius: 19px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.sf-rail-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.sf-rail-progress > span,
.sf-rail-progress small {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sf-rail-progress > div,
.sf-rail-progress small {
  grid-column: 1 / -1;
}

.sf-rail-progress > div span {
  background: #6259c9;
}

.sf-practice-rail nav {
  display: grid;
  gap: 5px;
  padding: 9px;
}

.sf-practice-rail nav button {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sf-practice-rail nav button.active,
.sf-practice-rail nav button:hover {
  background: #efeeff;
}

.sf-practice-rail nav button > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #f0f1ef;
  font-size: 11px;
  font-weight: 900;
}

.sf-practice-rail nav button.active > span {
  background: #6259c9;
  color: white;
}

.sf-practice-rail nav button div {
  display: grid;
  gap: 2px;
}

.sf-practice-rail nav strong {
  font-size: 12px;
}

.sf-practice-rail nav small {
  color: var(--ink-muted);
  font-size: 10px;
}

.sf-practice-rail nav button.mastery {
  margin-top: 5px;
  border-top: 1px solid var(--line-dark);
  border-radius: 0 0 12px 12px;
}

.sf-question-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.sf-session-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 3px 8px;
}

.sf-session-heading h1 {
  margin: 4px 0;
  font-family: var(--font-math);
  font-size: clamp(30px, 4vw, 45px);
}

.sf-session-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.sf-question-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 23px;
  background: white;
  box-shadow: var(--shadow-md);
}

.sf-question-card > .question-meta {
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-dark);
}

.sf-question-copy,
.mastery-scenario,
.sf-checkpoint-prompt {
  padding: 24px clamp(18px, 4vw, 34px);
}

.sf-question-copy > span,
.mastery-scenario > span,
.sf-checkpoint-prompt > span {
  color: #6259c9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sf-question-copy h2,
.sf-checkpoint-prompt h2 {
  margin: 8px 0 0;
  font-family: var(--font-math);
  font-size: 23px;
}

.mastery-scenario {
  background: #f2f0ff;
}

.mastery-scenario p {
  margin: 12px 0 18px;
  font-family: var(--font-math);
  font-size: 19px;
  line-height: 1.55;
}

.checkpoint-path {
  display: flex;
  gap: 7px;
}

.checkpoint-path span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 900;
}

.checkpoint-path span.current {
  background: #6259c9;
  color: white;
}

.checkpoint-path span.passed {
  background: var(--teal);
  color: white;
}

.sf-checkpoint-prompt {
  padding-bottom: 4px;
}

.sf-builder-card {
  padding: 24px clamp(18px, 4vw, 34px) 30px;
  border-top: 1px solid var(--line-dark);
  background: #fafaf7;
}

.sf-answer-builder-fields {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 13px;
  padding: 23px;
  border: 2px solid rgba(98, 89, 201, 0.22);
  border-radius: 17px;
  background: white;
}

.sf-answer-builder-fields label,
.ordinary-answer-field {
  display: grid;
  gap: 6px;
}

.sf-answer-builder-fields label > span,
.ordinary-answer-field > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sf-answer-builder-fields input {
  width: 150px;
  height: 49px;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: #fafaf8;
  font-family: var(--font-math);
  font-size: 20px;
}

.sf-answer-builder-fields .sf-exponent-field input {
  width: 72px;
}

.sf-times,
.sf-ten,
.sf-unit {
  padding-bottom: 10px;
  font-family: var(--font-math);
  font-size: 25px;
}

.sf-unit {
  color: var(--ink-muted);
  font-size: 17px;
}

.ordinary-answer-field {
  max-width: 540px;
  margin: 22px auto 13px;
}

.ordinary-answer-field > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ordinary-answer-field input {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 2px solid rgba(98, 89, 201, 0.22);
  border-radius: 13px;
  background: white;
  font-family: var(--font-math);
  font-size: 20px;
}

.sf-choice-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 540px;
  margin: 22px auto 13px;
}

.sf-choice-builder button {
  min-height: 52px;
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  background: white;
  font-weight: 800;
  cursor: pointer;
}

.sf-choice-builder button.selected {
  border-color: #6259c9;
  background: #efeeff;
}

.sf-builder-note {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

.sf-builder-card .submit-answer {
  margin-left: auto;
}

.sf-support-row,
.admin-question-controls,
.admin-question-nav {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sf-support-row button,
.admin-question-controls button,
.admin-question-nav > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: white;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.admin-question-controls {
  justify-content: center;
  padding: 11px;
  border: 1px solid rgba(98, 89, 201, 0.22);
  border-radius: 13px;
  background: #f0efff;
}

.admin-question-nav {
  justify-content: space-between;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.admin-question-nav .pattern-dots {
  flex: 1;
  justify-content: center;
}

/* Teacher evidence and course overview */
.teacher-actions .admin-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.teacher-deadline-strip {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
  padding: 14px 17px;
  border: 1px solid rgba(233, 104, 87, 0.28);
  border-radius: 17px;
  background: #fff5ec;
}

.teacher-deadline-strip.overdue {
  background: #fff0ec;
}

.teacher-deadline-strip div {
  display: grid;
  gap: 2px;
}

.teacher-deadline-strip span,
.teacher-deadline-strip small {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.standard-card {
  background: linear-gradient(145deg, #f1efff, white);
}

.course-choice-grid button.form,
.course-feedback.form,
.inline-course-feedback.form {
  border-color: #d7a52b;
  background: #fff8df;
  color: #72520b;
}

.cumulative-test-summary {
  margin-top: 15px;
  border-color: rgba(39, 143, 134, 0.28);
  background: linear-gradient(135deg, #f2fbf9, #fffdf8 72%);
}

.cumulative-test-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cumulative-test-heading h2 {
  margin: 5px 0 4px;
  font-family: var(--font-math);
  font-size: clamp(20px, 2.4vw, 29px);
}

.cumulative-test-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.cumulative-test-status {
  padding: 8px 11px;
  border-radius: 999px;
  background: #dcefeb;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.cumulative-test-summary.submitted .cumulative-test-status {
  background: var(--teal);
  color: white;
}

.cumulative-test-summary.expired .cumulative-test-status {
  background: #fff0ec;
  color: #b14636;
}

.cumulative-test-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.cumulative-test-details > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.cumulative-test-details span {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cumulative-test-details strong {
  color: var(--navy);
  font-size: 11px;
}

.cumulative-test-preview {
  display: inline-flex;
  margin-top: 13px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--navy);
  color: white;
  font-size: 9px;
  font-weight: 850;
  text-decoration: none;
}

.cumulative-test-summary.locked {
  border-color: #e3cc96;
  background: linear-gradient(135deg, #fff9e9, #fffdf8 72%);
}
.cumulative-test-summary.locked .cumulative-test-status {
  background: #f5dfaa;
  color: #80500d;
}
.test-readiness-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 16px;
}
.test-readiness-list > a {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--navy);
  text-decoration: none;
}
.test-readiness-list > a > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #f7e6bd;
  color: #8a570d;
}
.test-readiness-list > a.complete > span {
  background: var(--teal);
  color: white;
}
.test-readiness-list svg {
  width: 13px;
}
.test-readiness-list strong {
  font-size: 9px;
}
.test-readiness-list small {
  color: var(--ink-muted);
  font-size: 8px;
}
.teacher-test-paper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}
.teacher-test-paper-grid > article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.teacher-test-paper-grid > article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.teacher-test-paper-grid span {
  color: var(--teal);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
.teacher-test-paper-grid strong {
  font-size: 10px;
}
.teacher-test-paper-grid p {
  margin: 8px 0 4px;
  font-size: 10px;
}
.teacher-test-paper-grid small {
  color: var(--ink-muted);
  font-size: 8px;
}
.teacher-test-evidence {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.teacher-test-evidence > summary {
  padding: 11px 0 2px;
  color: var(--teal);
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}
.teacher-test-evidence > div {
  display: grid;
  max-height: 640px;
  gap: 9px;
  margin-top: 10px;
  overflow-y: auto;
}
.teacher-test-evidence > div > article {
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-dark);
  border-radius: 10px;
  background: #fbfcfa;
}
.teacher-test-evidence > div > article.correct {
  border-left-color: var(--teal);
}
.teacher-test-evidence > div > article.wrong,
.teacher-test-evidence > div > article.blank {
  border-left-color: var(--coral);
}
.teacher-test-evidence > div > article.form {
  border-left-color: #c17a10;
}
.teacher-test-evidence article > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.teacher-test-evidence article > header > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #edf2f0;
  color: var(--navy);
  font-size: 8px;
}
.teacher-test-evidence article > header strong {
  display: block;
  color: var(--teal);
  font-size: 8px;
  text-transform: uppercase;
}
.teacher-test-evidence article > header p {
  margin: 4px 0 0;
  font-family: var(--font-math);
  font-size: 12px;
  line-height: 1.4;
}
.teacher-test-evidence article > header em {
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}
.teacher-test-scenario,
.teacher-test-expression {
  margin-top: 9px;
  padding: 9px;
  border-radius: 8px;
  background: #f2f7f5;
  font-family: var(--font-math);
  font-size: 11px;
  line-height: 1.5;
}
.teacher-test-evidence .exam-diagram-card {
  margin: 9px 0 0;
}
.teacher-test-evidence dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 9px 0 0;
}
.teacher-test-evidence dl > div {
  padding: 8px;
  border-radius: 8px;
  background: #f3f5f3;
}
.teacher-test-evidence dt {
  color: var(--ink-muted);
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
}
.teacher-test-evidence dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-family: var(--font-math);
  font-size: 11px;
}

.guided-overview-panel,
.mistake-insights-panel,
.answer-history-panel {
  margin-top: 15px;
}

.guided-course-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.guided-course-summary-grid article {
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-radius: 15px;
  background: #fafaf8;
}

.guided-course-summary-grid article > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.guided-course-summary-grid small {
  color: var(--ink-muted);
  font-size: 10px;
}

.guided-stat-pair {
  display: flex;
  gap: 18px;
  margin: 13px 0 10px;
  color: var(--ink-muted);
  font-size: 11px;
}

.guided-stat-pair b {
  color: var(--navy);
}

.mistake-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.mistake-insight-grid article {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(233, 104, 87, 0.2);
  border-radius: 13px;
  background: #fff8f5;
}

.mistake-insight-grid article > div {
  display: grid;
  gap: 3px;
}

.mistake-insight-grid small,
.mistake-insight-grid em {
  color: var(--ink-muted);
  font-size: 10px;
}

.mistake-insight-grid em {
  color: var(--coral);
  font-style: normal;
  font-weight: 700;
}

.answer-history-heading {
  align-items: flex-end;
}

.history-filters {
  display: flex;
  gap: 6px;
}

.history-filters button,
.show-history-button {
  padding: 8px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: white;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.history-filters button.active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.attempt-history-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.attempt-history-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(39, 143, 134, 0.22);
  border-radius: 15px;
  background: #f7fcfa;
}

.attempt-history-list article.wrong {
  border-color: rgba(233, 104, 87, 0.24);
  background: #fff9f6;
}

.attempt-status-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal);
  color: white;
}

.attempt-history-list article.wrong .attempt-status-icon {
  background: var(--coral);
}

.attempt-main {
  min-width: 0;
}

.attempt-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.attempt-topline small {
  color: var(--ink-muted);
}

.attempt-main h3 {
  margin: 6px 0 11px;
  font-family: var(--font-math);
  font-size: 16px;
  line-height: 1.4;
}

.answer-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.answer-comparison p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.answer-comparison span,
.attempt-correction strong {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-comparison strong {
  overflow-wrap: anywhere;
  font-family: var(--font-math);
  font-size: 14px;
}

.attempt-correction {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #fff0ec;
}

.attempt-correction p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.show-history-button {
  display: block;
  margin: 14px auto 0;
}

@media (max-width: 1100px) {
  .course-layout,
  .sf-practice-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
  }

  .course-section-nav strong {
    font-size: 11px;
  }

  .course-stage-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .course-stage-hero .deadline-card {
    width: 100%;
  }

  .teacher-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .course-topbar,
  .sf-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 10px 13px;
  }

  .course-topbar > .brand-lockup,
  .sf-header > .brand-lockup {
    display: none;
  }

  .course-sync,
  .header-actions {
    grid-column: 2;
  }

  .header-actions a {
    display: none;
  }

  .admin-preview-banner {
    align-items: flex-start;
    width: calc(100% - 20px);
    margin-top: 9px;
  }

  .admin-preview-banner a {
    display: none;
  }

  .course-layout,
  .sf-practice-shell {
    display: block;
    width: calc(100% - 20px);
    padding-top: 15px;
  }

  .course-rail,
  .sf-practice-rail {
    position: static;
    margin-bottom: 15px;
  }

  .course-section-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    scroll-snap-type: x mandatory;
  }

  .course-section-nav button {
    min-width: 175px;
    scroll-snap-align: start;
  }

  .course-practice-link {
    margin-top: 0;
  }

  .course-stage-hero h1 {
    font-size: 34px;
  }

  .deadline-card.compact {
    min-width: 0;
  }

  .course-panel {
    padding: 18px;
    border-radius: 19px;
  }

  .course-choice-grid,
  .teaching-grid,
  .worked-choice-grid,
  .lesson-memory-grid,
  .theory-summary-grid {
    grid-template-columns: 1fr;
  }

  .course-question-block {
    padding: 16px;
  }

  .diagnostic-result {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-orbit {
    width: 118px;
    height: 118px;
    margin: auto;
  }

  .lesson-intro-panel {
    padding-left: 78px;
  }

  .lesson-number-badge {
    width: 61px;
  }

  .course-math,
  .worked-expression {
    padding: 15px 8px;
    font-size: 24px;
  }

  .lesson-complete-banner,
  .theory-ready-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .sf-practice-rail {
    display: block;
  }

  .sf-practice-rail .deadline-card,
  .sf-rail-progress {
    margin-bottom: 10px;
  }

  .sf-practice-rail nav {
    display: flex;
    overflow-x: auto;
  }

  .sf-practice-rail nav button {
    min-width: 145px;
  }

  .sf-session-heading {
    align-items: flex-start;
  }

  .sf-answer-builder-fields {
    flex-wrap: wrap;
    padding: 16px;
  }

  .sf-answer-builder-fields input {
    width: 116px;
  }

  .sf-choice-builder,
  .guided-course-summary-grid,
  .mistake-insight-grid,
  .answer-comparison {
    grid-template-columns: 1fr;
  }

  .admin-question-nav {
    flex-wrap: wrap;
  }

  .admin-question-nav .pattern-dots {
    order: 3;
    flex-basis: 100%;
  }

  .teacher-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cumulative-test-heading {
    flex-direction: column;
  }

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

  .answer-history-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .attempt-history-list article {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 12px;
  }
}

/* Quadratics: twenty-level practice */
.quad-practice-page,
.graph-lab-page,
.review-page,
.mixed-test-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 86% 4%,
      rgba(40, 127, 140, 0.14),
      transparent 27rem
    ),
    #f5f4ef;
}
.quad-practice-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 20px;
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 34px) 70px;
}
.quad-level-rail {
  position: sticky;
  top: 92px;
  overflow: hidden auto;
  max-height: calc(100vh - 116px);
  align-self: start;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}
.quad-rail-progress {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.quad-rail-progress > span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quad-rail-progress > strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-math);
  font-size: 28px;
}
.quad-rail-progress > div {
  overflow: hidden;
  height: 5px;
  margin-top: 9px;
  border-radius: 99px;
  background: #e7ecea;
}
.quad-rail-progress > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}
.quad-rail-progress small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 9px;
}
.quad-level-rail nav {
  display: grid;
  gap: 3px;
  padding: 8px;
}
.quad-level-rail nav button {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 49px;
  padding: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.quad-level-rail nav button:hover:not(:disabled),
.quad-level-rail nav button.active {
  background: #e7f4f2;
}
.quad-level-rail nav button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.quad-level-rail nav button > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: #edf1ef;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 900;
}
.quad-level-rail nav button.active > span {
  background: var(--teal);
  color: white;
}
.quad-level-rail nav button.passed > span {
  background: var(--navy);
  color: white;
}
.quad-level-rail nav button > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.quad-level-rail nav small {
  color: var(--teal);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quad-level-rail nav strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quad-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.quad-stage-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 3px 8px;
}
.quad-stage-heading h1 {
  margin: 5px 0;
  font-family: var(--font-math);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}
.quad-stage-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}
.quad-question-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-md);
}
.quad-question-card > .question-meta {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.quad-question-copy {
  padding: 26px clamp(18px, 4vw, 36px);
}
.quad-question-copy > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quad-question-copy h2 {
  margin: 10px 0 0;
  font-family: var(--font-math);
  font-size: clamp(22px, 3vw, 30px);
}
.quad-question-copy .course-math {
  margin: 20px 0 0;
}
.quad-scenario {
  margin: 14px 0 0;
  padding: 16px;
  border-left: 4px solid var(--mango);
  border-radius: 0 12px 12px 0;
  background: #fffbef;
  font-family: var(--font-math);
  font-size: 18px;
  line-height: 1.55;
}
.quad-question-copy .paper-prompt {
  margin-top: 18px;
}
.quad-builder-card {
  padding: 24px clamp(16px, 4vw, 34px) 30px;
  border-top: 1px solid var(--line);
  background: #f8faf8;
}
.quad-builder-card > .submit-answer {
  display: flex;
  margin: 18px auto 0;
}
.quad-field {
  display: grid;
  gap: 5px;
  min-width: 88px;
}
.quad-field > span {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quad-field > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quad-field input {
  width: 100%;
  min-width: 72px;
  max-width: 155px;
  height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: white;
  font-family: var(--font-math);
  font-size: 18px;
}
.quad-field strong {
  color: var(--ink-muted);
  font-size: 11px;
}
.quad-equation-builder,
.quad-factor-builder,
.quad-roots-builder,
.quad-vertex-builder,
.quad-surd-builder {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 20px;
  border: 2px solid rgba(39, 143, 134, 0.2);
  border-radius: 16px;
  background: white;
}
.quad-equation-builder b,
.quad-factor-builder b,
.quad-vertex-builder > span,
.quad-roots-builder > strong,
.quad-surd-builder > span {
  padding-bottom: 13px;
  font-family: var(--font-math);
  font-size: 18px;
}
.quad-factor-builder .quad-field {
  min-width: 72px;
}
.quad-factor-builder .quad-field input {
  width: 80px;
}
.quad-vertex-builder .quad-field input {
  width: 90px;
}
.quad-roots-builder {
  gap: 18px;
}
.quad-roots-builder .quad-field input {
  width: 180px;
}
.quad-parts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(135px, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding: 20px;
  border: 2px solid rgba(39, 143, 134, 0.2);
  border-radius: 16px;
  background: white;
}
.quad-parts-grid .quad-field input {
  max-width: none;
}
.quad-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.quad-choice-grid button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}
.quad-choice-grid button > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #edf1ef;
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
}
.quad-choice-grid button.selected {
  border-color: var(--teal);
  background: #edf8f6;
}
.quad-surd-builder {
  align-items: center;
}
.surd-fraction {
  display: grid;
  align-items: center;
  text-align: center;
}
.surd-fraction > span {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  padding: 7px;
}
.surd-fraction > span:first-child {
  border-bottom: 2px solid var(--navy);
}
.surd-fraction .quad-field {
  min-width: 68px;
}
.surd-fraction .quad-field input {
  width: 82px;
}
.graph-launch-builder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 17px;
  border: 1px solid rgba(98, 89, 201, 0.25);
  border-radius: 15px;
  background: #f0efff;
  color: #302a78;
}
.graph-launch-builder div {
  display: grid;
  gap: 3px;
}
.graph-launch-builder p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}
.graph-launch-builder a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #302a78;
  color: white;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}
.quad-progressive-help {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e9ce86;
  border-radius: 13px;
  background: #fffbef;
}
.quad-progressive-help > strong {
  color: #98600e;
  font-size: 10px;
  text-transform: uppercase;
}
.quad-progressive-help p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}
.quad-progressive-help > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  font-size: 11px;
}
.quad-progressive-help > div span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--mango);
  font-size: 8px;
  font-weight: 900;
}
.quad-progressive-help button {
  justify-self: start;
  padding: 8px 10px;
  border: 1px solid #d8b668;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}
.quadratic-level-panel {
  grid-column: 1 / -1;
}
.quadratic-level-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 16px;
}
.quadratic-level-summary-grid > div {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.quadratic-level-summary-grid > div > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  background: #edf1ef;
  color: var(--teal);
  font-size: 8px;
  font-weight: 900;
}
.quadratic-level-summary-grid > div.complete > span {
  background: var(--teal);
  color: white;
}
.quadratic-level-summary-grid strong {
  display: block;
  font-size: 9px;
}
.quadratic-level-summary-grid small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

/* SVG graph laboratory */
.graph-header > button {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.graph-lab-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 25px clamp(14px, 3vw, 34px) 70px;
}
.graph-access-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: min(720px, calc(100% - 32px));
  margin: clamp(70px, 14vh, 150px) auto;
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid var(--line-dark);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-md);
}
.graph-access-card > svg {
  flex: 0 0 auto;
  color: var(--teal);
}
.graph-access-card h1 {
  margin: 6px 0 9px;
  font-family: var(--font-math);
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.05;
}
.graph-access-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}
.graph-access-card a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}
.graph-brief {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.graph-brief h1 {
  margin: 6px 0;
  font-family: var(--font-math);
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -0.04em;
}
.graph-brief p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}
.graph-equation {
  padding: 14px 18px;
  border: 1px solid rgba(39, 143, 134, 0.25);
  border-radius: 14px;
  background: white;
  font-family: var(--font-math);
  font-size: 23px;
  white-space: nowrap;
}
.graph-workspace {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: #e9eeec;
  box-shadow: var(--shadow-md);
}
.graph-workspace:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 16px;
  border-radius: 0;
  background: #e9eeec;
}
.graph-workspace:fullscreen .graph-canvas-wrap {
  min-height: 0;
}
.graph-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: white;
}
.graph-tools button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f4f6f5;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
  text-align: left;
}
.graph-tools button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}
.graph-tools button.clear-graph {
  margin-top: 7px;
  border-color: rgba(233, 104, 87, 0.25);
  background: #fff3ef;
  color: var(--coral);
}
.graph-tools small {
  margin-top: auto;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.45;
}
.graph-canvas-wrap {
  overflow: hidden;
  min-width: 0;
  border-radius: 14px;
  background: white;
}
.vector-graph {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  touch-action: none;
  user-select: none;
}
.vector-graph .graph-grid {
  stroke: #e5ebe8;
  stroke-width: 0.8;
}
.vector-graph .graph-axis {
  stroke: #52656d;
  stroke-width: 1.6;
}
.vector-graph text {
  fill: #53656d;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 254, 250, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.student-axis {
  stroke: #8260a0;
  stroke-width: 2;
  stroke-dasharray: 8 6;
}
.student-curve {
  fill: none;
  stroke: var(--teal);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reference-curve {
  fill: none;
  stroke: var(--mango);
  stroke-width: 3;
  stroke-dasharray: 9 7;
  opacity: 0.9;
}
.student-point {
  fill: var(--teal);
  stroke: white;
  stroke-width: 3;
  cursor: grab;
}
.student-point-hit {
  fill: transparent;
  pointer-events: all;
  cursor: grab;
}
.root-point {
  fill: var(--coral);
  stroke: white;
  stroke-width: 3;
}
.intercept-point {
  fill: #6259c9;
  stroke: white;
  stroke-width: 3;
}
.vertex-mark {
  fill: none;
  stroke: #b56c0b;
  stroke-width: 4;
  stroke-linecap: round;
}
.graph-canvas-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}
.graph-canvas-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: #edf5f3;
  color: #176d65;
  font-size: 8px;
  font-weight: 850;
}
.graph-submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: white;
}
.graph-submit-panel h2 {
  margin: 4px 0;
  font-family: var(--font-math);
  font-size: 22px;
}
.graph-submit-panel p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
}
.graph-submit-panel button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.graph-rubric {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 17px;
  background: white;
}
.graph-rubric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.graph-rubric h2 {
  margin: 4px 0 0;
  font-family: var(--font-math);
  font-size: 24px;
}
.graph-rubric-heading button {
  padding: 8px 10px;
  border: 1px solid #d8b668;
  border-radius: 9px;
  background: #fffbef;
  color: #7a4b08;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}
.graph-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.graph-check-grid article {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(39, 143, 134, 0.22);
  border-radius: 11px;
  background: #f2faf8;
}
.graph-check-grid article.retry {
  border-color: #e9ce86;
  background: #fffbef;
}
.graph-check-grid article > svg {
  flex: 0 0 auto;
  color: var(--teal);
}
.graph-check-grid article.retry > svg {
  color: #b56c0b;
}
.graph-check-grid strong {
  display: block;
  font-size: 10px;
}
.graph-check-grid p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.4;
}
.graph-perfect {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  border-radius: 11px;
  background: var(--teal);
  color: white;
  font-size: 11px;
}
.graph-perfect a {
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: white;
  color: #176d65;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

/* Mistake Fixer: spaced, personalised revision */
.review-due-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  justify-self: end;
  padding: 8px 11px;
  border: 1px solid rgba(233, 104, 87, 0.25);
  border-radius: 999px;
  background: #fff3ef;
  color: #a43d30;
  font-size: 10px;
  font-weight: 900;
}
.review-shell {
  display: grid;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px clamp(15px, 3vw, 34px) 74px;
}
.review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 90% 12%,
      rgba(255, 196, 94, 0.28),
      transparent 15rem
    ),
    var(--navy);
  color: white;
  box-shadow: var(--shadow-md);
}
.review-hero h1 {
  max-width: 720px;
  margin: 7px 0 8px;
  font-family: var(--font-math);
  font-size: clamp(31px, 5vw, 53px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.99;
}
.review-hero p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}
.review-hero .eyebrow {
  color: var(--mango);
}
.review-spacing-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 9px;
  min-width: 230px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
.review-spacing-card svg {
  grid-row: 1 / 3;
  color: var(--mango);
}
.review-spacing-card strong {
  font-size: 11px;
}
.review-spacing-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
}
.review-session-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.review-queue {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 7px;
  padding: 17px;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}
.review-queue h2 {
  margin: 2px 0 9px;
  font-family: var(--font-math);
  font-size: 22px;
}
.review-queue > div {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
}
.review-queue > div.active {
  border-color: rgba(39, 143, 134, 0.25);
  background: #edf8f6;
}
.review-queue > div > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #edf1ef;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 900;
}
.review-queue > div.active > span {
  background: var(--teal);
  color: white;
}
.review-queue > div > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.review-queue strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-queue small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.35;
}
.review-question-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.review-question-card {
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-md);
}
.review-question-card > .question-meta {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.review-question-copy {
  padding: clamp(22px, 4vw, 38px);
}
.review-question-copy h2 {
  margin: 9px 0 0;
  font-family: var(--font-math);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
}
.review-question-copy .course-math {
  margin-top: 20px;
}
.review-builder {
  display: grid;
  gap: 14px;
  padding: 23px clamp(16px, 4vw, 34px) 29px;
  border-top: 1px solid var(--line);
  background: #f8faf8;
}
.review-builder > label,
.review-root-fields label,
.review-standard-fields label {
  display: grid;
  gap: 5px;
}
.review-builder label > span {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.review-builder label > input,
.review-root-fields input,
.review-standard-fields input {
  width: 100%;
  height: 50px;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  background: white;
  color: var(--navy);
  font-family: var(--font-math);
  font-size: 19px;
}
.review-builder > label {
  max-width: 390px;
}
.review-builder > label > b {
  margin-top: -39px;
  margin-right: 12px;
  justify-self: end;
  color: var(--ink-muted);
  font-size: 10px;
}
.review-root-fields,
.review-standard-fields {
  display: flex;
  align-items: flex-end;
  gap: 11px;
  max-width: 590px;
  padding: 17px;
  border: 2px solid rgba(39, 143, 134, 0.18);
  border-radius: 15px;
  background: white;
}
.review-root-fields label,
.review-standard-fields label {
  flex: 1 1 0;
}
.review-root-fields > strong,
.review-standard-fields > strong {
  padding-bottom: 15px;
  color: var(--ink-muted);
  font-family: var(--font-math);
  white-space: nowrap;
}
.review-builder > .submit-answer {
  justify-self: start;
  margin: 0;
}
.review-empty,
.review-clear {
  padding: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 19px;
  background: white;
  box-shadow: var(--shadow-sm);
}
.review-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
}
.review-empty.error {
  flex-direction: column;
  color: var(--coral);
  text-align: center;
}
.review-empty p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
}
.review-clear {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.review-clear > svg {
  color: var(--teal);
}
.review-clear h2 {
  margin: 3px 0;
  font-family: var(--font-math);
  font-size: 25px;
}
.review-clear p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}
.review-clear a {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}

/* Repeat the course-map overrides at the end so they win over legacy flat-list styles. */
.folder-path-list {
  gap: 6px;
  margin: 0;
  padding: 0 9px 9px 54px;
}
.folder-path-list .topic-row {
  min-height: 57px;
  padding: 8px 10px;
  border-radius: 11px;
}

@media (max-width: 940px) {
  .working-levels-home .working-level-list {
    grid-template-columns: 1fr;
  }
  .quad-practice-shell {
    display: block;
  }
  .quad-level-rail {
    position: static;
    max-height: none;
    margin-bottom: 16px;
  }
  .quad-level-rail nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .quad-level-rail nav button {
    min-width: 145px;
    scroll-snap-align: start;
  }
  .quad-rail-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .quad-rail-progress > div,
  .quad-rail-progress small {
    grid-column: 1 / -1;
  }
  .quadratic-level-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .graph-workspace {
    grid-template-columns: 1fr;
  }
  .graph-tools {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
  }
  .graph-tools > .eyebrow,
  .graph-tools > small {
    grid-column: 1 / -1;
  }
  .graph-tools button.clear-graph {
    margin: 0;
  }
  .review-session-grid {
    grid-template-columns: 1fr;
  }
  .review-queue {
    position: static;
  }
  .review-queue > div:not(.active) {
    display: none;
  }
}

@media (max-width: 650px) {
  .quad-stage-heading,
  .graph-brief,
  .graph-submit-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .quad-stage-heading .level-score {
    align-self: stretch;
  }
  .quad-question-copy {
    padding: 20px 15px;
  }
  .quad-builder-card {
    padding: 18px 12px 22px;
  }
  .quad-equation-builder,
  .quad-factor-builder,
  .quad-roots-builder,
  .quad-vertex-builder,
  .quad-surd-builder {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 14px;
  }
  .quad-parts-grid,
  .quad-choice-grid {
    grid-template-columns: 1fr;
  }
  .graph-launch-builder {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .graph-launch-builder a {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .quadratic-level-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .graph-lab-shell {
    padding-inline: 9px;
  }
  .graph-brief {
    padding-inline: 7px;
  }
  .graph-equation {
    font-size: 18px;
  }
  .graph-workspace {
    padding: 6px;
  }
  .graph-tools {
    grid-template-columns: repeat(5, 118px);
    padding: 8px;
  }
  .graph-check-grid {
    grid-template-columns: 1fr;
  }
  .graph-rubric-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .review-header {
    grid-template-columns: 1fr auto;
  }
  .review-header .brand-lockup {
    display: none;
  }
  .review-hero {
    grid-template-columns: 1fr;
  }
  .review-spacing-card {
    min-width: 0;
  }
  .review-shell {
    padding-inline: 9px;
  }
  .review-root-fields,
  .review-standard-fields {
    align-items: stretch;
    flex-direction: column;
  }
  .review-root-fields > strong,
  .review-standard-fields > strong {
    padding: 0;
    text-align: center;
  }
  .review-clear {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .review-clear a {
    grid-column: 1 / -1;
    text-align: center;
  }
  .vector-graph {
    min-height: 410px;
    object-fit: contain;
  }
  .vector-graph text {
    font-size: 20px;
  }
  .test-readiness-list,
  .teacher-test-paper-grid {
    grid-template-columns: 1fr;
  }
  .chapter-folder-body {
    padding-left: 9px;
  }
  .folder-path-list {
    padding-left: 9px;
  }
  .folder-path-list .topic-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .folder-path-list .topic-progress {
    display: none;
  }
  .folder-path-list .topic-arrow {
    grid-column: 3;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .graph-workspace:fullscreen {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .graph-workspace:fullscreen .graph-tools {
    display: flex;
    overflow: visible;
  }
  .graph-workspace:fullscreen .vector-graph {
    height: calc(100vh - 48px);
    width: 100%;
  }
}
.mixed-daily-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 30px 64px;
  color: var(--ink, #163341);
  font-size: 1rem;
}
.mixed-daily-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 30px 0;
}
.mixed-daily-heading h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 8px 0 12px;
}
.mixed-daily-heading p:not(.deep-kicker) {
  max-width: 740px;
  line-height: 1.65;
}
.mixed-date-control {
  min-width: 210px;
  display: grid;
  justify-items: center;
  gap: 12px;
  border: 1px solid #c5d9d8;
  padding: 18px;
  border-radius: 18px;
  background: #f3faf9;
}
.mixed-date-control > div {
  display: flex;
  gap: 6px;
}
.mixed-date-control button,
.mixed-day-notice button {
  min-height: 44px;
  border: 1px solid #a9c6c3;
  border-radius: 10px;
  background: white;
  padding: 8px 12px;
  color: #185b58;
}
.mixed-date-control small {
  font-size: 0.8125rem;
}
.mixed-day-notice {
  padding: 16px;
  border: 1px solid #cadbdb;
  border-radius: 12px;
  line-height: 1.6;
}
.mixed-daily-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 28px;
}
.mixed-daily-rail {
  padding: 20px;
  border: 1px solid #d4dfdf;
  border-radius: 18px;
  background: white;
  align-self: start;
}
.mixed-daily-rail h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}
.mixed-daily-rail progress {
  width: 100%;
  height: 10px;
  accent-color: #16756e;
}
.mixed-topic-count {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
}
.mixed-daily-rail nav {
  display: grid;
  gap: 6px;
  margin: 20px 0;
}
.mixed-daily-rail nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px;
  background: #f5f8f8;
  text-align: left;
  min-height: 52px;
}
.mixed-daily-rail nav button[aria-current] {
  border-color: #178377;
  background: #e6f5f2;
}
.mixed-daily-rail nav button > span {
  width: 20px;
  font-weight: 700;
}
.mixed-daily-rail nav strong {
  font-size: 0.875rem;
  display: block;
}
.mixed-daily-rail nav small {
  font-size: 0.8125rem;
  color: #576e77;
}
.mixed-daily-rail nav svg {
  margin-left: auto;
  color: #178377;
  flex-shrink: 0;
}
.mixed-daily-rail > a {
  display: block;
  font-size: 0.875rem;
  margin-top: 16px;
  line-height: 1.5;
  text-decoration: underline;
}
.mixed-daily-stage {
  min-width: 0;
}
.mixed-daily-stage .review-question-card {
  overflow: hidden;
}
.mixed-daily-stage fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.mixed-daily-stage legend {
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 1rem;
}
.mixed-daily-stage input {
  min-width: 0;
  width: 100%;
  font-size: 1.125rem;
  padding: 12px;
  border: 1px solid #b9cacc;
  border-radius: 10px;
}
.mixed-daily-stage label {
  min-width: 0;
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
}
.mixed-daily-stage .course-math {
  overflow-x: auto;
  padding-bottom: 8px;
}
.mixed-daily-stage .question-meta {
  flex-wrap: wrap;
  gap: 8px;
}
.mixed-daily-stage .quad-choice-grid button {
  min-height: 56px;
  padding: 14px;
  overflow-wrap: anywhere;
}
.mixed-feedback {
  margin-top: 18px;
  background: white;
  border: 1px solid #d5e1e0;
  border-radius: 18px;
  padding: 24px;
  line-height: 1.65;
}
.mixed-feedback h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.mixed-feedback.correct {
  border-color: #8abbad;
  background: #effaf4;
}
.mixed-question-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.mixed-daily-footnote {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #526d76;
}
.mixed-complete {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e7f6ef;
  border: 1px solid #83b4a6;
  padding: 22px;
  border-radius: 16px;
  margin-bottom: 20px;
}
.mixed-complete h2 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}
.mixed-complete p {
  margin: 0;
  line-height: 1.6;
}
.mixed-daily-page button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.mixed-daily-home-row {
  border-color: #438c82 !important;
  background: #eef9f5 !important;
}
@media (max-width: 760px) {
  .mixed-daily-page {
    padding: 16px 14px 40px;
  }
  .mixed-daily-heading {
    display: block;
    margin-top: 20px;
  }
  .mixed-date-control {
    margin-top: 18px;
    grid-template-columns: auto 1fr auto;
    min-width: 0;
    gap: 8px;
  }
  .mixed-date-control small {
    grid-column: 1/-1;
  }
  .mixed-daily-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .mixed-daily-rail {
    padding: 16px;
  }
  .mixed-daily-rail nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .mixed-daily-rail nav button {
    justify-content: center;
    padding: 8px 2px;
    min-height: 44px;
  }
  .mixed-daily-rail nav button > div {
    display: none;
  }
  .mixed-daily-rail nav svg {
    margin-left: 0;
    width: 12px;
  }
  .mixed-feedback {
    padding: 18px;
  }
  .mixed-daily-stage .review-question-copy {
    padding: 22px 18px;
  }
  .mixed-daily-stage .review-builder {
    padding: 18px;
  }
}
.reasoned-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1.25rem;
}
.reasoned-steps > li {
  border: 1px solid #cddeda;
  border-radius: 12px;
  background: white;
  overflow: hidden;
  padding: 1rem;
}
.reasoned-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.reasoned-step-heading > span {
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 50%;
  background: #e2f2ee;
  color: #12655f;
  font-weight: 800;
}
.reasoned-step-heading h4 {
  margin: 0 !important;
  line-height: 1.7;
  font-size: 1rem;
  font-weight: 650;
  min-width: 0;
}
.reasoned-step-math {
  padding: 0.75rem 0;
  font-size: 1.15rem;
  line-height: 2;
  overflow-wrap: anywhere;
}
.reasoned-step-why {
  margin-top: 0.8rem;
  border-left: 3px solid #20766a;
  background: #f0f8f5;
  padding: 0.9rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  line-height: 1.85;
}
.reasoned-step-why > strong {
  font-size: 0.9rem;
  color: #12655f;
}
.reasoned-step-why p {
  margin: 0.35rem 0 0 !important;
  line-height: 1.85 !important;
}
.reasoned-pitfall {
  border: 1px solid #e4c486;
  background: #fff9ec;
  padding: 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  line-height: 1.75;
}
.reasoned-pitfall p {
  margin: 0.4rem 0 0;
}
@media (max-width: 600px) {
  .reasoned-steps > li {
    padding: 0.9rem;
  }
  .reasoned-step-heading {
    gap: 0.6rem;
  }
  .reasoned-step-why {
    padding: 0.75rem;
  }
  .reasoned-step-heading > span {
    flex-basis: 26px;
    height: 26px;
  }
}
.teacher-refresh-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  max-width: 420px;
}
.teacher-refresh-controls .teacher-live-status {
  font-size: 0.875rem;
}
.teacher-refresh-controls button {
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.teacher-refresh-controls button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.teacher-refresh-controls small {
  flex-basis: 100%;
  text-align: right;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.teacher-ineq-overview {
  margin: 1.5rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px solid #168174;
  border-radius: 16px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.65;
}
.teacher-ineq-overview header,
.teacher-ineq-overview footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.teacher-ineq-overview h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0.25rem 0;
}
.teacher-ineq-overview a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #12665c;
  text-underline-offset: 3px;
}
.teacher-ineq-location {
  margin: 1rem 0;
}
.teacher-ineq-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.teacher-ineq-metrics > div {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 0.8rem;
  background: #f0f7f5;
  border-radius: 10px;
  align-content: start;
}
.teacher-ineq-metrics strong {
  font-size: 1.65rem;
  line-height: 1.2;
  color: var(--navy);
}
.teacher-ineq-metrics span {
  font-size: 0.875rem;
  line-height: 1.4;
}
.teacher-ineq-overview progress,
.teacher-ineq-stages progress {
  display: block;
  width: 100%;
  height: 10px;
  accent-color: #168174;
  margin: 0.8rem 0;
}
.teacher-ineq-overview footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
#teacher-inequalities {
  scroll-margin-top: 1rem;
}
.teacher-ineq-stages {
  font-size: 1rem;
  line-height: 1.75;
  min-width: 0;
}
.teacher-ineq-stages > .teacher-ineq-stage {
  margin: 0.75rem 0;
}
.teacher-ineq-stages .teacher-ineq-stage > summary {
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
  background: #f4f8f7;
}
.teacher-ineq-stages .teacher-ineq-stage > summary:after {
  content: '+';
  font-size: 1.5rem;
  color: #12665c;
}
.teacher-ineq-stages .teacher-ineq-stage[open] > summary:after {
  content: '−';
}
.teacher-ineq-stages .teacher-ineq-stage > summary > div {
  flex: 1;
  min-width: 0;
}
.teacher-ineq-stages .teacher-ineq-stage > summary strong {
  font-size: 1rem;
}
.teacher-ineq-stages .teacher-ineq-stage > summary span {
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.teacher-ineq-stages .teacher-ineq-stage > summary progress {
  max-width: 280px;
}
.teacher-ineq-stage > section {
  padding: 0 1rem;
}
.teacher-ineq-question {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.teacher-ineq-question h4 {
  font-size: 1.1rem;
  margin: 0.7rem 0;
}
.teacher-ineq-question p {
  font-size: 1rem;
  line-height: 1.75;
}
.teacher-ineq-question .teacher-ineq-expression {
  font-size: 1.25rem;
}
.teacher-ineq-question ol:not(.reasoned-steps) {
  padding-left: 1.5rem;
}
.teacher-ineq-question details {
  padding: 0.4rem 0.8rem;
}
.teacher-ineq-question details > summary {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 0;
}
.teacher-ineq-question details > summary:after {
  content: ' +';
  padding-left: 0.5rem;
}
.teacher-ineq-question details[open] > summary:after {
  content: ' −';
}
.teacher-ineq-question figure {
  margin: 1rem 0;
  max-width: 650px;
}
.teacher-ineq-question figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.teacher-ineq-question figcaption {
  display: grid;
  font-size: 0.875rem;
}
.teacher-ineq-retry {
  color: #a73521;
  font-weight: 700;
}
@media (max-width: 760px) {
  .teacher-ineq-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .teacher-ineq-metrics > div:last-child {
    grid-column: 1/-1;
  }
  .teacher-refresh-controls {
    justify-content: flex-start;
  }
  .teacher-refresh-controls small {
    text-align: left;
  }
  .teacher-ineq-stages .teacher-ineq-stage > summary {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .teacher-ineq-stages .teacher-ineq-stage > summary > div {
    flex-basis: 100%;
  }
  .teacher-ineq-stage > section {
    padding: 0 0.7rem;
  }
}
.home-memory {
  margin: 1.5rem 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.8rem);
  font-size: 1rem;
  line-height: 1.75;
}
.home-memory h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0.3rem 0;
}
.home-memory header p {
  color: var(--ink-muted);
  margin: 0.5rem 0 1.25rem;
}
.memory-topics {
  display: grid;
  gap: 0.65rem;
}
.memory-topics > details {
  border: 1px solid #cededb;
  border-radius: 12px;
  overflow: hidden;
}
.memory-topics summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
  background: #f1f7f5;
  list-style: none;
}
.memory-topics summary::-webkit-details-marker {
  display: none;
}
.memory-topics summary:after {
  content: '+';
  color: #147467;
  font-size: 1.4rem;
}
.memory-topics details[open] > summary:after {
  content: '−';
}
.memory-topics summary strong {
  font-size: 1rem;
  min-width: 150px;
}
.memory-topics summary > span {
  font-size: 0.95rem;
  flex: 1;
  color: #36564f;
}
.memory-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.memory-rules article {
  border-bottom: 1px solid var(--line);
  padding: 0 0.25rem 0.8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.memory-rules h3 {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 0.3rem;
}
.memory-rules p {
  margin: 0.2rem 0;
  color: var(--ink-muted);
  font-size: 1rem;
}
.memory-rules a {
  color: #12695f;
  font-weight: 700;
}
.memory-check {
  font-weight: 650;
  background: #fff6df;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0;
}
@media (max-width: 650px) {
  .memory-rules {
    grid-template-columns: 1fr;
  }
  .memory-topics summary {
    flex-wrap: wrap;
    gap: 0.3rem 0.7rem;
  }
  .memory-topics summary > span {
    flex-basis: 80%;
    order: 3;
  }
  .memory-topics summary strong {
    flex: 1;
  }
}
.question-reading-help {
  margin: 1rem 0;
  border: 1px solid #b7d4ce;
  border-radius: 12px;
  background: #f3faf7;
  font-size: 1rem;
  line-height: 1.75;
}
.question-reading-help > summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 750;
  color: #175f54;
}
.question-reading-help > div {
  padding: 0 1rem 1rem;
}
.question-reading-help h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.3rem;
}
.question-reading-help p {
  font-size: 1rem;
  line-height: 1.75;
}
.question-reading-help ul {
  padding-left: 1.35rem;
}
.question-reading-help li {
  margin: 0.45rem 0;
}
.question-reading-help dl > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 3fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #d7e6e1;
}
.question-reading-help dt {
  font-weight: 750;
}
.question-reading-help dd {
  margin: 0;
}
.reading-watch {
  border-left: 3px solid #c98b2b;
  padding: 0.7rem 1rem;
  background: #fff7e6;
}
.reading-restate {
  color: #48615a;
}
@media (max-width: 600px) {
  .question-reading-help dl > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.teacher-geo-panel {
  margin: 24px 0;
  padding: 28px;
  background: #fff;
  border: 1px solid #d5e3df;
  border-radius: 24px;
}
.teacher-geo-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.teacher-geo-panel h2 {
  font-size: 28px;
  margin: 8px 0;
}
.teacher-geo-panel p {
  line-height: 1.65;
  color: #526b65;
}
.teacher-geo-panel a {
  color: #12715f;
  text-underline-offset: 4px;
}
.teacher-geo-metrics {
  display: grid;
  grid-template-columns: 140px repeat(4, 1fr);
  align-items: center;
  gap: 22px;
  margin: 24px 0;
}
.teacher-geo-metrics > div > b {
  font-size: 32px;
  display: block;
  color: #143b3b;
}
.teacher-geo-metrics span {
  font-size: 13px;
  color: #526b65;
  display: block;
  margin-top: 4px;
}
.teacher-geo-ring svg {
  width: 120px;
  height: 120px;
}
.teacher-geo-stage-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 28px;
}
.teacher-geo-stage-bars > a {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
}
.teacher-geo-stage-bars span {
  grid-column: 1/-1;
}
.teacher-geo-stage-bars progress {
  width: 100%;
  height: 10px;
  accent-color: #16836d;
}
.teacher-geo-current,
.teacher-geo-all,
.teacher-geo-all > details {
  border-top: 1px solid #e0e8e4;
  margin-top: 20px;
  padding-top: 18px;
}
.teacher-geo-panel summary {
  cursor: pointer;
  font-weight: 650;
  padding: 8px 0;
  line-height: 1.5;
}
.teacher-geo-all article {
  padding: 24px 0;
  border-top: 1px solid #e0e8e4;
}
.teacher-geo-retry {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff5de;
}
.teacher-geo-retry a {
  display: block;
  padding: 8px 0;
}
@media (max-width: 760px) {
  .teacher-geo-panel {
    padding: 18px;
  }
  .teacher-geo-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .teacher-geo-ring {
    grid-row: span 2;
  }
  .teacher-geo-stage-bars {
    grid-template-columns: 1fr;
  }
  .teacher-geo-panel > header {
    flex-direction: column;
  }
}
.geography-choice{background:#e8f0df}.social-studies-choice{background:#f6eadc}.open-practice-callout{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:28px;background:#193f4b;color:#fff;border-radius:20px;margin:25px 0}.open-practice-callout h2{margin:5px 0 10px}.open-practice-callout p{line-height:1.7;max-width:650px}.open-practice-callout a{padding:13px 18px;background:#fff;color:#244c52;border-radius:10px;text-decoration:none;white-space:nowrap}.learning-header-inner nav{flex-wrap:wrap}@media(max-width:700px){.open-practice-callout{flex-direction:column;align-items:flex-start}.learning-header-inner nav{gap:10px}}

/* Practical revision entry point. Existing subject evidence stays unchanged. */
.practical-home-callout{display:flex;flex-wrap:wrap;align-items:center;gap:9px 22px;padding:19px 23px;background:#e9f0dc;border:1px solid #cddbbc;border-radius:13px;margin:15px 0 25px;color:#294d40;text-decoration:none}.practical-home-callout span{font-size:10px;font-weight:800;letter-spacing:.7px}.practical-home-callout strong{font-size:22px}.practical-home-callout small{font-size:12px;line-height:1.6}.practical-home-callout:hover{background:#e0ebd0}.practical-home-callout:focus-visible{outline:3px solid #b87819;outline-offset:3px}@media(max-width:600px){.practical-home-callout{display:grid;padding:18px;gap:7px}.practical-home-callout strong{font-size:23px}}
.subjects-home {
  min-height: 100vh;
  background: var(--learning-surface);
  color: var(--navy);
  font: 16px/1.6 var(--font-sans);
}
.learning-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
  color: var(--navy);
}
.learning-header-inner {
  max-width: 1320px;
  margin: auto;
  padding: 19px 30px;
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: space-between;
}
.learning-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}
.learning-brand small {
  display: block;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  margin-top: 3px;
}
.learning-monogram {
  display: grid;
  place-items: center;
  position: relative;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: var(--navy);
  color: white;
  font:
    700 29px Georgia,
    serif;
}
.learning-monogram > span {
  position: absolute;
  bottom: 2px;
  right: 7px;
  color: var(--mango);
}
.learning-header nav {
  display: flex;
  gap: 5px;
  align-items: center;
}
.learning-header nav a {
  display: flex;
  gap: 7px;
  align-items: center;
  text-decoration: none;
  color: #5d6b72;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 9px;
  min-height: 44px;
}
.learning-header nav a[aria-current] {
  background: var(--teal-soft);
  color: #196c63;
}
.learning-header nav a:last-child[aria-current] {
  background: var(--learning-chem-soft);
  color: var(--learning-chem);
}
.teacher-entry {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 10px;
}
.learning-breadcrumb {
  max-width: 1320px;
  margin: auto;
  padding: 10px 30px 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  flex-wrap: wrap;
}
.learning-breadcrumb > a {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-muted);
  text-decoration: none;
  min-height: 32px;
}
.dashboard-sync {
  margin-left: auto;
  color: #52666d;
  font-size: 13px;
}
.breadcrumb-topic {
  font-weight: 700;
}
.subjects-shell {
  max-width: 1160px;
  margin: auto;
  padding: 48px 30px 56px;
}
.subjects-welcome h1 {
  font-family: Georgia, serif;
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.18;
  letter-spacing: -1px;
  max-width: 750px;
  margin: 12px 0;
}
.subjects-welcome > p:last-child {
  color: var(--ink-muted);
  margin: 15px 0 30px;
}
.subject-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.subject-choice {
  display: flex;
  flex-direction: column;
  gap: 23px;
  min-height: 420px;
  padding: 30px;
  border: 1px solid var(--learning-border);
  border-radius: 24px;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  color: var(--navy);
  box-shadow: 0 3px 10px #132b3a05;
}
.subject-choice:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.maths-choice {
  background: #153e43;
  color: #fff;
}
.chemistry-choice {
  background: #fff;
}
.biology-choice { background:#fff; }
.biology-choice .subject-symbol { background:var(--learning-bio-soft); color:var(--learning-bio); }
.biology-choice .subject-card-number,.biology-choice footer { color:var(--learning-bio); }
.biology-choice h2 + p { color:#647781; }
.biology-choice .subject-card-topics span { border-color:var(--bio-card-border); color:var(--bio-label-ink); background:var(--learning-bio-soft); }
.biology-choice footer { border-color:var(--bio-card-border); }
.poa-choice { background:white; }
.poa-choice .subject-symbol { background:#d9eef0; color:#086876; }
.poa-choice .subject-card-number,.poa-choice footer { color:#086876; }
.poa-choice .subject-card-topics span { background:#edf6f7; color:#235766; border-color:#bcd9dd; }
@media(min-width:1100px) { .subject-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .subject-choice { padding:28px; } }
.subject-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1px;
}
.subject-symbol {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 17px;
  background: #ffffff17;
  color: #b4ebe0;
}
.chemistry-choice .subject-symbol {
  background: var(--learning-chem-soft);
  color: var(--learning-chem);
}
.subject-card-number {
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 750;
  color: #a6d7cf;
  margin: 0 0 10px;
}
.chemistry-choice .subject-card-number {
  color: var(--learning-chem);
}
.subject-choice h2 {
  font-family: Georgia, serif;
  font-size: clamp(30px, 3vw, 39px);
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -0.6px;
}
.subject-choice h2 + p {
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  color: #daebe6;
}
.chemistry-choice h2 + p {
  color: #647781;
}
.subject-card-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.subject-card-topics span {
  padding: 6px 10px;
  border: 1px solid #ffffff22;
  border-radius: 7px;
  font-size: 13px;
  color: #d7e8e3;
}
.chemistry-choice .subject-card-topics span {
  border-color: #e5eaf1;
  color: #536877;
  background: #f8faff;
}
.subject-choice footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff25;
  padding-top: 20px;
  font-size: 16px;
  font-weight: 750;
}
.chemistry-choice footer {
  border-color: #e5eaf1;
  color: var(--learning-chem);
}
.subjects-reassurance {
  font-size: 14px;
  color: var(--ink-muted);
  text-align: center;
  margin: 25px 0;
}
.learning-header :focus-visible,
.subjects-home :focus-visible,
.chem-page :focus-visible {
  outline: 3px solid #c08b31;
  outline-offset: 4px;
}
@media (max-width: 720px) {
  .learning-header-inner {
    padding: 16px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .learning-brand {
    font-size: 15px;
    flex: 1;
  }
  .teacher-entry span {
    display: none;
  }
  .learning-header nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .learning-header nav a {
    justify-content: center;
    padding: 9px 5px;
  }
  .learning-breadcrumb {
    padding: 5px 16px 12px;
    gap: 8px;
  }
  .dashboard-sync {
    width: 100%;
    margin-left: 0;
  }
  .subjects-shell {
    padding: 28px 18px;
  }
  .subject-choice-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .subject-choice {
    padding: 24px;
    min-height: 370px;
    gap: 20px;
  }
  .subject-card-top {
    font-size: 12px;
  }
  .subjects-welcome h1 {
    font-size: 33px;
  }
  .learning-brand small {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .subject-choice {
    transition: none;
  }
  .subject-choice:hover {
    transform: none;
  }
}
@media print {
  .learning-header {
    display: none;
  }
}
