:root {
  --ink: #18332d;
  --ink-soft: #45635c;
  --forest: #173f36;
  --forest-light: #245e50;
  --cream: #f6f1e7;
  --paper: #fffdf8;
  --line: rgba(24, 51, 45, 0.14);
  --mint: #bfe4d5;
  --blue: #bed9ed;
  --coral: #f0b9a6;
  --lime: #d8e89c;
  --violet: #d8c6e7;
  --shadow: 0 24px 70px rgba(24, 51, 45, 0.12);
  --radius-large: 32px;
  --radius-medium: 22px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(191, 228, 213, 0.35), transparent 28rem),
    radial-gradient(circle at 92% 24%, rgba(240, 185, 166, 0.24), transparent 24rem),
    var(--cream);
  font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e38857;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  color: white;
  background: var(--forest);
  border-radius: 10px;
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 30px;
  min-height: 86px;
  padding: 14px clamp(20px, 4vw, 64px);
  background: rgba(246, 241, 231, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--cream);
  background: var(--forest);
  font-weight: 900;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px 15px 15px 4px;
  letter-spacing: -0.08em;
}

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

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

.brand small {
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-link,
.mobile-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 700;
}

.nav-link.is-active {
  color: var(--cream);
  background: var(--forest);
}

.profile-chip {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.profile-chip:hover {
  background: rgba(255, 253, 248, 0.7);
  border-color: var(--line);
}

.profile-avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  font-size: 0.85rem;
}

.profile-copy small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  min-height: calc(100vh - 86px);
  padding-block: 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--forest-light);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #d8efe5;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.hero-copy h1,
.page-intro h1,
.result-section h1 {
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  line-height: 0.94;
}

h1 em {
  color: #cf6e46;
  font-weight: 500;
}

.hero-text,
.page-intro > p {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.secondary-button,
.light-button,
.danger-button,
.text-button,
.text-link,
.card-link,
.back-button {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.light-button,
.danger-button {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 850;
}

.primary-button {
  color: white;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(23, 63, 54, 0.2);
}

.primary-button:hover {
  background: #0f2f28;
  transform: translateY(-1px);
}

.secondary-button {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
}

.secondary-button:hover {
  background: white;
}

.light-button {
  color: var(--forest);
  background: var(--cream);
}

.danger-button {
  color: #8f302e;
  background: #fbe4df;
}

.full-width {
  width: 100%;
}

.hero-dashboard {
  position: relative;
  min-height: 550px;
  padding: 56px;
  overflow: hidden;
  color: var(--cream);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    var(--forest);
  background-size: 36px 36px;
  border-radius: 48px 48px 48px 12px;
  box-shadow: var(--shadow);
}

.hero-dashboard::before {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  top: -90px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.level-orbit {
  position: relative;
  display: grid;
  place-items: center;
  height: 330px;
}

.level-ring {
  display: grid;
  place-content: center;
  width: 245px;
  height: 245px;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--forest) 78%, transparent 80% 100%),
    conic-gradient(#e6a979 var(--progress), rgba(255, 255, 255, 0.13) 0);
}

.level-ring span {
  color: #b9d5cb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.level-ring strong {
  font-family: Georgia, serif;
  font-size: 5rem;
  font-weight: 500;
  line-height: 1;
}

.orbit-dot {
  position: absolute;
  width: 15px;
  height: 15px;
  background: #e6a979;
  border: 4px solid var(--forest);
  border-radius: 50%;
}

.orbit-one {
  top: 62px;
  left: 54px;
}

.orbit-two {
  right: 42px;
  bottom: 78px;
  background: var(--lime);
}

.hero-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-stat-row article {
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

.hero-stat-row span,
.hero-stat-row small {
  display: block;
  color: #b9d5cb;
}

.hero-stat-row strong {
  display: block;
  margin: 4px 0;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.section-block {
  padding-block: 70px;
}

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

.section-heading h2,
.lesson-layout h2,
.takeaway-card h2,
.practice-callout h2,
.focus-card h2 {
  margin-bottom: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

.text-link,
.card-link,
.back-button,
.text-button {
  padding: 0;
  background: transparent;
  font-weight: 850;
}

.text-link:hover,
.card-link:hover,
.back-button:hover {
  text-decoration: underline;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.section-copy {
  max-width: 430px;
  margin: 0;
  color: var(--ink-soft);
}

.scene-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  grid-template-rows: repeat(2, minmax(250px, 1fr));
  gap: 18px;
}

.scene-card {
  position: relative;
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  background: var(--forest);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 8px;
  box-shadow: var(--shadow);
}

.scene-card-featured {
  grid-row: 1 / 3;
  min-height: 520px;
}

.scene-card::after {
  position: absolute;
  inset: 38% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(8, 29, 24, 0.9));
}

.scene-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.scene-card:hover img {
  transform: scale(1.025);
}

.scene-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: clamp(22px, 4vw, 36px);
  color: white;
}

.scene-card figcaption span {
  color: #d8ed8f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-card figcaption strong {
  max-width: 440px;
  font-family: Georgia, serif;
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  font-weight: 500;
  line-height: 1.05;
}

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 355px;
  padding: 25px;
  border: 1px solid rgba(24, 51, 45, 0.1);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  box-shadow: 0 15px 45px rgba(24, 51, 45, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(24, 51, 45, 0.12);
}

.module-card.mint,
.module-hero.mint,
.question-module.mint {
  background: var(--mint);
}

.module-card.blue,
.module-hero.blue,
.question-module.blue {
  background: var(--blue);
}

.module-card.coral,
.module-hero.coral,
.question-module.coral {
  background: var(--coral);
}

.module-card.lime,
.module-hero.lime,
.question-module.lime {
  background: var(--lime);
}

.module-card.violet,
.module-hero.violet,
.question-module.violet {
  background: var(--violet);
}

.module-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.module-code,
.question-module {
  width: fit-content;
  padding: 6px 9px;
  border: 1px solid rgba(24, 51, 45, 0.2);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.module-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(24, 51, 45, 0.23);
  border-radius: 50% 50% 50% 12px;
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

.module-card h3 {
  margin: 30px 0 12px;
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.05;
}

.module-card p {
  color: rgba(24, 51, 45, 0.77);
}

.module-progress {
  margin-top: auto;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(24, 51, 45, 0.12);
  border-radius: 999px;
}

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

.module-progress small {
  display: block;
  margin-top: 7px;
  color: var(--ink-soft);
}

.card-link {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  text-align: left;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.glossary-card {
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 25px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  box-shadow: 0 15px 45px rgba(24, 51, 45, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.glossary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(24, 51, 45, 0.11);
}

.glossary-category {
  width: fit-content;
  padding: 6px 9px;
  color: var(--forest);
  background: #e8f3ed;
  border: 1px solid rgba(24, 51, 45, 0.12);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.glossary-card h2 {
  margin: 24px 0 10px;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.08;
}

.glossary-card p {
  margin-bottom: auto;
  color: var(--ink-soft);
}

.glossary-detail-shell {
  padding-block: 45px 90px;
}

.glossary-detail-card,
.glossary-quiz-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
  box-shadow: var(--shadow);
}

.glossary-detail-card {
  margin-top: 28px;
  padding: clamp(34px, 6vw, 70px);
}

.glossary-detail-card h1 {
  max-width: 900px;
  margin: 18px 0;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.94;
}

.glossary-lead {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
}

.glossary-explanation {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 35px;
}

.glossary-explanation > div,
.glossary-explanation aside {
  padding: 24px;
  background: #faf7f0;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.glossary-explanation p:last-child,
.glossary-explanation aside p {
  margin-bottom: 0;
}

.glossary-explanation aside {
  background: var(--mint);
}

.glossary-explanation aside strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.glossary-quiz-card {
  max-width: 900px;
  margin: 26px auto 0;
  padding: clamp(28px, 5vw, 48px);
}

.glossary-quiz-card h2 {
  margin-bottom: 24px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.focus-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 410px;
  padding: 42px;
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.dark-card {
  color: var(--cream);
  background: var(--forest);
}

.dark-card p {
  max-width: 480px;
  color: #c7dbd3;
}

.mistake-card {
  background: var(--paper);
  border: 1px solid var(--line);
}

.focus-mark {
  align-self: end;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  background: var(--coral);
  border-radius: 50%;
  font-size: 2rem;
}

.feedback-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(32px, 6vw, 64px);
  color: var(--cream);
  background:
    radial-gradient(circle at 84% 10%, rgba(216, 237, 143, 0.2), transparent 16rem),
    var(--forest);
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.feedback-invite h2 {
  max-width: 680px;
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.feedback-invite p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: #c7dbd3;
}

.feedback-invite .light-button {
  flex: 0 0 auto;
}

.page-intro {
  padding-top: clamp(80px, 10vw, 145px);
}

.page-intro h1 {
  max-width: 950px;
}

.overall-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 25px;
  max-width: 760px;
  margin-top: 45px;
}

.overall-progress div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.overall-progress strong {
  font-family: Georgia, serif;
  font-size: 2.4rem;
}

.overall-progress span {
  color: var(--ink-soft);
}

.progress-track.large {
  height: 12px;
}

.module-hero {
  border-bottom: 1px solid var(--line);
}

.module-hero-inner {
  padding-block: 34px 85px;
}

.module-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;
  padding-top: 55px;
}

.module-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(3.8rem, 8vw, 7.8rem);
  line-height: 0.92;
}

.module-hero p:not(.eyebrow) {
  max-width: 650px;
  font-size: 1.15rem;
}

.module-hero-mark {
  display: grid;
  place-items: center;
  width: clamp(180px, 24vw, 320px);
  height: clamp(180px, 24vw, 320px);
  border: 2px solid rgba(24, 51, 45, 0.28);
  border-radius: 50% 50% 50% 28px;
  font-family: Georgia, serif;
  font-size: clamp(4rem, 8vw, 7rem);
}

.module-status {
  align-self: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(40px, 8vw, 120px);
}

.lesson-list {
  border-top: 1px solid var(--line);
}

.lesson-card {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-card > span {
  color: #cf6e46;
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.lesson-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.lesson-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.takeaway-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  padding: 55px;
  color: var(--cream);
  background: var(--forest);
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.takeaway-card ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaway-card li {
  position: relative;
  padding: 16px 18px 16px 54px;
  color: #e7f1ed;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}

.takeaway-card li::before {
  position: absolute;
  left: 18px;
  color: var(--lime);
  content: "✓";
  font-weight: 900;
}

.practice-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-inline: 45px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.practice-callout p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.practice-shell {
  min-height: calc(100vh - 90px);
  padding-block: 45px 90px;
}

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

.practice-header div {
  display: flex;
  gap: 15px;
}

.practice-header span {
  color: var(--ink-soft);
}

.practice-progress {
  margin-bottom: 35px;
}

.question-card {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(30px, 6vw, 70px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 36px 36px 36px 10px;
  box-shadow: var(--shadow);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.question-card h1 {
  margin-bottom: 35px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.06;
}

.choice-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-option {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 12px 18px 12px 12px;
  background: #faf7f0;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}

.choice-option:hover {
  border-color: var(--forest);
}

.choice-option:has(input:checked) {
  background: #e8f3ed;
  border-color: var(--forest);
}

.choice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-letter {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 900;
}

.number-answer > span:first-child {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.number-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: #faf7f0;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.number-input-wrap:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 63, 54, 0.12);
}

.number-input-wrap input {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1.6rem;
  font-weight: 750;
}

.number-input-wrap strong {
  color: var(--ink-soft);
}

.number-answer small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.answer-button {
  width: 100%;
  margin-top: 24px;
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 22px;
  padding: 22px;
  border-radius: 16px;
}

.feedback.correct {
  background: #dff0e7;
  border: 1px solid #8fc6ab;
}

.feedback.incorrect {
  background: #fae5df;
  border: 1px solid #dda18f;
}

.feedback strong {
  font-size: 1.06rem;
}

.feedback p {
  margin: 4px 0 0;
}

.result-section {
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 86px);
  padding-block: 90px;
  text-align: center;
}

.result-score {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin-bottom: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--cream) 76%, transparent 78% 100%),
    conic-gradient(#cf6e46 var(--result), rgba(24, 51, 45, 0.12) 0);
}

.result-score span {
  font-family: Georgia, serif;
  font-size: 3.5rem;
}

.result-section h1 {
  max-width: 800px;
  margin-bottom: 18px;
}

.mistake-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 35px;
  background: var(--coral);
  border-radius: var(--radius-medium);
}

.mistake-overview > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mistake-overview strong {
  font-family: Georgia, serif;
  font-size: 3.6rem;
}

.mistake-list {
  margin-top: 25px;
  border-top: 1px solid var(--line);
}

.mistake-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 22px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.mistake-list h2 {
  margin-bottom: 5px;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.mistake-list p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.empty-state {
  max-width: 650px;
  margin: 20px auto 100px;
  padding: 60px 35px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  color: white;
  background: var(--forest);
  border-radius: 50%;
  font-size: 2rem;
}

.empty-state h2 {
  font-size: 2.2rem;
}

.achievement-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}

.achievement-summary article {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.achievement-summary span,
.achievement-summary small,
.achievement-summary strong {
  display: block;
}

.achievement-summary span,
.achievement-summary small {
  color: var(--ink-soft);
}

.achievement-summary strong {
  margin: 10px 0;
  font-family: Georgia, serif;
  font-size: 3.4rem;
  font-weight: 500;
}

.achievement-summary .progress-track {
  margin-top: 20px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.badge-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 20px;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.badge-card.locked {
  filter: grayscale(1);
  opacity: 0.52;
}

.badge-symbol {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  background: var(--lime);
  border: 1px solid var(--line);
  border-radius: 50% 50% 50% 14px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
}

.badge-card small {
  color: #b55332;
  font-weight: 850;
  text-transform: uppercase;
}

.badge-card h3 {
  margin: 4px 0;
  font-family: Georgia, serif;
  font-size: 1.5rem;
}

.badge-card p {
  margin: 0;
  color: var(--ink-soft);
}

.mobile-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 36, 31, 0.68);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.welcome-card,
.settings-card,
.feedback-card {
  position: relative;
  width: min(510px, 100%);
  max-height: calc(100vh - 40px);
  padding: clamp(28px, 5vw, 48px);
  overflow: auto;
  background: var(--cream);
  border-radius: 34px 34px 34px 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.welcome-card h1,
.settings-card h2,
.feedback-card h2 {
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 0.98;
}

.welcome-card > p:not(.eyebrow),
.settings-card > p:not(.eyebrow),
.feedback-card > p:not(.eyebrow) {
  color: var(--ink-soft);
}

.welcome-card label,
.settings-card label:not(.file-button),
.feedback-card label {
  display: block;
  margin: 24px 0 8px;
  font-weight: 800;
}

.welcome-card input,
.settings-card input,
.feedback-card select,
.feedback-card textarea {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.feedback-card {
  width: min(610px, 100%);
}

.feedback-form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.feedback-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feedback-card label {
  margin: 0;
}

.feedback-card select,
.feedback-card textarea {
  display: block;
  margin-top: 8px;
  font: inherit;
}

.feedback-card textarea {
  min-height: 150px;
  resize: vertical;
}

.welcome-card .primary-button {
  margin-top: 12px;
}

.welcome-card .text-button {
  display: block;
  margin: 15px auto 0;
  color: var(--ink-soft);
}

.welcome-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 170px;
  margin: -15px 0 30px;
}

.welcome-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  color: var(--cream);
  background: var(--forest);
  border-radius: 30px 30px 30px 8px;
  font-family: Georgia, serif;
  font-size: 2.7rem;
}

.paper {
  position: absolute;
  width: 120px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.paper-one {
  background: var(--blue);
  transform: rotate(-18deg) translateX(-55px);
}

.paper-two {
  background: var(--coral);
  transform: rotate(15deg) translateX(55px);
}

.paper-three {
  background: var(--lime);
  transform: rotate(2deg);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  background: rgba(24, 51, 45, 0.08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.settings-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 28px 0;
}

.settings-stats div {
  padding: 15px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.settings-stats strong {
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.settings-stats span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.settings-actions {
  display: grid;
  gap: 9px;
}

.copy-fallback {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.copy-fallback[hidden] {
  display: none;
}

.copy-fallback p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.copy-fallback textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  resize: vertical;
}

.settings-help {
  margin: 16px 0 0;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.file-button {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.privacy-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: grid;
  gap: 10px;
}

.toast {
  max-width: 360px;
  padding: 14px 18px;
  color: white;
  background: var(--forest);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toast-in 220ms ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.noscript-message {
  margin: 30px;
  padding: 20px;
  background: #fbe4df;
  border-radius: 12px;
}

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

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-dashboard {
    min-height: auto;
  }

  .module-grid.compact,
  .module-grid,
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .scene-card-featured {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: 420px;
  }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .glossary-explanation {
    grid-template-columns: 1fr;
  }

  .module-hero-mark {
    opacity: 0.78;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 74px;
  }

  .site-header {
    min-height: 70px;
    padding: 10px 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand small,
  .profile-copy {
    display: none;
  }

  .profile-chip {
    padding: 0;
  }

  .mobile-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px;
    background: rgba(23, 63, 54, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
  }

  .mobile-link {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 7px 3px;
    color: #bad2ca;
    border-radius: 14px;
    font-size: 0.62rem;
    font-weight: 800;
  }

  .mobile-link span {
    font-family: Georgia, serif;
    font-size: 0.9rem;
  }

  .mobile-link.is-active {
    color: var(--forest);
    background: var(--cream);
  }

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

  .hero-section {
    gap: 45px;
    padding-block: 55px;
  }

  .hero-copy h1,
  .page-intro h1,
  .result-section h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .hero-actions,
  .result-actions {
    display: grid;
  }

  .hero-actions button,
  .result-actions button {
    width: 100%;
  }

  .hero-dashboard {
    min-height: 480px;
    padding: 25px;
    border-radius: 32px 32px 32px 9px;
  }

  .level-orbit {
    height: 315px;
  }

  .level-ring {
    width: 210px;
    height: 210px;
  }

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

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

  .scene-card,
  .scene-card-featured {
    grid-column: auto;
    min-height: 300px;
  }

  .module-grid.compact,
  .module-grid,
  .glossary-grid,
  .focus-grid,
  .achievement-summary,
  .badge-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 330px;
  }

  .focus-card {
    min-height: 350px;
    padding: 30px;
  }

  .feedback-invite {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-invite .light-button {
    width: 100%;
  }

  .feedback-field-row {
    grid-template-columns: 1fr;
  }

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

  .module-hero-inner {
    padding-bottom: 50px;
  }

  .module-hero-grid {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .module-hero-mark {
    width: 150px;
    height: 150px;
    font-size: 3.4rem;
  }

  .takeaway-card {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .glossary-detail-card {
    padding: 30px 22px;
    border-radius: 28px 28px 28px 8px;
  }

  .practice-callout,
  .mistake-overview {
    align-items: stretch;
    flex-direction: column;
    padding: 30px 24px;
  }

  .practice-callout button,
  .mistake-overview button {
    width: 100%;
  }

  .practice-header {
    align-items: start;
    flex-direction: column;
  }

  .question-card {
    padding: 28px 20px;
    border-radius: 25px 25px 25px 8px;
  }

  .question-meta,
  .feedback {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback button {
    width: 100%;
  }

  .choice-option {
    grid-template-columns: 36px 1fr;
    padding-right: 12px;
  }

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

  .achievement-summary article:first-child {
    order: -1;
  }

  .badge-card {
    grid-template-columns: 66px 1fr;
    padding: 20px;
  }

  .badge-symbol {
    width: 64px;
    height: 64px;
  }

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

  .settings-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .toast-region {
    right: 14px;
    bottom: 90px;
    left: 14px;
  }

  .toast {
    max-width: none;
  }
}

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