:root {
  --navy: #1B2A4A; --navy-2: #24365d; --orange: #F28C28; --orange-soft: #fde7cf;
  --cream: #FAF6EF; --paper: #ffffff; --ink: #1B2A4A; --muted: #5d6678; --line: #e8e1d4;
  --ok: #2E8B57; --ok-soft: #dff1e7; --bad: #c2410c; --bad-soft: #fde4d6;
  --radius: 18px; --shadow: 0 10px 30px rgba(27, 42, 74, .08);
}
@media (prefers-color-scheme: dark) {
  :root { --cream: #0f1626; --paper: #172238; --ink: #eef0f5; --muted: #a6afc2; --line: #26334f;
    --orange-soft: #3a2a17; --ok-soft: #173326; --bad-soft: #3b2216; --shadow: 0 10px 30px rgba(0,0,0,.3); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); line-height: 1.65;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 17px; letter-spacing: .3px; }
.brand small { font-size: 12px; opacity: .7; }
nav { display: flex; gap: 4px; }
nav a { text-decoration: none; padding: 7px 12px; border-radius: 10px; font-size: 15px; opacity: .85; white-space: nowrap; }
nav a.on { background: rgba(255,255,255,.12); opacity: 1; }
.pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: var(--navy);
  font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }

/* hero */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 24px; padding: 48px 16px 56px; }
.hero h1 { font-size: clamp(30px, 5.4vw, 50px); line-height: 1.2; margin: 0 0 16px; letter-spacing: .5px; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { font-size: 17px; opacity: .88; max-width: 560px; margin: 0 0 26px; }
.hero .mascot { width: 100%; max-width: 340px; justify-self: center; border-radius: 50%; background: var(--cream);
  box-shadow: 0 0 0 10px rgba(255,255,255,.06), 0 0 0 22px rgba(255,255,255,.04); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px;
  font-weight: 700; font-size: 15px; text-decoration: none; background: var(--orange); color: var(--navy); }
.btn.line { background: transparent; color: inherit; border: 1.5px solid currentColor; opacity: .9; }
.btn.soft { background: var(--orange-soft); color: var(--ink); }
.btn.small { padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -30px; position: relative; }
.stat { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--orange); }
.stat span { font-size: 14px; color: var(--muted); }

section { padding: 44px 0 8px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
h2 { font-size: 25px; margin: 0; }
.sec-head a { font-size: 15px; color: var(--orange); text-decoration: none; font-weight: 700; white-space: nowrap; }
.lead { color: var(--muted); margin: 6px 0 0; }

/* lesson cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lcard { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none;
  display: flex; flex-direction: column; transition: transform .15s ease; }
.lcard:hover { transform: translateY(-3px); }
.lcard .thumb { aspect-ratio: 16 / 9; background: var(--line); position: relative; }
.lcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lcard .badge { position: absolute; left: 10px; top: 10px; background: rgba(27,42,74,.88); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 8px; }
.lcard .soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,22,38,.55);
  color: #fff; font-weight: 700; letter-spacing: 1px; }
.lcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard .body b { font-size: 16px; line-height: 1.45; }
.lcard .meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-top: auto; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--orange-soft); color: var(--ink); }
.done { color: var(--ok); font-weight: 700; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.step img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.step div { padding: 12px 14px 16px; }
.step h3 { margin: 0 0 4px; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.step h3 i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.band { display: grid; grid-template-columns: 160px 1fr auto; gap: 20px; align-items: center; background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin: 44px 0 8px; }
.band img { border-radius: 50%; width: 140px; }
.band h3 { margin: 0 0 4px; font-size: 20px; }
.band p { margin: 0; color: var(--muted); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.filters button { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 16px; font-size: 14px; }
.filters button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* lesson page */
.crumb { padding: 18px 0 0; font-size: 14px; color: var(--muted); }
.crumb a { text-decoration: none; }
.lhead { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 14px 0 6px; align-items: start; }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe, .video img { width: 100%; height: 100%; border: 0; object-fit: cover; }
.lhead h1 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.35; margin: 8px 0 10px; }
.lhead p { color: var(--muted); margin: 0 0 14px; }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 6px 0 4px; }
.progress i { display: block; height: 100%; background: var(--orange); border-radius: 8px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 26px 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; color: var(--muted); padding: 10px 14px; font-size: 16px; font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--orange); }
.panel { display: grid; gap: 12px; padding-bottom: 20px; }
.item { background: var(--paper); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.item .en { font-size: 18px; font-weight: 700; }
.item .zh { color: var(--muted); }
.item .ex { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; gap: 10px; align-items: center; }
.item .ex div { flex: 1; }
.play { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--orange); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.play.on { background: var(--navy); color: #fff; }
mark { background: linear-gradient(transparent 58%, var(--orange-soft) 58%); color: inherit; padding: 0 1px; }
.gram h3 { margin: 0 0 8px; font-size: 18px; }
.gram .ln { font-family: inherit; font-size: 16px; padding: 3px 0; }
.gram .ln.ok { color: var(--ok); } .gram .ln.bad { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.gram .note { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* quiz */
.quiz { background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.quiz .count { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.quiz h3 { font-size: 20px; margin: 6px 0 4px; line-height: 1.45; white-space: pre-line; }
.quiz .qen { color: var(--muted); margin: 0 0 12px; white-space: pre-line; }
.quiz .opts { display: grid; gap: 8px; margin: 10px 0; }
.quiz .opts div { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.quiz textarea { width: 100%; min-height: 76px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--cream); color: var(--ink); font: inherit; resize: vertical; margin: 8px 0 12px; }
.ans { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--ok-soft); }
.ans .row { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.ans .row div { flex: 1; white-space: pre-line; }
.ans small { color: var(--muted); display: block; }
.judge { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.judge .ok { background: var(--ok); color: #fff; } .judge .bad { background: var(--bad); color: #fff; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.finish { text-align: center; padding: 26px 18px; }
.finish img { width: 150px; margin: 0 auto 10px; border-radius: 50%; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty img { width: 150px; margin: 0 auto 12px; border-radius: 50%; }
.wrong-item { display: flex; gap: 14px; align-items: flex-start; }
.wrong-item .tag { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--orange); padding-top: 3px; }
.wrong-item .grow { flex: 1; }

@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; padding: 36px 16px 52px; text-align: left; }
  .hero .mascot { max-width: 200px; justify-self: start; order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .lhead { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  nav a { padding: 7px 8px; font-size: 14px; }
  .brand small { display: none; }
}
