@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --ink: #182a45;
  --muted: #62718a;
  --blue: #2563eb;
  --paper: #f5f7fb;
  --line: #e1e7f0;
  --navy: #142b52;
  --purple: #eef0f7;
  --peach: #f4efea;
  --mint: #eaf2ff;
}
.auth-screen {
  max-width: 1240px;
  margin: auto;
  padding: 36px 40px 64px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  padding-top: 64px;
}
.auth-intro h1 {
  font:
    750 clamp(32px, 4vw, 52px) / 1.2 Manrope,
    sans-serif;
  letter-spacing: -1.5px;
  margin: 18px 0 24px;
}
.auth-intro > p {
  max-width: 440px;
  font-size: 17px;
  color: var(--muted);
}
.auth-intro blockquote {
  margin: 36px 0 24px;
  padding: 16px 0 16px 22px;
  border-left: 3px solid var(--blue);
  font:
    600 22px/1.6 Manrope,
    sans-serif;
}
.auth-panel {
  width: 100%;
}
.verification-panel {
  max-width: 540px;
  margin: 64px auto 0;
  text-align: center;
}
.verification-panel h1 {
  font:
    700 30px/1.3 Manrope,
    sans-serif;
  margin: 16px 0 20px;
}
.verification-panel h1:focus {
  outline: none;
}
.verification-panel p {
  overflow-wrap: anywhere;
}
.verification-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  width: 64px;
  height: 64px;
  background: var(--mint);
  color: var(--blue);
  border-radius: 16px;
  font-size: 32px;
}
.verification-panel .primary {
  width: 100%;
  margin: 12px 0;
}
.verification-panel .text-button {
  min-height: 44px;
}
@media (max-width: 600px) {
  .verification-panel {
    margin-top: 32px;
  }
  .verification-panel h1 {
    font-size: 26px;
  }
}
.auth-screen .brand small {
  color: var(--muted);
}
.account-dialog .icon-button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}
.setup-notice {
  background: var(--mint);
  padding: 16px;
  border-radius: 12px;
  margin: 20px 0;
}
.setup-notice p {
  font-size: 14px;
  margin: 8px 0 0;
}
.check-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.setup-form .check-label input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.form-message {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.form-message:empty {
  display: none;
}
.account-dialog {
  width: min(620px, calc(100% - 28px));
  max-width: calc(100% - 28px);
}
.account-dialog > p {
  overflow-wrap: anywhere;
}
.account-dialog h2 {
  font-size: 21px;
}
.reminder-settings {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 12px;
}
.reminder-settings h3 {
  margin-bottom: 8px;
}
.study-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.study-time-fields label {
  display: block;
  margin-bottom: 8px;
}
.study-time-fields input {
  width: 100%;
  min-width: 0;
}
.account-signout {
  margin-top: 26px;
}
.motivation-card {
  --gallery-ink: #744000;
  --gallery-tint: #fff3cf;
  margin: 28px 40px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--gallery-ink);
  border-radius: 16px;
  background: var(--gallery-tint);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: center;
}
.motivation-card[data-motivation-theme="mint"] {
  --gallery-ink: #185744;
  --gallery-tint: #e6f8ef;
}
.motivation-card[data-motivation-theme="sky"] {
  --gallery-ink: #1f4c88;
  --gallery-tint: #e9f3ff;
}
.motivation-card[data-motivation-theme="lilac"] {
  --gallery-ink: #60418c;
  --gallery-tint: #f3ebff;
}
.motivation-card > h2 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--gallery-ink);
}
.motivation-content {
  display: grid;
  grid-template-columns: clamp(104px, 21vw, 260px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 20px);
  align-items: center;
  min-width: 0;
}
.motivation-photo {
  margin: 0;
}
.motivation-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.motivation-photo figcaption {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.motivation-photo a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.motivation-count {
  color: var(--gallery-ink);
  font-size: 12px;
  font-weight: 700;
}
.motivation-copy h3 {
  margin: 5px 0;
  color: var(--gallery-ink);
  font: 800 clamp(18px, 2.4vw, 28px)/1.2 Manrope, sans-serif;
}
.motivation-card p {
  margin: 0;
  color: var(--navy);
}
.motivation-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.motivation-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.motivation-nav button {
  padding-inline: 10px;
  min-height: 44px;
}
.lesson-encouragement {
  display: grid;
  grid-template-columns: clamp(90px, 25%, 152px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 12px;
  background: #e9f3ff;
  color: var(--navy);
}
.lesson-encouragement p {
  margin: 4px 0 0;
}
.topbar > div {
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .auth-layout {
    gap: 32px;
  }
  .motivation-card {
    margin: 20px 24px 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .motivation-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .auth-screen {
    padding: 24px 18px 40px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    padding-top: 28px;
    gap: 24px;
  }
  .auth-intro h1 {
    font-size: 33px;
  }
  .auth-intro blockquote {
    font-size: 18px;
    margin: 22px 0 14px;
  }
  .auth-intro > p {
    font-size: 15px;
  }
  .auth-intro .privacy-copy {
    display: none;
  }
  .motivation-card {
    margin: 18px 16px 0;
    padding: 20px;
  }
  .motivation-content {
    grid-template-columns: minmax(0, 1fr);
  }
  .motivation-photo img {
    aspect-ratio: 3 / 2;
  }
  .motivation-actions > * {
    width: 100%;
  }
  .account-dialog {
    padding: 22px 18px;
  }
  .study-time-fields {
    gap: 12px;
  }
  .account-dialog h2 {
    font-size: 18px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 "DM Sans",
    system-ui,
    sans-serif;
}
.startup-loader {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--paper);
  text-align: center;
}
.startup-loader > img {
  width: 144px;
  height: 144px;
  object-fit: contain;
  margin-bottom: 18px;
}
.startup-loader__name {
  font:
    700 27px/1.3 Manrope,
    system-ui,
    sans-serif;
  letter-spacing: -0.7px;
}
.startup-loader > p {
  max-width: 340px;
  margin: 10px 0 22px;
  font-size: 14px;
}
.startup-loader__track {
  width: 144px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: #dce7fc;
}
.startup-loader__track > span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  animation: startup-loading 2.5s ease-in-out infinite;
}
.startup-loader [hidden] {
  display: none;
}
.noscript-message {
  max-width: 420px;
  margin: 20vh auto;
  padding: 24px;
  text-align: center;
}
@keyframes startup-loading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .startup-loader__track > span {
    animation: none;
    transform: none;
    margin-inline: auto;
  }
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #be7b24;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.35;
}
h1 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -1.2px;
  margin-bottom: 8px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
}
p {
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 620px;
  background: var(--navy);
  color: #fff;
  padding: 33px 20px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font:
    700 25px/1.15 Manrope,
    system-ui,
    sans-serif;
  letter-spacing: -0.8px;
}
.brand-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 52px;
  padding: 4px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  font:
    700 26px Manrope,
    sans-serif;
  background: #fff;
}
.brand-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand small {
  display: block;
  font:
    400 10px/1.5 "DM Sans",
    sans-serif;
  letter-spacing: 0.1px;
  margin-top: 6px;
  color: #b9c9e2;
}
.learner-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ffffff18;
  border-bottom: 1px solid #ffffff18;
  padding: 20px 0;
  margin: 30px 2px;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  border-radius: 7px;
  background: #284776;
  color: #dbeafe;
  font-size: 15px;
  font-weight: 600;
}
.learner-box > div {
  flex: 1;
  min-width: 0;
}
.learner-box strong {
  font-size: 13px;
  display: block;
  overflow-wrap: anywhere;
}
.learner-box div > span {
  display: block;
  font-size: 11px;
  color: #b9c9e2;
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  font-size: 21px;
  flex-shrink: 0;
}
.learner-box .icon-button {
  background: transparent;
  border: 0;
  color: #bdcde6;
}
.nav-caption,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 600;
  color: #607391;
}
.nav-caption {
  color: #91a8ca;
  margin: 0 11px 13px;
  font-size: 9px;
}
nav {
  display: grid;
  gap: 6px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #b8c9e2;
  border-radius: 7px;
  min-height: 47px;
  padding: 12px;
  text-align: left;
  font-size: 13px;
}
.nav-button > span {
  width: 22px;
  font-size: 21px;
  line-height: 1;
  text-align: center;
}
.nav-button b {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: #93c5fd;
}
.nav-button.active {
  background: #264574;
  color: #fff;
  font-weight: 600;
}
.nav-button:hover {
  background: #203c67;
  color: #fff;
}
.sidebar-note {
  margin-top: auto;
  padding: 30px 9px 20px;
}
.sidebar-note strong {
  font-size: 11px;
  color: #dbe7f7;
  font-weight: 500;
}
.sidebar-note p {
  font-size: 11px;
  color: #a7bcdb;
  line-height: 1.8;
  margin: 8px 0 0;
}
.local-note {
  border-top: 1px solid #ffffff18;
  padding: 20px 9px 0;
  font-size: 10px;
  color: #d6e2f3;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #93c5fd;
  margin-right: 7px;
}
.local-note small {
  display: block;
  color: #a7bcdb;
  font-size: 10px;
  margin: 4px 0 0 12px;
}
main {
  min-width: 0;
  padding: 0 clamp(23px, 3.6vw, 56px) 20px;
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 85px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
  margin-left: 5px;
}
.topbar > div {
  display: flex;
  gap: 20px;
  align-items: center;
}
.free-pill {
  font-size: 10px;
  background: #eaf2ff;
  color: #2858a4;
  border: 1px solid #d7e5fc;
  border-radius: 4px;
  padding: 4px 9px;
}
.profile-button {
  min-height: 40px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #dce3e6;
  background: white;
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}
.profile-button > span {
  font-size: 12px;
  font-weight: 500;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-brand {
  display: none;
}
.mobile-brand img {
  display: block;
  width: 34px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 35px 0 27px;
}
.page-title .eyebrow {
  display: block;
  margin-bottom: 8px;
}
.page-title p {
  font-size: 13px;
  margin: 0;
}
.class-select {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
input,
select {
  border: 1px solid #d4dee2;
  background: #fff;
  border-radius: 6px;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--ink);
  max-width: 100%;
}
.class-select select {
  font-size: 12px;
  font-weight: 500;
}
.classroom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 283px;
  gap: 24px;
  align-items: start;
}
.learning-column {
  min-width: 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 195px;
  gap: 22px;
  background: var(--navy);
  color: white;
  padding: 29px;
  border-radius: 10px;
  min-height: 320px;
}
.hero-copy {
  min-width: 0;
}
.hero-tag {
  display: block;
  color: #a9ccff;
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 600;
}
.hero-meta {
  font-size: 11px;
  color: #b9cce9;
  margin: 21px 0 9px;
}
.hero-meta > span {
  padding: 0 6px;
  color: #849ec5;
}
.hero h2 {
  font-size: clamp(25px, 2.2vw, 33px);
  line-height: 1.3;
  letter-spacing: -0.8px;
  font-weight: 600;
  max-width: 390px;
  margin: 0 0 12px;
}
.hero p {
  font-size: 13px;
  color: #cfddf1;
  line-height: 1.8;
  max-width: 390px;
  min-height: 42px;
  margin-bottom: 20px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 46px;
  padding: 12px 19px;
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.primary:hover {
  background: #1d4ed8;
}
.hero .primary {
  background: #dbeafe;
  color: #1e4078;
  border-color: #dbeafe;
}
.hero .primary:hover {
  background: #eff6ff;
}
.primary > span {
  font-size: 17px;
}
.secondary {
  background: white;
  border-color: #cdd9dd;
  color: #284a7b;
}
.secondary:hover {
  background: #f3f6f7;
}
.hero-foot {
  font-size: 9px;
  color: #adc3e5;
  margin-top: 18px;
  line-height: 1.7;
}
.hero-foot > span {
  padding: 0 6px;
  color: #7c9bc6;
}
.session-card {
  border-left: 1px solid #ffffff20;
  padding: 12px 0 7px 21px;
  align-self: center;
}
.session-label {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #a9bfdf;
}
.session-card ol {
  list-style: none;
  padding: 0;
  margin: 23px 0 0;
  display: grid;
  gap: 25px;
}
.session-card li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.session-card li > span {
  color: #a6c8f5;
  font:
    500 10px Manrope,
    sans-serif;
  line-height: 1.7;
}
.session-card strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #edf4ff;
}
.session-card small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.6;
  color: #adc3e2;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 29px 0 17px;
}
.section-heading h2 {
  font-size: 19px;
  margin: 5px 0 0;
  font-weight: 700;
}
.text-button {
  background: none;
  border: 0;
  color: var(--blue);
  padding: 10px 0;
  min-height: 44px;
  font-size: 11px;
  font-weight: 600;
}
.text-button:hover {
  text-decoration: underline;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.purple {
  background: var(--purple);
  color: #505c81;
}
.peach {
  background: var(--peach);
  color: #88664d;
}
.mint {
  background: var(--mint);
  color: #3566a9;
}
.subject-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 20px 16px;
  min-height: 210px;
  text-align: left;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  color: var(--ink);
}
.subject-card:hover {
  border-color: #9bbcf3;
  box-shadow: 0 4px 14px #102c3508;
}
.subject-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font:
    600 16px/1 Manrope,
    sans-serif;
}
.subject-card .subject-icon {
  margin-bottom: 21px;
}
.subject-card.purple .subject-icon {
  background: var(--purple);
  color: #505c81;
}
.subject-card.peach .subject-icon {
  background: var(--peach);
  color: #88664d;
}
.subject-card.mint .subject-icon {
  background: var(--mint);
  color: #3566a9;
}
.card-arrow {
  position: absolute;
  right: 15px;
  top: 19px;
  font-size: 17px;
  color: #71848b;
}
.subject-card > strong {
  font:
    700 13px/1.5 Manrope,
    sans-serif;
  margin-bottom: 7px;
}
.subject-card > span:not(.subject-icon):not(.card-arrow) {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.subject-card small {
  margin-top: auto;
  padding-top: 18px;
  font-size: 9px;
  font-weight: 500;
  color: var(--blue);
}
.journey {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 22px;
  padding: 22px;
}
.journey > div {
  max-width: 440px;
}
.journey h2 {
  font-size: 15px;
  margin: 8px 0;
}
.journey p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}
.journey > .text-button {
  flex-shrink: 0;
  font-size: 10px;
}
.right-column {
  display: grid;
  gap: 19px;
  align-content: start;
}
.progress-card,
.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 21px 18px;
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-title h2 {
  font-size: 13px;
  letter-spacing: -0.2px;
  font-weight: 700;
  margin: 0;
}
.pill {
  font-size: 9px;
  background: #f5f7f8;
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
  color: #586c73;
}
.progress-summary {
  padding: 26px 0 20px;
}
.progress-summary > strong {
  display: block;
  font:
    600 36px/1.2 Manrope,
    sans-serif;
  letter-spacing: -1px;
}
.progress-summary strong small {
  font-size: 21px;
  font-weight: 400;
  color: #86989e;
}
.progress-summary > span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}
.progress-track {
  height: 5px;
  background: #eef2f3;
  border-radius: 2px;
  overflow: hidden;
}
.progress-track > span {
  height: 100%;
  display: block;
  background: #3b82f6;
}
.progress-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 10px;
  color: var(--muted);
}
.progress-caption strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.plan-card > p {
  font-size: 10px;
  margin: 7px 0 15px;
}
.plan-row {
  display: flex;
  gap: 11px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  padding: 17px 0;
}
.plan-row:last-child {
  padding-bottom: 0;
}
.plan-row .subject-icon {
  width: 30px;
  height: 32px;
  font-size: 12px;
  border-radius: 5px;
}
.plan-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.plan-row strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}
.plan-row small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.plan-row > span:last-child {
  font-size: 14px;
  color: #647da2;
}
.study-note {
  border-top: 1px solid #ced9de;
  padding: 20px 2px;
}
.study-note h2 {
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.study-note p {
  font-size: 11px;
  line-height: 1.85;
  margin: 0;
}
.source-note {
  font-size: 10px;
  margin: 26px 0;
  color: #65767d;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 27px;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  font-size: 10px;
  color: #6f7f85;
}
footer button {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 40px;
  color: var(--blue);
  font-size: 10px;
}
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter {
  min-height: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 18px;
  font-size: 12px;
}
.filter.selected {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.topic-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 24px 24px;
  margin: 20px 0;
}
.topic-section .section-heading h2 {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 17px;
}
.library-lesson {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.library-lesson > div > p {
  font-size: 13px;
  margin-top: 8px;
}
.library-lesson > div > small {
  font-size: 11px;
  color: var(--muted);
}
.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.topic-chips > span {
  font-size: 11px;
  border: 1px solid var(--line);
  background: #f7f9fa;
  padding: 6px 10px;
  border-radius: 4px;
}
.source-details {
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  margin-top: 24px;
}
.source-details summary {
  cursor: pointer;
  font-weight: 600;
}
.source-details p {
  margin: 12px 0 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat-card {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat-card > span {
  font-size: 12px;
  color: #52656d;
}
.stat-card > strong {
  display: block;
  font:
    600 31px/1.4 Manrope,
    sans-serif;
  letter-spacing: -1px;
  margin: 11px 0;
}
.stat-card > small {
  font-size: 10px;
  color: var(--muted);
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 23px;
}
.panel h2 {
  font-size: 17px;
  margin-bottom: 8px;
}
.panel p {
  font-size: 12px;
}
.report-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.report-row > div {
  flex: 1;
  min-width: 0;
}
.report-row strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.report-row small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
}
.report-row > span:last-child {
  font-size: 16px;
  font-weight: 600;
}
.home-activity {
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.home-activity strong {
  font-size: 12px;
  font-weight: 600;
}
.home-activity p {
  margin: 7px 0;
}
.home-activity small {
  font-size: 11px;
  color: var(--muted);
}
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.danger {
  color: #a4443b;
}
.storage-warning {
  background: #fff2d4;
  color: #704515;
  padding: 12px;
  border-radius: 6px;
  margin-top: 16px;
  font-size: 12px;
}
.storage-warning[hidden] {
  display: none;
}
.welcome {
  max-width: 1170px;
  min-height: 100vh;
  padding: 38px 42px;
  background: var(--paper);
}
.welcome > .brand {
  margin-bottom: 85px;
}
.welcome .brand-icon {
  width: 56px;
  height: 60px;
  background: #fff;
  color: white;
  border: 0;
}
.welcome .brand small {
  color: var(--muted);
}
.welcome-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 100px;
  align-items: center;
}
.welcome-intro h1 {
  font-size: clamp(34px, 4vw, 49px);
  letter-spacing: -1.9px;
  line-height: 1.2;
  margin: 18px 0 22px;
}
.welcome-intro > p {
  font-size: 14px;
  line-height: 1.9;
  max-width: 420px;
}
.welcome-features {
  display: grid;
  gap: 24px;
  margin: 35px 0;
}
.welcome-features > div {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.welcome-features > div > span {
  font-size: 10px;
  color: #6e84a5;
  background: #e9eeef;
  border-radius: 4px;
  padding: 5px 8px;
}
.welcome-features strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.welcome-features p {
  font-size: 11px;
  margin: 5px 0 0;
  line-height: 1.7;
}
.welcome-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 37px;
  font-size: 10px;
  color: #5a7192;
}
.welcome-tags > span + span:before {
  content: "·";
  padding: 0 12px;
}
.welcome-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 35px;
  box-shadow: 0 12px 40px #102c3505;
}
.welcome-panel h2 {
  font-size: 25px;
  margin: 12px 0 8px;
}
.welcome-panel > p {
  font-size: 12px;
  line-height: 1.8;
}
.setup-form {
  display: grid;
  gap: 9px;
  margin: 23px 0;
  text-align: left;
}
.setup-form label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 9px;
}
.setup-form input,
.setup-form select {
  font-size: 13px;
}
.setup-form .primary {
  margin-top: 12px;
  min-height: 47px;
}
.setup-form h3 {
  font-size: 16px;
  margin: 0;
}
.welcome-panel > .text-button {
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 19px;
}
.privacy-copy {
  font-size: 10px !important;
  color: #697c84;
}
.welcome-panel .privacy-copy {
  margin: 18px 0 0;
  line-height: 1.9;
}
dialog {
  border: 1px solid #dce3e6;
  border-radius: 10px;
  box-shadow: 0 24px 90px #102a3530;
  width: min(620px, calc(100% - 28px));
  max-height: 90dvh;
  padding: 28px;
  background: #fff;
  color: var(--ink);
}
dialog::backdrop {
  background: #142b5290;
  backdrop-filter: blur(3px);
}
dialog > p {
  font-size: 13px;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: 22px;
}
.dialog-top .eyebrow {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.dialog-top .icon-button {
  width: 36px;
  height: 36px;
}
.profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}
.profile-choice {
  flex: 1;
  min-width: 100px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
}
.profile-choice.chosen {
  background: #eff6ff;
  border-color: #80aaf1;
}
.profile-choice > span {
  display: grid;
  place-items: center;
  background: #e7eef9;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 13px;
}
.profile-choice strong,
.profile-choice small {
  display: block;
  overflow-wrap: anywhere;
}
.profile-choice strong {
  font-size: 13px;
}
.profile-choice small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.lesson-path {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}
.lesson-path > span {
  flex: 1;
  border-bottom: 2px solid #e3e9ec;
  padding: 8px 4px 13px;
  font-size: 12px;
  color: #65797f;
  text-align: center;
}
.lesson-path .reached {
  border-color: #2563eb;
  color: var(--blue);
  font-weight: 600;
}
.lesson-body h2 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.6px;
  margin: 14px 0 12px;
}
.lesson-body > p {
  font-size: 14px;
}
.lesson-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 11px;
}
.objective {
  color: var(--muted);
}
.teaching-block {
  background: #f2f6ff;
  border: 1px solid #e0e8f8;
  border-radius: 6px;
  padding: 22px;
  margin: 24px 0;
}
.teaching-block p {
  font-size: 17px;
  line-height: 1.9;
  color: #304e78;
  margin: 9px 0 0;
}
.ready-note {
  font-size: 12px;
  margin: 22px 0;
}
.ready-note p {
  font-size: 12px;
  margin: 5px 0;
  line-height: 1.9;
}
.full {
  width: 100%;
}
.example-visual {
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 26px 14px;
  font:
    600 clamp(22px, 5vw, 30px) / 1.8 Manrope,
    sans-serif;
  margin: 23px 0;
}
.example-steps {
  list-style: none;
  padding: 0;
  counter-reset: steps;
  margin: 20px 0;
}
.example-steps li {
  counter-increment: steps;
  position: relative;
  padding: 9px 0 9px 39px;
  font-size: 14px;
  line-height: 1.9;
}
.example-steps li:before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: #eaf2ff;
  color: #285fad;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.guided {
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 19px;
  margin: 23px 0;
}
.guided p {
  font-size: 14px;
  margin: 8px 0;
  color: #3c565f;
  line-height: 1.85;
}
.guided strong {
  font-size: 12px;
}
.guided summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  color: var(--blue);
}
.answers {
  display: grid;
  gap: 11px;
  margin: 23px 0;
}
.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid #d5dfe3;
  border-radius: 6px;
  background: white;
  padding: 15px 17px;
  text-align: left;
  font-size: 15px;
  min-height: 61px;
  line-height: 1.6;
}
.answer > span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #f0f4f5;
  color: #5c747e;
  font-size: 11px;
  font-weight: 600;
}
.answer b {
  margin-left: auto;
}
.answer:hover:not(:disabled) {
  border-color: #80aaf1;
  background: #f8faff;
}
.answer.correct {
  border-color: #80aaf1;
  background: #eff6ff;
  color: #244f91;
}
.answer.incorrect {
  border-color: #c29762;
  background: #fff7ea;
  color: #785628;
}
.hint-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #f9f7ef;
  border: 1px solid #e9e2cc;
  border-radius: 6px;
  padding: 13px 16px;
  margin: 17px 0;
}
.hint-box p {
  font-size: 12px;
  margin: 0;
  color: #6b5d3e;
}
.hint-box .text-button {
  color: #655733;
  flex-shrink: 0;
}
.feedback {
  padding: 17px;
  border-radius: 6px;
  background: #faf4e9;
  border: 1px solid #ecdfc7;
  margin: 18px 0;
}
.feedback.success {
  background: #eff6ff;
  border-color: #d4e3fc;
}
.feedback strong {
  font-size: 13px;
}
.feedback p {
  font-size: 14px;
  line-height: 1.9;
  color: #405a7c;
  margin: 6px 0 0;
}
.lesson-source {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 17px 0 0;
  font-size: 10px;
  color: #65767d;
}
.listen {
  display: block;
  margin-top: 14px;
}
.finish {
  text-align: center;
  padding: 10px 0;
}
.completion-mark {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin: 9px auto 25px;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2563eb;
  font-size: 24px;
}
.finish .eyebrow {
  display: block;
}
.finish p {
  font-size: 13px;
  line-height: 1.9;
}
.finish-stat {
  padding: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 23px 0;
}
.finish-stat strong {
  font:
    600 32px Manrope,
    sans-serif;
  display: block;
}
.finish-stat span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
#toast {
  position: fixed;
  z-index: 100;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 20px;
  background: var(--navy);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  max-width: calc(100% - 30px);
  width: max-content;
  box-shadow: 0 8px 30px #142b5220;
}
@media (min-width: 1550px) {
  .hero {
    min-height: 345px;
    padding: 35px;
  }
  .hero h2 {
    font-size: 35px;
  }
}
@media (max-width: 1240px) {
  .shell {
    grid-template-columns: 217px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 17px;
  }
  .brand {
    font-size: 23px;
  }
  .classroom-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 18px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 26px;
    min-height: 310px;
  }
  .session-card {
    display: none;
  }
  .hero h2 {
    font-size: 30px;
  }
  .hero p {
    min-height: 0;
  }
  .subject-card {
    padding: 18px 13px;
  }
  .subject-card > strong {
    font-size: 12px;
  }
  .journey {
    display: block;
  }
  .journey > .text-button {
    margin-top: 10px;
  }
  .card-title .pill {
    font-size: 8px;
  }
  .card-title h2 {
    font-size: 12px;
  }
}
@media (max-width: 1000px) {
  .classroom-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 20px;
  }
  .session-card {
    display: block;
    padding-left: 18px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .right-column {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .study-note {
    grid-column: 1/-1;
  }
  .subject-card > strong {
    font-size: 13px;
  }
  .page-title {
    align-items: flex-start;
  }
  .class-select {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 11px;
  }
  .library-lesson {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-card > strong {
    font-size: 27px;
  }
  .welcome-layout {
    gap: 55px;
  }
  .welcome {
    padding-inline: 32px;
  }
  .welcome-panel {
    padding: 28px;
  }
  .welcome > .brand {
    margin-bottom: 60px;
  }
}
@media (max-width: 740px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 10;
    inset: auto 0 0;
    width: 100%;
    height: auto;
    min-height: 0;
    display: block;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fffffffa;
    backdrop-filter: blur(10px);
  }
  .sidebar > .brand,
  .sidebar > .learner-box,
  .sidebar > .nav-caption,
  .sidebar > .sidebar-note,
  .sidebar > .local-note {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-around;
    gap: 5px;
  }
  .nav-button {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 7px 3px;
    color: #6c8088;
    font-size: 10px;
    border-radius: 5px;
  }
  .nav-button > span {
    font-size: 20px;
  }
  .nav-button b {
    display: none;
  }
  .nav-button.active {
    color: var(--blue);
    background: #eaf2ff;
  }
  .nav-button:hover {
    color: var(--blue);
    background: #f3f7ff;
  }
  main {
    padding: 0 22px 100px;
  }
  .topbar {
    min-height: 71px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font:
      700 22px Manrope,
      sans-serif;
    letter-spacing: -0.7px;
  }
  .topbar > div {
    gap: 12px;
  }
  .profile-button {
    font-size: 12px;
    padding: 7px 10px;
    min-height: 39px;
  }
  .profile-button > span {
    display: none;
  }
  .free-pill {
    font-size: 9px;
  }
  .page-title {
    margin: 27px 0 24px;
    gap: 15px;
  }
  .page-title h1 {
    font-size: 29px;
  }
  .page-title .eyebrow {
    font-size: 9px;
  }
  .page-title p {
    font-size: 12px;
    max-width: 290px;
  }
  .class-select select {
    font-size: 11px;
    padding: 9px;
  }
  .hero {
    padding: 26px;
    min-height: 300px;
  }
  .hero h2 {
    font-size: 30px;
  }
  .subject-card {
    min-height: 200px;
    padding: 18px 14px;
  }
  .subject-card > strong {
    font-size: 13px;
  }
  .subject-card small {
    font-size: 9px;
  }
  .right-column {
    gap: 16px;
  }
  .card-title h2 {
    font-size: 13px;
  }
  .journey {
    display: flex;
  }
  .journey > .text-button {
    margin: 0;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .stat-card > strong {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0 0 0 10px;
  }
  .stat-card > small {
    grid-row: 2;
  }
  .topic-section {
    padding: 0 18px 20px;
  }
  .library-lesson {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
  }
  .topic-section .section-heading h2 {
    font-size: 15px;
  }
  .topic-chips {
    gap: 6px;
  }
  .topic-chips > span {
    font-size: 10px;
    padding: 5px 8px;
  }
  .library-lesson > div > p {
    font-size: 12px;
  }
  .panel {
    padding: 21px;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .welcome {
    padding: 28px 24px 45px;
  }
  .welcome > .brand {
    margin-bottom: 45px;
  }
  .welcome-layout {
    gap: 35px;
  }
  .welcome-intro h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .welcome-intro > p {
    font-size: 12px;
  }
  .welcome-panel {
    padding: 25px;
  }
  .welcome-features p {
    font-size: 10px;
  }
  .welcome-features > div {
    gap: 12px;
  }
  .welcome-tags {
    font-size: 9px;
  }
  .welcome-tags > span + span:before {
    padding: 0 7px;
  }
  dialog {
    padding: 24px;
  }
  .lesson-body h2 {
    font-size: 24px;
  }
}
@media (max-width: 560px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 290px;
  }
  .session-card {
    display: none;
  }
  .hero h2 {
    font-size: 30px;
    max-width: 330px;
  }
  .hero p {
    max-width: 300px;
  }
  .hero-meta {
    margin-top: 19px;
  }
  .subject-grid {
    grid-template-columns: 1fr;
  }
  .subject-card {
    min-height: 135px;
    padding: 20px 40px 20px 77px;
    justify-content: center;
  }
  .subject-card > .subject-icon {
    position: absolute;
    left: 20px;
    top: 22px;
    margin: 0;
    width: 37px;
    height: 37px;
  }
  .subject-card > strong {
    font-size: 15px;
  }
  .subject-card > span:not(.subject-icon):not(.card-arrow) {
    font-size: 12px;
  }
  .subject-card small {
    margin-top: 0;
    padding-top: 13px;
    font-size: 10px;
  }
  .card-arrow {
    top: 23px;
  }
  .right-column {
    grid-template-columns: 1fr;
  }
  .study-note {
    grid-column: auto;
  }
  .journey {
    display: block;
  }
  .journey .text-button {
    margin-top: 9px;
  }
  .card-title h2 {
    font-size: 14px;
  }
  .progress-summary {
    padding: 24px 0;
  }
  .progress-summary > strong {
    font-size: 38px;
  }
  .progress-summary > span,
  .progress-caption {
    font-size: 11px;
  }
  .plan-card > p,
  .plan-row small {
    font-size: 11px;
  }
  .plan-row strong {
    font-size: 12px;
  }
  .plan-row .subject-icon {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .study-note h2 {
    font-size: 13px;
  }
  .study-note p {
    font-size: 12px;
  }
  .library-lesson {
    grid-template-columns: 1fr;
  }
  .library-lesson .subject-card {
    min-height: 150px;
  }
  .topic-section .section-heading h2 {
    font-size: 14px;
  }
  .library-lesson > div > p {
    font-size: 12px;
  }
  .filter {
    padding: 9px 13px;
    font-size: 11px;
  }
  .topic-section .subject-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .welcome {
    max-width: 460px;
    padding: 25px 22px 40px;
  }
  .welcome > .brand {
    margin-bottom: 40px;
  }
  .welcome-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .welcome-intro h1 {
    font-size: 38px;
    margin-bottom: 16px;
  }
  .welcome-intro > p {
    font-size: 13px;
    margin-bottom: 0;
  }
  .welcome-features {
    display: none;
  }
  .welcome-tags {
    margin-top: 22px;
    font-size: 10px;
  }
  .welcome-panel {
    padding: 25px;
  }
  .welcome-panel h2 {
    font-size: 23px;
  }
  .welcome-panel > .eyebrow {
    font-size: 9px;
  }
  .button-row > button {
    flex: 1;
  }
  .backup-panel .button-row {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-choice {
    min-width: 90px;
  }
  .hint-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .hint-box .text-button {
    padding: 8px 0;
  }
  .lesson-path {
    gap: 5px;
  }
  .lesson-path > span {
    font-size: 11px;
  }
  .teaching-block p {
    font-size: 16px;
  }
  .answer {
    font-size: 14px;
    padding: 13px;
  }
  .report-row {
    gap: 10px;
  }
  .report-row strong {
    font-size: 12px;
  }
  .report-row small {
    font-size: 10px;
  }
}
@media (max-width: 390px) {
  main {
    padding-inline: 16px;
  }
  .page-title h1 {
    font-size: 27px;
  }
  .page-title p {
    max-width: 205px;
  }
  .class-select {
    max-width: 113px;
  }
  .class-select select {
    width: 110px;
  }
  .class-select input {
    width: 125px;
    font-size: 10px;
    padding: 9px;
  }
  .topbar .free-pill {
    display: none;
  }
  .hero {
    padding: 25px 22px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero-foot {
    font-size: 8px;
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .section-heading .text-button {
    font-size: 10px;
  }
  .page-title .eyebrow {
    font-size: 8px;
  }
  .lesson-body h2 {
    font-size: 22px;
  }
  dialog {
    padding: 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Learner-selected themes apply to navigation, lessons, assessments and dialogs. */
:root {
  --theme-accent: #2563eb;
  --theme-navy: #142b52;
  --theme-soft: #eaf2ff;
  --theme-text: #244f91;
  --theme-border: #b9d1fa;
  --theme-active: #264574;
}
[data-theme] .nav-button.active {
  background: var(--theme-active);
}
[data-theme] .hero .primary {
  background: var(--theme-soft);
  border-color: var(--theme-soft);
  color: var(--theme-text);
}
[data-theme] .hero .primary:hover {
  background: white;
}
[data-theme] .progress-track > span {
  background: var(--theme-accent);
}
[data-theme] .free-pill,
[data-theme] .profile-choice.chosen,
[data-theme] .completion-mark,
[data-theme] .example-steps li:before {
  background: var(--theme-soft);
  border-color: var(--theme-border);
  color: var(--theme-text);
}
[data-theme] .primary:hover {
  background: var(--theme-text);
  border-color: var(--theme-text);
}
[data-theme] .hero .primary:hover {
  background: white;
  border-color: white;
}
[data-theme] .secondary,
[data-theme] .text-button,
[data-theme] .lesson-path .reached {
  color: var(--theme-text);
}
[data-theme] .lesson-path .reached {
  border-color: var(--theme-accent);
}
[data-theme] .answer.correct,
[data-theme] .feedback.success {
  border-color: var(--theme-border);
  background: var(--theme-soft);
  color: var(--theme-text);
}
[data-theme] .teaching-block,
[data-theme] .guided {
  background: var(--theme-soft);
  border-color: var(--theme-border);
}
[data-theme] .danger {
  color: #a4443b;
}
.welcome-tools {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: -70px;
  margin-bottom: 50px;
}
.topbar .text-button,
.welcome-tools .text-button {
  font-size: 14px;
  line-height: 1.5;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  max-height: min(52dvh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px;
}
.theme-options button {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 52px;
  min-width: 0;
}
.theme-options button[aria-pressed="true"] {
  border: 2px solid var(--theme-accent);
  background: var(--theme-soft);
}
.theme-options button > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}
.appearance-dialog h2,
.dialog-top h2 {
  margin: 0;
  font-size: 20px;
}
.install-banner {
  position: fixed;
  z-index: 18;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(590px, calc(100% - 32px));
  padding: 18px;
  background: white;
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  box-shadow: 0 10px 45px #142b5220;
}
.install-banner > div {
  flex: 1;
  min-width: 0;
}
.install-banner strong {
  display: block;
  font-size: 13px;
}
.install-banner span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.install-banner button {
  flex-shrink: 0;
}
.install-help {
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.9;
}
.install-help li {
  margin: 15px 0;
}
.course-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 20px 0 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 20px 24px;
}
.course-summary > span {
  font-size: 12px;
  color: var(--muted);
}
.course-summary strong {
  font:
    700 22px/1.5 Manrope,
    sans-serif;
  color: var(--ink);
  margin-right: 7px;
}
.term-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0;
}
.term-tabs button {
  border: 1px solid var(--line);
  background: white;
  min-height: 46px;
  padding: 10px 25px;
  font-size: 13px;
  border-radius: 6px;
}
.term-tabs .selected {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: white;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.course-topic {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  padding: 21px;
  min-width: 0;
}
.course-topic:hover {
  border-color: var(--theme-accent);
}
.course-topic > div {
  min-width: 0;
}
.topic-number {
  font:
    600 12px Manrope,
    sans-serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: var(--theme-soft);
  color: var(--theme-text);
  border-radius: 6px;
}
.course-topic h2 {
  font-size: 15px;
  margin: 0 0 9px;
  letter-spacing: -0.2px;
}
.course-topic p {
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 13px;
}
.topic-meta {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.course-topic small {
  display: block;
  font-size: 11px;
  color: var(--theme-text);
  margin-top: 12px;
  font-weight: 600;
}
.course-dialog {
  width: min(920px, calc(100% - 30px));
  max-height: 94dvh;
  padding: 26px;
}
.course-dialog .dialog-top {
  position: sticky;
  top: -26px;
  background: white;
  z-index: 3;
  padding-top: 10px;
}
.session-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}
.session-controls > [data-session-time],
.legacy-clock {
  font:
    600 14px/1.5 ui-monospace,
    monospace;
  color: var(--theme-text);
  font-variant-numeric: tabular-nums;
}
.session-controls .secondary {
  min-height: 40px;
  padding: 8px 13px;
  font-size: 11px;
}
.legacy-clock {
  display: block;
  text-align: right;
  margin-bottom: 12px;
}
.course-stages {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.course-stages button {
  flex: 1;
  white-space: nowrap;
  border: 0;
  border-radius: 5px;
  background: #f1f4f8;
  min-height: 44px;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}
.course-stages button[aria-current] {
  background: var(--theme-soft);
  color: var(--theme-text);
  font-weight: 600;
}
.course-stages button:disabled {
  opacity: 0.65;
}
.course-body {
  max-width: 750px;
  margin: 0 auto;
}
.course-body h2 {
  font-size: 28px;
  line-height: 1.5;
  margin: 12px 0 18px;
  letter-spacing: -0.6px;
}
.course-body > .objective {
  font-size: 15px;
  line-height: 1.85;
}
.number-reference {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--theme-border);
  border-radius: 7px;
}
/* Timed exam practice shares the classroom's type, themes and button styles. */
.exam-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}
.exam-type,
.exam-paper {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.exam-type.available {
  border-color: var(--theme-border);
}
.exam-type h2 {
  font-size: 20px;
  margin: 16px 0 10px;
}
.exam-type p,
.exam-paper p {
  font-size: 14px;
  line-height: 1.8;
}
.exam-soon {
  display: inline-block;
  padding: 4px 10px;
  color: var(--muted);
  background: #f0f3f7;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.exam-subjects {
  scroll-margin-top: 24px;
}
.exam-paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.exam-paper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.exam-paper h3 {
  font-size: 21px;
  margin-bottom: 12px;
}
.exam-paper > .primary {
  margin-top: auto;
}
.exam-paper-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
}
.exam-paper-meta span {
  padding: 4px 8px;
  background: var(--theme-soft);
  color: var(--theme-text);
  border-radius: 4px;
  font-size: 12px;
}
.exam-resume-note {
  font-weight: 600;
  color: var(--theme-text);
}
.exam-result-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.exam-result-row > div {
  flex: 1;
  min-width: 0;
}
.exam-result-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.exam-dialog {
  width: min(940px, calc(100% - 28px));
  max-height: 94dvh;
  padding: 24px;
}
.exam-top {
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: -24px;
  z-index: 2;
  background: white;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.exam-top > div:first-child {
  flex: 1;
  min-width: 0;
}
.exam-top strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}
.exam-top .eyebrow {
  font-size: 10px;
}
.exam-clock {
  flex-shrink: 0;
  text-align: right;
}
.exam-clock small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.exam-clock span {
  font:
    600 20px/1.5 ui-monospace,
    monospace;
  color: var(--theme-text);
  font-variant-numeric: tabular-nums;
}
.exam-body {
  max-width: 740px;
  margin: 0 auto;
}
.exam-body h2 {
  font-size: 26px;
}
.exam-brief {
  background: var(--theme-soft);
  border-radius: 7px;
  padding: 20px;
  margin: 20px 0;
}
.exam-brief strong {
  color: var(--theme-text);
  font-size: 18px;
}
.exam-brief p {
  margin: 10px 0 0;
}
.exam-instructions {
  padding-left: 22px;
  line-height: 1.9;
}
.exam-instructions li {
  margin-bottom: 12px;
}
.exam-question-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
.exam-question-meta .eyebrow {
  font-size: 11px;
}
.exam-passage {
  padding: 20px;
  margin: 0 0 24px;
  background: var(--theme-soft);
  border-left: 3px solid var(--theme-border);
  border-radius: 5px;
}
.exam-passage h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.exam-passage p,
p.exam-passage {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 0;
  color: var(--ink);
}
.exam-question {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.exam-question legend {
  padding: 0;
  font:
    700 22px/1.5 Manrope,
    system-ui,
    sans-serif;
}
.exam-prompt {
  font-size: 19px;
  line-height: 1.8;
  color: var(--ink);
  margin: 18px 0 24px;
}
.exam-options {
  display: grid;
  gap: 12px;
}
.exam-option {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.7;
}
.exam-option.selected {
  border-color: var(--theme-accent);
  background: var(--theme-soft);
}
.exam-option input {
  accent-color: var(--theme-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.exam-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.exam-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0;
}
.exam-navigator {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.exam-navigator summary {
  cursor: pointer;
  color: var(--theme-text);
  font-size: 14px;
  min-height: 34px;
}
.exam-question-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
  margin: 20px 0;
}
.exam-question-grid button {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  font-size: 13px;
  padding: 5px 1px;
}
.exam-question-grid button span {
  font-size: 10px;
  margin-left: 2px;
}
.exam-question-grid button.answered {
  color: var(--theme-text);
  background: var(--theme-soft);
}
.exam-question-grid button[aria-current] {
  outline: 2px solid var(--theme-accent);
  outline-offset: 1px;
}
.exam-score-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px;
  margin: 20px 0;
  border-radius: 8px;
  background: var(--theme-soft);
}
.exam-score-summary span {
  font-size: 14px;
}
.exam-score-summary strong {
  display: block;
  color: var(--theme-text);
  font:
    700 28px/1.5 Manrope,
    sans-serif;
}
.exam-solution {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.exam-solution h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
}
.exam-invitation {
  width: min(500px, calc(100% - 28px));
  max-width: calc(100% - 28px);
}
.exam-invitation h2 {
  font-size: 24px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.exam-invitation h2:focus {
  outline: none;
}
.exam-invitation .icon-button {
  width: 44px;
  height: 44px;
}
.exam-invitation > p {
  font-size: 15px;
  line-height: 1.85;
}
.exam-invitation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.exam-invitation-actions .primary {
  flex: 1;
}
@media (max-width: 560px) {
  .exam-invitation h2 {
    font-size: 21px;
  }
  .exam-invitation-actions > * {
    width: 100%;
  }
}
.exam-solution p {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.85;
}
@media (max-width: 1050px) {
  .exam-paper-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .exam-catalog {
    grid-template-columns: 1fr;
  }
  .exam-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    padding: 18px;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .exam-top {
    top: -18px;
    gap: 10px;
    padding: 12px 0;
  }
  .exam-top strong {
    font-size: 16px;
  }
  .exam-top .eyebrow {
    font-size: 8px;
    letter-spacing: 0.4px;
  }
  .exam-top .secondary {
    padding: 10px;
    min-height: 44px;
    font-size: 11px;
  }
  .exam-clock span {
    font-size: 17px;
  }
  .exam-clock small {
    font-size: 9px;
  }
  .exam-question-meta {
    align-items: flex-start;
  }
  .exam-question legend {
    font-size: 21px;
  }
  .exam-prompt {
    font-size: 17px;
  }
  .exam-passage {
    padding: 16px;
  }
  .exam-option {
    padding: 13px;
    font-size: 16px;
  }
  .exam-actions {
    flex-wrap: wrap;
  }
  .exam-actions button {
    flex: 1;
  }
  .exam-question-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .exam-score-summary {
    gap: 18px;
    padding: 18px;
  }
  .exam-result-row {
    flex-wrap: wrap;
  }
  .exam-result-row > div {
    flex-basis: 65%;
  }
}
.number-reference summary {
  cursor: pointer;
  color: var(--theme-text);
  font-weight: 600;
  min-height: 30px;
}
.number-chart {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.number-chart li {
  min-width: 0;
  padding: 9px 0;
  text-align: center;
  border: 1px solid var(--theme-border);
  border-radius: 3px;
  font-size: clamp(11px, 2.8vw, 16px);
  font-variant-numeric: tabular-nums;
}
.number-word-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px 18px;
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .number-chart {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .number-chart li {
    font-size: 16px;
    padding: 10px 0;
  }
}
.number-word-list > div {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.number-word-list dt {
  min-width: 26px;
  font-weight: 600;
  color: var(--theme-text);
}
.number-word-list dd {
  margin: 0;
}
.course-explanations {
  display: grid;
  gap: 18px;
  margin: 25px 0;
}
.course-explanations section {
  border-left: 3px solid var(--theme-border);
  padding: 4px 0 4px 20px;
}
.course-explanations section > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--theme-text);
}
.course-explanations p {
  font-size: 16px;
  line-height: 1.95;
  margin: 9px 0 0;
  color: var(--ink);
}
.rule {
  background: var(--theme-soft);
  border-radius: 7px;
  padding: 20px;
  margin: 24px 0;
}
.rule strong {
  font-size: 12px;
  color: var(--theme-text);
}
.rule p {
  font-size: 15px;
  color: var(--ink);
  margin: 7px 0 0;
  line-height: 1.85;
}
.prerequisite {
  font-size: 12px;
  line-height: 1.85;
}
.example-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
.example-picker button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  font-size: 12px;
}
.example-picker button.selected {
  color: white;
  background: var(--theme-accent);
  border-color: var(--theme-accent);
}
.worked-prompt {
  font:
    600 19px/1.9 Manrope,
    sans-serif;
  color: var(--ink);
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 20px;
  margin: 20px 0;
}
.worked-answer {
  background: var(--theme-soft);
  color: var(--theme-text);
  padding: 17px 20px;
  border-radius: 6px;
  font-size: 16px;
  margin: 20px 0;
}
.course-body .example-steps li {
  font-size: 16px;
  line-height: 1.9;
  padding-top: 12px;
  padding-bottom: 12px;
}
.assessment-brief {
  padding: 23px;
  background: var(--theme-soft);
  border-radius: 8px;
  margin: 25px 0;
}
.assessment-brief > strong {
  font:
    700 26px Manrope,
    sans-serif;
  color: var(--theme-text);
}
.assessment-brief p {
  margin: 13px 0 0;
  font-size: 14px;
  line-height: 1.9;
}
.assessment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.countdown {
  background: var(--theme-soft);
  border: 1px solid var(--theme-border);
  border-radius: 5px;
  padding: 8px 10px;
  font:
    600 17px/1.5 ui-monospace,
    monospace;
  color: var(--theme-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.assessment-question {
  border-top: 1px solid var(--line);
  padding: 23px 0;
}
.assessment-question label {
  display: block;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
}
.assessment-question label > span {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.assessment-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.assessment-input input {
  width: min(330px, 100%);
  min-width: 0;
  font-size: 16px;
}
.assessment-input > span {
  font-size: 12px;
  color: var(--muted);
}
.assessment-question details {
  margin-top: 12px;
  font-size: 13px;
}
.assessment-question summary {
  cursor: pointer;
  color: var(--theme-text);
  min-height: 36px;
  padding: 6px 0;
}
.assessment-question details p {
  font-size: 13px;
  line-height: 1.8;
}
.assessment-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 25px 0;
  padding: 25px;
  background: var(--theme-soft);
  border-radius: 8px;
}
.assessment-result strong {
  font:
    700 40px Manrope,
    sans-serif;
  color: var(--theme-text);
}
.assessment-result span {
  font-size: 13px;
}
.assessment-result small {
  font-size: 11px;
  color: var(--muted);
}
.answer-review {
  margin: 22px 0;
  font-size: 13px;
}
.answer-review summary {
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--theme-text);
}
.answer-review section {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.answer-review p,
.answer-review li {
  font-size: 13px;
  line-height: 1.9;
}
.session-log article,
.assessment-log {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.session-log article > div,
.assessment-log > div {
  min-width: 0;
}
.session-log strong,
.assessment-log strong {
  font-size: 12px;
}
.session-log span,
.assessment-log span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.session-log article > strong,
.assessment-log > strong {
  white-space: nowrap;
}
@media (max-width: 1050px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
  .topbar > div {
    gap: 12px;
  }
  .topbar .free-pill {
    display: none;
  }
}
@media (max-width: 740px) {
  [data-theme] .nav-button.active {
    background: var(--theme-soft);
    color: var(--theme-text);
  }
  .install-banner {
    bottom: 85px;
    right: 16px;
    flex-wrap: wrap;
  }
  .install-banner > div {
    flex-basis: 100%;
  }
  .install-banner .primary {
    min-height: 42px;
  }
  .course-summary {
    gap: 16px;
    padding: 17px;
  }
  .course-summary strong {
    font-size: 19px;
  }
  .course-summary > span {
    font-size: 11px;
  }
  .course-dialog .dialog-top {
    top: -26px;
  }
  .course-topic {
    padding: 19px;
  }
  .course-topic h2 {
    font-size: 15px;
  }
  .topbar .text-button {
    font-size: 14px;
  }
  .welcome-tools {
    margin-top: -70px;
    margin-bottom: 38px;
  }
}
@media (max-width: 560px) {
  .course-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 18px;
    border: 0;
    border-radius: 0;
  }
  .course-dialog .dialog-top {
    top: -18px;
    padding-top: 12px;
    gap: 10px;
  }
  .session-controls {
    gap: 9px;
  }
  .session-controls > [data-session-time] {
    font-size: 12px;
  }
  .session-controls .secondary {
    padding: 8px 10px;
  }
  .course-dialog .dialog-top .eyebrow {
    font-size: 10px;
  }
  .course-body h2 {
    font-size: 23px;
  }
  .course-explanations p,
  .course-body .example-steps li {
    font-size: 15px;
  }
  .course-stages {
    gap: 5px;
  }
  .course-stages button {
    font-size: 10px;
    min-width: 82px;
    padding: 9px;
  }
  .term-tabs {
    gap: 7px;
  }
  .term-tabs button {
    flex: 1;
    padding: 10px 15px;
  }
  .course-topic {
    padding: 18px 15px;
    gap: 12px;
  }
  .course-topic h2 {
    font-size: 15px;
  }
  .course-topic p {
    font-size: 12px;
  }
  .topic-meta {
    font-size: 9px;
  }
  .countdown {
    font-size: 14px;
  }
  .assessment-heading > .eyebrow {
    font-size: 9px;
  }
  .assessment-question label {
    font-size: 15px;
  }
  .worked-prompt {
    font-size: 17px;
    padding: 17px;
  }
  .welcome-tools {
    position: static;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 16px 0 24px;
    gap: 12px;
  }
  .welcome-tools .text-button {
    font-size: 14px;
  }
  .welcome > .brand {
    font-size: 22px;
  }
  .welcome .brand small {
    max-width: 130px;
    font-size: 8px;
  }
  .welcome .brand-icon {
    width: 44px;
    height: 48px;
  }
  .topbar > div {
    gap: 9px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }
  .topbar .profile-button {
    padding: 7px 8px;
  }
  .topbar {
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .topbar .mobile-brand {
    font-size: 21px;
  }
  .assessment-log,
  .session-log article {
    align-items: flex-start;
  }
  .course-summary {
    gap: 12px;
  }
  .panel .course-summary {
    padding: 14px;
  }
  .assessment-input input {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .topbar > div {
    margin-left: auto;
  }
  .welcome-tools {
    position: static;
    justify-content: flex-start;
    margin: 16px 0 24px;
  }
  .theme-options {
    grid-template-columns: 1fr;
  }
  .course-summary > span {
    flex-basis: 100%;
  }
}
.math-diagram {
  margin: 20px 0;
  padding: 16px;
  text-align: center;
  background: var(--theme-soft);
  border-radius: 7px;
  color: var(--theme-text);
}
.math-diagram svg {
  width: min(340px, 100%);
  height: auto;
}
.math-diagram text {
  fill: currentColor;
  stroke: none;
  font:
    12px system-ui,
    sans-serif;
}
.math-diagram figcaption {
  font-size: 10px;
  color: var(--muted);
}
.course-introduction {
  display: grid;
  gap: 19px;
  margin: 25px 0;
}
.course-introduction h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-text);
  margin: 0 0 9px;
}
.course-introduction p {
  font-size: 17px;
  line-height: 1.95;
  margin: 0;
  color: var(--ink);
}
.course-introduction [data-real-life-example] {
  padding: 20px;
  background: var(--theme-soft);
  border: 1px solid var(--theme-border);
  border-radius: 7px;
}
.lesson-visual svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
.assessment-question .lesson-visual {
  max-width: 380px;
}
@media (max-width: 560px) {
  .course-introduction p {
    font-size: 16px;
  }
  .course-introduction [data-real-life-example] {
    padding: 17px;
  }
}
.age-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 4px;
}
.age-gate {
  max-width: 650px;
}
.age-gate .welcome-panel {
  margin-top: 55px;
}
.readiness-list {
  display: grid;
  gap: 15px;
  margin: 25px 0;
}
.readiness-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.readiness-item strong {
  display: block;
  font-size: 16px;
  line-height: 1.7;
}
.readiness-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 13px;
}
.readiness-actions .confirmed {
  background: var(--theme-soft);
  border-color: var(--theme-accent);
  color: var(--theme-text);
}
.readiness-item > a {
  color: var(--theme-text);
  font-size: 13px;
  line-height: 1.9;
  display: inline-block;
  padding: 5px 0;
}
.readiness-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  margin-top: 18px;
}
.return-topic {
  display: block;
  text-align: left;
  max-width: 100%;
  line-height: 1.8;
  margin-bottom: 15px;
}
.primary:disabled,
.return-topic:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 560px) {
  .readiness-item {
    padding: 16px;
  }
  .readiness-item strong {
    font-size: 15px;
  }
  .readiness-actions .secondary {
    font-size: 11px;
    padding: 11px 13px;
  }
  .age-gate .welcome-panel {
    margin-top: 35px;
  }
}
.clock-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.clock-group > small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.clock-group > [role="timer"] {
  font:
    600 12px/1.5 ui-monospace,
    monospace;
  font-variant-numeric: tabular-nums;
  color: var(--theme-text);
}
@media (max-width: 560px) {
  .course-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
  }
  .course-dialog .session-controls {
    gap: 10px;
  }
  .course-dialog .dialog-top > .eyebrow {
    max-width: 75px;
    font-size: 9px;
    line-height: 1.7;
  }
  .clock-group > [role="timer"] {
    font-size: 11px;
  }
  .session-controls .secondary {
    font-size: 10px;
    padding: 8px;
  }
  .clock-group > small {
    font-size: 7px;
  }
}

/* Learning records, offline packs and content support. */
.junior-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 12px;
}
.junior-choices label {
  display: grid;
  gap: 8px;
  font-weight: 650;
  font-size: 16px;
  min-width: 0;
}
.junior-choices select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
@media (max-width: 600px) {
  .junior-choices {
    grid-template-columns: 1fr;
  }
}
.beginner-foundation {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin: 24px 0;
  background: var(--paper);
}
.beginner-foundation h3 {
  font-size: 21px;
  line-height: 1.4;
}
.beginner-foundation h4 {
  font-size: 18px;
  margin: 24px 0 10px;
}
.beginner-foundation p,
.beginner-words dd,
.small-explanation p {
  font-size: 17px;
  line-height: 1.8;
}
.beginner-words {
  margin: 16px 0;
}
.beginner-words > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.beginner-words dt {
  font-weight: 750;
  font-size: 17px;
}
.beginner-words dd {
  margin: 4px 0 0;
}
.beginner-check {
  border-left: 3px solid var(--theme-accent, var(--blue));
  padding-left: 14px;
}
.small-explanation p {
  margin: 8px 0;
}
@media (max-width: 500px) {
  .beginner-foundation {
    padding: 16px;
  }
}
/* Accessible progress graphs; keep a readable plot on narrow screens. */
.progress-graphs {
  display: grid;
  gap: 24px;
  margin: 24px 0;
}
.progress-graph {
  min-width: 0;
  overflow-x: auto;
  padding: 20px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.progress-graph h3 {
  font-size: 17px;
  margin: 0 12px 14px;
}
.progress-line-graph {
  display: block;
  width: 100%;
  min-width: 480px;
  max-height: 330px;
}
.graph-grid {
  stroke: #dfe6ef;
  stroke-width: 1;
}
.graph-axis {
  fill: #596b84;
  font:
    14px system-ui,
    sans-serif;
}
.graph-value {
  fill: #243b5d;
  font:
    600 14px system-ui,
    sans-serif;
}
.graph-trend {
  fill: none;
  stroke: var(--theme-accent, var(--blue));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.graph-point {
  fill: var(--theme-accent, var(--blue));
  stroke: white;
  stroke-width: 2;
}
.graph-empty {
  padding: 0 12px;
  color: var(--muted);
}
.graph-mobile-help {
  display: none;
}
.test-history .table-scroll {
  margin: 20px 0;
}
.test-history table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.test-history th,
.test-history td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
.test-history th {
  font-weight: 650;
}
.topic-attempt-history {
  margin: 20px 0;
}
.topic-attempt-history h3 {
  font-size: 17px;
}
.topic-attempt-history li {
  margin: 10px 0;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .graph-mobile-help {
    display: block;
    color: var(--muted);
    font-size: 13px;
  }
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
.insight-grid article {
  padding: 18px;
  background: var(--paper);
  border-radius: 8px;
}
.insight-grid h3 {
  margin: 0 0 12px;
}
.insight-grid p {
  font-size: 14px;
  line-height: 1.7;
}
.table-scroll {
  overflow-x: auto;
}
.growth-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}
.growth-panel th,
.growth-panel td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.plan-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin: 20px 0;
}
.plan-form label {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 170px;
  font-size: 14px;
}
.plan-form select,
.plan-form input,
.support-dialog select,
.support-dialog input,
.voice-settings select {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.study-plan-list article,
.offline-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.study-plan-list small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.support-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: 90dvh;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}
.support-dialog p {
  line-height: 1.7;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.support-dialog .setup-form label,
.voice-settings label {
  display: grid;
  gap: 8px;
}
.setup-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: white;
}
.voice-settings {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  display: grid;
  gap: 14px;
}
.voice-settings p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}
.staged-hints {
  padding: 14px;
  background: var(--theme-soft, var(--paper));
  border-radius: 7px;
  margin-top: 12px;
}
.staged-hints p {
  font-size: 14px;
  line-height: 1.7;
}
.report-question {
  font-size: 13px;
  text-align: left;
  display: block;
  margin-top: 10px;
}
.admin-report {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.admin-report label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.admin-dialog {
  width: min(850px, calc(100% - 28px));
}
[data-sync-status] {
  overflow-wrap: anywhere;
}
footer > span:last-child {
  text-align: right;
  line-height: 2;
}
footer button {
  min-height: 44px;
}
@media (max-width: 600px) {
  .insight-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .study-plan-list article,
  .offline-pack {
    align-items: flex-start;
    flex-direction: column;
  }
  .support-dialog {
    padding: 20px;
  }
  footer {
    flex-wrap: wrap;
  }
  footer > span:last-child {
    text-align: left;
  }
}

.offline-tools {
  margin: 18px 0;
}
.study-plan-list label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}
.study-plan-list input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--theme-accent, var(--blue));
  flex-shrink: 0;
}

/* Complete teaching manual library. */
.subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.subject-tabs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 12px 20px;
  min-height: 46px;
  font:
    600 14px Manrope,
    sans-serif;
}
.subject-tabs button.selected {
  background: var(--theme-accent, var(--blue));
  border-color: var(--theme-accent, var(--blue));
  color: white;
}
.manual-library {
  margin: 26px 0;
}
.manual-library .page-title {
  padding-top: 0;
  margin-top: 0;
}
.manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.manual-topic {
  display: flex;
  gap: 14px;
  text-align: left;
  align-items: flex-start;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  min-width: 0;
}
.manual-topic:hover {
  border-color: var(--theme-accent, var(--blue));
  box-shadow: 0 4px 16px #142b520a;
}
.manual-topic strong {
  display: block;
  font-size: 16px;
  line-height: 1.55;
}
.manual-topic small {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0;
}
.manual-topic b {
  font-size: 13px;
  color: var(--theme-text, var(--blue));
}
.manual-topic .topic-number {
  flex-shrink: 0;
}
.manual-figure {
  margin: 24px 0;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.manual-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.manual-figure figcaption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
}
.manual-supplement,
.manual-deeper {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.manual-supplement summary,
.manual-deeper summary {
  font-weight: 600;
  cursor: pointer;
  min-height: 28px;
}
.manual-supplement p,
.manual-deeper p,
.manual-example p,
.manual-solution p {
  font-size: 16px;
  line-height: 1.85;
}
.manual-example,
.manual-solution,
.written-practice article {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.manual-question {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  margin: 0;
  min-width: 0;
}
.manual-question legend {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.written-practice label {
  display: block;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 600;
}
.written-practice textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  resize: vertical;
}
.manual-dialog .course-body h2 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.4;
}
.manual-passage {
  padding: 20px;
  border-left: 3px solid var(--theme-accent, var(--blue));
  background: var(--theme-soft, var(--paper));
  line-height: 1.9;
  font-size: 17px;
}
@media (max-width: 740px) {
  .manual-grid {
    grid-template-columns: 1fr;
  }
  .subject-tabs button {
    flex: 1;
    min-width: 100px;
    padding: 12px 10px;
  }
  .manual-library.panel {
    padding: 18px;
  }
  .manual-topic {
    padding: 18px;
  }
  .manual-figure {
    padding: 8px;
    margin: 18px 0;
  }
  .manual-topic strong {
    font-size: 16px;
  }
}

.written-response {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.manual-dialog .dialog-top > .eyebrow {
  font-size: 12px;
  line-height: 1.5;
}

/* Topic discovery, revision and guided workshops. */
.topic-search {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #cbdcf6;
  border-left: 4px solid var(--blue);
  border-radius: 9px;
  background: #f7faff;
}
.topic-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
  font: 800 clamp(19px, 2.2vw, 23px)/1.3 Manrope, sans-serif;
}
.secondary-subjects {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.secondary-subjects .manual-topic {
  width: 100%;
  margin: 8px 0;
}
.secondary-subjects .manual-topic > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.manual-dialog .guide-section {
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.manual-dialog .guide-section h4 {
  color: var(--navy);
}
.manual-dialog .guide-visual {
  background: var(--paper);
  padding: 14px;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.daily-challenge-card {
  display: grid;
  grid-template-columns: clamp(64px, 15vw, 144px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-left: 4px solid var(--blue);
  background: #f7faff;
  margin-bottom: 20px;
}
.challenge-kit {
  display: block;
  width: 100%;
  height: auto;
}
.challenge-overview {
  display: grid;
  grid-template-columns: clamp(64px, 15vw, 112px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.challenge-progress {
  width: 100%;
  height: 12px;
  accent-color: #2563eb;
}
.challenge-milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  gap: 6px;
  padding: 0;
  list-style: none;
}
.challenge-milestones button {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  padding: 6px 2px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #eaf2ff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}
.challenge-milestones button[aria-pressed="true"] {
  border-color: #2563eb;
}
.challenge-milestones button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.challenge-milestones svg {
  width: 20px;
  height: 20px;
}
.challenge-milestone-detail {
  color: var(--navy);
  font-size: 0.9rem;
}
.challenge-milestones .reached,
.challenge-notice {
  background: #dcfce7;
  color: #14532d;
}
.challenge-notice {
  padding: 10px;
  border-radius: 6px;
}
.challenge-dialog .challenge-prompt {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}
.search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-fields input,
.search-fields select {
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}
.search-fields input {
  flex: 3;
  min-width: 180px;
}
.search-fields select {
  flex: 1;
  min-width: 125px;
}
.search-fields > button.primary {
  background: #1d4ed8;
  color: white;
  font-weight: 800;
}
.search-fields > button.primary:hover {
  background: #1e40af;
}
.search-result-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.search-result-heading [role="status"] {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
}
.search-result-heading .search-coming-soon {
  padding: 6px 10px;
  border-radius: 6px;
  background: #fef3c7;
  color: #78350f;
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.search-result {
  display: block;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  min-width: 0;
  text-decoration: none;
}
.search-result:hover {
  border-color: var(--blue);
  background: #eff6ff;
}
.search-result strong,
.search-result span,
.search-result small {
  display: block;
  line-height: 1.7;
}
.search-result strong {
  font-size: 15px;
  font-weight: 800;
}
.search-result span {
  font-size: 13px;
  margin-top: 8px;
  color: #1e40af;
  font-weight: 700;
}
.search-result small {
  font-size: 12px;
  color: var(--muted);
}
.search-class-matches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.revision-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  margin: 22px 0;
}
.revision-summary h2 {
  font-size: 20px;
  margin: 7px 0;
}
.revision-summary p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.revision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.revision-card {
  margin: 0;
}
.revision-card h2 {
  font-size: 19px;
  line-height: 1.5;
}
.revision-card p {
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.revision-card small {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.revision-card .text-button {
  display: block;
}
.revision-dialog input[type="text"] {
  width: 100%;
  margin: 12px 0;
  font-size: 16px;
}
.revision-feedback {
  margin: 22px 0;
  padding: 18px;
  background: var(--paper);
  border-radius: 8px;
}
.revision-feedback li {
  line-height: 1.8;
  margin-bottom: 8px;
}
.learning-workshop {
  padding: 22px;
  margin: 24px 0;
  background: var(--theme-soft, var(--paper));
  border: 1px solid var(--theme-border, var(--line));
  border-radius: 9px;
}
.learning-workshop p,
.learning-workshop li {
  font-size: 16px;
  line-height: 1.85;
}
.learning-workshop li {
  margin: 8px 0;
}
.learning-workshop label {
  display: block;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 600;
  margin-top: 16px;
}
.learning-workshop textarea {
  display: block;
  width: 100%;
  min-height: 85px;
  resize: vertical;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin: 10px 0;
  background: white;
  color: var(--ink);
}
.workshop-word-list > div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.workshop-word-list dt {
  font-size: 17px;
  font-weight: 700;
}
.workshop-word-list dd {
  margin: 8px 0;
  line-height: 1.7;
}
.workshop-word-list dd p {
  margin: 6px 0;
  font-size: 15px;
}
.activity-care {
  font-size: 14px !important;
  color: var(--muted);
}
@media (max-width: 800px) {
  .search-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .search-results-grid,
  .revision-grid {
    grid-template-columns: 1fr;
  }
  .search-fields input {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
  }
  .search-fields select {
    min-width: 0;
    width: 100px;
  }
  .search-fields > button {
    width: 100%;
  }
  .revision-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .learning-workshop {
    padding: 16px;
  }
  .sidebar .nav-button {
    font-size: 9px;
    min-width: 0;
  }
}

.auth-password-field {
  position: relative;
  min-width: 0;
}
.auth-password-field input {
  width: 100%;
  padding-right: 54px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover { color: var(--blue); }
.password-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.password-toggle svg { width: 22px; height: 22px; }
.password-eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-slash { display: block; }

.google-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.google-signin:hover:not(:disabled) { background: var(--paper); border-color: #a6b4c8; }
.google-signin:disabled { opacity: .65; }
.google-signin svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-divider + .setup-form { margin-top: 8px; }

/* Phone controls: stable type size, touch targets and a consistent action grid. */
@media (max-width: 760px) {
 .setup-form input:not([type="checkbox"]):not([type="radio"]), .setup-form select, .setup-form textarea,
 .search-fields input, .assessment-input input { font-size: 16px; min-height: 48px; }
 .setup-form label { font-size: 14px; line-height: 1.5; }
 .setup-form .age-help, .setup-form .form-message { font-size: 13px; line-height: 1.6; }
 .google-signin { min-height: 48px; font-size: 15px; }
 .auth-links .text-button { min-height: 44px; }
 .auth-panel .privacy-copy { font-size: 12px !important; line-height: 1.65; }
 .welcome-tools { gap: 8px; }
 .welcome-tools .text-button { min-height: 44px; }
 .topbar > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: 100%; }
 .topbar > div .text-button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; text-align: center; text-decoration: none; white-space: normal; }
 .topbar > div .profile-button { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 44px; justify-content: center; }
 .topbar > div .profile-button span { display: inline; max-width: 70vw; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .topbar .free-pill { display: none; }
 .setup-audiences { font-size: 14px; line-height: 1.6; }
 .setup-audiences summary { min-height: 44px; padding: 10px 0; }
 .study-time-fields { grid-template-columns: 1fr; }
 .account-dialog, .support-dialog { max-width: calc(100% - 24px); max-height: calc(100dvh - 32px); padding: 20px; }
}

@media (max-width: 760px) {
 .sidebar .nav-button { font-size: 11px; line-height: 1.3; min-height: 60px; white-space: normal; }
 #main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
 .course-stages button { font-size: 12px; min-height: 44px; }
 .term-tabs button { font-size: 13px; min-height: 44px; }
 .session-controls .secondary { min-height: 44px; font-size: 13px; }
 .exam-top { flex-wrap: wrap; align-items: flex-start; }
 .exam-top > div:first-child { flex: 1; min-width: 0; }
 .exam-top strong { overflow-wrap: anywhere; }
 .exam-top .eyebrow { font-size: 10px; }
 .exam-clock small { font-size: 11px; }
 .exam-top .secondary { font-size: 13px; }
}

@media (max-width: 760px) {
 .install-banner { position: static; width: auto; max-width: none; margin: 16px 16px calc(96px + env(safe-area-inset-bottom)); box-shadow: none; }
}

.dual-card { margin-block: 20px; background: linear-gradient(120deg, #eff6ff, #f0fdf8); }
.dual-card p { max-width: 64ch; }
.study-room-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 16px; margin-block: 20px; }
.study-room { overflow-wrap: anywhere; }
.study-members { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); gap: 8px; }
.study-members li { padding: 10px 12px; background: #f3f7fd; border-radius: 8px; font-size: 14px; }
.study-members span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.study-next-lesson, .study-rename { border-top: 1px solid var(--line); padding-top: 16px; }
.study-rename { display: grid; gap: 8px; }
.dual-dialog { width: 700px; overflow-wrap: anywhere; }
.dual-dialog [data-dual-body] { display: grid; gap: 14px; }
.dual-dialog input:not([type="radio"]), .dual-dialog select { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.dual-dialog .setup-form { margin: 0; }
.dual-room-code { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dual-room-code strong { font-family: monospace; letter-spacing: .05em; font-size: 18px; }
.dual-people, .dual-presence { margin: 0; }
.dual-lesson { background: #f3f7fd; padding: 18px; border-radius: 12px; }
.dual-lesson p { white-space: pre-wrap; line-height: 1.75; }
.dual-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.dual-footer { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.dual-dialog fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.dual-dialog legend { font-weight: 700; line-height: 1.65; margin-bottom: 12px; }
.dual-option { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; margin-block: 8px; cursor: pointer; }
.dual-option:has(:checked) { background: #eff6ff; border-color: #2563eb; }
.dual-dialog .dual-option input[type="radio"] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; accent-color: #2563eb; }
.dual-option span { min-width: 0; line-height: 1.6; }
.dual-scores { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dual-scores p { padding: 16px; background: #f3f7fd; border-radius: 10px; }
.dual-scores strong { display: block; font-size: 24px; }
.dual-dialog details { border-top: 1px solid var(--line); padding-block: 12px; }
.dual-dialog summary { cursor: pointer; line-height: 1.65; }
@media(max-width: 520px) { .dual-actions > button { flex: 1 1 100%; min-height: 44px; } .dual-dialog { padding: 16px; } }

.math-method-diagram { margin: 20px 0; padding: 16px; border: 1px solid #c9d8eb; border-radius: 14px; background: #f3f7fd; }
.math-method-diagram figcaption { font-weight: 700; margin-bottom: 12px; }
.math-method-diagram ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; counter-reset: method; }
.math-method-diagram li { position: relative; counter-increment: method; padding: 12px 14px; border: 1px solid #b9cde5; border-radius: 10px; background: white; overflow-wrap: anywhere; }
.math-method-diagram li::before { content: counter(method) ". "; font-weight: 700; }
.math-method-diagram li:not(:last-child)::after { content: "↓"; position: absolute; left: 50%; bottom: -27px; font-size: 21px; color: #315b8b; }
.learning-session { display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid var(--line); margin-bottom:20px; }
.learning-session p { margin:6px 0 0; }
.learning-session button { flex-shrink:0; }
.family-link { border-top:1px solid var(--line); padding:20px 0; }
.family-dialog pre { font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; }
.family-dialog details { margin:12px 0; }
.family-dialog [data-family-code] { overflow-wrap:anywhere; }
@media(max-width:600px) { .learning-session { flex-direction:column; align-items:stretch; gap:12px; } }
.family-dialog .setup-form label { display:grid; gap:8px; }
.family-dialog .setup-form input:not([type=checkbox]) { width:100%; box-sizing:border-box; }
.family-dialog .setup-form label:has(input[type=checkbox]) { display:flex; align-items:center; gap:10px; }
.family-dialog summary { cursor:pointer; padding:8px 0; }

/* Result invitations stay readable in narrow result dialogs. */
.result-sharing { margin: 24px 0; padding: 20px; border: 1px solid var(--border, #d9e2df); border-radius: 16px; background: var(--surface, #f5faf7); text-align: left; }
.result-sharing h3 { margin-top: 24px; }
.result-sharing .button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.result-sharing .button-row > * { white-space: normal; text-align: center; }
.result-sharing textarea { width: 100%; min-height: 150px; margin-top: 10px; }
.challenge-invitation { max-width: 760px; margin: 24px auto; padding: 24px; }
@media (max-width: 480px) { .result-sharing .button-row > * { width: 100%; } .challenge-invitation { margin: 16px; } }

/* Separate learner cards collapse to one column on smaller screens. */
.family-learner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 20px 0; }
.family-learner-card { padding: 20px; border: 1px solid #d9e2df; border-radius: 14px; min-width: 0; overflow-wrap: anywhere; }
.family-learner-card.selected { border-color: #22735c; background: #f3faf6; }
.family-learner-card dl > div { display: flex; justify-content: space-between; gap: 16px; margin: 12px 0; }
.family-learner-card dd { margin: 0; font-weight: 700; text-align: right; }
.family-learner-card button { width: 100%; white-space: normal; }

/* A foreground push keeps its destination available while the app is open. */
.learning-notification { position: fixed; bottom: 20px; right: 20px; width: min(380px, calc(100vw - 40px)); z-index: 10000; box-shadow: 0 12px 40px #0003; }

/* Written exam practice stays separate from the automatically marked score. */
.exam-written-practice { margin: 24px 0; padding: 16px; border: 1px solid #d9e2df; border-radius: 12px; }
.exam-written-practice textarea { display: block; width: 100%; margin: 8px 0 16px; }
.exam-angle-models { display: flex; flex-wrap: wrap; gap: 16px; }
.exam-angle-models figure { margin: 0; width: 140px; text-align: center; }
.exam-angle-models svg { width: 140px; height: 110px; }
