:root {
  color-scheme: light;
  --bg: #f5f8f9;
  --paper: #fff;
  --ink: #17323f;
  --muted: #526875;
  --line: #dbe5e9;
  --accent: #087f86;
  --tint: #e9f5f4;
  --soft: #eef3f5;
  --green: #24794b;
  --amber: #906314;
  --red: #a13c39;
  --shadow: 0 16px 50px #17323f12;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101d25;
  --paper: #172932;
  --ink: #e5eff3;
  --muted: #abc0cb;
  --line: #314752;
  --accent: #6dd7d1;
  --tint: #203c40;
  --soft: #20333d;
  --green: #86d4a7;
  --amber: #e7bf77;
  --red: #f1aaa5;
  --shadow: 0 16px 50px #0002;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.6 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 700;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 17px;
  line-height: 1.4;
}
p + p {
  margin-top: 12px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--paper);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.app-header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 36px;
  position: relative;
  z-index: 5;
}
.brand {
  text-decoration: none;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}
.brand-symbol {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 40px;
}
.brand-symbol span {
  color: var(--accent);
}
.course-tabs {
  display: flex;
  padding: 4px;
  background: var(--soft);
  border-radius: 9px;
  gap: 4px;
}
.course-tabs a {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  color: var(--muted);
}
.course-tabs a[aria-current] {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1px 4px #0000000a;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-button,
.quiet-button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
}
.icon-button {
  font-size: 24px;
}
.quiet-button {
  font-size: 14px;
  padding: 8px 12px;
}
.quiet-button:hover,
.icon-button:hover {
  background: var(--soft);
}
.app-shell {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: calc(100dvh - 86px);
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.main-nav {
  display: grid;
  gap: 5px;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-decoration: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.main-nav a[aria-current] {
  background: var(--tint);
  color: var(--accent);
}
.nav-icon {
  width: 19px;
  text-align: center;
}
.nav-count {
  margin-left: auto;
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 0 7px;
  border-radius: 5px;
}
.sidebar-course {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.chapter-nav {
  display: grid;
  gap: 6px;
  margin-top: 15px;
}
.chapter-nav a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  gap: 11px;
  padding: 8px;
  border-radius: 5px;
  line-height: 1.45;
}
.chapter-nav a:hover,
.chapter-nav a[aria-current] {
  background: var(--soft);
  color: var(--ink);
}
.chapter-number {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 26px;
  display: grid;
  gap: 10px;
}
.sidebar-footer a {
  font-size: 13px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
}
.sidebar-footer p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
main {
  min-width: 0;
  padding: 42px clamp(24px, 4vw, 64px) 64px;
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
}
main:focus {
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.page-heading .eyebrow {
  margin-bottom: 10px;
}
.page-heading p.muted {
  margin-top: 12px;
}
.edition {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 8px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.continue-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: var(--paper);
}
.continue-card h2 {
  margin: 10px 0;
}
.continue-card p {
  color: var(--muted);
  font-size: 14px;
}
.continue-card .button {
  margin-top: 22px;
}
.overview-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 26px;
  background: var(--tint);
}
.overview-number {
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -0.05em;
  font-weight: 700;
}
.overview-number small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.overview-card p {
  font-size: 14px;
  margin-top: 8px;
}
.overview-card a {
  font-size: 14px;
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 650;
}
.manual-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: -12px 0 32px;
  padding: 18px 24px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.manual-cover {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 14px 28px -16px #17323f99;
  transition: transform 0.2s;
}
.manual-cover:hover {
  transform: translateY(-2px) rotate(-1deg);
}
.manual-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.manual-text h2 {
  margin: 6px 0 6px;
  font-size: 20px;
}
.manual-text p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.manual-button {
  white-space: nowrap;
}
.meter {
  height: 5px;
  border-radius: 4px;
  background: var(--line);
  margin: 16px 0 8px;
  overflow: hidden;
}
.meter > span {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 4px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 28px 0 16px;
}
.section-heading p {
  font-size: 14px;
  color: var(--muted);
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.search-wrap > span {
  position: absolute;
  left: 16px;
  color: var(--muted);
  font-size: 22px;
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  padding: 13px 44px;
  font-size: 15px;
}
.search-wrap button {
  position: absolute;
  right: 8px;
}
.search-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}
.chapter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  margin-bottom: 12px;
  overflow: clip;
}
.chapter summary {
  cursor: pointer;
  list-style: none;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.chapter summary::-webkit-details-marker {
  display: none;
}
.chapter summary:after {
  content: "+";
  font-size: 23px;
  color: var(--muted);
  margin-left: auto;
}
.chapter[open] summary:after {
  content: "−";
}
.chapter summary .chapter-number {
  font-size: 14px;
  min-width: 25px;
}
.chapter summary h3 {
  font-size: 16px;
}
.chapter-summary {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.topic-row {
  border-top: 1px solid var(--line);
  padding: 17px 22px 17px 60px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.topic-info {
  min-width: 0;
}
.topic-info > a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.topic-info > a:hover {
  text-decoration: underline;
}
.topic-info p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.exercise-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.exercise-chip {
  min-width: 35px;
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
  font-size: 13px;
  background: var(--paper);
  position: relative;
}
.exercise-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.exercise-chip[data-state="review"] {
  border-bottom: 3px solid var(--amber);
}
.exercise-chip[data-state="done"] {
  border-bottom: 3px solid var(--green);
}
.exercise-chip[aria-current] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip-legend {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}
.button:hover {
  border-color: var(--accent);
}
.button.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.button.accent {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.text-button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}
.empty-state {
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.empty-state p {
  color: var(--muted);
  margin: 12px 0 20px;
  max-width: 540px;
}
.loading {
  padding: 50px 0;
  color: var(--muted);
}
.notice {
  padding: 14px 18px;
  background: var(--tint);
  border-radius: 6px;
  font-size: 14px;
  margin: 16px 0;
}
.error-state {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.error-state p {
  margin: 12px 0;
}
.exercise-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}
.exercise-topline a {
  text-decoration: none;
}
.exercise-topline a:hover {
  text-decoration: underline;
}
.exercise-heading {
  margin-bottom: 23px;
}
.exercise-heading h1 {
  font-size: clamp(26px, 2.6vw, 34px);
  max-width: 780px;
}
.exercise-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.difficulty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--tint);
}
.difficulty[data-level="experto"],
.difficulty[data-level="avanzado"] {
  color: var(--amber);
  background: var(--paper);
}
.exercise-switcher {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0 0 22px;
}
.exercise-switcher .exercise-chip {
  min-height: 39px;
  min-width: 39px;
}
.exercise-switcher > span {
  font-size: 13px;
  color: var(--muted);
}
.study-sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 18px #17323f03;
  overflow: hidden;
}
.statement-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
}
.statement-header h2 {
  font-size: 14px;
  letter-spacing: 0.04em;
}
.statement-header a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.statement {
  padding: 27px 28px 30px;
  font-size: 17px;
  line-height: 1.85;
  overflow-x: auto;
}
.study-tip {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 12px 28px;
  background: var(--soft);
}
.study-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.study-actions .text-button {
  margin-left: auto;
}
.solution-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 30px 0 14px;
}
.solution-heading h2 {
  font-size: 18px;
}
.solution-heading span {
  font-size: 13px;
  color: var(--muted);
}
.solution-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 12px;
  overflow: hidden;
}
.step-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 22px;
}
.step-number {
  font-size: 11px;
  color: var(--accent);
  font-weight: 750;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.step-heading h3 {
  font-size: 15px;
  font-weight: 650;
  overflow-x: auto;
  min-width: 0;
}
.step-content {
  padding: 0 22px 22px;
  line-height: 1.8;
  overflow-x: auto;
}
.step-reveal {
  margin: 0 22px 16px;
}
.math-scroll-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}
.statement table,
.step-content table {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 100%;
}
.statement th,
.statement td,
.step-content th,
.step-content td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.table-header {
  background: var(--soft);
  color: var(--ink);
}
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 3px 0;
}
mjx-container {
  font-size: 105% !important;
}
.evaluation {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.evaluation h2 {
  font-size: 19px;
}
.evaluation > p {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 18px;
}
.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.rating-option {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  padding: 12px;
  font-size: 12px;
  line-height: 1.4;
}
.rating-option strong {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}
.rating-option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.rating-option:hover {
  border-color: var(--accent);
}
.evaluation-status {
  font-size: 13px;
  color: var(--green);
  margin-top: 14px;
}
.evaluation-history {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.exercise-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.exercise-footer .button {
  min-width: 110px;
}
.share-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.share-actions a,
.share-actions button {
  font-size: 12px;
  color: var(--muted);
  min-height: 35px;
}
.share-actions a {
  display: flex;
  align-items: center;
}
.saved-state {
  color: var(--green);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
}
.stat strong {
  font-size: 31px;
  display: block;
  letter-spacing: -0.04em;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}
.progress-list {
  display: grid;
  gap: 12px;
}
.progress-item {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--paper);
  border-radius: 7px;
}
.progress-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.progress-item h3 {
  font-size: 15px;
}
.progress-item a {
  font-size: 13px;
  color: var(--accent);
}
.progress-item p {
  font-size: 13px;
  color: var(--muted);
}
.review-list {
  display: grid;
  gap: 12px;
}
.review-item {
  padding: 20px 22px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
}
.review-item h3 {
  font-size: 16px;
}
.review-item p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.review-item .button {
  flex-shrink: 0;
}
.review-level {
  font-size: 12px;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  width: min(550px, calc(100% - 32px));
  max-height: 85dvh;
  padding: 28px;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #071a28aa;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.dialog-heading h2 {
  font-size: 23px;
}
dialog > p {
  color: var(--muted);
  font-size: 14px;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.danger-zone {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}
.danger-zone p {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.danger {
  color: var(--red);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 7px;
  box-shadow: var(--shadow);
  z-index: 20;
  max-width: calc(100% - 30px);
  font-size: 14px;
}
.toast:empty {
  display: none;
}
@media (min-width: 1600px) {
  .app-header {
    padding-left: max(36px, calc((100% - 1528px) / 2));
    padding-right: max(36px, calc((100% - 1528px) / 2));
  }
}
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 15px;
  }
  main {
    padding: 32px 28px 48px;
  }
  .topic-row {
    padding-left: 24px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .rating-options {
    grid-template-columns: 1fr;
  }
  .rating-option {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 10px 14px;
  }
  .rating-option strong {
    min-width: 110px;
    margin: 0;
  }
  .welcome-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: auto;
    min-height: 110px;
    padding: 12px 18px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 21px;
  }
  .brand-symbol {
    font-size: 31px;
  }
  .brand small {
    display: none;
  }
  .header-actions {
    gap: 4px;
  }
  .course-tabs {
    order: 3;
    width: 100%;
    padding: 3px;
  }
  .course-tabs a {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 13px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    padding: 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .sidebar > .eyebrow,
  .sidebar-course,
  .sidebar-footer {
    display: none;
  }
  .main-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }
  .main-nav a {
    padding: 12px 5px;
    font-size: 13px;
    gap: 6px;
    border-radius: 0;
  }
  .main-nav a[aria-current] {
    background: transparent;
    box-shadow: inset 0 -2px var(--accent);
  }
  .nav-icon {
    display: none;
  }
  .nav-count {
    font-size: 11px;
    padding: 0 5px;
  }
  main {
    padding: 26px 18px 40px;
  }
  .page-heading {
    margin-bottom: 20px;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading p.muted {
    font-size: 14px;
  }
  .edition {
    display: none;
  }
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }
  .continue-card {
    padding: 21px;
  }
  .continue-card h2 {
    font-size: 21px;
  }
  .overview-card {
    padding: 17px 21px;
  }
  .overview-card .overview-number {
    font-size: 27px;
  }
  .overview-card .meter {
    margin: 10px 0;
  }
  .overview-card a {
    margin-top: 6px;
  }
  .manual-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    margin: -12px 0 24px;
    padding: 14px 16px 16px 14px;
  }
  .manual-text h2 {
    font-size: 17px;
  }
  .manual-button {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .section-heading {
    margin-top: 24px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .section-heading p {
    font-size: 12px;
  }
  .chapter summary {
    padding: 16px;
    gap: 11px;
  }
  .chapter summary h3 {
    font-size: 15px;
  }
  .topic-row {
    padding: 15px 18px;
  }
  .exercise-chip {
    min-width: 40px;
    min-height: 40px;
  }
  .exercise-topline {
    margin-bottom: 14px;
    font-size: 12px;
  }
  .exercise-topline > span {
    max-width: 65%;
    text-align: right;
  }
  .exercise-heading {
    margin-bottom: 16px;
  }
  .exercise-heading h1 {
    font-size: 26px;
  }
  .exercise-meta {
    margin-top: 10px;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .exercise-switcher {
    margin-bottom: 16px;
  }
  .exercise-switcher > span {
    font-size: 12px;
  }
  .statement-header {
    padding: 13px 17px;
  }
  .statement {
    padding: 19px 17px 22px;
    font-size: 16px;
  }
  .study-tip {
    padding: 10px 17px;
    font-size: 12px;
  }
  .study-actions {
    gap: 8px;
    margin: 16px 0;
  }
  .study-actions .button {
    flex: 1;
    font-size: 13px;
    padding: 10px;
  }
  .study-actions .text-button {
    margin-left: 0;
    font-size: 13px;
  }
  .step-heading {
    padding: 15px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .step-content {
    padding: 0 15px 18px;
    font-size: 15px;
  }
  .step-reveal {
    margin-left: 15px;
  }
  .solution-heading {
    margin-top: 24px;
  }
  .evaluation {
    padding: 18px;
  }
  .rating-option strong {
    min-width: 104px;
  }
  .exercise-footer {
    gap: 10px;
  }
  .exercise-footer .button {
    min-width: 0;
    font-size: 13px;
    padding: 10px 12px;
  }
  .exercise-footer > span {
    font-size: 12px;
    text-align: center;
  }
  .share-actions {
    gap: 14px;
  }
  .stats-row {
    gap: 8px;
  }
  .stat {
    padding: 15px 11px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat span {
    font-size: 11px;
  }
  .review-item {
    padding: 17px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .review-item .button {
    width: 100%;
  }
  .progress-item {
    padding: 17px;
  }
  .progress-item-head {
    align-items: flex-start;
  }
  .empty-state {
    padding: 26px;
  }
  .toast {
    bottom: 15px;
    width: max-content;
  }
  .solution-heading span {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a,
  button {
    transition:
      background 0.15s,
      border-color 0.15s,
      color 0.15s;
  }
  .solution-step {
    animation: appear 0.18s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.5;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@media print {
  .app-header,
  .sidebar,
  .study-actions,
  .exercise-switcher,
  .exercise-footer,
  .share-actions,
  .evaluation {
    display: none;
  }
  .app-shell {
    display: block;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .study-sheet,
  .solution-step {
    box-shadow: none;
    break-inside: avoid;
  }
  body {
    background: white;
    color: black;
  }
}

h1[tabindex="-1"]:focus {
  outline: none;
}
.resource-links {
  display: grid;
  gap: 9px;
  margin: 20px 0;
  font-size: 14px;
}
.resource-links a {
  color: var(--accent);
}
.math-scroll-note {
  padding: 0 16px;
}
