:root {
  --atlas-paper: #f8f4e9;
  --atlas-surface: #fffdf8;
  --atlas-ink: #14283a;
  --atlas-ink-soft: #284156;
  --atlas-muted: #706a58;
  --atlas-line: #e3dcc8;
  --atlas-green: #087f5b;
  --atlas-green-dark: #056046;
  --atlas-brass: #805a16;
  --atlas-red: #b24a3d;
  --atlas-orange: #9a4e18;
  --atlas-blue: #356fa0;
  --atlas-purple: #745397;
}

body.learning-body {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--atlas-ink);
  background: var(--atlas-paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
}

.learning-body *,
.learning-body *::before,
.learning-body *::after {
  box-sizing: border-box;
}

.learning-body a {
  color: inherit;
}

.learning-body a:hover {
  text-decoration: none;
}

body.onboarding-body {
  overflow: auto;
}

.onboarding-shell {
  min-height: 100vh;
  padding: 0 24px 56px;
  background:
    radial-gradient(circle at 8% 8%, rgba(8, 127, 91, .12), transparent 28%),
    radial-gradient(circle at 92% 16%, rgba(128, 90, 22, .11), transparent 25%),
    var(--atlas-paper);
}

.onboarding-topbar {
  display: flex;
  width: min(100%, 1040px);
  min-height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.onboarding-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-brand > span {
  display: flex;
  flex-direction: column;
}

.onboarding-brand strong {
  font: 800 18px/1.2 "Fraunces", Georgia, serif;
}

.onboarding-brand small {
  color: var(--atlas-muted);
  font-size: 11px;
}

.onboarding-logout {
  min-height: 44px;
  border: 0;
  color: var(--atlas-ink-soft);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.onboarding-main {
  width: min(100%, 920px);
  margin: 18px auto 0;
}

.onboarding-card {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--atlas-line);
  border-radius: 24px;
  background: var(--atlas-surface);
  box-shadow: 0 20px 60px rgba(20, 40, 58, .1);
}

.onboarding-heading {
  max-width: 690px;
  margin-bottom: 34px;
}

.onboarding-heading h1 {
  margin: 4px 0 10px;
  font: 800 clamp(34px, 5vw, 50px)/1.02 "Fraunces", Georgia, serif;
}

.onboarding-heading > p:last-child,
.onboarding-step-help,
.onboarding-actions p {
  margin: 0;
  color: var(--atlas-muted);
}

.onboarding-errors {
  margin-bottom: 24px;
  padding: 15px 18px;
  border: 1px solid color-mix(in srgb, var(--atlas-red) 45%, var(--atlas-line));
  border-radius: 12px;
  color: #7d2f27;
  background: #fff1ed;
}

.onboarding-errors ul {
  margin: 5px 0 0;
  padding-left: 20px;
}

.onboarding-form {
  display: grid;
  gap: 34px;
}

.onboarding-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.onboarding-step legend {
  display: flex;
  padding: 0;
  align-items: center;
  gap: 11px;
  font: 800 clamp(20px, 3vw, 25px)/1.2 "Fraunces", Georgia, serif;
}

.onboarding-step legend > span {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  place-items: center;
  color: white;
  background: var(--atlas-green-dark);
  font: 800 14px "Inter", Arial, sans-serif;
}

.onboarding-step-help {
  margin: 8px 0 16px;
  font-size: 14px;
}

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

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

.onboarding-choice {
  position: relative;
  display: flex;
  min-height: 108px;
  padding: 18px 42px 18px 18px;
  border: 2px solid var(--atlas-line);
  border-radius: 15px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: white;
  cursor: pointer;
}

.onboarding-choice:hover {
  border-color: color-mix(in srgb, var(--atlas-green) 48%, var(--atlas-line));
  background: #fbfdf9;
}

.onboarding-choice:has(input:focus-visible) {
  outline: 3px solid #e8b64c;
  outline-offset: 3px;
}

.onboarding-choice:has(input:checked) {
  border-color: var(--atlas-green);
  background: #edf8f3;
  box-shadow: 0 5px 14px rgba(8, 127, 91, .1);
}

.onboarding-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.onboarding-choice strong {
  font-size: 16px;
}

.onboarding-choice small {
  color: var(--atlas-muted);
  font-size: 12px;
}

.onboarding-choice-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 23px;
  height: 23px;
  border: 2px solid var(--atlas-line);
  border-radius: 50%;
  place-items: center;
  color: transparent;
  font-size: 12px;
}

.onboarding-choice:has(input:checked) .onboarding-choice-mark {
  border-color: var(--atlas-green-dark);
  color: white;
  background: var(--atlas-green-dark);
}

.onboarding-choice.is-unavailable {
  cursor: not-allowed;
  opacity: .55;
  background: #f3f0e8;
}

.onboarding-choice-wide {
  grid-column: 1 / -1;
}

.onboarding-actions {
  display: flex;
  padding-top: 2px;
  align-items: center;
  gap: 18px;
}

.onboarding-actions .learning-button {
  min-width: 180px;
}

.onboarding-actions p {
  font-size: 12px;
}

.study-course-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.learning-body :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #e8b64c;
  outline-offset: 3px;
}

.learning-skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: white !important;
  background: var(--atlas-green-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .15s ease;
}

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

.learning-body h1,
.learning-body h2,
.learning-body h3 {
  margin: 0;
  color: var(--atlas-ink);
}

.learning-body h1,
.learning-body .course-level-mark,
.learning-brand strong {
  font-family: "Fraunces", Georgia, serif;
}

.learning-app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.learning-sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100vh;
  padding: 18px 14px;
  overflow: hidden;
  flex-direction: column;
  color: white;
  background: var(--atlas-ink);
}

.learning-sidebar::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Ccircle cx='150' cy='150' r='40'/%3E%3Ccircle cx='150' cy='150' r='70'/%3E%3Ccircle cx='150' cy='150' r='100'/%3E%3Ccircle cx='150' cy='150' r='130'/%3E%3Cpath d='M20 60 Q80 30 150 55 T290 40'/%3E%3Cpath d='M10 250 Q90 210 170 235 T295 225'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px;
}

.learning-brand,
.learning-language-form,
.learning-primary-nav,
.learning-profile {
  position: relative;
  z-index: 1;
}

.learning-brand {
  display: flex;
  min-height: 44px;
  margin-bottom: 22px;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}

.learning-brand > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.learning-brand strong {
  font-size: 17px;
  line-height: 1.2;
}

.learning-brand small {
  margin-top: 2px;
  color: #7e93a5;
  font-size: 9px;
  white-space: nowrap;
}

.learning-language-form {
  margin-bottom: 17px;
}

.learning-language-form label {
  display: block;
  margin-bottom: 6px;
  color: #7e93a5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.learning-language-form select {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #2c455c;
  border-radius: 8px;
  color: white;
  background: #0f2233;
  font: 600 12px "Inter", sans-serif;
}

.learning-primary-nav {
  flex: 1;
}

.learning-nav-link {
  display: flex;
  min-height: 44px;
  margin-bottom: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  align-items: center;
  gap: 11px;
  color: #a8b6c2;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.learning-nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, .07);
}

.learning-nav-link.is-active {
  color: white;
  background: var(--atlas-green);
}

.learning-nav-link.is-disabled {
  cursor: default;
  opacity: .62;
}

.learning-nav-link small {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.learning-nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.learning-profile {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.learning-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.learning-avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--atlas-green);
  font-size: 13px;
  font-weight: 800;
}

.learning-profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.learning-profile-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.learning-profile-copy small {
  color: #7e93a5;
  font-size: 10px;
}

.learning-upgrade-link {
  display: flex;
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 182, 76, .55);
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  color: #ffe2a3;
  background: rgba(232, 182, 76, .08);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.learning-upgrade-link:hover {
  color: white;
  background: rgba(232, 182, 76, .16);
}

.learning-settings-link {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #a8b6c2;
}

.learning-settings-link:hover {
  color: white;
  background: rgba(255, 255, 255, .07);
}

.learning-logout {
  display: inline-flex;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  align-items: center;
  color: #7e93a5;
  background: none;
  font: 600 10px "Inter", sans-serif;
  cursor: pointer;
}

.learning-logout:hover {
  color: white;
}

.learning-main {
  position: relative;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--atlas-paper);
}

.learning-main:focus {
  outline: none;
}

.learning-main::before {
  position: fixed;
  inset: 0 0 0 232px;
  content: "";
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg width='500' height='500' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%2314283a' stroke-width='1'%3E%3Cpath d='M60 240 Q100 150 200 165 T380 130 T495 200'/%3E%3Cpath d='M50 275 Q100 190 205 200 T380 170 T500 235'/%3E%3Cpath d='M40 310 Q100 230 210 235 T385 210 T500 270'/%3E%3Cpath d='M30 345 Q105 270 215 272 T390 250 T500 305'/%3E%3Ccircle cx='110' cy='85' r='22'/%3E%3Ccircle cx='110' cy='85' r='42'/%3E%3Ccircle cx='110' cy='85' r='64'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 500px;
}

.learning-content,
.learning-flash {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 880px);
  margin-right: auto;
  margin-left: auto;
}

.learning-content {
  padding: 30px 0 68px;
}

.learning-flash {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
}

.learning-flash.is-notice {
  border-color: #b9ddcf;
  color: #075c43;
  background: #e4f3ed;
}

.learning-flash.is-alert {
  border-color: #e5b8b1;
  color: #8c342a;
  background: #fae9e6;
}

.xp-celebration {
  position: fixed;
  z-index: 30;
  top: 22px;
  right: 24px;
  display: grid;
  width: min(360px, calc(100vw - 48px));
  padding: 17px 42px 17px 17px;
  border: 1px solid rgba(179, 131, 45, .48);
  border-radius: 18px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  color: white;
  background:
    radial-gradient(circle at 100% 0, rgba(232, 182, 76, .28), transparent 42%),
    var(--atlas-green-dark);
  box-shadow: 0 18px 44px rgba(9, 48, 40, .28);
  animation: xp-celebration-in .5s cubic-bezier(.2, .9, .25, 1.15) both;
}

.xp-celebration.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.xp-celebration-mark {
  display: grid;
  width: 46px;
  height: 46px;
  border: 2px solid var(--atlas-gold);
  border-radius: 50%;
  place-items: center;
  color: var(--atlas-gold);
  background: rgba(255, 255, 255, .08);
  font-size: 23px;
}

.xp-celebration div {
  display: grid;
  gap: 2px;
}

.xp-celebration small {
  color: #cce4dc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.xp-celebration strong {
  color: white;
  font: 900 28px/1.1 "Fraunces", Georgia, serif;
}

.xp-celebration p {
  margin: 2px 0 0;
  color: #dcece7;
  font-size: 11px;
  line-height: 1.4;
}

.xp-celebration button {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #dcece7;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.xp-celebration button:hover,
.xp-celebration button:focus-visible {
  color: white;
  background: rgba(255, 255, 255, .12);
}

@keyframes xp-celebration-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.learning-mobile-header,
.learning-bottom-nav {
  display: none;
}

.learning-page-header {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.learning-eyebrow {
  margin: 0 0 5px;
  color: var(--atlas-brass);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.learning-page-header h1,
.lesson-header h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(27px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.16;
}

.lesson-header h1 {
  font-size: clamp(34px, 5vw, 44px);
}

.learning-page-header > div > p:last-child {
  margin: 4px 0 0;
  color: var(--atlas-muted);
  font-size: 15px;
}

.learning-draft-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 10px;
  align-items: center;
  border: 1px solid #dacba9;
  border-radius: 999px;
  color: #765617;
  background: #f7efd8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.course-level-tabs {
  display: flex;
  margin-bottom: 18px;
  gap: 8px;
  flex-wrap: wrap;
}

.course-level-tab {
  --level-color: var(--atlas-muted);
  display: inline-flex;
  min-width: 66px;
  min-height: 44px;
  padding: 8px 15px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #5c563f;
  background: #efe9d8;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.course-level-tab small {
  display: none;
  font-size: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.course-level-tab:hover {
  border-color: var(--level-color);
  color: var(--level-color);
}

.course-level-tab.is-active {
  border-color: var(--level-color);
  color: white;
  background: var(--level-color);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--level-color) 28%, transparent);
}

.course-level-tab.is-unavailable:not(.is-active) {
  color: var(--atlas-muted);
  background: #f1ecdf;
}

.level-a0 { --level-color: var(--atlas-muted); }
.level-a1 { --level-color: var(--atlas-green); }
.level-a2 { --level-color: var(--atlas-blue); }
.level-b1 { --level-color: var(--atlas-purple); }
.level-b2 { --level-color: var(--atlas-orange); }
.level-c1 { --level-color: var(--atlas-red); }

.course-overview-card {
  --level-color: var(--atlas-green);
  display: grid;
  margin-bottom: 17px;
  padding: 18px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  grid-template-columns: auto minmax(190px, 1fr) 130px auto;
  align-items: center;
  gap: 15px;
  background: var(--atlas-surface);
  box-shadow: 0 1px 3px rgba(23, 43, 58, .05);
}

.course-level-mark {
  color: var(--level-color);
  font-size: 28px;
  font-weight: 900;
}

.course-overview-copy h2 {
  font-size: 17px;
  font-weight: 800;
}

.course-overview-copy h2 span {
  color: var(--atlas-muted);
  font-weight: 600;
}

.course-overview-copy p {
  margin: 3px 0 0;
  color: var(--atlas-muted);
  font-size: 14px;
}

.course-overview-progress small {
  display: block;
  margin-top: 4px;
  color: var(--atlas-muted);
  font-size: 10px;
  text-align: right;
}

.learning-progress-track {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e2cd;
}

.learning-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--level-color, var(--atlas-brass));
}

.learning-button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  font: 750 12px "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.learning-button-primary {
  color: white !important;
  background: linear-gradient(135deg, var(--atlas-green), var(--atlas-green-dark));
  box-shadow: 0 4px 12px rgba(8, 127, 91, .25);
}

.learning-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(8, 127, 91, .3);
}

.learning-button-ghost {
  border: 1px solid var(--atlas-line);
  color: #5c563f;
  background: #efe9d8;
}

.learning-button-blue {
  color: white !important;
  background: var(--atlas-blue);
}

.learning-home-page {
  display: grid;
  width: min(100% - 48px, 1040px);
  gap: 18px;
}

.learning-home-progress-frame {
  display: grid;
  gap: 18px;
}

.learning-home-hero {
  display: grid;
  padding: clamp(30px, 6vw, 58px);
  border: 1px solid var(--atlas-line);
  border-radius: 22px;
  gap: 22px 34px;
  background:
    radial-gradient(circle at 85% 10%, rgba(179, 131, 45, .13), transparent 28%),
    var(--atlas-surface);
  box-shadow: 0 8px 28px rgba(20, 40, 58, .08);
  text-align: left;
}

.learning-home-hero.has-plan {
  padding: clamp(28px, 4vw, 42px);
  grid-template-areas:
    "copy plan"
    "action plan";
  grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
  align-items: center;
}

.learning-home-hero-copy {
  grid-area: copy;
}

.learning-home-compass {
  display: flex;
  margin-bottom: 14px;
  justify-content: flex-start;
}

.learning-home-hero h1 {
  max-width: 520px;
  margin: 0;
  font: 900 clamp(34px, 4vw, 46px)/1.08 "Fraunces", Georgia, serif;
}

.learning-home-intro {
  max-width: 500px;
  margin: 14px 0 0;
  color: var(--atlas-muted);
  font-size: 16px;
}

.learning-home-plan-panel {
  padding: 20px;
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  grid-area: plan;
  background: rgba(255, 255, 255, .72);
}

.learning-home-plan-panel > p {
  margin: 0 0 12px;
}

.learning-home-plan {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
  text-align: left;
}

.learning-home-plan li {
  display: grid;
  min-width: 0;
  min-height: 74px;
  padding: 15px 16px;
  border: 1px solid var(--atlas-line);
  border-radius: 14px;
  grid-template-columns: 36px minmax(0, 1fr);
  align-content: center;
  gap: 3px 12px;
  background: #fffdf8;
}

.learning-home-plan li > span {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  grid-row: 1 / 3;
  place-items: center;
  color: white;
  background: var(--atlas-green-dark);
  font-size: 14px;
  font-weight: 850;
}

.learning-home-hero.is-complete .learning-home-plan li > span {
  background: var(--atlas-green);
  font-size: 18px;
}

.learning-home-plan strong,
.learning-home-plan small {
  min-width: 0;
}

.learning-home-plan strong {
  color: var(--atlas-ink);
  font-size: 15px;
  line-height: 1.2;
}

.learning-home-plan small {
  color: var(--atlas-muted);
  font-size: 12px;
}

.learning-home-primary-action {
  display: flex;
  margin: 0;
  grid-area: action;
  justify-content: flex-start;
}

.learning-home-primary-action form {
  display: flex;
  margin: 0;
}

.learning-home-primary-action .learning-button {
  min-height: 52px;
  padding: 13px 24px;
  font-size: 14px;
}

.learning-home-complete-actions {
  display: grid;
  gap: 10px;
}

.learning-home-complete-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--atlas-green-dark);
  font-weight: 850;
}

.learning-home-complete-status > span {
  display: grid;
  min-width: 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  place-items: center;
  color: white;
  background: var(--atlas-green);
}

.learning-home-complete-actions > p {
  max-width: 430px;
  margin: 0;
  color: var(--atlas-muted);
  font-size: 13px;
}

.learning-home-complete-actions .learning-button {
  width: fit-content;
  min-height: 44px;
  padding: 10px 16px;
}

.learning-home-unavailable {
  color: var(--atlas-muted);
  font-weight: 700;
}

.learning-home-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, .7fr)) minmax(260px, 1.6fr);
  gap: 14px;
}

.learning-home-overview.has-insights {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-home-overview.has-insights .learning-home-course {
  grid-column: auto;
}

.learning-home-stat,
.learning-home-course {
  display: flex;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  flex-direction: column;
  background: var(--atlas-surface);
}

.learning-home-stat > span,
.learning-home-course > span {
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.learning-home-stat strong {
  margin: 5px 0;
  color: var(--atlas-green);
  font: 900 34px "Fraunces", Georgia, serif;
}

.learning-home-course strong {
  margin: 8px 0 4px;
  color: var(--atlas-ink);
  font: 800 20px "Fraunces", Georgia, serif;
}

.learning-home-stat small,
.learning-home-course small {
  color: var(--atlas-muted);
}

.learning-home-text-link {
  margin-top: auto;
  padding-top: 10px;
  color: var(--atlas-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.learning-home-secondary-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.learning-home-insight-heading {
  display: flex;
  margin: 5px 2px -7px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.learning-home-insight-heading span {
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.learning-home-insight-heading a {
  min-height: 44px;
  padding: 12px 2px;
  color: var(--atlas-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.course-chapter-list {
  display: grid;
  gap: 10px;
}

.course-chapter-card {
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 15px;
  background: var(--atlas-surface);
  box-shadow: 0 1px 3px rgba(23, 43, 58, .04);
}

.course-chapter-card summary {
  display: grid;
  min-height: 68px;
  padding: 13px 16px;
  grid-template-columns: 32px minmax(180px, 1fr) 95px 18px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  transition: background-color .15s ease;
}

.course-chapter-card summary::-webkit-details-marker {
  display: none;
}

.course-chapter-card summary:hover,
.course-chapter-card[open] summary {
  background: #faf6ea;
}

.chapter-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #9b9278;
  background: #e9e2cd;
  font: 900 14px "Fraunces", Georgia, serif;
}

.chapter-number.is-started {
  color: white;
  background: var(--atlas-brass);
}

.chapter-number.is-complete {
  color: white;
  background: var(--atlas-green);
}

.chapter-summary-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chapter-summary-copy strong {
  overflow: hidden;
  color: var(--atlas-ink);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-summary-copy small {
  margin-top: 2px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.chapter-progress .learning-progress-track > span {
  background: var(--atlas-brass);
}

.chapter-chevron {
  color: #a89d7f;
  font-size: 22px;
  line-height: 1;
  transition: transform .15s ease;
}

.course-chapter-card[open] .chapter-chevron {
  transform: rotate(90deg);
}

.chapter-lessons {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--atlas-line);
}

.course-section-label {
  padding: 11px 10px 4px;
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.course-lesson-row {
  overflow: hidden;
  border-radius: 9px;
}

.course-lesson-row.is-current {
  background: #fdf6e3;
}

.course-lesson-link {
  display: flex;
  min-height: 44px;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  color: var(--atlas-ink);
  text-decoration: none;
}

.course-lesson-link:hover {
  background: rgba(227, 220, 200, .35);
}

.lesson-state-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  align-items: center;
  justify-content: center;
  border: 2px solid #cfc5a8;
  border-radius: 50%;
  color: #a89d7f;
  background: var(--atlas-surface);
  font-size: 10px;
  font-weight: 800;
}

.course-lesson-row.is-complete .lesson-state-icon {
  border-color: var(--atlas-green);
  color: white;
  background: var(--atlas-green);
}

.course-lesson-row.is-current .lesson-state-icon {
  border-color: var(--atlas-brass);
  color: white;
  background: var(--atlas-brass);
  animation: atlas-pulse 2.2s infinite;
}

.lesson-row-title {
  min-width: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 650;
}

.course-lesson-row.is-current .lesson-row-title {
  font-weight: 800;
}

.lesson-current-label {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 12px;
  align-items: center;
  border-radius: 9px;
  color: white;
  background: var(--atlas-green);
  font-size: 11px;
  font-weight: 800;
}

.show-all-lessons {
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  color: var(--atlas-green);
  background: transparent;
  font: 800 13px "Inter", sans-serif;
  cursor: pointer;
}

.show-all-lessons:hover {
  color: var(--atlas-green-dark);
  text-decoration: underline;
}

.learning-empty-state {
  --level-color: var(--atlas-muted);
  padding: 42px 22px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: var(--atlas-surface);
  text-align: center;
}

.learning-empty-state .course-level-mark {
  display: block;
  margin-bottom: 7px;
}

.learning-empty-state h2 {
  margin-bottom: 6px;
  font: 800 18px "Fraunces", Georgia, serif;
}

.learning-empty-state p,
.learning-empty-copy p {
  margin: 0 0 18px;
  color: var(--atlas-muted);
  font-size: 13px;
}

.lesson-page {
  max-width: 900px;
}

.lesson-back-link {
  display: inline-flex;
  min-height: 44px;
  margin-bottom: 12px;
  align-items: center;
  color: var(--atlas-muted) !important;
  font-size: 14px;
  font-weight: 700;
}

.lesson-back-link:hover {
  color: var(--atlas-green) !important;
}

.lesson-header {
  margin-bottom: 17px;
}

.lesson-position-row {
  display: grid;
  margin-top: 14px;
  grid-template-columns: auto minmax(100px, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--atlas-muted);
  font-size: 14px;
}

.lesson-position-row strong {
  color: var(--atlas-green);
}

.lesson-position-row .learning-progress-track > span {
  background: var(--atlas-green);
}

.lesson-content-card,
.lesson-examples,
.lesson-quick-check,
.lesson-actions {
  margin-bottom: 14px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--atlas-line);
  border-radius: 17px;
  background: var(--atlas-surface);
  box-shadow: 0 1px 3px rgba(23, 43, 58, .05);
}

.lesson-content-card {
  color: #453f2e;
  font-size: 19px;
  line-height: 1.8;
}

.lesson-content-card .trix-content > *:first-child,
.lesson-content-card > *:first-child {
  margin-top: 0;
}

.lesson-content-card .trix-content > *:last-child,
.lesson-content-card > *:last-child {
  margin-bottom: 0;
}

.lesson-content-card h1,
.lesson-content-card h2,
.lesson-content-card h3,
.lesson-content-card h4 {
  margin: 1.3em 0 .55em;
  color: var(--atlas-ink);
  font-family: "Fraunces", Georgia, serif;
}

.lesson-content-card h2 { font-size: 29px; }
.lesson-content-card h3 { font-size: 25px; }
.lesson-content-card h4 { font-size: 21px; }

.lesson-content-card p {
  margin: 0 0 1em;
}

.lesson-content-card ul,
.lesson-content-card ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.lesson-content-card table {
  width: 100%;
  margin: 1.25em 0;
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  font-size: 17px;
}

.lesson-content-card th,
.lesson-content-card td {
  padding: 9px 11px;
  border-right: 1px solid var(--atlas-line);
  border-bottom: 1px solid var(--atlas-line);
  text-align: left;
}

.lesson-content-card th {
  color: var(--atlas-ink);
  background: #f3eddd;
}

.lesson-content-card tr:last-child td { border-bottom: 0; }
.lesson-content-card th:last-child,
.lesson-content-card td:last-child { border-right: 0; }

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

.lesson-section-heading h2 {
  font: 800 28px "Fraunces", Georgia, serif;
}

.lesson-example-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lesson-example-card {
  display: grid;
  min-width: 0;
  min-height: 104px;
  padding: 20px 22px;
  border: 1px solid var(--atlas-line);
  border-radius: 13px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  background: var(--atlas-paper);
}

.lesson-example-copy {
  flex: 1;
}

.lesson-example-sentence {
  color: var(--atlas-ink);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 750;
}

.lesson-example-translation {
  margin-top: 8px;
  color: var(--atlas-muted);
  font-size: 17px;
  line-height: 1.55;
}

.example-audio audio {
  display: none;
}

.example-audio-button {
  display: inline-flex;
  min-width: 112px;
  min-height: 48px;
  padding: 10px 17px;
  border: 1px solid #c9d9e6;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #195077;
  background: #e9f1f7;
  font: 800 14px "Inter", sans-serif;
  cursor: pointer;
}

.example-audio-button:hover {
  border-color: #8db4cf;
  background: #dcebf5;
}

.example-audio-button > span:first-child {
  font-size: 13px;
}

.lesson-examples,
.lesson-quick-check {
  scroll-margin-top: 74px;
}

.learning-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.quick-check-header {
  display: flex;
  margin-bottom: 22px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.quick-check-header h2 {
  color: var(--atlas-ink);
  font: 900 30px "Fraunces", Georgia, serif;
}

.quick-check-header p:last-child {
  margin: 5px 0 0;
  color: var(--atlas-muted);
  font-size: 16px;
}

.quick-check-passed {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #abd3c3;
  border-radius: 999px;
  align-items: center;
  color: var(--atlas-green-dark);
  background: #e4f3ed;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.quick-check-form {
  display: grid;
  gap: 14px;
}

.quick-check-feedback {
  display: flex;
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #efb2aa;
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: #8f342b;
  background: #fce9e6;
  font-size: 14px;
}

.quick-check-question {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--atlas-line);
  border-radius: 14px;
  background: var(--atlas-paper);
}

.quick-check-prompt {
  color: var(--atlas-ink);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.5;
}

.quick-check-translation {
  margin: 6px 0 15px;
  color: var(--atlas-muted);
  font-size: 16px;
}

.quick-check-select {
  display: inline-block;
  width: auto;
  max-width: min(100%, 300px);
  min-height: 48px;
  margin: 3px 5px;
  padding: 8px 38px 8px 12px;
  border: 1px solid #bdc4c8;
  border-radius: 10px;
  color: var(--atlas-ink);
  background: white;
  font: 700 18px "Inter", sans-serif;
  vertical-align: middle;
  cursor: pointer;
}

.quick-check-select:focus {
  border-color: var(--atlas-green);
  outline: 3px solid rgba(5, 150, 105, .14);
}

.quick-check-submit {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
}

.lesson-actions {
  display: grid;
  gap: 11px;
}

.lesson-actions form.button_to,
.lesson-actions form.button_to .lesson-complete-button {
  display: block;
  width: 100%;
}

.lesson-complete-button {
  min-height: 50px;
  font-size: 15px;
}

.lesson-complete-state {
  display: flex;
  min-height: 58px;
  padding: 10px 13px;
  align-items: center;
  gap: 11px;
  border: 1px solid #b9ddcf;
  border-radius: 13px;
  color: var(--atlas-green-dark);
  background: #e4f3ed;
}

.lesson-complete-state > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--atlas-green);
  font-weight: 900;
}

.lesson-complete-state div {
  display: flex;
  flex-direction: column;
}

.lesson-complete-state strong { font-size: 14px; }
.lesson-complete-state small { font-size: 12px; }

.lesson-flashcard-panel {
  display: grid;
  min-height: 72px;
  padding: 12px 13px;
  border: 1px solid #ccdbe8;
  border-radius: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #e9eff5;
}

.lesson-flashcard-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: white;
  background: var(--atlas-blue);
}

.lesson-flashcard-panel > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.lesson-flashcard-panel strong {
  color: var(--atlas-ink);
  font-size: 14px;
}

.lesson-flashcard-panel small {
  color: var(--atlas-muted);
  font-size: 12px;
}

.lesson-flashcard-panel .lesson-flashcard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-flashcard-status {
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 700;
}

.lesson-practice-page {
  max-width: 820px;
}

.lesson-practice-header {
  margin-bottom: 20px;
}

.lesson-practice-header h1,
.lesson-practice-summary h1 {
  font: 800 clamp(34px, 5vw, 46px) "Fraunces", Georgia, serif;
  line-height: 1.08;
}

.lesson-practice-header > p:last-child {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--atlas-muted);
  font-size: 16px;
}

.lesson-flashcard-review .review-top-actions {
  margin-bottom: 14px;
  color: var(--atlas-muted);
  font-size: 14px;
}

.lesson-flashcard-review .review-top-actions .button {
  margin: 0;
}

.lesson-flashcard-review .card-container {
  min-height: 310px;
  padding: clamp(28px, 7vw, 58px);
  border-color: var(--atlas-line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--atlas-surface);
  box-shadow: 0 12px 34px rgba(20, 40, 58, .08);
}

.lesson-flashcard-review .card-text-content {
  width: 100%;
  color: var(--atlas-ink);
  font-size: 22px;
  line-height: 1.6;
}

.lesson-flashcard-review .card-back .card-content strong {
  color: var(--atlas-ink);
}

.lesson-flashcard-review #show-answer {
  min-width: 220px;
  min-height: 54px;
  border-radius: 12px;
  background: var(--atlas-green);
  font-size: 16px;
  font-weight: 800;
}

.learning-body .flashcard-review {
  padding-bottom: 32px;
}

.learning-body .flashcard-review.is-answer-shown {
  padding-bottom: 104px;
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) {
  width: min(100% - 48px, 1040px);
  margin: 0 auto;
  padding-top: 30px;
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions {
  margin-bottom: 18px;
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions h1 {
  margin: 0;
  color: var(--atlas-ink);
  font: 800 clamp(20px, 2.4vw, 28px) "Inter", sans-serif;
  line-height: 1.2;
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions > div {
  justify-content: flex-end;
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions .learning-button {
  border-color: #c9bea4;
  color: var(--atlas-ink);
  background: var(--atlas-surface);
  box-shadow: 0 2px 7px rgba(20, 40, 58, .08);
}

.learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions .learning-button:hover {
  border-color: var(--atlas-ink-soft);
  background: white;
}

.learning-body .flashcard-review .card-container {
  min-height: 0;
  padding: clamp(28px, 4vw, 44px);
  border-color: var(--atlas-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.learning-body .flashcard-review .card-text-content {
  width: min(100%, 900px);
  color: var(--atlas-ink);
  font-size: 20px;
  line-height: 1.55;
}

.learning-body .flashcard-review .card-container {
  position: relative;
}

.review-card-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--atlas-muted);
  background: #fff;
}

.review-card-loading > span {
  width: 34px;
  height: 34px;
  border: 3px solid #e8e0cd;
  border-top-color: var(--atlas-green);
  border-radius: 50%;
  animation: review-card-spin .7s linear infinite;
}

.review-card-loading strong {
  font-size: 12px;
}

.flashcard-review.is-media-loading .review-card-loading {
  display: grid;
}

.flashcard-review.is-media-loading .card-text-content {
  opacity: 0;
}

.flashcard-review.is-media-ready .card-text-content {
  animation: review-card-ready .16s ease-out both;
}

.flashcard-review .card-back {
  scroll-margin-top: 18px;
}

.flashcard-review .card-back:focus {
  outline: none;
}

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

@keyframes review-card-ready {
  from { opacity: 0; }
  to { opacity: 1; }
}

.review-card-image {
  display: block;
  max-width: min(100%, 440px);
  max-height: 320px;
  margin: 24px auto 0;
  border-radius: 14px;
  object-fit: contain;
}

.review-card-audio {
  display: block;
  width: min(100%, 340px);
  margin: 22px auto 0;
}

.review-card-hint-control {
  margin-top: 22px;
}

.review-card-hint-button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #c7b98e;
  border-radius: 999px;
  color: var(--atlas-ink);
  background: #faf5e5;
  font: 800 13px "Inter", sans-serif;
  cursor: pointer;
}

.review-card-hint-button:hover {
  border-color: #a88731;
  background: #fff9e9;
}

.review-card-hint {
  max-width: 620px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border: 1px solid #e0d4b6;
  border-radius: 12px;
  color: #554d3d;
  background: #fffaf0;
  font-size: 16px;
}

.review-card-hint > span {
  display: block;
  margin-bottom: 4px;
  color: #765b18;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.review-card-pronunciation,
.review-card-translation {
  margin-top: 14px;
  color: var(--atlas-muted);
  font-size: 17px;
}

.review-card-pronunciation {
  font-style: italic;
}

.review-card-explanation {
  max-width: 680px;
  margin: 22px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--atlas-line);
  border-radius: 12px;
  color: var(--atlas-muted);
  background: #faf8f2;
  font-size: 15px;
  text-align: left;
}

.review-card-explanation > summary {
  color: var(--atlas-green-dark);
  font-weight: 800;
  cursor: pointer;
}

.learning-body #rating-bar {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 232px;
  width: auto;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  border-top: 1px solid var(--atlas-line);
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 -8px 24px rgba(20, 40, 58, .1);
  backdrop-filter: blur(10px);
}

.learning-body .rating-form {
  max-width: 800px;
  padding: 0;
}

.lesson-practice-page #rating-bar {
  padding: 14px 20px;
  border-color: var(--atlas-line);
  background: var(--atlas-surface);
}

.lesson-practice-page .rating-btn {
  min-height: 48px;
  border-radius: 10px;
}

.lesson-practice-page .review-progress {
  color: var(--atlas-muted);
  font-size: 14px;
}

.lesson-practice-summary {
  max-width: 680px;
  margin: 40px auto 0;
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--atlas-line);
  border-radius: 20px;
  text-align: center;
  background: var(--atlas-surface);
  box-shadow: 0 12px 34px rgba(20, 40, 58, .08);
}

.lesson-practice-summary-icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border: 4px double #b9ddcf;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--atlas-green);
  font-size: 28px;
  font-weight: 900;
}

.lesson-practice-summary > p:not(.learning-eyebrow) {
  margin: 12px auto 0;
  color: var(--atlas-muted);
  font-size: 16px;
  line-height: 1.6;
}

.lesson-practice-stats {
  display: grid;
  max-width: 330px;
  margin: 24px auto 0;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lesson-practice-stats span {
  padding: 13px;
  border: 1px solid var(--atlas-line);
  border-radius: 12px;
  color: var(--atlas-muted);
  background: var(--atlas-paper);
  font-size: 13px;
}

.lesson-practice-stats strong {
  display: block;
  color: var(--atlas-ink);
  font-size: 24px;
}

.lesson-practice-summary-actions {
  display: grid;
  margin-top: 28px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lesson-practice-summary-actions .learning-button {
  min-height: 52px;
  font-size: 14px;
}

.lesson-practice-summary .lesson-practice-unlocked {
  max-width: 530px;
  margin-top: 18px;
  font-size: 12px;
}

.lesson-sequence-nav {
  display: grid;
  margin-top: 18px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lesson-sequence-link {
  display: flex;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 13px;
  flex-direction: column;
  justify-content: center;
  background: var(--atlas-surface);
  text-decoration: none;
}

.lesson-sequence-link.is-next {
  text-align: right;
}

.lesson-sequence-link small {
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.lesson-sequence-link strong {
  overflow: hidden;
  color: var(--atlas-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-sequence-link:hover {
  border-color: var(--atlas-green);
}

@keyframes atlas-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 131, 45, .42); }
  50% { box-shadow: 0 0 0 9px rgba(179, 131, 45, 0); }
}

.flashcards-page {
  width: min(100% - 48px, 1040px);
}

.flashcards-header {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
}

.flashcards-header > div {
  max-width: 680px;
}

.flashcards-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.flashcards-header-actions .learning-button-ghost {
  border-color: #c9bea4;
  color: var(--atlas-ink);
  background: var(--atlas-surface);
  box-shadow: 0 2px 7px rgba(20, 40, 58, .08);
}

.flashcards-header-actions .learning-button-ghost:hover {
  border-color: var(--atlas-ink-soft);
  background: white;
}

.flashcards-header-actions form,
.flashcard-deck-action form,
.learning-session-state form {
  margin: 0;
}

.flashcard-daily-summary,
.flashcard-tree-section,
.flashcard-empty-state {
  border: 1px solid var(--atlas-border);
  background: white;
  box-shadow: var(--atlas-shadow-sm);
}

.flashcard-daily-summary {
  display: grid;
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 18px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
}

.flashcard-daily-summary h2,
.flashcard-section-heading h2 {
  margin: 3px 0 0;
  color: var(--atlas-ink);
  font-family: var(--atlas-font-display);
}

.flashcard-daily-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.flashcard-daily-stats span {
  display: flex;
  min-height: 48px;
  padding: 9px 12px;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  color: var(--atlas-muted);
  background: var(--atlas-surface-soft);
  font-size: 13px;
}

.flashcard-daily-stats strong {
  color: var(--atlas-ink);
  font-size: 18px;
}

.flashcard-tree-section {
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 18px;
}

.flashcard-section-heading {
  display: flex;
  min-height: 64px;
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--atlas-border);
  background: var(--atlas-surface-soft);
}

.flashcard-section-heading span {
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 700;
}

.flashcard-tree,
.flashcard-tree-children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flashcard-tree-children .flashcard-deck-row {
  background: #fbfcfd;
}

.flashcard-deck-row {
  display: grid;
  min-height: 68px;
  padding: 10px 16px;
  align-items: center;
  border-bottom: 1px solid var(--atlas-border);
  grid-template-columns: minmax(0, 1fr) auto minmax(104px, auto);
  gap: 18px;
}

.flashcard-tree-item:last-child > .flashcard-deck-row {
  border-bottom: 0;
}

.flashcard-tree-children .flashcard-tree-item:last-child > .flashcard-deck-row {
  border-bottom: 1px solid var(--atlas-border);
}

.flashcard-deck-main {
  display: flex;
  min-width: 0;
  padding-left: calc(var(--deck-depth) * 20px);
  align-items: center;
  gap: 8px;
}

.flashcard-tree-marker {
  display: inline-flex;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  color: var(--atlas-muted);
  background: transparent;
  font: inherit;
  font-size: 22px;
  text-align: center;
}

.flashcard-tree-toggle {
  border-radius: 6px;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.flashcard-tree-toggle:hover,
.flashcard-tree-toggle:focus-visible {
  color: var(--atlas-green);
  background: #e8f3ee;
  outline: none;
}

.flashcard-tree-toggle[aria-expanded="true"] {
  transform: rotate(90deg);
}

.flashcard-tree-leaf {
  font-size: 13px;
}

.flashcard-tree-children[hidden] {
  display: none;
}

.flashcard-deck-name {
  color: var(--atlas-ink);
  font-weight: 750;
  text-decoration: none;
}

.flashcard-deck-name:hover {
  color: var(--atlas-green);
}

.flashcard-deck-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--atlas-green-dark);
  background: #e5f4ec;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.flashcard-deck-counts {
  display: flex;
  min-width: 190px;
  gap: 14px;
  color: var(--atlas-muted);
  font-size: 12px;
  white-space: nowrap;
}

.flashcard-deck-counts strong {
  color: var(--atlas-ink);
  font-size: 15px;
}

.flashcard-deck-action {
  display: flex;
  min-width: 104px;
  justify-content: flex-end;
}

.flashcard-deck-action .learning-button {
  min-height: 44px;
  padding: 9px 16px;
}

.flashcard-limit-label,
.flashcard-up-to-date {
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 700;
}

.flashcard-empty-state {
  margin: 16px;
  padding: 18px;
  border-radius: 12px;
  box-shadow: none;
}

.flashcard-empty-state p {
  margin: 0;
  color: var(--atlas-muted);
}

.deck-detail-page,
.deck-editor-page,
.card-browser-page {
  width: min(100% - 48px, 1040px);
}

.deck-detail-header > div,
.card-browser-header > div {
  min-width: 0;
  max-width: 720px;
}

.deck-detail-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.deck-detail-meta {
  margin: 7px 0 0;
  color: var(--atlas-muted);
}

.deck-detail-text-link {
  display: inline-block;
  margin-top: 9px;
  color: var(--atlas-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.deck-detail-text-link:hover {
  text-decoration: underline;
}

.deck-detail-limits,
.deck-detail-first-card {
  display: grid;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

.deck-detail-first-card {
  border-color: #b9ddcf;
  background: linear-gradient(135deg, #f8fcfa, #eef8f3);
}

.deck-detail-first-card h2 {
  margin: 2px 0 5px;
  color: var(--atlas-ink);
  font: 800 24px "Fraunces", Georgia, serif;
}

.deck-detail-first-card p:last-child {
  margin: 0;
  color: var(--atlas-muted);
}

.deck-detail-first-card-note {
  margin: -5px 0 22px;
  color: var(--atlas-muted);
  font-size: 12px;
  text-align: center;
}

.deck-editor-header {
  margin-bottom: 22px;
}

.deck-form-panel {
  display: grid;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
  gap: 24px;
}

.deck-form-panel h2 {
  margin: 2px 0 5px;
  color: var(--atlas-ink);
  font: 800 26px "Fraunces", Georgia, serif;
}

.deck-form-panel > div:first-child > p:last-child,
.deck-form-field > p {
  margin: 0;
  color: var(--atlas-muted);
  font-size: 13px;
}

.deck-form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--atlas-ink);
  font-size: 14px;
  font-weight: 850;
}

.deck-form-field input[type="text"] {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid #c8c2b3;
  border-radius: 11px;
  color: var(--atlas-ink);
  background: white;
  font-size: 17px;
}

.deck-form-field input[type="text"]:focus {
  border-color: var(--atlas-green);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .12);
}

.deck-form-field > p {
  margin-top: 8px;
}

.deck-form-actions {
  display: flex;
  margin-top: 18px;
  justify-content: flex-end;
  gap: 10px;
}

.deck-form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.deck-danger-zone {
  display: flex;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid #e7b5ae;
  border-radius: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff8f6;
}

.deck-danger-zone h2 {
  margin: 0 0 4px;
  color: #8d2f26;
  font: 800 19px "Fraunces", Georgia, serif;
}

.deck-danger-zone p {
  margin: 0;
  color: #795d59;
  font-size: 13px;
}

.deck-danger-zone form {
  margin: 0;
}

.deck-delete-button {
  border-color: #a63b30;
  color: white;
  background: #a63b30;
}

.deck-delete-button:hover {
  border-color: #842d25;
  color: white;
  background: #842d25;
}

.deck-detail-limits h2,
.card-browser-empty h2 {
  font: 800 22px "Fraunces", Georgia, serif;
}

.deck-detail-limits p:last-child {
  margin: 5px 0 0;
  color: var(--atlas-muted);
}

.deck-progress-card {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

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

.deck-progress-heading h2 {
  margin-top: 2px;
  font: 800 22px "Fraunces", Georgia, serif;
}

.deck-progress-heading > div > p:last-child {
  margin: 5px 0 0;
  color: var(--atlas-muted);
  font-size: 13px;
}

.deck-progress-percentage {
  color: var(--atlas-green-dark);
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.deck-progress-track {
  display: flex;
  width: 100%;
  height: 13px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7dc;
}

.deck-progress-track span {
  display: block;
  height: 100%;
}

.deck-progress-learning {
  background: #77bd44;
}

.deck-progress-mastered {
  background: var(--atlas-blue);
}

.deck-progress-legend {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.deck-progress-legend span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.deck-progress-legend strong {
  color: var(--atlas-ink);
  font-size: 14px;
}

.deck-progress-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 3px;
  background: #ebe7dc;
}

.deck-progress-dot.is-learning {
  background: #77bd44;
}

.deck-progress-dot.is-mastered {
  background: var(--atlas-blue);
}

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

.deck-detail-actions {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

.deck-detail-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.deck-detail-action-buttons form {
  margin: 0;
}

.deck-detail-limit-caption {
  margin: 11px 0 0;
  color: var(--atlas-muted);
  font-size: 12px;
}

.deck-detail-empty,
.deck-detail-limit-message {
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--atlas-line);
  border-radius: 13px;
  color: var(--atlas-muted);
  background: #faf7ef;
}

.deck-detail-action-buttons + .deck-detail-empty {
  margin-top: 12px;
}

.deck-detail-empty-guidance {
  margin: 0;
  color: var(--atlas-muted);
  font-size: 12px;
  text-align: center;
}

.deck-detail-limit-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.deck-detail-limit-message p {
  margin: 0;
}

.card-browser-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

.card-browser-table {
  width: 100%;
  border-collapse: collapse;
}

.card-browser-table th,
.card-browser-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--atlas-line);
  text-align: left;
  vertical-align: top;
}

.card-browser-table th {
  color: var(--atlas-muted);
  background: #f5f1e6;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.card-browser-table tbody tr:last-child td {
  border-bottom: 0;
}

.card-browser-scope {
  min-width: 150px;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 700;
}

.card-browser-actions {
  min-width: 150px;
  white-space: nowrap;
}

.card-browser-actions a,
.card-browser-delete {
  margin-right: 10px;
  padding: 0;
  border: 0;
  color: var(--atlas-green-dark);
  background: transparent;
  font: 750 12px "Inter", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.card-browser-delete {
  color: var(--atlas-red);
}

.card-browser-delete-form {
  display: inline;
  margin: 0;
}

.card-browser-empty {
  padding: 42px 24px;
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
  text-align: center;
}

.card-browser-empty p {
  margin: 6px 0 20px;
  color: var(--atlas-muted);
}

.card-editor-page {
  width: min(100% - 48px, 1040px);
}

.card-editor-header {
  margin-bottom: 22px;
}

.card-form-panel,
.card-form-advanced {
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

.card-form-panel {
  display: grid;
  padding: clamp(20px, 4vw, 30px);
  gap: 24px;
}

.card-form-panel-heading h2 {
  margin: 2px 0 5px;
  color: var(--atlas-ink);
  font: 800 26px "Fraunces", Georgia, serif;
}

.card-form-panel-heading > p:last-child {
  margin: 0;
  color: var(--atlas-muted);
}

.card-composer-stack {
  display: grid;
  gap: 14px;
}

.card-composer-side {
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid #d9d2c2;
  border-radius: 16px;
  background: #fbfaf6;
}

.card-composer-front {
  box-shadow: inset 4px 0 0 #d5a541;
}

.card-composer-back {
  box-shadow: inset 4px 0 0 var(--atlas-green);
}

.card-composer-side-heading {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
  gap: 12px;
}

.card-composer-side-heading h3 {
  margin: 0 0 3px;
  color: var(--atlas-ink);
  font: 800 24px "Fraunces", Georgia, serif;
}

.card-composer-side-heading p {
  margin: 0;
  color: var(--atlas-muted);
  font-size: 13px;
}

.card-composer-step {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--atlas-ink);
  background: #eee8da;
  font-size: 14px;
  font-weight: 900;
  place-items: center;
}

.card-composer-back .card-composer-step {
  color: #075d44;
  background: #dcefe8;
}

.card-composer-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card-composer-divider::before,
.card-composer-divider::after {
  height: 1px;
  flex: 1;
  background: var(--atlas-line);
  content: "";
}

.card-composer-side-options {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--atlas-line);
}

.card-composer-side-options > p {
  margin: 0 0 10px;
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.card-form-option-list {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.card-form-field > label {
  display: block;
  margin-bottom: 4px;
  color: var(--atlas-ink);
  font-size: 14px;
  font-weight: 800;
}

.card-form-hint,
.card-form-current-file {
  margin: 0 0 9px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.card-form-editor-shell {
  overflow: hidden;
  border: 1px solid #c8c2b3;
  border-radius: 12px;
  background: white;
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.card-form-editor-shell:focus-within {
  border-color: var(--atlas-green);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .12);
}

.card-form-editor-shell .tiptap-toolbar-styles {
  min-height: 42px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid var(--atlas-line);
  border-radius: 0;
  background: #f7f4ec;
}

.card-form-editor-shell .tiptap-toolbar-button {
  min-width: 32px;
  min-height: 30px;
  border-color: #d6d0c1;
  border-radius: 7px;
  background: white;
}

.card-form-editor-shell .tiptap-editor-container {
  position: relative;
  min-height: 112px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
}

.card-form-editor-shell .tiptap-editor-content {
  width: 100%;
  min-height: 84px;
  margin: 0;
  cursor: text;
}

.card-form-editor-shell .tiptap-editor-container[data-empty="true"]::before {
  position: absolute;
  top: 14px;
  left: 16px;
  color: #9b9588;
  content: attr(data-placeholder);
  font-size: 14px;
  pointer-events: none;
}

.card-composer-main-field .card-form-editor-shell .tiptap-editor-container,
.card-composer-main-field .card-form-editor-shell .tiptap-editor-content {
  min-height: 190px;
}

.card-form-advanced {
  margin-top: 18px;
  overflow: hidden;
}

.card-form-advanced > summary {
  display: flex;
  min-height: 72px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.card-form-advanced > summary::-webkit-details-marker {
  display: none;
}

.card-form-advanced > summary::after {
  content: "+";
  color: var(--atlas-green);
  font-size: 26px;
  font-weight: 700;
}

.card-form-advanced[open] > summary::after {
  content: "−";
}

.card-form-advanced summary span,
.card-form-advanced summary small {
  display: block;
}

.card-form-advanced summary strong {
  color: var(--atlas-ink);
  font-size: 15px;
}

.card-form-advanced summary small {
  margin-top: 3px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.card-form-advanced-content {
  display: grid;
  padding: 0 20px 24px;
  border-top: 1px solid var(--atlas-line);
  gap: 16px;
}

.card-form-options-intro {
  margin: 20px 0 0;
  color: var(--atlas-muted);
  font-size: 13px;
}

.card-form-option {
  max-width: 100%;
  border: 0;
  background: transparent;
}

.card-form-option > summary {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #d6cfbe;
  border-radius: 999px;
  color: var(--atlas-green-dark);
  background: white;
  cursor: pointer;
  list-style: none;
}

.card-form-option > summary::-webkit-details-marker {
  display: none;
}

.card-form-option summary strong,
.card-form-option summary small {
  display: block;
}

.card-form-option summary strong {
  color: var(--atlas-ink);
  font-size: 13px;
}

.card-form-option summary small {
  margin-top: 3px;
  color: var(--atlas-muted);
  font-size: 11px;
}

.card-form-option-content {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--atlas-line);
  border-radius: 12px;
  background: white;
}

.card-form-option[open] {
  flex: 1 0 100%;
}

.card-form-option[open] > summary {
  width: fit-content;
  border-color: #9fcdbd;
  background: #edf7f3;
}

.card-form-option > summary:hover {
  border-color: #9fcdbd;
  background: #f4faf7;
}

.card-form-option > summary:focus-visible,
.card-form-advanced > summary:focus-visible,
.review-card-explanation > summary:focus-visible {
  outline: 3px solid rgba(8, 127, 91, .28);
  outline-offset: 3px;
}

.card-form-specialist-fields {
  display: grid;
  gap: 22px;
}

.card-form-subsection {
  display: grid;
  padding-top: 22px;
  gap: 22px;
}

.card-form-subsection + .card-form-subsection {
  border-top: 1px solid var(--atlas-line);
}

.card-form-subsection h3 {
  color: var(--atlas-ink);
  font: 800 20px "Fraunces", Georgia, serif;
}

.card-form-field input[type="file"] {
  width: 100%;
  padding: 11px;
  border: 1px dashed #c8c2b3;
  border-radius: 10px;
  color: var(--atlas-muted);
  background: #faf8f2;
}

.learning-body .sticky-form-actions {
  position: sticky;
  bottom: 0;
  margin: 20px -4px 0;
  padding: 14px 4px;
  border: 0;
  justify-content: flex-end;
  background: rgba(246, 241, 229, .94);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.card-composer-shortcut {
  margin-right: auto;
  color: var(--atlas-muted);
  font-size: 12px;
}

.card-preview-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #765b18;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.card-form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.card-preview-page {
  width: min(100% - 48px, 920px);
}

.card-preview-header > div:first-child {
  max-width: 620px;
}

.card-preview-header-actions,
.card-preview-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-preview-stage {
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 32px rgba(20, 40, 58, .10);
}

.card-preview-face {
  display: grid;
  min-height: 250px;
  padding: clamp(28px, 6vw, 56px);
  place-items: center;
  align-content: center;
  gap: 15px;
  text-align: center;
}

.card-preview-front {
  background:
    radial-gradient(circle at 12% 18%, rgba(179, 131, 45, .09), transparent 24%),
    linear-gradient(180deg, #fffefb, #fbf8ef);
}

.card-preview-back {
  background:
    radial-gradient(circle at 88% 82%, rgba(8, 127, 91, .08), transparent 26%),
    white;
}

.card-preview-side-label {
  margin: 0;
  color: var(--atlas-brass);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.card-preview-main-content {
  color: var(--atlas-ink);
  font: 750 clamp(25px, 4vw, 38px)/1.35 "Inter", sans-serif;
}

.card-preview-main-content p,
.card-preview-supporting p,
.card-preview-pronunciation p {
  margin: 0;
}

.card-preview-supporting {
  max-width: 720px;
  color: var(--atlas-muted);
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.6;
}

.card-preview-pronunciation {
  color: #8a816b;
  font-size: 18px;
}

.card-preview-placeholder {
  color: var(--atlas-muted);
  font-style: italic;
  font-weight: 500;
}

.card-preview-image {
  max-width: min(100%, 520px);
  max-height: 300px;
  border-radius: 14px;
  object-fit: contain;
}

.card-preview-audio,
.card-preview-reference audio {
  width: min(100%, 420px);
}

.card-preview-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--atlas-muted);
  background: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card-preview-divider::before,
.card-preview-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--atlas-line);
}

.card-preview-reference {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: var(--atlas-surface);
}

.card-preview-reference > summary {
  display: flex;
  min-height: 70px;
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.card-preview-reference > summary::-webkit-details-marker {
  display: none;
}

.card-preview-reference > summary::after {
  content: "+";
  color: var(--atlas-green);
  font-size: 24px;
  font-weight: 800;
}

.card-preview-reference[open] > summary::after {
  content: "−";
}

.card-preview-reference summary strong,
.card-preview-reference summary small {
  display: block;
}

.card-preview-reference summary strong {
  color: var(--atlas-ink);
}

.card-preview-reference summary small {
  margin-top: 3px;
  color: var(--atlas-muted);
}

.card-preview-reference-content {
  display: grid;
  padding: 22px;
  border-top: 1px solid var(--atlas-line);
  gap: 20px;
}

.card-preview-reference-content section {
  overflow-wrap: anywhere;
  color: var(--atlas-ink-soft);
  line-height: 1.65;
}

.card-preview-reference-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.card-preview-reference-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.card-preview-reference-content th,
.card-preview-reference-content td {
  min-width: 130px;
  padding: 9px 11px;
  border: 1px solid var(--atlas-line);
  text-align: left;
}

.card-preview-reference-content section + section {
  padding-top: 20px;
  border-top: 1px solid var(--atlas-line);
}

.card-preview-reference-content h2 {
  margin-bottom: 8px;
  color: var(--atlas-ink);
  font: 800 20px "Fraunces", Georgia, serif;
}

.card-preview-footer {
  margin-top: 18px;
  padding: 16px 0;
}

.card-preview-footer form {
  margin: 0 0 0 auto;
}

.card-preview-delete {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  color: var(--atlas-red);
  background: transparent;
  font: 750 12px "Inter", sans-serif;
  cursor: pointer;
}

.study-settings-page {
  width: min(100% - 48px, 1040px);
}

.study-settings-form {
  display: grid;
  gap: 18px;
}

.study-settings-panel,
.study-time-zone-panel {
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
  box-shadow: 0 3px 14px rgba(20, 40, 58, .06);
}

.study-settings-panel {
  padding: clamp(20px, 4vw, 28px);
}

.study-settings-panel-heading h2 {
  margin: 2px 0 5px;
  color: var(--atlas-ink);
  font: 800 26px "Fraunces", Georgia, serif;
}

.study-settings-panel-heading > p:last-child {
  margin: 0;
  color: var(--atlas-muted);
}

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

.study-settings-field label,
.study-custom-limits label {
  display: block;
  margin-bottom: 7px;
  color: var(--atlas-ink);
  font-size: 13px;
  font-weight: 800;
}

.study-settings-field select,
.study-settings-field input,
.study-custom-limits input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c8c2b3;
  border-radius: 10px;
  color: var(--atlas-ink);
  background: white;
  font: 500 14px "Inter", sans-serif;
}

.study-settings-field select:focus,
.study-settings-field input:focus,
.study-custom-limits input:focus {
  border-color: var(--atlas-green);
  outline: 3px solid rgba(8, 127, 91, .12);
}

.study-settings-field small {
  display: block;
  margin-top: 6px;
  color: var(--atlas-muted);
  font-size: 11px;
}

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

.study-preset-card {
  position: relative;
  overflow: hidden;
  border: 2px solid #ded8c9;
  border-radius: 15px;
  background: white;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.study-preset-card:hover {
  border-color: #9ecbb9;
  transform: translateY(-1px);
}

.study-preset-card.selected {
  border-color: var(--atlas-green);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .11);
}

.study-preset-label {
  display: block;
  min-height: 185px;
  padding: 20px;
  cursor: pointer;
}

.study-preset-check {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  place-items: center;
  color: white;
  background: var(--atlas-green);
  font-size: 14px;
  font-weight: 900;
}

.study-preset-card.selected .study-preset-check {
  display: grid;
}

.study-preset-label h3 {
  margin: 0 34px 7px 0;
  color: var(--atlas-ink);
  font: 800 21px "Fraunces", Georgia, serif;
}

.study-preset-label > p {
  min-height: 42px;
  margin: 0 0 16px;
  color: var(--atlas-muted);
  font-size: 13px;
  line-height: 1.55;
}

.study-preset-limits {
  display: flex;
  gap: 10px;
}

.study-preset-limits span {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 10px;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
  color: var(--atlas-muted);
  background: #f3efe4;
  font-size: 11px;
}

.study-preset-limits strong {
  color: var(--atlas-ink);
  font-size: 15px;
}

.study-custom-limits {
  display: grid;
  gap: 12px;
}

.study-time-zone-panel {
  overflow: hidden;
}

.study-time-zone-panel > summary {
  display: flex;
  min-height: 68px;
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.study-time-zone-panel > summary::-webkit-details-marker {
  display: none;
}

.study-time-zone-panel > summary::after {
  content: "+";
  color: var(--atlas-green);
  font-size: 24px;
}

.study-time-zone-panel[open] > summary::after {
  content: "−";
}

.study-time-zone-panel summary strong,
.study-time-zone-panel summary small {
  display: block;
}

.study-time-zone-panel summary strong {
  color: var(--atlas-ink);
}

.study-time-zone-panel summary small {
  margin-top: 3px;
  color: var(--atlas-muted);
}

.study-time-zone-fields {
  display: grid;
  padding: 22px;
  border-top: 1px solid var(--atlas-line);
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  align-items: start;
  gap: 18px;
}

.study-time-zone-fields > p {
  margin: 0;
  color: var(--atlas-muted);
  line-height: 1.65;
}

.study-settings-actions {
  display: flex;
  padding: 4px 0 14px;
  justify-content: flex-end;
  gap: 10px;
}

.leaderboard-privacy-panel {
  display: grid;
  gap: 20px;
}

.leaderboard-opt-out-control {
  display: flex;
  padding: 18px;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
  cursor: pointer;
}

.leaderboard-opt-out-control input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--atlas-green);
}

.leaderboard-opt-out-control span {
  display: grid;
  gap: 4px;
}

.leaderboard-opt-out-control strong {
  color: var(--atlas-ink);
}

.leaderboard-opt-out-control small {
  color: var(--atlas-muted);
  line-height: 1.5;
}

.learning-session-page {
  display: grid;
  min-height: calc(100vh - 80px);
  place-items: center;
}

.learning-session-state {
  width: min(100%, 660px);
  padding: 40px;
  border: 1px solid var(--atlas-border);
  border-radius: 24px;
  background: white;
  box-shadow: var(--atlas-shadow);
  text-align: center;
}

.learning-session-state h1 {
  margin: 8px 0 12px;
  color: var(--atlas-ink);
  font-family: var(--atlas-font-display);
  font-size: clamp(36px, 6vw, 56px);
}

.learning-session-state > p:not(.learning-eyebrow) {
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--atlas-muted);
  line-height: 1.65;
}

.learning-session-state-icon {
  display: inline-flex;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: var(--atlas-green);
  font-size: 32px;
  font-weight: 900;
}

.learning-session-summary-grid {
  display: grid;
  margin: 24px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.learning-session-summary-grid span,
.learning-session-progress-copy {
  padding: 13px;
  border-radius: 12px;
  color: var(--atlas-muted);
  background: var(--atlas-surface-soft);
  font-size: 13px;
}

.learning-session-summary-grid strong {
  display: block;
  color: var(--atlas-ink);
  font-size: 24px;
}

.learning-session-xp-earned {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: -4px auto 24px;
  padding: 12px 18px;
  border: 1px solid #dec887;
  border-radius: 14px;
  align-items: center;
  gap: 10px;
  color: var(--atlas-green-dark);
  background: #fbf3dc;
  text-align: left;
  animation: xp-celebration-in .5s .12s cubic-bezier(.2, .9, .25, 1.15) both;
}

.learning-session-xp-earned > span {
  color: #a8781f;
  font-size: 24px;
}

.learning-session-xp-earned div {
  display: grid;
  gap: 2px;
}

.learning-session-xp-earned strong {
  font: 850 20px/1.15 "Fraunces", Georgia, serif;
}

.learning-session-xp-earned small {
  color: var(--atlas-muted);
  font-size: 11px;
  line-height: 1.4;
}

.learning-session-progress-copy {
  width: max-content;
  margin: 0 auto 22px;
  font-weight: 750;
}

.progress-page {
  display: grid;
  width: min(100% - 48px, 1100px);
  gap: 20px;
}

.progress-learning-map-frame {
  display: grid;
  gap: 20px;
  opacity: 1;
  transition: opacity .16s ease;
}

.progress-learning-map-frame.is-loading {
  opacity: .62;
  pointer-events: none;
}

.progress-learning-map-frame.is-settling {
  animation: progress-frame-settle .16s ease-out both;
}

@keyframes progress-frame-settle {
  from { opacity: .78; }
  to { opacity: 1; }
}

.progress-page-header {
  margin-bottom: 0;
}

.progress-tab-shell,
.progress-tab-panel,
.progress-overview-tab {
  display: grid;
  gap: 20px;
}

.progress-tab-panel[hidden] {
  display: none;
}

.progress-tabs {
  display: grid;
  padding: 5px;
  border: 1px solid var(--atlas-line);
  border-radius: 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  background: #ebe5d7;
}

.progress-tab {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  color: var(--atlas-muted);
  background: transparent;
  font: 800 13px "Inter", sans-serif;
  cursor: pointer;
}

.progress-tab:hover,
.progress-tab:focus-visible {
  color: var(--atlas-ink);
  background: rgba(255, 255, 255, .55);
}

.progress-tab:focus-visible {
  outline: 3px solid rgba(8, 127, 91, .2);
  outline-offset: 2px;
}

.progress-tab.is-active {
  color: white;
  background: var(--atlas-green-dark);
  box-shadow: 0 3px 10px rgba(5, 91, 67, .18);
}

.progress-momentum-strip {
  display: flex;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 253, 248, .72);
}

.progress-momentum-stat,
.progress-momentum-leaderboard {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.progress-momentum-stat {
  padding: 3px 8px;
}

.progress-momentum-strip span,
.progress-momentum-strip small {
  color: var(--atlas-muted);
}

.progress-momentum-strip span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.progress-momentum-strip strong {
  color: var(--atlas-green-dark);
  font: 850 18px/1.15 "Fraunces", Georgia, serif;
}

.progress-momentum-strip small {
  font-size: 11px;
}

.progress-momentum-leaderboard {
  min-width: 185px;
  padding: 7px 10px 7px 18px;
  border: 0;
  border-left: 1px solid var(--atlas-line);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.progress-momentum-leaderboard:hover small,
.progress-momentum-leaderboard:focus-visible small {
  color: var(--atlas-green-dark);
}

.progress-momentum-leaderboard:focus-visible {
  border-radius: 9px;
  outline: 3px solid rgba(8, 127, 91, .2);
  outline-offset: 1px;
}

.progress-gamification-panel {
  display: grid;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  gap: 24px;
  background: var(--atlas-surface);
}

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

.progress-gamification-heading h2,
.progress-gamification-heading p {
  margin: 0;
}

.progress-gamification-heading h2 {
  margin: 3px 0 6px;
  color: var(--atlas-ink);
  font: 850 31px/1.12 "Fraunces", Georgia, serif;
}

.progress-gamification-heading div > p:last-child {
  max-width: 620px;
  color: var(--atlas-muted);
  line-height: 1.55;
}

.progress-gamification-heading > strong {
  flex: 0 0 auto;
  color: var(--atlas-green-dark);
  font-size: 13px;
}

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

.achievement-card {
  display: grid;
  min-width: 0;
  min-height: 282px;
  padding: 20px 16px;
  border: 1px solid var(--atlas-line);
  border-radius: 17px;
  justify-items: center;
  align-content: start;
  gap: 10px;
  background: #f1ede3;
  text-align: center;
}

.achievement-card.is-earned {
  border-color: rgba(8, 127, 91, .38);
  background:
    radial-gradient(circle at 50% 0, rgba(179, 131, 45, .15), transparent 42%),
    #fffdf8;
  box-shadow: 0 5px 16px rgba(15, 63, 52, .07);
}

.achievement-stamp {
  display: grid;
  width: 104px;
  height: 104px;
  margin-bottom: 3px;
  border: 3px double #aaa496;
  border-radius: 50%;
  place-items: center;
  color: #777267;
  background: #e5e0d4;
  box-shadow: inset 0 0 0 6px #f1ede3;
}

.achievement-card.is-earned .achievement-stamp {
  border-color: var(--atlas-gold);
  color: white;
  background: var(--atlas-green-dark);
  box-shadow: inset 0 0 0 6px #e8d6a2;
}

.achievement-stamp span {
  font: 900 27px/1 "Fraunces", Georgia, serif;
}

.achievement-card h3,
.achievement-card p {
  margin: 0;
}

.achievement-card h3 {
  color: var(--atlas-ink);
  font: 820 18px/1.2 "Fraunces", Georgia, serif;
}

.achievement-card p {
  color: var(--atlas-muted);
  font-size: 12px;
  line-height: 1.5;
}

.achievement-card small {
  margin-top: auto;
  color: #777267;
  font-size: 11px;
  font-weight: 750;
}

.achievement-card.is-earned small {
  color: var(--atlas-green-dark);
}

.achievement-progress {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #d8d2c5;
}

.achievement-progress i {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: var(--atlas-gold);
}

.leaderboard-opt-out-notice,
.leaderboard-early-days,
.progress-gamification-empty {
  padding: 18px 20px;
  border: 1px solid #dfd4b7;
  border-radius: 14px;
  color: var(--atlas-ink);
  background: #f9f1dc;
}

.leaderboard-opt-out-notice p,
.leaderboard-early-days p,
.progress-gamification-empty p {
  margin: 4px 0 0;
  color: var(--atlas-muted);
  line-height: 1.55;
}

.leaderboard-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.leaderboard-entry {
  display: grid;
  min-height: 74px;
  padding: 13px 17px;
  border: 1px solid var(--atlas-line);
  border-radius: 14px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: #fffdf8;
}

.leaderboard-entry.is-current-user {
  border-color: var(--atlas-green);
  background: #f1faf6;
  box-shadow: 0 4px 13px rgba(8, 127, 91, .08);
}

.leaderboard-rank {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  place-items: center;
  color: white;
  background: var(--atlas-ink);
  font-weight: 850;
}

.leaderboard-entry.rank-1 .leaderboard-rank { background: #a8781f; }
.leaderboard-entry.rank-2 .leaderboard-rank { background: #79848a; }
.leaderboard-entry.rank-3 .leaderboard-rank { background: #986241; }

.leaderboard-entry div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.leaderboard-entry div strong {
  overflow: hidden;
  color: var(--atlas-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-entry div small {
  color: var(--atlas-muted);
}

.leaderboard-xp {
  color: var(--atlas-muted);
  font-size: 12px;
}

.leaderboard-xp strong {
  color: var(--atlas-green-dark);
  font: 900 23px/1 "Fraunces", Georgia, serif;
}

.leaderboard-lifetime-xp {
  display: flex;
  padding-top: 18px;
  border-top: 1px solid var(--atlas-line);
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--atlas-muted);
}

.leaderboard-lifetime-xp strong {
  color: var(--atlas-green-dark);
  font: 850 18px/1.15 "Fraunces", Georgia, serif;
}

.progress-level-overview {
  display: grid;
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  gap: 16px;
  background: var(--atlas-surface);
}

.progress-level-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.progress-level-heading p,
.progress-level-heading h2 {
  margin: 0;
}

.progress-level-heading h2 {
  margin-top: 3px;
  font: 850 25px/1.12 "Fraunces", Georgia, serif;
}

.progress-level-heading > p {
  color: var(--atlas-muted);
  font-size: 12px;
}

.progress-level-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-level-identity .course-level-mark {
  display: grid;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  flex-basis: 60px;
  place-items: center;
  color: white;
  background: var(--atlas-green-dark);
  font-size: 17px;
}

.progress-level-identity p,
.progress-level-identity h2 {
  margin: 0;
}

.progress-level-identity h2 {
  margin: 3px 0 5px;
  font: 850 28px/1.12 "Fraunces", Georgia, serif;
}

.progress-level-identity div > p:last-child {
  color: var(--atlas-muted);
  font-size: 13px;
}

.progress-strength-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.progress-strength-card {
  display: grid;
  min-width: 0;
  min-height: 122px;
  padding: 18px 20px;
  border: 1px solid var(--atlas-line);
  border-radius: 16px;
  align-content: center;
  gap: 10px;
  color: inherit;
  background: #fffdf8;
  text-decoration: none;
}

.progress-strength-card.is-track:hover,
.progress-strength-card.is-track:focus-visible,
.progress-strength-card.is-active {
  border-color: var(--atlas-green);
  box-shadow: 0 4px 14px rgba(8, 127, 91, .1);
}

.progress-strength-card > span:first-child,
.progress-strength-card > small {
  color: var(--atlas-muted);
}

.progress-strength-card > span:first-child {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.progress-strength-card > strong,
.progress-words-card > strong {
  color: var(--atlas-green-dark);
  font: 900 29px/1.05 "Fraunces", Georgia, serif;
}

.progress-strength-card > small {
  font-size: 12px;
}

.progress-words-card > strong {
  margin: 0;
}

.learning-map {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
}

.learning-home-chapter-map .learning-map-chapters {
  padding: 0;
}

.learning-home-chapter-map-copy {
  display: grid;
  max-width: 440px;
  justify-items: end;
  gap: 5px;
}

.learning-home-chapter-map-copy .learning-home-text-link {
  display: flex;
  min-height: 44px;
  align-items: center;
}

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

.progress-section-heading h2 {
  margin: 2px 0 0;
  font: 800 27px/1.15 "Fraunces", Georgia, serif;
}

.progress-section-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--atlas-muted);
  text-align: right;
}

.learning-map-levels {
  display: grid;
  gap: 10px;
}

.learning-map-level {
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 15px;
  background: #fffdf8;
}

.learning-map-level-summary {
  display: grid;
  min-height: 82px;
  padding: 15px 17px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.learning-map-level-summary > .course-level-mark {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--level-color) 35%, var(--atlas-line));
  border-radius: 13px;
  place-items: center;
  color: var(--level-color);
  background: color-mix(in srgb, var(--level-color) 8%, white);
  font-size: 17px;
}

.learning-map-level > a.learning-map-level-summary,
.learning-map-level > summary.learning-map-level-summary {
  cursor: pointer;
}

.learning-map-level > a.learning-map-level-summary:hover,
.learning-map-level > a.learning-map-level-summary:focus-visible,
.learning-map-level > summary.learning-map-level-summary:hover,
.learning-map-level > summary.learning-map-level-summary:focus-visible {
  background: #f7f2e7;
}

.learning-map-level > summary.learning-map-level-summary {
  list-style: none;
}

.learning-map-level > summary.learning-map-level-summary::-webkit-details-marker {
  display: none;
}

.learning-map-level.is-viewed {
  border-color: color-mix(in srgb, var(--level-color) 48%, var(--atlas-line));
  box-shadow: 0 5px 18px rgba(14, 44, 62, .07);
}

.learning-map-level.is-viewed > .learning-map-level-summary {
  background: #fbf8f0;
}

.progress-strength-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.learning-map-level.is-placed-above {
  border-style: dashed;
  background: #fbf7ed;
}

.learning-map-level-copy small.is-placed-above {
  color: #68470e;
  background: #f3e5bd;
}

.learning-map-level.is-placed-above .learning-map-level-score strong {
  color: var(--atlas-muted);
}

.learning-map-level-copy > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.learning-map-level-copy strong,
.learning-map-level-copy p,
.learning-map-level-meta {
  margin: 0;
}

.learning-map-level-copy strong {
  font: 800 20px "Fraunces", Georgia, serif;
}

.learning-map-level-copy small {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--atlas-green-dark);
  background: #dcefe7;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.learning-map-level-copy p,
.learning-map-level-meta {
  display: block;
  margin-top: 3px;
  color: var(--atlas-muted);
  font-size: 13px;
}

.learning-map-level-score {
  display: grid;
  min-width: 116px;
  justify-items: end;
}

.learning-map-level-score span,
.learning-map-level-score small {
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 750;
}

.learning-map-level-score strong {
  color: var(--atlas-green-dark);
  font: 900 25px/1.1 "Fraunces", Georgia, serif;
}

.learning-map-level.is-viewed .learning-map-level-score small {
  color: var(--atlas-green-dark);
}

.learning-map-level-toggle-closed,
details.learning-map-level:not([open]) .learning-map-level-toggle-open {
  display: none;
}

details.learning-map-level:not([open]) .learning-map-level-toggle-closed {
  display: inline;
}

.learning-map-level.is-unavailable {
  background: #f7f3e9;
}

.learning-map-level.is-unavailable .learning-map-level-summary {
  grid-template-columns: 48px minmax(0, 1fr);
}

.learning-map-chapters {
  display: grid;
  padding: 0 16px 16px;
  gap: 9px;
}

.learning-map-chapter {
  display: grid;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--atlas-line);
  border-left: 4px solid #a9a597;
  border-radius: 13px;
  gap: 14px;
  background: white;
}

.learning-map-chapter.is-strong { border-left-color: var(--atlas-green); }
.learning-map-chapter.is-growing { border-left-color: var(--atlas-blue); }
.learning-map-chapter.is-weak { border-left-color: var(--atlas-gold); }
.learning-map-chapter.is-struggling { border-left-color: #c76551; }
.learning-map-chapter.is-suggested {
  border-color: rgba(179, 131, 45, .58);
  border-left-color: var(--atlas-gold);
  background: #fffdf7;
  box-shadow: 0 5px 18px rgba(107, 80, 28, .08);
}

.learning-map-chapter-heading,
.learning-map-chapter-title {
  display: flex;
  min-width: 0;
  align-items: center;
}

.learning-map-chapter-heading {
  justify-content: space-between;
  gap: 14px;
}

.learning-map-chapter-labels {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.learning-map-suggested-badge {
  padding: 6px 9px;
  border-radius: 999px;
  color: #765614;
  background: #f7e8bd;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.learning-map-chapter-title {
  align-items: flex-start;
  gap: 10px;
}

.learning-map-chapter-title > span {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--atlas-ink);
  font-size: 12px;
  font-weight: 850;
}

.learning-map-chapter-title h3,
.learning-map-chapter-title p {
  margin: 0;
}

.learning-map-chapter-title h3 {
  font-size: 15px;
}

.learning-map-chapter-title h3 a {
  color: inherit;
  text-decoration-color: rgba(8, 127, 91, .35);
  text-underline-offset: 3px;
}

.learning-map-chapter-title h3 a:hover,
.learning-map-chapter-title h3 a:focus-visible {
  color: var(--atlas-green-dark);
  text-decoration-color: currentColor;
}

.learning-map-chapter-title p {
  margin-top: 3px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.learning-map-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.learning-map-metric {
  display: grid;
  gap: 7px;
}

.learning-map-metric > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.learning-map-metric span {
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.learning-map-metric strong {
  font-size: 13px;
}

.learning-map-meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e0d2;
}

.learning-map-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--atlas-green);
}

.learning-map-meter.is-mastery i {
  background: linear-gradient(90deg, var(--atlas-green), var(--atlas-blue));
}

.learning-map-chapter-suggestion {
  display: flex;
  padding-top: 13px;
  border-top: 1px solid #eadfbe;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.learning-map-chapter-suggestion > div {
  min-width: 0;
}

.learning-map-chapter-suggestion strong,
.learning-map-chapter-suggestion p {
  margin: 0;
}

.learning-map-chapter-suggestion strong {
  font-size: 12px;
}

.learning-map-chapter-suggestion p {
  margin-top: 3px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.learning-map-chapter-suggestion form,
.learning-map-chapter-suggestion .learning-button {
  flex: 0 0 auto;
}

.learning-map-state {
  padding: 6px 9px;
  border-radius: 999px;
  color: #5b574c;
  background: #eee9dc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .course-overview-card {
    grid-template-columns: auto minmax(160px, 1fr) 110px;
  }

  .course-continue-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .learning-home-hero.has-plan {
    grid-template-areas:
      "copy"
      "plan"
      "action";
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .onboarding-shell {
    padding: 0 14px 32px;
  }

  .onboarding-topbar {
    min-height: 68px;
  }

  .onboarding-brand small {
    display: none;
  }

  .onboarding-main {
    margin-top: 8px;
  }

  .onboarding-card {
    padding: 24px 17px;
    border-radius: 18px;
  }

  .onboarding-heading {
    margin-bottom: 28px;
  }

  .onboarding-choice-grid,
  .onboarding-level-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-choice-wide {
    grid-column: auto;
  }

  .onboarding-actions,
  .study-course-preferences {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-actions .learning-button,
  .study-course-preferences .learning-button {
    width: 100%;
  }

  .xp-celebration {
    top: 70px;
    right: 14px;
    width: calc(100vw - 28px);
  }

  .progress-page {
    width: min(100% - 28px, 680px);
  }

  .progress-strength-grid,
  .learning-map-metrics {
    grid-template-columns: 1fr;
  }

  .progress-momentum-strip {
    align-items: stretch;
  }

  .progress-momentum-leaderboard {
    min-width: 155px;
  }

  .progress-gamification-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-gamification-heading .learning-button {
    width: 100%;
  }

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

  .progress-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-section-heading > p {
    text-align: left;
  }

  .progress-level-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .learning-map-level-summary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .learning-map-level-score {
    grid-column: 2;
    justify-items: start;
  }

  .learning-map-chapter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .learning-map-chapter-labels {
    margin-left: 40px;
    justify-content: flex-start;
  }

  .learning-map-chapter-suggestion {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-map-chapter-suggestion form,
  .learning-map-chapter-suggestion .learning-button {
    width: 100%;
  }

  .progress-level-identity {
    align-items: flex-start;
  }

  .progress-level-identity .course-level-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .progress-level-identity h2 {
    font-size: 24px;
  }

  .learning-home-chapter-map-copy {
    width: 100%;
    max-width: none;
    justify-items: start;
  }

  .learning-home-page {
    width: min(100% - 28px, 680px);
  }

  .learning-home-hero {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .learning-home-primary-action .learning-button,
  .learning-home-primary-action form {
    width: 100%;
  }

  .learning-home-complete-actions,
  .learning-home-complete-actions .learning-button {
    width: 100%;
  }

  .learning-home-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-home-overview.has-insights {
    grid-template-columns: 1fr;
  }

  .learning-home-overview.has-insights .learning-home-course {
    grid-column: auto;
  }

  .learning-home-course {
    grid-column: 1 / -1;
  }

  .learning-home-secondary-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-home-secondary-actions .learning-button {
    width: 100%;
  }

  .flashcards-page {
    width: min(100% - 28px, 680px);
  }

  .flashcards-header,
  .flashcard-daily-summary {
    grid-template-columns: 1fr;
  }

  .flashcards-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .flashcards-header .learning-button {
    width: 100%;
    justify-content: center;
  }

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

  .flashcards-header-actions .learning-button,
  .flashcards-header-actions form {
    width: 100%;
  }

  .flashcard-daily-summary {
    gap: 14px;
  }

  .flashcard-deck-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
  }

  .flashcard-deck-main {
    padding-left: calc(var(--deck-depth) * 12px);
  }

  .flashcard-deck-counts {
    min-width: 0;
    justify-content: flex-end;
  }

  .flashcard-deck-action {
    min-width: 0;
    grid-column: 1 / -1;
  }

  .flashcard-deck-action .learning-button {
    width: 100%;
    justify-content: center;
  }

  .deck-detail-page,
  .deck-editor-page,
  .card-browser-page,
  .card-editor-page {
    width: min(100% - 28px, 680px);
  }

  .card-form-option-grid-back {
    grid-template-columns: 1fr;
  }

  .card-form-option-grid {
    grid-template-columns: 1fr;
  }

  .card-form-option-wide {
    grid-column: auto;
  }

  .deck-detail-header,
  .deck-editor-header,
  .card-browser-header,
  .deck-detail-limits,
  .deck-detail-first-card {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .deck-detail-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-detail-header-actions .learning-button,
  .deck-editor-header .learning-button,
  .deck-detail-first-card .learning-button {
    width: 100%;
  }

  .deck-progress-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .deck-progress-legend {
    grid-template-columns: 1fr;
  }

  .deck-detail-action-buttons,
  .card-browser-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-detail-action-buttons .learning-button,
  .deck-detail-action-buttons form,
  .card-browser-header-actions .learning-button {
    width: 100%;
  }

  .deck-detail-limit-message {
    align-items: stretch;
    flex-direction: column;
  }


  .learning-session-page {
    min-height: 0;
  }

  .learning-session-state {
    padding: 26px 18px;
    border-radius: 18px;
  }

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

  body.learning-body {
    overflow: auto;
  }

  .learning-app {
    display: block;
    min-height: 100vh;
  }

  .learning-sidebar {
    display: none;
  }

  .learning-main {
    height: auto;
    min-height: 100vh;
    padding-top: 55px;
    padding-bottom: 76px;
    overflow: visible;
  }

  .learning-main::before {
    inset: 55px 0 76px;
  }

  .learning-body .flashcard-review.is-answer-shown {
    padding-bottom: 176px;
  }

  .learning-body #rating-bar {
    right: 0;
    bottom: 69px;
    left: 0;
    padding: 10px 12px;
  }

  .learning-mobile-header {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    min-height: 55px;
    padding: 9px 14px;
    align-items: center;
    gap: 10px;
    color: white;
    background: var(--atlas-ink);
  }

  .learning-mobile-header > strong {
    flex: 1;
    font: 700 15px "Fraunces", Georgia, serif;
  }

  .learning-mobile-header > a {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: white;
  }

  .learning-mobile-language-switcher {
    position: relative;
    flex: 0 0 auto;
  }

  .learning-mobile-language-switcher > summary {
    display: inline-flex;
    min-width: 48px;
    min-height: 38px;
    padding: 0 9px;
    align-items: center;
    justify-content: center;
    border: 1px solid #365269;
    border-radius: 9px;
    gap: 4px;
    color: #eef4f7;
    background: #0f2233;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    list-style: none;
  }

  .learning-mobile-language-switcher > summary::-webkit-details-marker {
    display: none;
  }

  .learning-mobile-language-switcher > summary:hover,
  .learning-mobile-language-switcher > summary:focus-visible,
  .learning-mobile-language-switcher[open] > summary {
    border-color: #e8b64c;
    color: white;
  }

  .learning-mobile-language-menu {
    position: absolute;
    z-index: 70;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(248px, calc(100vw - 28px));
    padding: 7px;
    border: 1px solid #365269;
    border-radius: 12px;
    gap: 4px;
    background: var(--atlas-ink);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .28);
  }

  .learning-mobile-language-menu form {
    margin: 0;
  }

  .learning-mobile-language-option {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 11px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 8px;
    color: white;
    background: transparent;
    cursor: pointer;
    font: 700 12px "Inter", sans-serif;
    text-align: left;
  }

  .learning-mobile-language-option:hover,
  .learning-mobile-language-option:focus-visible {
    background: #19354c;
  }

  .learning-mobile-language-option.is-active {
    color: #f3ca6e;
    background: #19354c;
    cursor: default;
  }

  .learning-mobile-language-option small {
    color: inherit;
    font-size: 10px;
  }

  .learning-bottom-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 69px;
    padding: 7px 4px 10px;
    grid-template-columns: repeat(5, 1fr);
    background: var(--atlas-ink);
  }

  .learning-bottom-nav > a,
  .learning-bottom-nav > span,
  .learning-mobile-more > summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: #a8b6c2;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
  }

  .learning-mobile-more {
    position: relative;
  }

  .learning-mobile-more > summary {
    list-style: none;
    cursor: pointer;
  }

  .learning-mobile-more > summary::-webkit-details-marker {
    display: none;
  }

  .learning-mobile-more[open] > summary {
    color: #e8b64c;
  }

  .learning-mobile-more-menu {
    position: absolute;
    right: 6px;
    bottom: calc(100% + 10px);
    display: grid;
    width: 164px;
    padding: 7px;
    border: 1px solid #365269;
    border-radius: 12px;
    gap: 4px;
    background: var(--atlas-ink);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .28);
  }

  .learning-mobile-more-menu > a {
    display: flex;
    min-height: 44px;
    padding: 8px 11px;
    align-items: center;
    border-radius: 8px;
    gap: 10px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
  }

  .learning-mobile-more-menu > a:hover,
  .learning-mobile-more-menu > a:focus-visible {
    background: #19354c;
  }

  .learning-mobile-more-menu .learning-nav-icon {
    width: 19px;
    height: 19px;
  }

  .learning-bottom-nav > .is-active {
    color: #e8b64c;
  }

  .learning-bottom-nav .learning-nav-icon {
    width: 20px;
    height: 20px;
  }

  .learning-content,
  .learning-flash {
    width: min(100% - 28px, 680px);
  }

  .learning-content {
    padding: 20px 0 34px;
  }

  .learning-flash {
    margin-top: 12px;
  }

  .learning-page-header {
    margin-bottom: 16px;
  }

  .learning-draft-badge {
    display: none;
  }

  .course-level-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .course-level-tab {
    min-width: 0;
    padding: 8px 5px;
  }

  .course-overview-card {
    padding: 15px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
  }

  .course-overview-progress,
  .course-continue-button {
    grid-column: 1 / -1;
  }

  .course-overview-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .course-overview-progress small {
    margin: 0;
  }

  .course-chapter-card summary {
    min-height: 66px;
    padding: 12px;
    grid-template-columns: 32px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .chapter-progress {
    display: none;
  }

  .chapter-summary-copy strong {
    white-space: normal;
  }

  .chapter-lessons {
    padding: 7px 7px 10px;
  }

  .course-lesson-link {
    padding-right: 7px;
    padding-left: 7px;
  }

  .lesson-current-label {
    padding: 4px 8px;
    font-size: 11px;
  }

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

  .lesson-content-card,
  .lesson-examples,
  .lesson-quick-check,
  .lesson-actions {
    padding: 17px;
    border-radius: 15px;
  }

  .lesson-content-card {
    overflow-x: auto;
    font-size: 18px;
  }

  .lesson-example-card {
    min-height: 0;
    padding: 17px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .lesson-example-sentence,
  .quick-check-prompt {
    font-size: 21px;
  }

  .lesson-example-translation {
    font-size: 16px;
  }

  .example-audio-button {
    min-width: 108px;
  }

  .quick-check-header {
    flex-direction: column;
  }

  .quick-check-question {
    padding: 17px;
  }

  .quick-check-select {
    max-width: 100%;
    font-size: 17px;
  }

  .lesson-flashcard-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lesson-flashcard-panel .lesson-flashcard-actions {
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-flashcard-panel .learning-button {
    width: 100%;
    justify-content: center;
  }

  .lesson-practice-page #rating-bar {
    padding: 10px 6px;
  }

  .lesson-practice-page .rating-form {
    padding: 0 5px;
  }

  .lesson-practice-page .rating-buttons-grid {
    gap: 5px;
  }

  .lesson-practice-page .rating-btn {
    min-width: 0;
    margin: 0;
    padding: 11px 3px;
    font-size: 13px;
  }

  .lesson-flashcard-review .card-container {
    min-height: 210px;
    margin-bottom: 10px;
    padding: 24px 18px;
  }

  .lesson-flashcard-review .card-text-content {
    font-size: 20px;
  }

  .lesson-practice-page {
    padding-top: 12px;
  }

  .lesson-practice-page .lesson-back-link {
    min-height: 44px;
    margin-bottom: 3px;
    font-size: 12px;
  }

  .lesson-practice-header {
    margin-bottom: 10px;
  }

  .lesson-practice-header h1 {
    font-size: 30px;
  }

  .lesson-practice-header > p:last-child {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
  }

  .lesson-flashcard-review .review-top-actions {
    margin-bottom: 7px;
  }

  .lesson-flashcard-review #review-actions {
    padding: 8px 0;
  }

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

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

  .card-preview-page,
  .study-settings-page {
    width: min(100% - 28px, 680px);
  }

  .learning-body .flashcard-review:not(.lesson-flashcard-review) {
    width: min(100% - 28px, 680px);
    padding-top: 18px;
  }

  .learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions,
  .learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions > div {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-body .flashcard-review:not(.lesson-flashcard-review) .review-top-actions .learning-button {
    width: 100%;
  }

  .card-preview-header,
  .card-preview-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .card-preview-header-actions .learning-button,
  .card-preview-footer .learning-button,
  .card-preview-footer form {
    width: 100%;
  }

  .card-preview-face {
    min-height: 210px;
    padding: 28px 18px;
  }

  .card-preview-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .card-preview-footer form {
    margin: 0;
  }

  .card-preview-delete {
    width: 100%;
  }

  .study-settings-header {
    align-items: stretch;
    flex-direction: column;
  }

  .study-settings-header .learning-button {
    width: 100%;
  }

  .study-settings-fields,
  .study-preset-grid,
  .study-time-zone-fields {
    grid-template-columns: 1fr;
  }

  .study-preset-label {
    min-height: 0;
  }

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

  .study-settings-actions .learning-button,
  .study-time-zone-fields .learning-button {
    width: 100%;
  }

  .learning-body .sticky-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .learning-body .sticky-form-actions .learning-button {
    width: 100%;
  }

  .learning-body .sticky-form-actions input[type="submit"] {
    order: 1;
  }

  .learning-body .sticky-form-actions a {
    order: 2;
  }

  .card-composer-shortcut {
    margin: 2px 0 0;
    order: 3;
    text-align: center;
  }

  .card-editor-header {
    margin-bottom: 14px;
  }

  .card-editor-header > div > p:last-child {
    margin-top: 5px;
    font-size: 13px;
  }

  .card-form-panel {
    padding: 16px;
    gap: 16px;
  }

  .card-form-panel-heading h2 {
    font-size: 22px;
  }

  .card-composer-side {
    padding: 17px;
  }

  .card-composer-main-field .card-form-editor-shell .tiptap-editor-container,
  .card-composer-main-field .card-form-editor-shell .tiptap-editor-content {
    min-height: 140px;
  }

  .deck-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .deck-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-danger-zone .learning-button {
    width: 100%;
  }

  .deck-form-actions .learning-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learning-skip-link,
  .xp-celebration,
  .learning-session-xp-earned {
    animation: none;
    transition: none;
  }
}

@media (max-width: 440px) {
  .progress-tab {
    padding-inline: 6px;
    font-size: 11px;
  }

  .achievement-card {
    min-height: 270px;
    padding-inline: 11px;
  }

  .achievement-stamp {
    width: 88px;
    height: 88px;
  }

  .leaderboard-entry {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .leaderboard-xp {
    grid-column: 2;
  }
}

@media (max-width: 390px) {
  .learning-page-header h1,
  .lesson-header h1 {
    font-size: 32px;
  }

  .course-overview-copy h2 span {
    display: block;
    margin-top: 2px;
  }

  .lesson-position-row {
    grid-template-columns: auto 1fr;
  }

  .lesson-position-row .learning-progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Launch-ready authentication */
.authentication-main {
  width: min(100%, 520px);
  margin-top: clamp(20px, 6vh, 70px);
}

.authentication-card {
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid var(--atlas-line);
  border-radius: 24px;
  background: var(--atlas-surface);
  box-shadow: 0 20px 60px rgba(20, 40, 58, .1);
}

.authentication-card h1 {
  margin: 5px 0 10px;
  font: 800 clamp(34px, 7vw, 46px)/1.05 "Fraunces", Georgia, serif;
}

.authentication-intro,
.authentication-help {
  color: var(--atlas-muted);
}

.authentication-form {
  display: grid;
  margin-top: 28px;
  gap: 18px;
}

.authentication-field {
  display: grid;
  gap: 7px;
}

.authentication-field label {
  color: var(--atlas-ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.authentication-field label small {
  color: var(--atlas-muted);
  font-weight: 500;
}

.authentication-field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #cfc6af;
  border-radius: 12px;
  color: var(--atlas-ink);
  background: white;
  font: 16px "Inter", sans-serif;
}

.authentication-field input:focus {
  border-color: var(--atlas-green);
  outline: 3px solid rgba(8, 127, 91, .15);
}

.authentication-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--atlas-muted);
  font-size: 14px;
}

.authentication-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--atlas-green);
}

.authentication-submit {
  width: 100%;
  min-height: 50px;
  font-size: 15px;
}

.authentication-help {
  margin: 20px 0 0;
  text-align: center;
}

.authentication-help a {
  color: var(--atlas-green-dark);
  font-weight: 800;
}

.authentication-signup {
  display: flex;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--atlas-line);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--atlas-muted);
  font-size: 14px;
}

.authentication-signup-button {
  min-width: 106px;
  text-align: center;
}

.course-chapter-empty {
  margin: 0;
  padding: 18px;
  color: var(--atlas-muted);
  font-size: 14px;
}

/* Language Atlas card structure */
.language-card-front {
  display: grid;
  width: 100%;
  gap: 32px;
  text-align: center;
}

.language-card-back {
  display: block;
  width: 100%;
  text-align: center;
}

.language-card-sentence,
.language-card-answer {
  color: var(--atlas-ink);
  font: 400 24px/1.45 Verdana, Arial, sans-serif !important;
}

.language-card-sentence :where(div, p, span, strong, b, em, i, u),
.language-card-answer :where(div, p, span, strong, b, em, i, u),
.language-card-hint :where(div, p, span, strong, b, em, i, u),
.language-card-translation :where(div, p, span, strong, b, em, i, u),
.language-card-ipa :where(div, p, span, strong, b, em, i, u),
.language-card-reference-block :where(div, p, span, strong, b, em, i, u) {
  font-size: inherit !important;
  line-height: inherit !important;
}

.language-card-sentence p,
.language-card-answer p,
.language-card-hint p,
.language-card-translation p,
.language-card-ipa p,
.language-card-reference-block p {
  margin: 0;
}

.language-card-hint {
  color: #666;
  font: 400 24px/1.45 Verdana, Arial, sans-serif;
  letter-spacing: .02em;
  text-transform: lowercase;
}

.language-card-translation {
  color: var(--atlas-ink);
  font: 400 24px/1.45 Verdana, Arial, sans-serif;
}

.language-card-ipa {
  color: #999;
  font: 400 24px/1.45 Verdana, Arial, sans-serif;
}

.language-card-image {
  display: block;
  max-width: min(100%, 400px);
  max-height: 400px;
  margin: 0 auto;
  object-fit: contain;
}

.language-card-audio {
  width: min(100%, 340px);
  margin: 0 auto;
}

.language-card-back > .language-card-answer,
.language-card-back > .language-card-ipa,
.language-card-back > .language-card-translation {
  margin-bottom: 24px;
}

.language-card-section-divider {
  width: min(100%, 900px);
  margin: 44px auto;
  border-top: 1px solid #999;
}

.language-card-reference-block {
  display: grid;
  width: min(100%, 900px);
  margin: 0 auto;
  gap: 24px;
  color: var(--atlas-ink);
  font: 400 24px/1.45 Verdana, Arial, sans-serif;
  text-align: center;
}

.language-card-reference-primary {
  font-size: 24px;
}

.language-card-reference-ipa {
  color: #999;
  font-size: 24px;
}

.language-card-reference-translation {
  font-size: 24px;
}

.language-card-explanation {
  width: min(100%, 900px);
  margin: 0 auto;
  color: var(--atlas-ink);
  font: 400 20px/1.6 Verdana, Arial, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
}

.language-card-explanation h1,
.language-card-explanation h2,
.language-card-explanation h3,
.language-card-explanation h4 {
  margin: 32px auto 18px;
  font-family: Verdana, Arial, sans-serif;
  line-height: 1.35;
  text-align: center;
}

.language-card-explanation h1:first-child,
.language-card-explanation h2:first-child,
.language-card-explanation h3:first-child,
.language-card-explanation h4:first-child {
  margin-top: 0;
}

.language-card-explanation table {
  display: block;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 24px auto !important;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: .9em !important;
}

.language-card-explanation th,
.language-card-explanation td {
  min-width: 0;
  width: auto !important;
  padding: 6px 14px !important;
  border: 1px solid #333 !important;
  text-align: left;
}

.language-card-source {
  display: block;
  width: min(100%, 900px);
  margin: 44px auto 0;
  padding-top: 44px;
  border-top: 1px solid #999;
  color: var(--atlas-ink);
  font: 400 24px/1.45 Verdana, Arial, sans-serif;
}

.language-card-source a {
  display: block;
  margin-bottom: 28px;
  color: var(--atlas-green-dark);
  font-weight: 400;
}

.learning-body .flashcard-review .simple-divider {
  width: min(100%, 900px);
  margin: 44px auto;
  border-top: 2px solid var(--atlas-line);
  border-radius: 0;
}

/* Premium upgrade */
.upgrade-page {
  display: grid;
  max-width: 1040px;
  gap: 20px;
}

.upgrade-hero,
.upgrade-checkout {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--atlas-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 6%, rgba(232, 182, 76, .2), transparent 32%),
    var(--atlas-surface);
  box-shadow: 0 10px 32px rgba(20, 40, 58, .08);
}

.upgrade-hero.is-premium {
  text-align: center;
}

.upgrade-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--atlas-brass);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.upgrade-hero h1 {
  max-width: 760px;
  font: 900 clamp(34px, 5vw, 48px)/1.08 "Fraunces", Georgia, serif;
}

.upgrade-hero p,
.upgrade-checkout p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--atlas-muted);
  font-size: 15px;
  line-height: 1.65;
}

.upgrade-hero .learning-button {
  margin-top: 22px;
}

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

.upgrade-comparison-heading {
  grid-column: 1 / -1;
}

.upgrade-comparison-heading h2,
.upgrade-checkout h2 {
  font: 850 clamp(25px, 4vw, 34px)/1.15 "Fraunces", Georgia, serif;
}

.upgrade-plan-card {
  padding: 25px;
  border: 1px solid var(--atlas-line);
  border-radius: 18px;
  background: var(--atlas-surface);
}

.upgrade-plan-card.is-premium {
  border-color: rgba(8, 127, 91, .48);
  box-shadow: 0 8px 24px rgba(8, 127, 91, .09);
}

.upgrade-plan-card > span {
  color: var(--atlas-brass);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.upgrade-plan-card h3 {
  margin-top: 6px;
  font-size: 21px;
}

.upgrade-plan-card ul {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.upgrade-plan-card li {
  position: relative;
  padding-left: 25px;
  color: var(--atlas-ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.upgrade-plan-card li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: var(--atlas-green);
  font-weight: 900;
}

.upgrade-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.upgrade-checkout-actions {
  display: grid;
  min-width: 230px;
  gap: 10px;
}

.upgrade-return-link {
  margin: 0;
  text-align: center;
}

.upgrade-return-link a {
  display: inline-flex;
  min-height: 44px;
  padding: 12px;
  align-items: center;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 700px) {
  .authentication-shell {
    padding-inline: 14px;
  }

  .authentication-signup {
    align-items: stretch;
    flex-direction: column;
  }

  .language-card-source {
    font-size: 20px;
  }

  .upgrade-comparison,
  .upgrade-checkout {
    grid-template-columns: 1fr;
  }

  .upgrade-checkout-actions {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-learning-map-frame,
  .progress-learning-map-frame.is-settling,
  .flashcard-review.is-media-ready .card-text-content,
  .review-card-loading > span {
    animation: none;
    transition: none;
  }
}
