:root {
  color-scheme: light;
  --cream: #fffaf1;
  --ink: #18334f;
  --muted: #586779;
  --blue: #005bbb;
  --yellow: #ffd500;
  --sky: #dbeaff;
  --lavender: #f0e9fb;
  --line: #ccd6df;
  --white: #fffefa;
  --green: #dff5c5;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.page-width { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; left: 16px; top: -80px; padding: 12px 16px; color: white; background: var(--ink); }
.skip-link:focus { top: 12px; }

.lesson-header { height: 96px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 7px; width: max-content; font-size: 2rem; font-weight: 800; letter-spacing: -1.5px; }
.brand-ua { color: var(--blue); background: linear-gradient(transparent 72%, var(--yellow) 72%); }
.brand-dot { color: var(--blue); }
.lesson-progress { display: flex; align-items: center; gap: 13px; font-size: .72rem; font-weight: 800; letter-spacing: 1.2px; }
.progress-track { display: block; width: 90px; height: 6px; border-radius: 10px; background: #e2e7eb; overflow: hidden; }
.progress-track span { display: block; width: 18%; height: 100%; background: var(--blue); border-radius: inherit; }
.back-link { justify-self: end; font-size: .82rem; font-weight: 700; padding: 10px 0; }
.back-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.eyebrow { margin: 0; color: var(--blue); font-size: .75rem; line-height: 1.5; letter-spacing: 1.45px; font-weight: 800; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 25px 0 29px; font-size: clamp(3.2rem, 6vw, 5.65rem); line-height: .98; letter-spacing: -4.5px; }
h2 { margin: 15px 0 20px; font-size: clamp(2.35rem, 4.3vw, 4.25rem); line-height: 1.03; letter-spacing: -2.4px; }
.marker { position: relative; z-index: 0; white-space: nowrap; }
.marker::after { content: ""; position: absolute; z-index: -1; left: -2%; right: -2%; bottom: 5%; height: 24%; border-radius: 50% 10% 35% 15%; background: var(--yellow); transform: rotate(-1deg); }

.lesson-hero { display: grid; grid-template-columns: .96fr 1.04fr; align-items: center; gap: 70px; padding-block: 72px 91px; }
.goal-card { display: flex; gap: 16px; max-width: 570px; padding: 18px 20px; border: 1.5px solid var(--ink); border-radius: 15px; background: var(--white); box-shadow: 0 5px 0 #d9e3ed; }
.goal-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); }
.goal-card p { margin: 0; font-size: .95rem; line-height: 1.55; }
.goal-card strong { display: block; margin-bottom: 3px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 9px 24px; margin-top: 24px; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.hero-meta span::before { content: "✓"; margin-right: 8px; color: var(--blue); font-weight: 800; }

.store-scene { position: relative; min-height: 527px; padding: 39px 25px 12px; border: 1.5px solid var(--ink); border-radius: 170px 170px 27px 27px; background: var(--sky); box-shadow: 9px 9px 0 var(--ink); }
.store-scene svg { display: block; width: 100%; height: auto; }
.scene-sign { position: absolute; z-index: 2; top: 52px; left: 50%; transform: translateX(-50%) rotate(-2deg); padding: 9px 20px 7px; color: white; background: #cf3634; border: 2px solid var(--ink); border-radius: 3px; font-family: Georgia, serif; font-size: .8rem; line-height: 1; text-align: center; letter-spacing: 1px; box-shadow: 3px 3px 0 var(--ink); }
.scene-sticker { position: absolute; z-index: 3; top: 205px; right: -28px; padding: 9px 12px; border: 1px solid var(--ink); border-radius: 7px; background: var(--yellow); font-size: .72rem; font-weight: 700; transform: rotate(7deg); }
.mascot-peek { position: absolute; z-index: 4; left: -45px; bottom: -56px; width: 142px; height: 142px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--lavender); transform: rotate(-8deg); }
.mascot-peek img { width: 155%; height: 155%; margin: -23% 0 0 -22%; object-fit: contain; mix-blend-mode: multiply; }

.scene-section { padding-block: 93px; border-block: 1.5px solid var(--ink); background: var(--yellow); }
.scene-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 90px; align-items: center; }
.section-intro h2 { font-size: clamp(2.5rem, 4.5vw, 4.1rem); }
.section-intro > p:last-child { max-width: 510px; margin: 0; font-size: 1.02rem; line-height: 1.72; }
.dialogue-card { border: 1.5px solid var(--ink); border-radius: 23px; padding: 30px; background: var(--white); box-shadow: 8px 8px 0 var(--ink); }
.speaker-row { display: flex; align-items: center; gap: 12px; }
.speaker-row > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.speaker-row small { color: var(--muted); font-size: .72rem; }
.speaker-avatar { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 14px; background: var(--sky); font-weight: 800; transform: rotate(-5deg); }
.english-line { margin: 25px 0 22px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.12; letter-spacing: -1.7px; font-weight: 800; }
.phrase-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.listen-button, .translate-button, .icon-button { min-height: 47px; border: 1.5px solid var(--ink); border-radius: 11px; background: var(--white); font-size: .83rem; font-weight: 800; }
.listen-button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 11px 17px; box-shadow: 0 3px 0 var(--ink); }
.listen-button:hover, .icon-button:hover { transform: translateY(-1px); }
.listen-button:active, .icon-button:active { transform: translateY(2px); box-shadow: none; }
.listen-button.is-speaking, .icon-button.is-speaking, .variation-list button.is-speaking { color: white; border-color: var(--blue); background: var(--blue); }
.sound-icon { font-family: Arial, sans-serif; letter-spacing: -3px; }
.translate-button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--blue); border-color: #7e9bb9; background: #edf4fb; }
.tap-cue { display: none; padding-left: 3px; color: var(--muted); font-size: .66rem; font-weight: 400; }
.translation { margin: 18px 0 0; padding: 13px 15px; color: #354c61; border-radius: 10px; background: var(--sky); font-size: .9rem; line-height: 1.55; }

.canada-note { padding-block: 95px; color: white; background: var(--blue); }
.canada-note .eyebrow { color: var(--yellow); }
.canada-layout { display: grid; grid-template-columns: 1fr .88fr; align-items: center; gap: 90px; }
.canada-layout > div > p:last-child { max-width: 590px; color: #e5f0ff; font-size: 1.03rem; line-height: 1.72; }
.answer-card { padding: 29px; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 22px; background: var(--yellow); box-shadow: 8px 8px 0 #082f68; transform: rotate(2deg); }
.answer-label { display: inline-block; padding: 6px 8px; border-radius: 5px; background: var(--white); font-size: .7rem; font-weight: 800; letter-spacing: 1px; }
.answer-card > p[lang="en"] { margin: 24px 0 13px; font-size: clamp(2.15rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -1.8px; font-weight: 800; }
.answer-meaning { margin: 0 0 22px; font-size: .88rem; }
.listen-primary { background: var(--ink); color: white; }

.remember-section { padding-block: 98px; }
.remember-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 38px; }
.remember-heading h2 { margin-bottom: 0; }
.remember-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.remember-grid article { min-height: 250px; padding: 27px; border: 1.5px solid var(--ink); border-radius: 19px; }
.remember-grid article:nth-child(1) { background: var(--sky); }
.remember-grid article:nth-child(2) { background: var(--lavender); }
.remember-grid article:nth-child(3) { background: #fff2b2; }
.remember-grid article > span { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--white); font-size: .72rem; font-weight: 800; }
.remember-grid h3 { margin: 29px 0 12px; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.5px; }
.remember-grid p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.65; }

.conversation-section { padding-block: 96px; border-block: 1px solid var(--line); background: #edf3fa; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 38px; }
.section-heading-row > div { max-width: 720px; }
.section-heading-row > p { max-width: 350px; margin: 0 0 4px; color: var(--muted); font-size: .86rem; line-height: 1.6; }
.conversation-list { display: grid; gap: 11px; }
.conversation-line { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 19px 21px; border: 1.5px solid var(--ink); border-radius: 15px; background: var(--white); }
.conversation-line.is-you { margin-left: 7%; background: #fff8cf; }
.line-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: .69rem; font-weight: 800; }
.is-you .line-number { background: var(--blue); }
.conversation-copy .role { color: var(--muted); font-size: .72rem; font-weight: 700; }
.conversation-copy > p:not(.translation) { margin: 5px 0 0; font-size: 1.18rem; line-height: 1.4; font-weight: 800; }
.conversation-copy .translation { margin-top: 9px; }
.line-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 47px; padding: 0; box-shadow: 0 2px 0 var(--ink); font-family: Arial, sans-serif; letter-spacing: -3px; }
.translate-button.compact { min-height: 43px; padding: 9px 12px; font-size: .73rem; }
.speech-status { min-height: 1.4em; margin: 13px 0 0; color: var(--muted); font-size: .75rem; }

.weekly-practice { padding-block: 98px; }
.practice-card { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 480px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 28px; background: var(--lavender); box-shadow: 9px 9px 0 var(--ink); }
.practice-copy { align-self: center; padding: 55px; }
.practice-copy > p:not(.eyebrow):not(.practice-phrase) { max-width: 500px; font-size: 1rem; line-height: 1.65; }
.practice-phrase { margin: 24px 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -1.8px; font-weight: 800; }
.practice-art { position: relative; min-height: 480px; overflow: hidden; background: var(--sky); border-left: 1.5px solid var(--ink); }
.practice-art::before { content: ""; position: absolute; width: 320px; height: 320px; left: 50%; top: 50%; border-radius: 50%; background: var(--yellow); transform: translate(-50%, -50%); }
.practice-art img { position: absolute; z-index: 2; right: -60px; bottom: -95px; width: 410px; height: 410px; object-fit: contain; mix-blend-mode: multiply; }
.receipt { position: absolute; z-index: 3; top: 42px; left: 30px; width: 205px; min-height: 275px; padding: 25px 20px; border: 1.5px solid var(--ink); background: var(--white); box-shadow: 6px 6px 0 var(--ink); transform: rotate(-7deg); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 15px; background: linear-gradient(135deg, transparent 7px, var(--white) 0) 0 0/14px 14px repeat-x; }
.receipt span, .receipt b, .receipt i { display: block; }
.receipt span { font-size: .61rem; letter-spacing: 1.2px; text-align: center; }
.receipt b { margin: 37px 0 13px; font-size: 1.4rem; }
.receipt i { margin: 8px 0; font-style: normal; font-size: .95rem; }
.receipt span:last-child { margin-top: 39px; padding-top: 12px; border-top: 1px dashed var(--ink); color: var(--blue); font-weight: 800; }
.result-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 38px; }
.result-row > div { display: flex; gap: 15px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.result-row > div > span { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-weight: 800; }
.result-row p { margin: 0; font-size: .86rem; line-height: 1.55; }
.result-row strong { display: block; margin-bottom: 3px; color: var(--ink); }

.insight-section { padding-block: 100px; color: white; background: var(--ink); }
.insight-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: start; }
.insight-sticky { position: sticky; top: 30px; }
.insight-sticky .eyebrow { color: var(--yellow); }
.insight-sticky > p:not(.eyebrow) { color: #d8e2eb; font-size: .98rem; line-height: 1.72; }
.insight-callout { display: flex; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #ffffff3d; }
.insight-callout > span { color: var(--yellow); font-size: 1.5rem; }
.insight-callout p { margin: 0; color: #d8e2eb; font-size: .88rem; line-height: 1.6; }
.insight-callout strong { color: white; }
.variations-panel { padding: 29px; border: 1.5px solid white; border-radius: 23px; background: #244764; box-shadow: 8px 8px 0 #0c2032; }
.variations-panel .eyebrow { color: var(--yellow); }
.variations-help { margin: 9px 0 22px; color: #d8e2eb; font-size: .8rem; }
.variation-list { display: grid; gap: 8px; }
.variation-list button { display: grid; grid-template-columns: 1.3fr 1fr 34px; gap: 12px; align-items: center; min-height: 57px; padding: 11px 14px; color: var(--ink); border: 1px solid var(--ink); border-radius: 11px; background: var(--white); text-align: left; }
.variation-list button:hover { background: #fff7c9; }
.variation-list span:first-child { font-size: 1rem; font-weight: 800; }
.variation-list span:nth-child(2) { color: var(--muted); font-size: .77rem; }
.variation-list i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-style: normal; font-family: Arial, sans-serif; font-size: .72rem; letter-spacing: -3px; }
.one-answer { margin-top: 18px; padding: 19px; color: var(--ink); border-radius: 12px; background: var(--yellow); }
.one-answer span, .one-answer strong { display: block; }
.one-answer span { margin-bottom: 8px; font-size: .63rem; letter-spacing: 1px; }
.one-answer strong { font-size: 1.15rem; }

.challenge-section { display: grid; grid-template-columns: .83fr 1.17fr; gap: 22px; padding-block: 100px; }
.summary-card, .challenge-card { border: 1.5px solid var(--ink); border-radius: 24px; }
.summary-card { padding: 39px; background: var(--yellow); }
.summary-card h2 { font-size: clamp(2.3rem, 3.8vw, 3.7rem); }
.summary-card > p:last-child { margin-top: 28px; font-size: .95rem; line-height: 1.65; }
.challenge-card { padding: 39px; background: var(--white); }
.challenge-card h2 { font-size: 2.7rem; }
.challenge-list { display: grid; gap: 10px; margin-top: 26px; }
.challenge-list label { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.challenge-list label:has(input:checked) { background: var(--green); border-color: #839b64; }
.challenge-list input { width: 21px; height: 21px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--blue); }
.challenge-list strong, .challenge-list small { display: block; }
.challenge-list strong { font-size: .87rem; line-height: 1.4; }
.challenge-list small { margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.45; }

.closing-section { overflow: hidden; border-block: 1.5px solid var(--ink); background: var(--sky); }
.closing-inner { min-height: 320px; display: grid; grid-template-columns: 260px 1fr auto; gap: 40px; align-items: center; }
.closing-inner > img { align-self: end; width: 290px; height: 290px; object-fit: contain; mix-blend-mode: multiply; margin-bottom: -35px; }
.closing-inner h2 { margin-bottom: 10px; }
.closing-inner > div > p:last-child { color: var(--muted); font-size: .92rem; }
.closing-listen { background: var(--yellow); }
.lesson-footer { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lesson-footer .wordmark { font-size: 1.7rem; }
.lesson-footer p, .lesson-footer > span { color: var(--muted); font-size: .72rem; }

@media (max-width: 960px) {
  .page-width { width: min(100% - 48px, 760px); }
  .lesson-hero, .scene-layout, .canada-layout, .insight-layout { grid-template-columns: 1fr; }
  .lesson-hero { gap: 70px; }
  .hero-copy { max-width: 690px; }
  .store-scene { width: min(100%, 620px); margin-inline: auto; }
  .scene-layout, .canada-layout, .insight-layout { gap: 45px; }
  .remember-grid { grid-template-columns: 1fr; }
  .remember-grid article { min-height: 0; }
  .section-heading-row { display: block; }
  .section-heading-row > p { max-width: 620px; margin-top: 20px; }
  .practice-card { grid-template-columns: 1fr; }
  .practice-art { border-left: 0; border-top: 1.5px solid var(--ink); }
  .insight-sticky { position: static; }
  .challenge-section { grid-template-columns: 1fr; }
  .closing-inner { grid-template-columns: 210px 1fr; }
  .closing-inner > img { width: 240px; height: 240px; }
  .closing-listen { grid-column: 2; width: max-content; margin: -25px 0 35px; }
}

@media (max-width: 680px) {
  .page-width { width: calc(100% - 36px); }
  .lesson-header { height: 78px; grid-template-columns: 1fr auto; }
  .lesson-header .wordmark { font-size: 1.65rem; }
  .lesson-header .wordmark img { width: 25px; height: 25px; }
  .lesson-progress { display: none; }
  .back-link { font-size: .75rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.5rem); letter-spacing: -3px; }
  h2 { font-size: 2.65rem; letter-spacing: -1.8px; }
  .lesson-hero { padding-block: 47px 75px; gap: 55px; }
  .marker { white-space: normal; }
  .goal-card { padding: 15px; }
  .goal-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .store-scene { min-height: 0; padding: 24px 10px 8px; border-radius: 100px 100px 22px 22px; box-shadow: 6px 6px 0 var(--ink); }
  .scene-sign { top: 30px; padding: 6px 13px 5px; font-size: .58rem; }
  .scene-sticker { top: 36%; right: -13px; font-size: .61rem; }
  .mascot-peek { left: -17px; bottom: -37px; width: 98px; height: 98px; }
  .scene-section, .canada-note, .conversation-section, .insight-section { padding-block: 67px; }
  .dialogue-card { padding: 23px 19px; box-shadow: 6px 6px 0 var(--ink); }
  .english-line { font-size: 2.2rem; }
  .tap-cue { display: inline; }
  .answer-card { padding: 24px 20px; box-shadow: 6px 6px 0 #082f68; }
  .remember-section, .weekly-practice, .challenge-section { padding-block: 70px; }
  .remember-heading { display: block; }
  .remember-grid { gap: 12px; }
  .remember-grid article { padding: 22px; }
  .conversation-line, .conversation-line.is-you { grid-template-columns: 34px minmax(0, 1fr); margin-left: 0; padding: 16px 14px; gap: 12px; }
  .line-number { width: 32px; height: 32px; }
  .conversation-copy > p:not(.translation) { font-size: 1.04rem; }
  .line-actions { grid-column: 2; }
  .translate-button.compact { min-height: 45px; }
  .practice-card { box-shadow: 6px 6px 0 var(--ink); }
  .practice-copy { padding: 35px 24px; }
  .practice-art { min-height: 400px; }
  .practice-art img { width: 330px; height: 330px; right: -65px; bottom: -70px; }
  .receipt { top: 39px; left: 20px; width: 180px; min-height: 250px; }
  .result-row { grid-template-columns: 1fr; }
  .variations-panel { padding: 22px 16px; }
  .variation-list button { grid-template-columns: 1.25fr .9fr 32px; padding-inline: 12px; }
  .summary-card, .challenge-card { padding: 28px 22px; }
  .challenge-card h2 { font-size: 2.35rem; }
  .closing-inner { min-height: 500px; grid-template-columns: 1fr; gap: 0; text-align: center; padding-top: 48px; }
  .closing-inner > img { grid-row: 3; justify-self: center; width: 260px; height: 260px; margin: 0 0 -50px; }
  .closing-listen { grid-column: 1; justify-self: center; margin: 10px 0 0; }
  .lesson-footer { min-height: 150px; flex-wrap: wrap; justify-content: center; padding-block: 28px; text-align: center; }
  .lesson-footer .wordmark { width: 100%; justify-content: center; }
  .lesson-footer p, .lesson-footer > span { margin: 0; }
}

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