:root {
  --primary: #674bff;
  --primary-dark: #4f35d2;
  --primary-light: #eee9ff;
  --accent: #42d6c5;
  --accent-hl: #6ff0e0;
  --bg: #f8f6ff;
  --surface: #ffffff;
  --text: #171342;
  --text-2: #6c6685;
  --border: #ddd4f1;
  --phone: #1b1740;
  --speaking: #625bf6;
  --speaking-bg: #f0efff;
  --listening: #d18400;
  --listening-bg: #fff5df;
  --reading: #18a999;
  --reading-bg: #eafbf8;
  --grammar: #ff7a72;
  --grammar-bg: #fff0ef;
  --vocab: #3b82f6;
  --vocab-bg: #ebf3ff;
  --gold: #c77800;
  --gold-bg: #fff3c4;
  --correction: #1f8f55;
  --suggest: #b7791f;
  --radius: 20px;
  --max: 1120px;
  --ease-out: cubic-bezier(.2, .7, .25, 1);
  interpolate-size: allow-keywords;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 246, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(221, 212, 241, 0.6);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--primary); }
.nav a.btn, .nav a.btn:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(103, 75, 255, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-light { background: #fff; color: var(--text); box-shadow: 0 8px 22px rgba(10, 6, 40, 0.3); }
.btn-light svg { width: 18px; height: 18px; fill: var(--primary); }
.btn-light.is-playing svg { fill: var(--accent); }

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px 12px 18px;
  background: #0f0b2e;
  color: #fff;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(15, 11, 46, 0.3);
}
.play-btn:hover { transform: translateY(-2px); }
.play-btn svg { width: 28px; height: 28px; flex: none; }
.play-btn span { display: flex; flex-direction: column; line-height: 1.15; }
.play-btn small { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.play-btn strong { font-size: 1.2rem; font-weight: 500; }

/* ---------- Shared type ---------- */
.kicker {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hl { color: var(--primary); }
.blob { position: absolute; border-radius: 50%; filter: blur(8px); pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  color: #fff;
  background: radial-gradient(120% 70% at 85% 10%, #8a73ff 0%, #674bff 38%, #4f35d2 100%);
}
.hero-blob-1 { width: 520px; height: 520px; left: -200px; top: 46%; background: rgba(66, 214, 197, 0.35); }
.hero-blob-2 { width: 640px; height: 640px; right: -300px; bottom: -360px; background: rgba(255, 255, 255, 0.08); }
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  padding-top: 64px;
}
.hero-copy { padding-bottom: 88px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.85rem;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 20px 0 18px;
}
.hero .hl { color: var(--accent-hl); }
.hero p.lead {
  font-size: 1.2rem;
  max-width: 470px;
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero-note { font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); }
.hero-art { position: relative; align-self: stretch; min-height: 640px; }
.hero-ellie {
  position: absolute;
  right: -48px;
  top: 0;
  width: 330px;
  transform: scaleX(-1);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 96%);
  animation: ellie-float 6s ease-in-out infinite;
}
.hero-phone { position: absolute; left: 8px; bottom: 0; z-index: 1; }
.hero-phone .screen { height: 500px; }

@keyframes ellie-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* ---------- Phone mockup ---------- */
.phone {
  flex: none;
  width: 320px;
  padding: 7px 7px 0;
  background: var(--phone);
  border-radius: 38px 38px 0 0;
  box-shadow: 0 30px 70px rgba(79, 53, 210, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.screen {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 32px 32px 0 0;
  background: #f8f6ff;
}
.screen > img { width: 100%; }
.screen svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Voice chat */
.chat-top {
  position: relative;
  height: 148px;
  background: url("img/ellie-poster.webp") center 18% / cover;
  color: #fff;
}
.chat-top::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(40, 28, 110, 0.35));
}
.chat-top svg { position: absolute; top: 16px; width: 18px; height: 18px; color: rgba(255, 255, 255, 0.85); }
.i-back { left: 12px; }
.i-translate { right: 34px; }
.i-more { right: 10px; }
.i-more circle { fill: currentColor; stroke: none; }
.chat-timer {
  position: absolute;
  top: 10px;
  left: 38px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #2b2650;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chat-timer svg { position: static; width: 13px; height: 13px; color: #2b2650; }
.chat-title {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(20, 10, 60, 0.35);
}

.chat {
  padding: 10px;
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #1d1a3a;
  transition: opacity 0.4s ease;
}
.chat.is-resetting { opacity: 0; }
.msg-user {
  position: relative;
  margin-left: 26%;
  padding: 0.85em 1em 2em;
  background: #efecff;
  border: 1px solid #d9d2ff;
  border-radius: 1.5em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
}
.msg-user p { margin: 0; }
.msg-user svg { position: absolute; right: 0.9em; bottom: 0.6em; width: 1.3em; height: 1.3em; color: var(--primary); fill: currentColor; stroke: none; }
.reply {
  margin: 0.8em 12% 0 0;
  padding: 0.2em 1em 0.5em;
  background: #fff;
  border: 1px solid #e6e1f5;
  border-radius: 1.5em;
  box-shadow: 0 6px 14px rgba(80, 60, 180, 0.07);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
}
.s1 .msg-user, .s2 .reply { opacity: 1; transform: none; }
.row {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease-out), opacity 0.5s ease;
}
.row-in { overflow: hidden; }
.row + .row .row-in { border-top: 1px solid #ece8f6; }
.row-in > div { padding: 0.65em 0; }
.row p { margin: 0; }
.s2 .r-correction, .s4 .r-ellie, .s6 .r-suggest, .s6 .r-actions { grid-template-rows: 1fr; opacity: 1; }
.lbl { display: block; margin-bottom: 0.2em; font-weight: 700; }
.r-correction .lbl { color: var(--correction); }
.r-ellie .lbl { color: var(--primary); }
.r-suggest .lbl { color: var(--suggest); }
.r-suggest p { font-style: italic; }
.fix { display: inline-grid; vertical-align: bottom; }
.fix > * { grid-area: 1 / 1; text-decoration: none; transition: opacity 0.4s ease, transform 0.4s var(--ease-out); }
.fix del { color: #d64545; text-decoration: line-through; }
.fix ins {
  padding: 0 0.15em;
  border-radius: 0.25em;
  background: #d9f5e6;
  color: #137a45;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.7);
}
.s3 .fix del { opacity: 0; transform: translateY(-6px); }
.s3 .fix ins { opacity: 1; transform: none; }
.s3.is-settled .fix del { display: none; }
.typing { display: inline-flex; gap: 4px; padding: 0.35em 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b8adf5; animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.r-ellie p { display: none; }
.s5 .r-ellie p { display: block; animation: fade-up 0.4s var(--ease-out); }
.s5 .typing { display: none; }
.r-actions .row-in > div { display: flex; justify-content: flex-end; gap: 1.2em; padding: 0.3em 0.2em 0.2em; color: #5f5a78; }
.r-actions svg { width: 1.45em; height: 1.45em; }
.r-actions button { padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.r-actions button:hover { color: var(--primary); }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Zoomed chat (Learn from every mistake) */
.phone-zoom { width: 420px; }
.phone-zoom .screen { height: 560px; }
.chat-zoom { padding: 22px 16px 90px; font-size: 14.5px; }
.chat-bar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  padding: 28px 16px 18px;
  background: linear-gradient(to bottom, rgba(248, 246, 255, 0), #f8f6ff 45%);
}
.bar-btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ebe7f6;
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(80, 60, 180, 0.1);
}
.bar-btn svg { width: 26px; height: 26px; }
.bar-mic { display: flex; gap: 3px; background: #e2f8f4; border-color: #c9f0e9; }
.bar-mic span { width: 3px; height: 18px; border-radius: 2px; background: #1fb5a3; animation: bars 1.1s ease-in-out infinite; }
.bar-mic span:nth-child(1), .bar-mic span:nth-child(5) { height: 8px; }
.bar-mic span:nth-child(2), .bar-mic span:nth-child(4) { height: 13px; animation-delay: 0.2s; }
.bar-mic span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bars {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

/* App screens */
.app-screen { font-size: 11.5px; color: var(--text); }
.app-screen .card { background: #fff; border: 1px solid #e3ddf3; border-radius: 16px; }
.app-head { display: flex; align-items: center; gap: 14px; padding: 18px 14px 12px; font-size: 16px; }
.app-head svg { width: 20px; height: 20px; }

.vs-card { margin: 0 10px; padding: 14px 14px 16px; }
.vs-card h4 { margin: 0 0 8px; font-size: 13px; }
.vs-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; }
.vs-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: #4b4668; font-weight: 700; font-size: 11px; }
.vs-hint { margin: 6px 0 12px; color: var(--text-2); font-size: 10.5px; line-height: 1.5; }
.seg-slider { position: relative; height: 26px; margin: 0 2px; }
.seg-slider .fill, .seg-slider .rest { position: absolute; top: 7px; height: 12px; border-radius: 6px; transition: width 0.3s var(--ease-out), left 0.3s var(--ease-out); }
.seg-slider .fill { left: 0; background: var(--primary); }
.seg-slider .rest { right: 0; background: #e6e0f8; }
.seg-slider .thumb { position: absolute; top: 0; width: 4px; height: 26px; margin-left: -2px; border-radius: 2px; background: var(--primary); transition: left 0.3s var(--ease-out); }
.seg-slider button, .tick-slider button {
  position: absolute;
  top: 0;
  width: 22px;
  height: 26px;
  margin-left: -11px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.seg-slider button::after { content: ""; position: absolute; left: 9px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.seg-slider button.on-fill::after { background: #fff; }
.seg-slider button.is-current::after { display: none; }
.pitch .fill { width: calc(48% - 6px); }
.pitch .rest { left: calc(48% + 6px); }
.tick-slider { position: relative; height: 40px; margin: 6px 4px 0; transition: opacity 0.3s ease; }
.tick-slider.is-off { opacity: 0.4; }
.tick-slider::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 2px; background: #e6e0f8; }
.tick-slider .fill { position: absolute; left: 0; top: 9px; height: 3px; border-radius: 2px; background: var(--primary); transition: width 0.3s var(--ease-out); }
.tick-slider .knob { position: absolute; top: 4px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--primary); transition: left 0.3s var(--ease-out); }
.tick-slider button { height: 40px; }
.tick-slider button::before { content: ""; position: absolute; left: 9px; top: 8.5px; width: 4px; height: 4px; border-radius: 50%; background: #d4cbf3; }
.tick-slider button span { position: absolute; top: 22px; left: 0; right: 0; text-align: center; color: #6c6685; font-size: 9.5px; }
.tick-slider button.is-current span { color: var(--primary); font-weight: 700; }
.switch {
  position: relative;
  width: 34px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 17px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left 0.2s var(--ease-out); }
.switch[aria-checked="false"] { background: #cfc9e2; }
.switch[aria-checked="false"]::after { left: 3px; }
.app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.app-btn svg { width: 15px; height: 15px; fill: #fff; stroke: none; }

/* Speaking review */
.score-card { display: flex; align-items: center; gap: 12px; margin: 0 10px; padding: 12px; background: #f9f8ff !important; }
.ring { position: relative; flex: none; width: 82px; height: 82px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { stroke: #e4defc; stroke-width: 7; }
.ring .ring-fill { stroke: #b9abff; stroke-dasharray: 0 100; transition: stroke-dasharray 1.4s var(--ease-out); }
.ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring strong { font-size: 26px; font-weight: 700; }
.ring span { margin-top: 4px; color: var(--text-2); font-size: 10px; }
.score-copy b { color: var(--primary); font-size: 13px; }
.score-copy p { margin: 4px 0 0; color: var(--text-2); font-size: 10.5px; line-height: 1.5; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 10px 0; }
.tiles .card { padding: 9px 4px; text-align: center; line-height: 1.3; }
.tiles b { display: block; font-size: 14px; }
.tiles span { color: var(--text-2); font-size: 9.5px; }
.skills-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 12px 8px; font-size: 14px; }
.skills-head .q { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.skills { margin: 0 10px; padding: 6px 12px; }
.skill { display: grid; grid-template-columns: 1fr 74px 24px; align-items: center; gap: 8px; height: 30px; }
.skill i { position: relative; height: 6px; border-radius: 3px; background: var(--t); overflow: hidden; }
.skill i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--c); transition: width 1.1s var(--ease-out); }
.skill b { text-align: right; font-size: 12.5px; }
.skill:nth-child(2) i::before { transition-delay: 0.1s; }
.skill:nth-child(3) i::before { transition-delay: 0.2s; }
.skill:nth-child(4) i::before { transition-delay: 0.3s; }
.skill:nth-child(5) i::before { transition-delay: 0.4s; }
.is-scored .ring-fill { stroke-dasharray: 78 100; }
.is-scored .skill i::before { width: calc(var(--v) * 1%); }

/* ---------- Stats ---------- */
.stats {
  position: relative;
  margin-top: -1px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--text-2); font-size: 0.92rem; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 72px; }
.section { padding: 88px 0; }
.section-tight { padding-top: 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2, .feature h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 10px 0 14px;
}
.section-head p { color: var(--text-2); margin: 0; font-size: 1.05rem; }
.sub { margin: 0; color: var(--text-2); font-size: 1.2rem; }

/* ---------- Feature panels (mirror the store screenshots) ---------- */
.panel {
  position: relative;
  overflow: hidden;
  overflow: clip; /* hidden still lets focus scroll the panel sideways toward the blobs */
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(180deg, #eee9ff 0%, #f8f6ff 55%, #fff 100%);
}
.panel > * { position: relative; }
.panel > .blob { position: absolute; }
.b-mint { width: 460px; height: 460px; right: -170px; top: 70px; background: rgba(66, 214, 197, 0.18); }
.reverse .b-mint { right: auto; left: -170px; }
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  min-height: 600px;
  padding: 64px 64px 0;
}
.feature-copy { align-self: center; padding-bottom: 64px; }
.reverse .feature-copy { order: 2; }
.feature-art { position: relative; display: flex; justify-content: center; align-self: end; }

.legend, .checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.legend li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.legend b { display: block; color: var(--text); }
.legend .dot { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; }
.d-correction { background: var(--correction); }
.d-ellie { background: var(--primary); }
.d-suggest { background: #e0a43a; }
.example-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.example-tabs button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.example-tabs button:hover { border-color: var(--primary); }
.example-tabs button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.float-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(40, 24, 120, 0.18);
  animation: badge-float 5s ease-in-out infinite;
}
.badge-ok { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #22b07d; color: #fff; font-size: 12px; font-weight: 700; }
.badge-pron { top: 7%; right: -18px; }
.badge-stars { top: 18%; left: -10px; animation-delay: -2.5s; }
.badge-stars b { color: var(--gold); }

@keyframes badge-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* Dark "pace" panel */
.feature-dark {
  border-color: transparent;
  color: #fff;
  background: radial-gradient(at 24% 8%, #3b3c69, transparent 60%), linear-gradient(140deg, #252341, #19172e);
}
.feature-dark .b-mint { background: rgba(66, 214, 197, 0.12); }
.feature-dark .kicker, .feature-dark .hl { color: var(--accent-hl); }
.feature-dark .sub { color: rgba(255, 255, 255, 0.75); }
.feature-dark .phone { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
.phrases { display: flex; gap: 10px; margin: 28px 0 10px; }
.phrase {
  flex: auto;
  padding: 12px 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  font-weight: 700;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out);
}
.phrase span { white-space: nowrap; }
.wave { display: flex; justify-content: center; align-items: center; gap: 3px; height: 34px; margin-top: 8px; }
.wave b { width: 3px; height: 100%; border-radius: 2px; background: #8a73ff; transform: scaleY(0.25); transition: transform 0.3s ease, background 0.25s ease; }
.phrase.is-active { background: rgba(111, 240, 224, 0.16); border-color: var(--accent-hl); transform: translateY(-3px); }
.phrase.is-active .wave b { background: var(--accent-hl); animation: wave 0.7s ease-in-out infinite; }
.pace-note { margin: 0 0 22px; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }
.audio-status { min-height: 1.4em; margin: 10px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

@keyframes wave {
  0%, 100% { transform: scaleY(var(--lo, 0.3)); }
  50% { transform: scaleY(var(--hi, 1)); }
}

/* Leaderboard */
.board-panel { padding: 64px 40px 0; }
.board-panel .section-head { margin-bottom: 40px; }
.rewards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.rewards div { padding: 8px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; line-height: 1.25; }
.rewards b { display: block; color: #f08a00; }
.rewards span { color: var(--text-2); font-size: 0.82rem; }
.board-art { display: flex; justify-content: center; align-items: flex-end; gap: 48px; }
.board-art .screen { height: 560px; }
.swipe-hint { display: none; }

.home-screen { background: #f5f2ff; }
.journey-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 14px 10px; line-height: 1.3; }
.journey-head b { display: block; font-size: 15.5px; }
.journey-head div span { color: #8a85a3; font-size: 10px; }
.crown { color: #d99000; font-size: 11px; }
.route-card { margin: 0 8px; padding-top: 10px; background: #fff; border-radius: 20px; box-shadow: 0 6px 16px rgba(80, 60, 180, 0.08); text-align: center; overflow: hidden; }
.route-top { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 6px; }
.route-name { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 13px; font-weight: 700; }
.route-name svg { width: 16px; height: 16px; }
.route-days { color: #6c6685; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; }
.road { position: relative; height: 136px; overflow: hidden; background: #fdfaf4; }
.scenery {
  position: absolute;
  inset: 0;
  background: url("img/bus-scenery.webp") 0 100% / auto 100% repeat-x;
  animation: drive 14s linear infinite;
}
.road-pill {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 2;
  translate: -50% 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ece6ff;
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bus { position: absolute; left: 50%; bottom: 6px; z-index: 1; width: 170px; margin-left: -85px; animation: bus-bob 0.9s ease-in-out infinite; }
.day { display: block; margin: 8px 0; font-size: 14px; }
.hop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0 10px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9157ff, #5b3fd9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(91, 63, 217, 0.3);
}
.hop svg { position: absolute; right: 16px; width: 16px; height: 16px; }
.mini-board { margin: 10px 8px 0; padding: 12px 10px; background: #fff; border: 1px solid #e3ddf3; border-radius: 20px; }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 10px; }
.mini-head b { font-size: 14px; }
.mini-head span { color: var(--primary); font-size: 11px; font-weight: 500; }

@keyframes drive { to { background-position-x: -887px; } }
@keyframes bus-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.lb-title { display: flex; align-items: center; gap: 16px; padding: 18px 14px 12px; }
.lb-title b { flex: 1; font-size: 18px; }
.lb-title svg { width: 18px; height: 18px; }
.lb-screen { background: #fff; }
.lb-screen .lb-tabs { margin: 0 10px; }
.lb-tabs { display: flex; padding: 3px; border-radius: 10px; background: #f0edf9; }
.lb-tabs button {
  flex: 1;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.lb-tabs button[aria-selected="true"] { background: var(--primary); color: #fff; }
.lb-tools { display: flex; justify-content: space-between; align-items: center; margin: 10px 10px 6px; }
.period { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #e3ddf3; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.period svg { width: 13px; height: 13px; }
.i-refresh { width: 18px; height: 18px; color: var(--primary); }
.lb-sub { display: flex; justify-content: space-between; margin: 0 10px; color: var(--text-2); font-size: 9.5px; }
.lb-table { margin-top: 4px; }
.lb-screen .lb-table { margin: 4px 10px 0; }
.lb-row {
  display: grid;
  grid-template-columns: 22px 26px 1fr auto 52px;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 4px;
  border-bottom: 1px solid #efecf6;
  font-size: 11.5px;
}
.lb-row.no-reward { grid-template-columns: 22px 26px 1fr auto; }
.lb-row.head { height: 26px; color: var(--text-2); font-size: 9.5px; }
.lb-row .rank { text-align: center; }
.lb-row .val { font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
.lb-row .rew { color: #f08a00; text-align: right; font-weight: 700; }
.lb-row.head .val, .lb-row.head .rew { color: var(--text-2); font-weight: 400; }
.lb-row img { width: 24px; height: 24px; border-radius: 50%; }
.lb-row.is-me { margin: 2px 0; border-radius: 10px; border-bottom-color: transparent; background: #efebff; }
.lb-row.is-me .name { color: var(--primary); font-weight: 500; }
.screen .medal { width: 18px; height: 22px; stroke: none; }
.lb-row.is-new { animation: row-in 0.45s var(--ease-out) both; }
.lb-row.is-new .rew { animation: pop 0.5s var(--ease-out) both; animation-delay: inherit; }
.your-rank { margin: 10px 10px 0; padding: 8px 6px 2px; border-radius: 14px; background: #f1eeff; }
.your-rank > span { display: block; padding: 0 4px; color: var(--primary); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; }
.your-rank .lb-row { border: 0; }

@keyframes row-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* Games */
.games { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 28px 0 0; padding: 0; }
.games li {
  padding: 6px 6px 8px;
  border: 1px solid #e6e0f6;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.games li:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(103, 75, 255, 0.14); }
.games img { width: 100%; border-radius: 10px; aspect-ratio: 32 / 27; object-fit: cover; }
.games span { display: block; margin-top: 6px; font-size: 0.74rem; font-weight: 700; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--text-2); }

/* ---------- Ellie ---------- */
.meet {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 48px;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px 48px 0;
  overflow: hidden;
}
.meet img { width: 100%; max-width: 360px; margin: 0 auto; align-self: end; }
.meet-copy { padding-bottom: 48px; }
.meet h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 900; line-height: 1.15; margin: 8px 0 16px; }
.meet p { color: var(--text-2); margin: 0 0 16px; font-size: 1.05rem; }
.meet .checks { margin: 0 0 28px; gap: 10px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq details[open] { border-color: #c9bdf5; box-shadow: 0 8px 22px rgba(103, 75, 255, 0.08); }
.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.3s var(--ease-out), content-visibility 0.3s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body p { margin: 12px 0 0; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  color: #fff;
  border-radius: 28px;
  padding: 64px 24px;
  background:
    radial-gradient(circle at 85% 20%, rgba(66, 214, 197, 0.35), transparent 40%),
    linear-gradient(140deg, #6a4dff, #4b2fd6);
}
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 900; margin: 0 0 12px; line-height: 1.15; }
.cta p { margin: 0 auto 28px; max-width: 520px; color: rgba(255, 255, 255, 0.88); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--text-2);
  font-size: 0.92rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 88px; }
.legal .container { max-width: 820px; }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
}
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 900; margin: 0 0 6px; line-height: 1.15; }
.legal .updated { color: var(--text-2); margin: 0 0 32px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { color: #3b3658; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { background: var(--bg); font-weight: 700; }
.legal .table-wrap { overflow-x: auto; }

/* ---------- Scroll reveal ---------- */
.reveal { transition: opacity 0.52s ease, transform 0.52s var(--ease-out); transition-delay: var(--reveal-delay, 0s); }
.reveal.is-pending { opacity: 0; transform: translateY(22px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 18px; }
  .feature { padding: 56px 40px 0; gap: 24px; }
  .games { gap: 8px; }
  .games span { font-size: 0.68rem; }
}
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 48px; text-align: center; gap: 0; }
  .hero-copy { padding-bottom: 24px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { min-height: 600px; }
  .hero-ellie { right: calc(50% - 250px); width: 250px; }
  .hero-phone { left: 50%; margin-left: -190px; }
  .hero-phone .screen { height: 440px; }

  .feature { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 48px 24px 0; text-align: center; }
  .phone { text-align: left; }
  .feature-copy, .reverse .feature-copy { order: 0; padding-bottom: 8px; }
  .legend, .checks { display: inline-grid; text-align: left; }
  .example-tabs, .phrases { justify-content: center; }
  .games { grid-template-columns: repeat(4, 1fr); text-align: center; }
  .feature-art { margin-top: 24px; }
  .b-mint, .reverse .b-mint { right: -200px; left: auto; top: auto; bottom: 80px; }

  .board-panel { padding: 48px 0 0; }
  .board-panel .section-head { padding: 0 24px; }
  .board-art {
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 calc(50% - 160px);
    scrollbar-width: none;
  }
  .board-art::-webkit-scrollbar { display: none; }
  .board-art .phone { scroll-snap-align: center; }
  .swipe-hint {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 2;
    width: max-content;
    margin: 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(23, 19, 66, 0.78);
    color: #fff;
    font-size: 0.8rem;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .swipe-hint.is-hidden { opacity: 0; }

  .meet { grid-template-columns: 1fr; padding: 36px 28px 0; text-align: center; gap: 8px; }
  .meet-copy { order: -1; padding-bottom: 8px; }
  .meet .checks { justify-items: start; }
  .meet img { max-width: 260px; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-tight { padding-top: 0; }
  .panel { border-radius: 26px; }
  .feature { padding: 40px 16px 0; }
  .sub { font-size: 1.05rem; }
  .phone { width: 290px; }
  .screen { height: 520px; }
  .hero-art { min-height: 560px; }
  .hero-ellie { right: -30px; width: 230px; }
  .hero-phone { margin-left: -160px; }
  .hero-phone .screen { height: 410px; }
  .phone-zoom { width: 300px; }
  .phone-zoom .screen { height: 590px; }
  .chat-zoom { font-size: 12.5px; padding: 16px 12px 84px; }
  .phrases { gap: 6px; }
  .phrase { padding: 10px 6px 8px; font-size: 0.85rem; }
  .games { grid-template-columns: repeat(3, 1fr); }
  .float-badge { font-size: 0.8rem; padding: 8px 12px; }
  .badge-pron { right: 0; }
  .badge-stars { left: 0; }
  .board-art { padding: 0 calc(50% - 145px); gap: 16px; }
  .rewards { gap: 6px; }
  .rewards div { padding: 6px 9px; }
  .rewards b { font-size: 0.88rem; }
  .rewards span { font-size: 0.7rem; }
  .board-art .screen { height: 520px; }
  .legal-card { padding: 28px 22px; }
}

@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;
    transition-delay: 0s !important;
  }
  .reveal.is-pending { opacity: 1; transform: none; }
}

/* ---------- Daily English Practice (v1) additions ---------- */
.hero-eli { transform: none; width: 360px; right: -60px; }
.feature-dark .checks li { color: rgba(255, 255, 255, 0.88); }
.accent-pills { display: flex; gap: 8px; margin: 0 0 16px; }
.accent-pills span { flex: 1; padding: 8px 0; text-align: center; border: 1px solid #e3ddf3; border-radius: 12px; font-weight: 700; color: #4b4668; }
.accent-pills .on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.meet img { max-width: 400px; }
@media (max-width: 980px) { .hero-eli { right: calc(50% - 250px); width: 260px; } }
@media (max-width: 640px) { .hero-eli { right: -30px; width: 230px; } }
@media (max-width: 640px) { .site-header .brand { font-size: 0.95rem; white-space: nowrap; gap: 8px; } .site-header .brand img { width: 30px; height: 30px; } }
