/* ---------- Base ---------- */
:root {
  --ink: #18372f;
  --ink-deep: #102c25;
  --green: #173f35;
  --green-light: #295b4d;
  --orange: #ff7849;
  --orange-dark: #e85f31;
  --cream: #f8f6ef;
  --paper: #fffefa;
  --yellow: #f5dfa0;
  --mint: #cfe6d8;
  --peach: #ffd2bd;
  --line: #dedfd5;
  --muted: #64736d;
  --white: #ffffff;
  --danger: #b43b32;
  --shadow: 0 24px 60px rgba(23, 63, 53, 0.12);
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "DM Serif Display", Georgia, serif;
  --radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { letter-spacing: -0.035em; }
p { color: var(--muted); }
button { cursor: pointer; }
button:disabled { cursor: default; }
::selection { color: var(--ink-deep); background: var(--yellow); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 112px 0; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Shared elements ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--green-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow > span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--orange);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 23px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button .icon { width: 20px; height: 20px; transition: transform 180ms ease; }
.button:hover .icon { transform: translateX(3px); }
.button-primary { color: white; background: var(--green); box-shadow: 0 8px 22px rgba(23, 63, 53, 0.18); }
.button-primary:hover { background: var(--ink-deep); box-shadow: 0 12px 28px rgba(23, 63, 53, 0.23); }
.button-dark { color: white; background: var(--ink-deep); }
.button-dark:hover { background: #071c17; }
.button-small { min-height: 44px; padding: 11px 17px; font-size: 14px; border-radius: 10px; }
.mini-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: background 180ms ease, transform 180ms ease;
}
.icon-button:hover { background: var(--cream); transform: translateY(-1px); }
.section-heading { max-width: 700px; margin-bottom: 56px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.centered-eyebrow { justify-content: center; }
.section-heading h2, .lessons-heading h2, .practice-heading h2, .final-card h2 {
  margin-bottom: 20px;
  font-size: clamp(38px, 4.2vw, 56px);
  font-weight: 600;
}
h2 em, h1 em { color: var(--orange-dark); font-family: var(--font-serif); font-weight: 400; }
.section-heading > p:last-child { max-width: 590px; margin: 0 auto; font-size: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  height: 84px;
  background: rgba(248, 246, 239, 0.9);
  border-bottom: 1px solid rgba(23, 63, 53, 0.08);
  backdrop-filter: blur(14px);
}
.header-inner { display: flex; align-items: center; height: 100%; }
.logo {
  display: inline-block;
  color: var(--green);
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 1;
}
.logo span { color: var(--orange); }
.main-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; margin-right: 38px; }
.main-nav a { position: relative; font-size: 14px; font-weight: 600; }
.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-cta { color: white; background: var(--green); }
.menu-toggle { display: none; padding: 8px; border: 0; background: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 92px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 64px; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 660px; margin-bottom: 26px; font-size: clamp(48px, 5.6vw, 76px); font-weight: 600; line-height: 1.04; }
.hero-copy h1 em { position: relative; display: inline-block; }
.hero-copy h1 em::after {
  position: absolute;
  right: 1%;
  bottom: -8px;
  width: 58%;
  height: 10px;
  content: "";
  border-top: 3px solid var(--orange);
  border-radius: 50%;
  transform: rotate(-2deg);
  opacity: 0.75;
}
.hero-lead { max-width: 530px; margin-bottom: 32px; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.text-link span { color: var(--orange-dark); font-size: 18px; transition: transform 180ms ease; }
.text-link:hover span { transform: translateY(3px); }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--muted); font-size: 13px; }
.hero-note strong { color: var(--ink); font-weight: 600; }
.note-check { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--green); background: var(--mint); border-radius: 50%; }
.note-check .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.hero-doodle-one { position: absolute; top: 55px; left: -60px; width: 140px; height: 140px; border: 1px solid rgba(23, 63, 53, 0.09); border-radius: 50%; }

.hero-visual { position: relative; min-height: 540px; display: flex; align-items: center; justify-content: center; }
.visual-shape {
  position: absolute;
  width: 460px;
  height: 460px;
  background: var(--peach);
  border-radius: 48% 52% 43% 57% / 58% 43% 57% 42%;
  transform: rotate(-7deg);
}
.visual-shape::before {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px dashed rgba(23, 63, 53, 0.23);
  border-radius: inherit;
}
.visual-dots {
  position: absolute;
  right: -5px;
  bottom: 30px;
  width: 110px;
  height: 110px;
  opacity: 0.24;
  background-image: radial-gradient(var(--green) 1.6px, transparent 1.6px);
  background-size: 13px 13px;
}
.word-window {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(23, 63, 53, 0.15);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(23, 63, 53, 0.19);
  transform: rotate(1.5deg);
  transition: transform 300ms ease;
}
.word-window:hover { transform: rotate(0deg) translateY(-4px); }
.window-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
.window-dots { display: flex; gap: 5px; }
.window-dots span { width: 7px; height: 7px; background: #d8d9d1; border-radius: 50%; }
.window-dots span:first-child { background: var(--orange); }
.level-badge { justify-self: end; padding: 2px 8px; color: var(--green); background: var(--mint); border-radius: 5px; font-size: 10px; font-weight: 700; }
.word-card { padding: 22px 26px 24px; }
.word-card-heading { display: flex; align-items: center; justify-content: space-between; }
.audio-button { width: 36px; height: 36px; color: var(--green); background: var(--cream); border: 0; }
.audio-button .icon { width: 17px; height: 17px; }
.audio-button.is-speaking .icon, .speaker-inline.is-speaking .icon { animation: soundPulse 700ms ease infinite alternate; }
.word-content { padding: 22px 0 20px; text-align: center; }
.word-category { display: inline-block; margin-bottom: 6px; color: var(--orange-dark); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }
.word-content h2 { margin-bottom: 7px; font-family: var(--font-serif); font-size: 50px; font-weight: 400; letter-spacing: -0.02em; }
.speaker-inline { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; color: var(--muted); border: 0; background: none; font-size: 11px; font-weight: 600; }
.speaker-inline:hover { color: var(--green); }
.speaker-inline .icon { width: 14px; height: 14px; }
.translation-box { display: flex; align-items: center; justify-content: center; min-height: 96px; margin-bottom: 17px; padding: 14px 18px; text-align: center; background: var(--cream); border: 1px dashed #ced2c8; border-radius: 12px; }
.translation-placeholder { color: #929b94; font-family: var(--font-serif); font-size: 19px; font-style: italic; }
.translation-answer { width: 100%; }
.translation-answer > strong { display: block; margin-bottom: 5px; font-size: 18px; }
.translation-answer p { display: flex; flex-direction: column; margin: 0; color: var(--green-light); font-size: 12px; }
.translation-answer small { color: var(--muted); font-size: 11px; }
.button-reveal { width: 100%; min-height: 46px; color: var(--green); background: var(--yellow); font-size: 13px; box-shadow: none; }
.button-reveal:hover { background: #eed083; }
.button-reveal .icon { width: 17px; height: 17px; }
.button-reveal.is-learned { background: var(--mint); }
.word-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 58px; padding: 0 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.word-navigation > span strong { color: var(--ink); }
.flash-dots { display: flex; gap: 4px; }
.flash-dots span { width: 4px; height: 4px; background: #d4d7ce; border-radius: 50%; transition: width 180ms ease, background 180ms ease; }
.flash-dots span.active { width: 12px; background: var(--orange); border-radius: 5px; }
.next-word { display: inline-flex; align-items: center; justify-self: end; gap: 5px; padding: 5px 0; color: var(--green); border: 0; background: none; font-size: 11px; font-weight: 700; }
.next-word .icon { width: 15px; height: 15px; }
.floating-pill { position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 15px; background: var(--paper); border: 1px solid rgba(23, 63, 53, 0.1); border-radius: 100px; box-shadow: 0 12px 25px rgba(23, 63, 53, 0.1); font-size: 12px; font-weight: 700; }
.floating-pill .icon { width: 16px; height: 16px; color: var(--orange-dark); }
.nl-flag { width: 20px; height: 14px; border: 1px solid rgba(23, 63, 53, 0.16); border-radius: 2px; background: linear-gradient(to bottom, #ae1c28 0 33.33%, #fff 33.33% 66.66%, #21468b 66.66%); }
.floating-pill-top { top: 47px; right: -12px; transform: rotate(5deg); }
.floating-pill-bottom { bottom: 40px; left: -14px; transform: rotate(-5deg); }

/* ---------- Phrase strip ---------- */
.phrase-strip { color: white; background: var(--green); }
.phrase-list { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 20px; }
.phrase-list span { display: flex; align-items: baseline; gap: 10px; color: #d4dfd9; font-size: 12px; white-space: nowrap; }
.phrase-list b { color: white; font-family: var(--font-serif); font-size: 20px; font-weight: 400; }
.phrase-list i { color: var(--orange); font-style: normal; }

/* ---------- Method ---------- */
.method-section { padding-bottom: 125px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.method-card { position: relative; min-height: 350px; padding: 30px; overflow: hidden; border: 1px solid rgba(23, 63, 53, 0.08); border-radius: var(--radius); transition: transform 220ms ease, box-shadow 220ms ease; }
.method-card:hover { transform: translateY(-7px) rotate(-0.5deg); box-shadow: 0 18px 36px rgba(23, 63, 53, 0.1); }
.method-card-yellow { background: #f6e8b9; }
.method-card-orange { background: #f8c6ad; }
.method-card-mint { background: #d8e9de; }
.method-number { position: absolute; top: 19px; right: 24px; color: rgba(23, 63, 53, 0.3); font-family: var(--font-serif); font-size: 20px; }
.method-icon { display: flex; align-items: center; justify-content: center; width: 66px; height: 66px; margin-bottom: 38px; background: rgba(255, 255, 255, 0.52); border: 1px solid rgba(23, 63, 53, 0.08); border-radius: 20px; transform: rotate(-5deg); }
.method-icon .icon { width: 30px; height: 30px; stroke-width: 1.5; }
.method-card:nth-child(2) .method-icon { transform: rotate(5deg); }
.method-card h3 { margin-bottom: 12px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.method-card p { margin-bottom: 22px; color: rgba(24, 55, 47, 0.75); font-size: 14px; line-height: 1.7; }
.method-tag { position: absolute; bottom: 27px; left: 30px; font-size: 11px; font-weight: 700; }
.method-tag::before { display: inline-block; width: 5px; height: 5px; margin-right: 7px; content: ""; vertical-align: middle; background: var(--green); border-radius: 50%; }

/* ---------- Lessons ---------- */
.lessons-section { background: #f0eee5; border-top: 1px solid #e5e3da; border-bottom: 1px solid #e5e3da; }
.lessons-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.lessons-heading h2 { margin-bottom: 12px; }
.lessons-heading > div:first-child > p:last-child { max-width: 550px; margin-bottom: 0; }
.progress-summary { display: flex; align-items: center; gap: 13px; min-width: 235px; padding: 14px 17px; background: rgba(255, 255, 255, 0.5); border: 1px solid var(--line); border-radius: 14px; }
.progress-summary > div:last-child { display: flex; flex-direction: column; }
.progress-summary strong { font-size: 13px; }
.progress-summary span { color: var(--muted); font-size: 11px; }
.progress-ring { --progress: 0deg; position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 auto; background: conic-gradient(var(--orange) var(--progress), #dedfd5 0); border-radius: 50%; }
.progress-ring::after { position: absolute; inset: 5px; content: ""; background: #f7f5ee; border-radius: 50%; }
.progress-ring span { position: relative; z-index: 1; color: var(--ink); font-size: 10px; font-weight: 700; }
.lesson-filters { display: flex; gap: 9px; margin-bottom: 28px; flex-wrap: wrap; }
.filter-button { padding: 9px 15px; color: var(--muted); background: transparent; border: 1px solid #d5d6cd; border-radius: 100px; font-size: 12px; font-weight: 600; transition: all 180ms ease; }
.filter-button:hover { color: var(--ink); border-color: var(--ink); }
.filter-button.active { color: white; background: var(--green); border-color: var(--green); }
.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lesson-card { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 24px; overflow: hidden; background: var(--paper); border: 1px solid #dedfd5; border-radius: 18px; transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.lesson-card:hover { border-color: #b7beb5; box-shadow: 0 14px 35px rgba(23, 63, 53, 0.09); transform: translateY(-5px); }
.lesson-card[hidden] { display: none; }
.lesson-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.lesson-illustration { display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; border-radius: 17px; font-size: 29px; transform: rotate(-3deg); }
.lesson-card:nth-child(even) .lesson-illustration { transform: rotate(3deg); }
.lesson-illustration .icon { width: 28px; height: 28px; stroke-width: 1.5; }
.lesson-illustration.yellow { background: #f8e9b9; }
.lesson-illustration.peach { background: #fbd6c3; }
.lesson-illustration.mint { background: #d8e9de; }
.lesson-illustration.blue { background: #dce6ec; }
.lesson-illustration.lilac { background: #e6deec; }
.lesson-illustration.rose { background: #f2d8d4; }
.lesson-level { padding: 4px 9px; color: var(--muted); background: var(--cream); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; font-weight: 700; }
.lesson-card h3 { margin-bottom: 9px; font-size: 21px; font-weight: 600; letter-spacing: -0.025em; }
.lesson-card > p { margin-bottom: 24px; font-size: 13px; line-height: 1.65; }
.lesson-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 17px; border-top: 1px solid #ecece5; }
.lesson-details { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.lesson-details span { display: flex; align-items: center; gap: 4px; }
.lesson-details .icon { width: 13px; height: 13px; }
.lesson-start { display: inline-flex; align-items: center; gap: 4px; padding: 5px 0; color: var(--green); background: none; border: 0; font-size: 11px; font-weight: 700; }
.lesson-start .icon { width: 16px; height: 16px; transition: transform 180ms ease; }
.lesson-start:hover .icon { transform: translateX(3px); }
.lesson-complete-badge { position: absolute; top: 76px; right: 23px; display: inline-flex; align-items: center; gap: 4px; color: var(--green-light); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.lesson-complete-badge .icon { width: 13px; height: 13px; }
.empty-filter { grid-column: 1 / -1; padding: 40px; text-align: center; }
.noscript-message { padding: 20px; background: var(--yellow); border-radius: 12px; }

/* ---------- Practice ---------- */
.practice-section { padding-bottom: 90px; }
.practice-shell { position: relative; padding: 56px; overflow: hidden; color: white; background: var(--green); border-radius: 30px; }
.practice-decoration { position: absolute; top: -118px; right: -15px; color: rgba(255, 255, 255, 0.035); font-family: var(--font-serif); font-size: 430px; line-height: 1; pointer-events: none; }
.practice-heading { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
.practice-heading h2 { margin: 0; }
.practice-heading h2 em { color: var(--orange); }
.eyebrow-light { color: #c7d7d0; }
.practice-heading > p { max-width: 330px; margin: 0 0 6px; color: #b6c8c0; font-size: 14px; }
.practice-grid { position: relative; display: grid; grid-template-columns: 1.4fr 0.85fr; gap: 22px; }
.quiz-card { min-height: 480px; padding: 30px; color: var(--ink); background: var(--paper); border-radius: 20px; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.quiz-step { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; }
.quiz-score { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.quiz-score .icon { width: 14px; height: 14px; color: var(--orange-dark); }
.quiz-progress { height: 4px; margin-bottom: 30px; overflow: hidden; background: #e9eae3; border-radius: 10px; }
.quiz-progress span { display: block; width: 20%; height: 100%; background: var(--orange); border-radius: inherit; transition: width 300ms ease; }
.quiz-instruction { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
.quiz-card h3 { min-height: 58px; margin-bottom: 23px; font-size: 26px; font-weight: 600; letter-spacing: -0.025em; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-option { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 11px 14px; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.quiz-option:not(:disabled):hover { background: var(--cream); border-color: var(--green-light); transform: translateY(-1px); }
.option-letter { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; flex: 0 0 auto; color: var(--muted); background: var(--cream); border: 1px solid #e0e2da; border-radius: 6px; font-size: 10px; }
.quiz-option.correct { color: #205c42; background: #e2f1e7; border-color: #70a88a; }
.quiz-option.correct .option-letter { color: white; background: #428164; border-color: #428164; }
.quiz-option.wrong { color: var(--danger); background: #f9e7e3; border-color: #d8998d; }
.quiz-option.wrong .option-letter { color: white; background: var(--danger); border-color: var(--danger); }
.quiz-option.dimmed { opacity: 0.52; }
.quiz-feedback { margin-top: 15px; padding: 11px 14px; color: var(--green-light); background: #edf4ee; border-radius: 9px; font-size: 11px; line-height: 1.5; }
.quiz-feedback strong { color: var(--ink); }
.quiz-feedback.error { color: #8e4339; background: #fbede9; }
.quiz-next { min-height: 42px; margin-top: 14px; margin-left: auto; padding: 10px 15px; color: white; background: var(--green); font-size: 11px; }
.quiz-next:not([hidden]) { display: flex; }
.quiz-finished { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 335px; text-align: center; }
.finish-icon { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; margin-bottom: 18px; color: var(--green); background: var(--yellow); border-radius: 50%; transform: rotate(-7deg); }
.finish-icon .icon { width: 32px; height: 32px; }
.quiz-finished h3 { min-height: 0; margin-bottom: 9px; font-family: var(--font-serif); font-size: 34px; font-weight: 400; }
.quiz-finished p { margin-bottom: 22px; font-size: 13px; }
.quiz-finished .button { min-height: 44px; font-size: 12px; }

.stats-card { padding: 28px; color: var(--ink); background: #eef0e5; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px; }
.stats-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.stats-heading h3 { margin: 3px 0 0; font-size: 23px; font-weight: 600; }
.stats-spark { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; color: var(--green); background: var(--yellow); border-radius: 12px; transform: rotate(7deg); }
.stats-spark .icon { width: 20px; height: 20px; }
.streak-box { display: flex; align-items: center; gap: 12px; padding: 15px; background: var(--paper); border: 1px solid #dde0d4; border-radius: 13px; }
.streak-icon { display: flex; align-items: center; justify-content: center; width: 43px; height: 43px; color: var(--orange-dark); background: #fee4d4; border-radius: 50%; }
.streak-icon .icon { width: 25px; height: 25px; }
.streak-box > div { display: flex; flex-direction: column; line-height: 1.2; }
.streak-box strong { font-size: 23px; }
.streak-box > div span { color: var(--muted); font-size: 10px; }
.streak-message { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 23px 0; }
.stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; border-right: 1px solid #d7dbd0; }
.stat-item:last-child { border: 0; }
.stat-item strong { font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.stat-item span { max-width: 65px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.daily-goal { padding-top: 18px; border-top: 1px solid #d7dbd0; }
.daily-goal > div:first-child { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 10px; }
.daily-goal > div:first-child span { color: var(--muted); }
.goal-track { height: 6px; overflow: hidden; background: #d8dcd1; border-radius: 10px; }
.goal-track span { display: block; width: 0; height: 100%; background: var(--orange); border-radius: inherit; transition: width 500ms ease; }
.daily-goal p { margin: 9px 0 0; font-size: 9px; }
.local-note { display: flex; align-items: center; gap: 5px; margin: 19px 0 0; color: #7a867e; font-size: 9px; }
.local-note .icon { width: 12px; height: 12px; }

/* ---------- Final CTA and footer ---------- */
.final-section { padding-top: 30px; }
.final-card { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 360px; padding: 55px 62px; overflow: hidden; background: var(--orange); border-radius: 28px; }
.final-copy { position: relative; z-index: 2; }
.final-card .eyebrow { color: var(--ink-deep); }
.final-card .eyebrow > span { background: var(--ink-deep); }
.final-card h2 { margin-bottom: 14px; color: var(--ink-deep); font-size: clamp(37px, 4vw, 52px); }
.final-card h2 em { color: var(--ink-deep); }
.final-card p:not(.eyebrow) { margin-bottom: 25px; color: rgba(16, 44, 37, 0.75); font-size: 14px; }
.final-illustration { position: relative; min-height: 250px; }
.sun-shape { position: absolute; top: 20px; right: 30px; width: 210px; height: 210px; background: var(--yellow); border: 2px solid var(--ink-deep); border-radius: 50%; }
.sun-shape::before, .sun-shape::after, .sun-shape span::before, .sun-shape span::after { position: absolute; top: 50%; left: 50%; width: 290px; height: 2px; content: ""; background: var(--ink-deep); transform: translate(-50%, -50%); }
.sun-shape::after { transform: translate(-50%, -50%) rotate(45deg); }
.sun-shape span::before { transform: translate(-50%, -50%) rotate(90deg); }
.sun-shape span::after { transform: translate(-50%, -50%) rotate(135deg); }
.speech-bubble { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; color: var(--ink-deep); background: var(--paper); border: 2px solid var(--ink-deep); font-family: var(--font-serif); box-shadow: 6px 6px 0 var(--ink-deep); }
.speech-bubble::after { position: absolute; bottom: -14px; left: 30px; width: 20px; height: 20px; content: ""; background: var(--paper); border-right: 2px solid var(--ink-deep); border-bottom: 2px solid var(--ink-deep); transform: rotate(45deg); }
.bubble-one { top: 25px; left: 10px; width: 145px; height: 80px; border-radius: 45% 55% 48% 52%; font-size: 38px; transform: rotate(-9deg); }
.bubble-two { right: 0; bottom: 15px; width: 120px; height: 65px; border-radius: 52% 48% 55% 45%; font-size: 27px; transform: rotate(8deg); }
.final-squiggle { position: absolute; right: 20px; bottom: -10px; width: 150px; fill: none; stroke: var(--ink-deep); stroke-width: 2; stroke-linecap: round; }
.site-footer { padding: 35px 0 42px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-logo { font-size: 27px; }
.footer-inner > div p { margin: 8px 0 0; font-size: 11px; }
.footer-inner nav { display: flex; gap: 25px; font-size: 11px; font-weight: 600; }
.footer-inner nav a:hover { color: var(--orange-dark); }
.footer-bottom { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid #e8e7df; font-size: 10px; text-align: center; }
.footer-bottom span { color: var(--orange-dark); }

/* ---------- Lesson dialog ---------- */
.lesson-dialog { width: min(660px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; overflow: auto; color: var(--ink); background: var(--paper); border: 0; border-radius: 22px; box-shadow: 0 35px 100px rgba(5, 27, 21, 0.35); }
.lesson-dialog::backdrop { background: rgba(9, 31, 25, 0.72); backdrop-filter: blur(5px); }
.lesson-dialog[open] { animation: dialogIn 220ms ease both; }
.dialog-shell { min-height: 540px; display: flex; flex-direction: column; }
.dialog-topbar { display: flex; align-items: center; justify-content: space-between; padding: 19px 24px 15px; }
.dialog-topbar > div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.dialog-level { padding: 3px 8px; color: var(--green); background: var(--mint); border-radius: 5px; font-size: 10px; font-weight: 700; }
.dialog-close { width: 36px; height: 36px; }
.dialog-close .icon { width: 18px; height: 18px; }
.dialog-progress { height: 4px; background: #e8eae2; }
.dialog-progress span { display: block; width: 25%; height: 100%; background: var(--orange); transition: width 300ms ease; }
.dialog-content { flex: 1; padding: 34px 40px 25px; }
.dialog-content h2 { margin-bottom: 10px; font-size: 32px; font-weight: 600; }
.dialog-prompt { margin-bottom: 25px; color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.45; }
.dialog-options { display: grid; gap: 10px; }
.dialog-option { display: flex; align-items: center; gap: 13px; min-height: 55px; padding: 12px 15px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-weight: 600; transition: all 160ms ease; }
.dialog-option:not(:disabled):hover { background: var(--cream); border-color: var(--green-light); }
.dialog-option .option-letter { width: 28px; height: 28px; }
.dialog-option.correct { color: #205c42; background: #e2f1e7; border-color: #70a88a; }
.dialog-option.correct .option-letter { color: white; background: #428164; border-color: #428164; }
.dialog-option.wrong { color: var(--danger); background: #f9e7e3; border-color: #d8998d; }
.dialog-option.wrong .option-letter { color: white; background: var(--danger); border-color: var(--danger); }
.dialog-option.dimmed { opacity: 0.52; }
.dialog-feedback { margin-top: 17px; padding: 13px 15px; color: var(--green-light); background: #edf4ee; border-radius: 10px; font-size: 12px; }
.dialog-feedback.error { color: #8e4339; background: #fbede9; }
.dialog-feedback strong { display: block; margin-bottom: 2px; color: var(--ink); }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 14px 40px; background: #f7f6f0; border-top: 1px solid #e5e6dd; }
.dialog-footer > span { color: var(--muted); font-size: 11px; }
.dialog-footer .button { min-height: 44px; padding: 11px 18px; font-size: 12px; }
.dialog-footer .button:not([hidden]) { display: inline-flex; }
.dialog-listen { display: inline-flex; align-items: center; gap: 8px; margin: -9px 0 20px; padding: 9px 13px; color: var(--green); background: var(--cream); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 700; }
.dialog-listen .icon { width: 17px; height: 17px; }
.lesson-intro-copy { margin-bottom: 22px; font-size: 13px; }
.vocab-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.vocab-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 67px; padding: 10px 11px 10px 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 11px; }
.vocab-item > div { display: flex; flex-direction: column; min-width: 0; }
.vocab-item strong { font-size: 13px; line-height: 1.35; }
.vocab-item span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.vocab-audio { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; padding: 0; color: var(--green); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; }
.vocab-audio:hover { background: var(--yellow); }
.vocab-audio .icon { width: 14px; height: 14px; }
.lesson-finish { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 335px; text-align: center; }
.lesson-finish .finish-icon { width: 76px; height: 76px; }
.lesson-finish h2 { margin-bottom: 10px; font-family: var(--font-serif); font-size: 40px; font-weight: 400; }
.lesson-finish > p { max-width: 390px; margin-bottom: 20px; font-size: 14px; }
.lesson-result { display: flex; gap: 12px; margin-bottom: 24px; }
.lesson-result div { min-width: 100px; padding: 12px 18px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; }
.lesson-result strong { display: block; font-family: var(--font-serif); font-size: 28px; font-weight: 400; }
.lesson-result span { color: var(--muted); font-size: 10px; }
.lesson-finish-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lesson-finish-actions .button { min-height: 44px; font-size: 12px; }
.button-secondary { color: var(--green); background: transparent; border: 1px solid var(--line); box-shadow: none; }

/* ---------- Header account and XP ---------- */
.site-header { position: sticky; top: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.xp-counter { display: flex; align-items: center; gap: 5px; height: 44px; padding: 0 13px; color: var(--ink); background: var(--yellow); border: 1px solid rgba(23, 63, 53, 0.1); border-radius: 11px; font-size: 12px; line-height: 1; }
.xp-counter .icon { width: 17px; height: 17px; color: var(--orange-dark); }
.xp-counter strong { font-size: 15px; }
.xp-counter.bump { animation: xpBump 300ms ease; }
.account-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 13px 5px 6px; color: var(--green); background: var(--paper); border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 700; transition: border-color 180ms ease, transform 180ms ease; }
.account-button:hover { border-color: var(--green-light); transform: translateY(-1px); }
.account-avatar { display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; color: white; background: var(--green); border-radius: 8px; font-size: 12px; }
.account-avatar .icon { width: 17px; height: 17px; }
.account-button.connected .account-avatar { color: var(--ink); background: var(--orange); }
.install-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 13px; color: white; background: var(--green); border: 0; border-radius: 11px; font-size: 12px; font-weight: 700; transition: transform 180ms ease, background 180ms ease; }
.install-button:hover { background: var(--ink-deep); transform: translateY(-1px); }
.install-button[hidden] { display: none; }
.install-button .icon { width: 17px; height: 17px; }

/* ---------- Revision cheat sheets ---------- */
.cheatsheet-section { background: var(--cream); }
.cheatsheet-section .section-heading { max-width: 750px; }
.cheatsheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }
.cheat-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.cheat-card[open] { border-color: #b8c4ba; box-shadow: 0 12px 28px rgba(23, 63, 53, 0.06); }
.cheat-card summary { display: flex; align-items: center; gap: 15px; min-height: 85px; padding: 18px 20px; cursor: pointer; list-style: none; }
.cheat-card summary::-webkit-details-marker { display: none; }
.cheat-card summary > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.cheat-card summary small { color: var(--orange-dark); font-size: 9px; font-weight: 700; letter-spacing: 0.11em; }
.cheat-card summary strong { font-size: 17px; }
.cheat-card summary > .icon { width: 18px; height: 18px; margin-left: auto; color: var(--muted); transition: transform 180ms ease; }
.cheat-card[open] summary > .icon { transform: rotate(90deg); }
.cheat-number { display: flex; align-items: center; justify-content: center; width: 41px; height: 41px; flex: 0 0 auto; color: var(--green); background: var(--cream); border-radius: 11px; font-family: var(--font-serif); font-size: 18px; }
.cheat-card[open] .cheat-number { background: var(--yellow); }
.cheat-content { padding: 0 22px 22px 76px; color: var(--muted); font-size: 12px; }
.cheat-content p { margin-bottom: 12px; color: var(--muted); }
.cheat-content p:last-child { margin-bottom: 0; }
.cheat-content strong { color: var(--ink); }
.cheat-content mark { padding: 1px 3px; color: var(--ink); background: var(--yellow); border-radius: 3px; }
.cheat-tip { margin-top: 15px; padding: 11px 13px; color: var(--green-light); background: #edf3e9; border-left: 3px solid var(--orange); border-radius: 7px; font-size: 11px; }
.tp-list { margin: 0; padding-left: 18px; color: var(--ink); line-height: 1.9; }
.pronoun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; color: var(--ink); font-weight: 600; }

/* ---------- Rule callout ---------- */
.rule-callout { margin-bottom: 20px; padding: 15px 17px; background: #f8edc5; border: 1px solid #ead9a5; border-radius: 12px; }
.rule-callout > span { display: block; margin-bottom: 5px; color: var(--orange-dark); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; }
.rule-callout p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.65; }

/* ---------- Account dialog ---------- */
.account-dialog { width: min(510px, calc(100% - 30px)); max-height: calc(100dvh - 30px); padding: 0; overflow: auto; color: var(--ink); background: var(--paper); border: 0; border-radius: 22px; box-shadow: 0 35px 100px rgba(5, 27, 21, 0.35); }
.account-dialog::backdrop { background: rgba(9, 31, 25, 0.72); backdrop-filter: blur(5px); }
.account-dialog[open] { animation: dialogIn 220ms ease both; }
.account-shell { position: relative; padding: 32px; }
.account-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; }
.account-close .icon { width: 18px; height: 18px; }
.account-heading { padding-right: 25px; }
.account-heading-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 22px; color: var(--green); background: var(--yellow); border-radius: 14px; transform: rotate(-5deg); }
.account-heading-icon .icon { width: 25px; height: 25px; }
.account-heading .eyebrow { margin-bottom: 10px; font-size: 9px; }
.account-heading h2 { margin-bottom: 10px; font-size: 30px; font-weight: 600; }
.account-heading > p:last-child { margin-bottom: 23px; font-size: 12px; line-height: 1.65; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 23px; padding: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 11px; }
.auth-tab { min-height: 39px; padding: 8px 10px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; }
.auth-tab.active { color: var(--ink); background: var(--paper); box-shadow: 0 2px 8px rgba(23, 63, 53, 0.08); }
.auth-form { display: flex; flex-direction: column; }
.auth-form[hidden] { display: none; }
.auth-form label { margin: 0 0 6px; font-size: 11px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 47px; margin-bottom: 15px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 9px; outline: none; font-size: 13px; }
.auth-form input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.09); }
.auth-form input::placeholder { color: #9aa29d; }
.field-help { margin: -10px 0 15px; color: var(--muted); font-size: 10px; }
.form-feedback { margin: -2px 0 14px; padding: 10px 12px; color: #8e4339; background: #fbede9; border-radius: 8px; font-size: 11px; }
.auth-submit { width: 100%; min-height: 47px; font-size: 12px; }
.auth-submit[disabled] { opacity: 0.65; }
.auth-privacy { display: flex; align-items: flex-start; gap: 7px; margin: 18px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.auth-privacy .icon { width: 13px; height: 13px; margin-top: 1px; }
.profile-identity { display: flex; align-items: center; gap: 13px; padding: 15px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; }
.profile-avatar { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 auto; color: var(--ink); background: var(--orange); border-radius: 13px; font-family: var(--font-serif); font-size: 24px; }
.profile-identity > div { display: flex; flex-direction: column; min-width: 0; }
.profile-identity strong { font-size: 16px; }
.profile-identity span:not(.profile-avatar) { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.profile-stats > div { padding: 17px; text-align: center; background: #f6e8b9; border-radius: 12px; }
.profile-stats > div:last-child { background: #d8e9de; }
.profile-stats strong { display: block; font-family: var(--font-serif); font-size: 28px; font-weight: 400; }
.profile-stats span { color: var(--muted); font-size: 10px; }
.account-sync-status { display: flex; align-items: center; gap: 7px; margin: 17px 0; color: var(--green-light); font-size: 10px; }
.account-sync-status .icon { width: 15px; height: 15px; }
.account-sync-status.error { color: var(--danger); }
.logout-button { width: 100%; min-height: 44px; font-size: 11px; }

@keyframes xpBump { 50% { transform: scale(1.1) rotate(-2deg); } }

/* ---------- Toast and motion ---------- */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 48px); padding: 14px 18px; color: white; background: var(--ink-deep); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; box-shadow: 0 15px 40px rgba(5, 27, 21, 0.25); font-size: 12px; font-weight: 600; animation: toastIn 220ms ease both; }
.toast[hidden] { display: none; }
.toast .icon { width: 18px; height: 18px; color: var(--orange); }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 650ms ease, transform 650ms ease; }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .reveal-delay-short { transition-delay: 90ms; }
.js .reveal-delay { transition-delay: 160ms; }
@keyframes soundPulse { to { transform: scale(1.16); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .hero-grid { gap: 32px; }
  .hero-copy h1 { font-size: 59px; }
  .visual-shape { width: 400px; height: 420px; }
  .floating-pill-top { right: -3px; }
  .floating-pill-bottom { left: -3px; }
  .phrase-list { gap: 12px; }
  .phrase-list span { flex-direction: column; align-items: center; gap: 0; }
  .practice-shell { padding: 42px; }
  .practice-grid { grid-template-columns: 1.25fr 0.85fr; }
  .quiz-card { padding: 25px; }
  .streak-message { display: none; }
  .final-card { padding: 50px; }
  .sun-shape { right: 0; width: 180px; height: 180px; }
}

@media (max-width: 850px) {
  .section { padding: 85px 0; }
  .main-nav { gap: 22px; margin-right: 24px; }
  .hero { padding-top: 55px; }
  .hero-grid { grid-template-columns: 1fr; gap: 45px; }
  .hero-copy { max-width: 670px; text-align: center; margin-inline: auto; }
  .hero-copy .eyebrow, .hero-actions, .hero-note { justify-content: center; }
  .hero-copy h1 { max-width: none; font-size: clamp(52px, 9vw, 72px); }
  .hero-lead { margin-inline: auto; }
  .hero-visual { width: min(100%, 570px); min-height: 530px; margin-inline: auto; }
  .visual-shape { width: 460px; height: 450px; }
  .word-window { width: 420px; }
  .floating-pill-top { right: 10px; }
  .floating-pill-bottom { left: 10px; }
  .method-grid { gap: 14px; }
  .method-card { min-height: 375px; padding: 24px; }
  .method-tag { left: 24px; }
  .lessons-heading { align-items: flex-start; }
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .practice-heading { align-items: flex-start; }
  .practice-grid { grid-template-columns: 1fr; }
  .stats-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
  .stats-heading { grid-column: 1 / -1; }
  .stats-grid { align-items: center; }
  .daily-goal { padding-top: 15px; }
  .local-note { grid-column: 1 / -1; justify-content: center; }
  .final-card { grid-template-columns: 1fr 0.7fr; padding: 45px; }
  .bubble-one { left: -15px; width: 120px; height: 70px; font-size: 31px; }
  .bubble-two { width: 100px; }
}

@media (max-width: 650px) {
  .container { width: min(100% - 32px, 520px); }
  .section { padding: 72px 0; }
  .site-header { height: 72px; }
  .logo { font-size: 28px; }
  .header-cta { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav { position: absolute; top: 64px; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 8px; }
  .main-nav a:hover { background: var(--cream); }
  .main-nav a::after { display: none; }
  .hero { padding: 48px 0 60px; }
  .hero-copy { text-align: left; }
  .hero-copy .eyebrow, .hero-actions, .hero-note { justify-content: flex-start; }
  .hero-copy h1 { font-size: clamp(44px, 13vw, 62px); }
  .hero-copy h1 em::after { bottom: -10px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-actions .button { width: 100%; }
  .hero-note { align-items: flex-start; font-size: 11px; }
  .note-check { flex: 0 0 auto; }
  .hero-visual { min-height: 480px; }
  .visual-shape { width: 360px; height: 390px; max-width: 100%; }
  .word-window { width: calc(100% - 20px); }
  .word-card { padding: 20px; }
  .word-content { padding: 15px 0; }
  .word-content h2 { font-size: 44px; }
  .floating-pill { font-size: 10px; }
  .floating-pill-top { top: 12px; right: -3px; }
  .floating-pill-bottom { bottom: 6px; left: -3px; }
  .phrase-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 17px 0; }
  .phrase-list span { align-items: flex-start; padding: 10px 8px; white-space: normal; }
  .phrase-list b { font-size: 18px; }
  .phrase-list i { display: none; }
  .section-heading { margin-bottom: 35px; text-align: left; }
  .section-heading.centered { text-align: left; }
  .centered-eyebrow { justify-content: flex-start; }
  .centered-eyebrow span:last-child { display: none; }
  .section-heading h2, .lessons-heading h2, .practice-heading h2, .final-card h2 { font-size: 39px; }
  .section-heading > p:last-child { font-size: 15px; }
  .method-grid { grid-template-columns: 1fr; gap: 15px; }
  .method-card { min-height: 310px; }
  .method-icon { margin-bottom: 28px; }
  .method-section { padding-bottom: 75px; }
  .lessons-heading { flex-direction: column; margin-bottom: 27px; }
  .progress-summary { width: 100%; }
  .lesson-filters { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; }
  .lesson-filters::-webkit-scrollbar { display: none; }
  .filter-button { flex: 0 0 auto; }
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-card { min-height: 280px; }
  .practice-section { padding-top: 60px; }
  .practice-section .container { width: calc(100% - 20px); }
  .practice-shell { padding: 34px 16px 16px; border-radius: 24px; }
  .practice-heading { flex-direction: column; gap: 15px; padding-inline: 8px; }
  .practice-heading > p { font-size: 13px; }
  .practice-decoration { font-size: 300px; }
  .quiz-card { min-height: 500px; padding: 23px 18px; }
  .quiz-topline { align-items: flex-start; }
  .quiz-score { max-width: 100px; text-align: right; }
  .quiz-card h3 { font-size: 23px; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-option { min-height: 49px; }
  .stats-card { display: block; padding: 24px; }
  .streak-message { display: inline; }
  .stats-grid { padding: 23px 0; }
  .daily-goal { padding-top: 18px; }
  .final-section { padding-top: 15px; }
  .final-card { grid-template-columns: 1fr; padding: 38px 28px; }
  .final-card .button { width: 100%; }
  .final-illustration { min-height: 245px; margin-top: 25px; }
  .sun-shape { top: 20px; right: 35px; width: 170px; height: 170px; }
  .bubble-one { left: 10px; }
  .bubble-two { right: 5px; bottom: 5px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-inner nav { justify-content: center; flex-wrap: wrap; }
  .footer-bottom { grid-column: 1; }
  .lesson-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 17px; }
  .dialog-shell { min-height: 550px; }
  .dialog-content { padding: 28px 22px 22px; }
  .dialog-content h2 { font-size: 27px; }
  .dialog-prompt { font-size: 18px; }
  .dialog-footer { padding: 14px 22px; }
  .dialog-footer .button { padding-inline: 14px; }
  .toast { right: 16px; bottom: 16px; max-width: calc(100% - 32px); }
}

@media (max-width: 380px) {
  .hero-copy h1 { font-size: 42px; }
  .word-card { padding-inline: 16px; }
  .word-content h2 { font-size: 39px; }
  .floating-pill-top { right: 0; }
  .floating-pill-bottom { left: 0; }
  .window-topbar { padding-inline: 12px; }
  .mini-label { font-size: 9px; }
  .streak-message { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 400px) {
  .vocab-list { grid-template-columns: 1fr; }
  .vocab-item { min-height: 58px; }
}

@media (max-width: 950px) {
  .account-button #account-label { display: none; }
  .account-button { padding-right: 6px; }
}

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

@media (max-width: 650px) {
  .header-actions { gap: 7px; margin-left: auto; margin-right: 5px; }
  .xp-counter { height: 40px; padding: 0 9px; }
  .xp-counter .icon { width: 15px; height: 15px; }
  .account-button { min-height: 40px; background: transparent; }
  .install-button span { display: none; }
  .install-button { min-height: 40px; padding-inline: 10px; }
  .account-avatar { width: 29px; height: 29px; }
  .main-nav { margin-left: 0; }
  .cheat-card summary { min-height: 75px; padding: 15px; }
  .cheat-content { padding: 0 18px 20px; }
  .account-shell { padding: 26px 22px; }
  .account-heading h2 { font-size: 27px; }
}

@media (max-width: 380px) {
  .xp-counter { gap: 3px; padding-inline: 7px; }
  .xp-counter strong { font-size: 13px; }
  .header-actions { gap: 4px; margin-right: 1px; }
  .profile-stats > div { padding-inline: 10px; }
}
