:root {
  --ink: #14253d;
  --ink-soft: #42536b;
  --paper: #f7fbff;
  --surface: #ffffff;
  --line: #bdcadb;
  --line-strong: #8295ad;
  --navy: #17345f;
  --navy-dark: #102746;
  --blue-soft: #e5f0ff;
  --grade: #3c6fb6;
  --good: #16724b;
  --good-soft: #e6f6ee;
  --warn: #9b5b10;
  --warn-soft: #fff4dc;
  --bad: #a33c46;
  --bad-soft: #ffebed;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(23, 52, 95, 0.11);
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

html.large-text {
  font-size: 18px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, transparent 0 31px, rgba(209, 79, 122, 0.14) 31px 33px, transparent 33px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(60, 111, 182, 0.07) 39px 40px),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 4px solid #f1b82d;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--navy);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  margin-top: 0.05rem;
  color: #c8dcf4;
  font-size: 0.78rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.quiet-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

main {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2.8rem, 7vw, 6.5rem) 0 clamp(2rem, 5vw, 4rem);
}

.plain-label,
.section-label {
  margin: 0 0 0.45rem;
  color: var(--grade);
  font-size: 0.9rem;
  font-weight: 800;
}

.intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.intro-copy > p:not(.plain-label) {
  max-width: 680px;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.overall-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.overall-stats strong {
  color: var(--ink);
}

.daily-card {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  padding: 2rem;
  border: 2px solid var(--navy);
  background: var(--surface);
  box-shadow: 12px 12px 0 var(--blue-soft);
}

.daily-card > div {
  position: relative;
  z-index: 1;
  max-width: 260px;
}

.daily-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.8rem;
}

.daily-card p {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.paper-number {
  position: absolute;
  right: -0.25rem;
  bottom: -1.35rem;
  color: var(--blue-soft);
  font-size: 11rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.1em;
}

.primary-action,
.outline-action,
.open-skill,
.back-button,
.icon-button {
  min-height: 46px;
  border-radius: 9px;
  font-weight: 800;
}

.primary-action {
  padding: 0.7rem 1.05rem;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #fff;
}

.primary-action:hover {
  background: var(--navy-dark);
}

.outline-action,
.back-button,
.icon-button {
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--line-strong);
  background: #fff;
  color: var(--navy);
}

.outline-action:hover,
.back-button:hover,
.icon-button:hover {
  border-color: var(--navy);
  background: var(--blue-soft);
}

.grade-rail {
  padding: 1.3rem 1.5rem 0;
  border: 2px solid var(--navy);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.grade-rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.grade-rail h2,
.grade-rail p {
  margin: 0;
}

.grade-rail p {
  color: var(--ink-soft);
}

.grade-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(74px, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
}

.grade-tab {
  position: relative;
  min-height: 74px;
  padding: 0.65rem 0.4rem 0.55rem;
  border: 0;
  border-top: 6px solid var(--grade);
  background: #eef4fb;
  color: var(--ink);
}

.grade-tab span,
.grade-tab strong {
  display: block;
}

.grade-tab span {
  font-size: 0.74rem;
  font-weight: 700;
}

.grade-tab strong {
  font-size: 1.65rem;
  line-height: 1;
}

.grade-tab:hover {
  background: #dce9f7;
}

.grade-tab[aria-selected="true"] {
  background: var(--grade);
  color: #fff;
  transform: translateY(-5px);
}

.library {
  padding: clamp(2rem, 5vw, 4.5rem) 0 5rem;
}

.library-heading,
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.library-heading h2,
.workspace-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  letter-spacing: -0.045em;
}

.library-heading > div > p:last-child,
.workspace-heading > div > p:last-child {
  max-width: 680px;
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.grade-summary,
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
}

.grade-summary div,
.summary-stats div {
  padding: 0.7rem 1rem;
  text-align: center;
}

.grade-summary strong,
.grade-summary span,
.summary-stats strong,
.summary-stats span {
  display: block;
}

.grade-summary strong,
.summary-stats strong {
  font-size: 1.25rem;
}

.grade-summary span,
.summary-stats span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.library-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1.2rem;
}

.strand-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  min-height: 42px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--grade);
  background: var(--grade);
  color: #fff;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--navy);
  border-left: 2px solid var(--navy);
}

.skill-card {
  display: flex;
  min-height: 265px;
  flex-direction: column;
  padding: 1.35rem;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  background: rgba(255, 255, 255, 0.93);
}

.skill-card:hover {
  background: #fff;
  box-shadow: inset 7px 0 0 var(--grade);
}

.skill-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.strand-label {
  color: var(--grade);
  font-size: 0.82rem;
  font-weight: 800;
}

.mastery-pill {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f0f4f8;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.mastery-pill.level-2,
.mastery-pill.level-3 {
  border-color: #8bc7ad;
  background: var(--good-soft);
  color: var(--good);
}

.skill-card h3 {
  margin: 0.8rem 0 0.45rem;
  font-size: 1.35rem;
}

.skill-card > p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.skill-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: auto 0 0.85rem;
  padding-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.skill-stats strong {
  color: var(--ink);
}

.open-skill {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
}

.open-skill:hover {
  background: var(--navy);
  color: #fff;
}

.workspace {
  margin: 3rem 0 5rem;
  padding: clamp(1.2rem, 4vw, 3rem);
  border: 2px solid var(--navy);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.back-button {
  margin-bottom: 2rem;
}

.mastery-box {
  display: grid;
  min-width: 220px;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.7rem;
  align-items: center;
}

.mastery-box label {
  font-size: 0.8rem;
  font-weight: 800;
}

.mastery-box progress {
  width: 100%;
  height: 12px;
  grid-column: 1 / -1;
  accent-color: var(--grade);
}

.mastery-box span {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.mode-tabs {
  display: flex;
  gap: 0;
  margin: 2rem 0;
  border-bottom: 2px solid var(--navy);
}

.mode-tabs button {
  min-height: 52px;
  padding: 0.7rem 1.15rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #eef4fb;
  color: var(--ink);
  font-weight: 800;
}

.mode-tabs button:first-child {
  border-left: 1px solid var(--line);
}

.mode-tabs button[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
}

.learn-panel {
  max-width: 900px;
  margin: 0 auto;
}

.learning-path {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-strong);
  background: #f8fbff;
}

.learning-path ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.learning-path li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.learning-path li span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.learning-path li.current {
  color: var(--navy);
}

.learning-path li.current span {
  border-color: var(--grade);
  background: var(--grade);
  color: #fff;
}

.learn-rule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem;
  border-left: 7px solid var(--grade);
  background: var(--blue-soft);
}

.rule-mark {
  color: var(--grade);
  font-size: 2rem;
}

.learn-rule h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.3;
}

.learn-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--navy);
  border-left: 2px solid var(--navy);
}

.learn-steps li {
  min-height: 150px;
  padding: 1.15rem;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
}

.learn-steps span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--grade);
  color: #fff;
  font-weight: 900;
}

.learn-steps p {
  margin: 0.8rem 0 0;
  line-height: 1.5;
}

.worked-example,
.watch-out {
  margin: 1rem 0;
  padding: 1.25rem 1.4rem;
}

.worked-example {
  border: 2px dashed var(--line-strong);
  background: #fff;
}

.worked-example p:last-child {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.watch-out {
  background: var(--warn-soft);
  color: #70420b;
}

.watch-out p {
  margin: 0.35rem 0 0;
}

.teach-back {
  margin: 1rem 0;
  padding: 1.25rem 1.4rem;
  border: 2px solid var(--grade);
  background: #fff;
}

.teach-back p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.learn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.drill-panel {
  max-width: 900px;
  margin: 0 auto;
}

.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.session-header > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
}

.session-type {
  width: 100%;
  margin: 0;
  color: var(--grade);
  font-weight: 900;
}

.session-header span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.timer-wrap {
  min-width: 100px;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--navy);
  text-align: center;
}

.timer-wrap span,
.timer-wrap strong {
  display: block;
}

.timer-wrap strong {
  font-size: 1.45rem;
}

.progress-track {
  height: 8px;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
  background: #dbe4ef;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--grade);
  transition: width 160ms ease;
}

.problem-stage {
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 2px solid var(--navy);
  background: #fff;
  box-shadow: 9px 9px 0 var(--blue-soft);
}

.guided-coach {
  margin-bottom: 1.5rem;
  padding: 1.15rem;
  border: 2px solid var(--grade);
  background: linear-gradient(135deg, #f8fbff, var(--blue-soft));
}

.guided-coach-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.guided-coach-heading h3 {
  margin: 0;
  font-size: 1.25rem;
}

.guided-coach-heading > span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.guided-steps {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.guided-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem;
  border-left: 4px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
}

.guided-steps li.current {
  border-color: var(--grade);
}

.guided-steps li > span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}

.guided-steps p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.guided-coach > .outline-action {
  min-height: 42px;
  padding: 0.45rem 0.75rem;
}

.problem-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.icon-button {
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.question {
  min-height: 112px;
  margin: 1.4rem 0;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.answer-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.answer-input {
  width: min(100%, 430px);
  min-height: 66px;
  padding: 0.6rem 0.85rem;
  border: 3px solid var(--navy);
  border-radius: 9px;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 800;
}

.choice-answers {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 0.7rem;
}

.choice-answer {
  min-height: 68px;
  border: 3px solid var(--navy);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.choice-answer:hover {
  background: var(--blue-soft);
}

.answer-actions,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.feedback {
  margin-top: 1.2rem;
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--line-strong);
  background: #eef4fb;
}

.feedback[data-type="correct"] {
  border-color: var(--good);
  background: var(--good-soft);
  color: #0d5637;
}

.feedback[data-type="incorrect"],
.feedback[data-type="try"] {
  border-color: var(--warn);
  background: var(--warn-soft);
  color: #70420b;
}

.feedback p {
  margin: 0.35rem 0 0;
  line-height: 1.5;
}

.scratchpad-wrap {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.scratchpad-wrap summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
}

.scratchpad-wrap label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.scratchpad-wrap textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: repeating-linear-gradient(#fff 0 31px, #dce7f5 31px 32px);
  color: var(--ink);
  line-height: 2;
}

.session-summary {
  padding: 2rem;
  border: 2px solid var(--navy);
  background: var(--blue-soft);
}

.session-summary h3 {
  margin: 0;
  font-size: 2rem;
}

.session-summary > p:not(.plain-label) {
  color: var(--ink-soft);
}

.summary-stats {
  grid-template-columns: repeat(4, 1fr);
  margin: 1.4rem 0;
}

.workspace-footer-actions {
  display: flex;
  justify-content: end;
  margin-top: 1.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem clamp(1rem, 4vw, 4rem);
  background: var(--navy);
  color: #d9e7f7;
  font-size: 0.9rem;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
}

.site-footer strong {
  color: #fff;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: 320px;
  padding: 0.8rem 1rem;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.print-sheet {
  display: none;
}

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

  .daily-card {
    min-height: 230px;
  }

  .grade-tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .library-heading,
  .workspace-heading {
    align-items: start;
    flex-direction: column;
  }

  .grade-summary {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

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

  .learning-path ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  body {
    background:
      linear-gradient(90deg, transparent 0 14px, rgba(209, 79, 122, 0.12) 14px 16px, transparent 16px),
      repeating-linear-gradient(0deg, transparent 0 39px, rgba(60, 111, 182, 0.06) 39px 40px),
      var(--paper);
  }

  .site-header {
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .site-header nav {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header nav a {
    display: none;
  }

  .quiet-button {
    min-height: 38px;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
  }

  main {
    width: min(100% - 1rem, 1240px);
  }

  .intro {
    padding-top: 2.5rem;
  }

  .intro h1 {
    font-size: clamp(3.1rem, 19vw, 5rem);
  }

  .daily-card {
    margin-right: 0.55rem;
    padding: 1.35rem;
    box-shadow: 7px 7px 0 var(--blue-soft);
  }

  .grade-rail {
    padding: 1rem 0.75rem 0;
  }

  .grade-rail-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .grade-tabs {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
  }

  .grade-tab {
    min-height: 65px;
  }

  .library-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .strand-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

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

  .workspace {
    margin: 1rem 0 3rem;
    padding: 1rem;
  }

  .mastery-box {
    width: 100%;
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mode-tabs button {
    border-left: 1px solid var(--line);
    text-align: left;
  }

  .problem-stage {
    padding: 1rem;
    box-shadow: 5px 5px 0 var(--blue-soft);
  }

  .problem-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .question {
    min-height: 90px;
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .answer-input {
    width: 100%;
  }

  .choice-answers {
    grid-template-columns: repeat(2, 1fr);
  }

  .answer-actions,
  .summary-actions,
  .learn-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-actions button,
  .summary-actions button,
  .learn-actions button {
    width: 100%;
  }

  .learning-path ol {
    grid-template-columns: 1fr;
  }

  .guided-coach-heading {
    flex-direction: column;
  }

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

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    background: #fff;
  }

  body > :not(.print-sheet) {
    display: none !important;
  }

  .print-sheet {
    display: block;
    color: #111;
    font-family: Arial, sans-serif;
  }

  .print-sheet header {
    border-bottom: 3px solid #111;
    padding-bottom: 0.15in;
  }

  .print-sheet header p,
  .print-sheet header h1 {
    margin: 0 0 0.08in;
  }

  .print-sheet header div {
    display: flex;
    justify-content: space-between;
    margin-top: 0.15in;
  }

  .print-directions {
    margin: 0.16in 0;
  }

  .print-sheet ol {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.12in 0.35in;
    margin: 0;
    padding-left: 0.3in;
  }

  .print-sheet li {
    min-height: 0.48in;
    break-inside: avoid;
    font-size: 12pt;
  }

  .print-sheet li span {
    display: block;
  }

  .print-sheet li i {
    display: block;
    width: 70%;
    margin-top: 0.12in;
    border-bottom: 1px solid #777;
  }

  .print-sheet footer {
    margin-top: 0.2in;
    border-top: 1px solid #777;
    padding-top: 0.08in;
    font-size: 9pt;
  }
}
