/* ═══════════════════════════════════════════════════════════════════════
   ONVI — SINGLE SITE STYLESHEET
   Used by: index.html, listening.html, reading.html, grammar.html, ebook.html
   All shared styles live here. Edit once, updates everywhere.
   Sections: Reset & Variables → Icons → Nav → Page Header → Progress/Filter
   → Exercise List → Modal/Quiz → Homepage (hero/skills/features/etc)
   → eBook (cover/gate/chapters) → Footer → Responsive
═══════════════════════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--ff); font-size: 15px; color: var(--ink); background: var(--surface); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--ff); cursor: pointer; border: none; background: none; }

:root {
  --teal:     #275664;
  --teal-dk:  #1a3d48;
  --teal-lt:  #e8f1f3;
  --teal-mid: #4a8fa0;
  --green:    #00a300;
  --ink:      #1a1a1a;
  --muted:    #6b6b6b;
  --subtle:   #9a9a9a;
  --border:   #e0dcd5;
  --surface:  #f8f7f4;
  --card:     #ffffff;
  --gold:     #e8a020;
  --gold-lt:  #fdf3e0;
  --accent:   #c0392b;
  --ok:       #27ae60;
  --ok-bg:    #eafaf1;
  --wrong:    #c0392b;
  --wrong-bg: #fdf1f0;
  --hi:       #ffe066;
  --r:        8px;
  --ff:       'Be Vietnam Pro', sans-serif;
}

/* ── ICONS (Bootstrap Icons, sized via font-size) ──────────────── */
.icon { display: inline-block; }
.icon-sm   { font-size: 14px; }
.icon-md   { font-size: 18px; }
.icon-lg   { font-size: 22px; }
.icon-xl   { font-size: 32px; }
.icon-hero { font-size: 44px; }

/* ── LANGUAGE TOGGLE & BUY-ME-A-COFFEE (shared across every page) ── */
.lang-toggle {
  display: flex; align-items: center; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.3); border-radius: 20px;
  overflow: hidden; margin-left: 12px;
}
.lang-btn {
  padding: 5px 12px; font-size: 12px; font-weight: 700;
  background: transparent; color: rgba(255,255,255,.65);
  border: none; cursor: pointer; transition: background .15s, color .15s;
}
.lang-btn.active { background: rgba(255,255,255,.2); color: #fff; }
.lang-btn:hover { color: #fff; }

.bmc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #FFDD00; color: #1a1a1a;
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 700;
  margin-left: 12px; flex-shrink: 0; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.bmc-btn:hover { background: #ffe94d; transform: translateY(-1px); }
.bmc-btn i { font-size: 15px; }

/* ── NAV (two visual variants sharing the same component pattern) ──
   Variant A: index.html / ebook.html   → .nav / .nav-links / .nav-link
   Variant B: listening.html / grammar.html → .site-nav / .skill-tabs / .skill-tab
   Variant C: reading.html              → .nav / .nav-tabs / .nav-tab
   All three coexist safely (different class names) and share identical
   visual language (teal bar, sticky, same hover/active behavior). ── */
.nav, .site-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--teal);
  height: 54px; padding: 0 2rem;
  display: flex; align-items: center; gap: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-logo, .site-logo {
  font-size: 21px; font-weight: 800; color: #fff;
  letter-spacing: -.5px; margin-right: 2rem; white-space: nowrap;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo span, .site-logo span { color: #7dd8e8; }

.nav-links, .skill-tabs, .nav-tabs { display: flex; align-items: stretch; height: 100%; gap: 2px; flex: 1; }
.nav-link, .skill-tab, .nav-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; color: rgba(255,255,255,.7);
  font-size: 13px; font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap; background: none;
  border-top: none; border-left: none; border-right: none;
  height: 100%; cursor: pointer;
}
.nav-link:hover, .skill-tab:hover, .nav-tab:hover { color: #fff; border-bottom-color: rgba(255,255,255,.35); }
.nav-link.active, .skill-tab.active, .nav-tab.active { color: #fff; border-bottom-color: #7dd8e8; }
.nav-link .badge, .skill-tab .tab-count, .nav-tab .badge {
  background: rgba(255,255,255,.15); border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.nav-link.dim, .skill-tab.coming, .nav-tab.dim { opacity: .4; pointer-events: none; }

.nav-cta {
  margin-left: auto;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px; padding: 6px 14px;
  font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.nav-cta:hover { background: rgba(255,255,255,.2); }

/* mobile hamburger toggle (hidden on desktop) */
.nav-burger {
  display: none; width: 34px; height: 34px; border-radius: 8px;
  align-items: center; justify-content: center; color: #fff; font-size: 20px;
  background: rgba(255,255,255,.1); margin-left: 8px; flex-shrink: 0;
}
.nav-burger:hover { background: rgba(255,255,255,.18); }

/* ── PAGE HEADER (listening/reading/grammar) ───────────────────── */
.page-header {
  background: var(--teal-dk);
  padding: 2.5rem 2rem 2rem;
  display: flex; align-items: center; gap: 2rem;
}
.page-header-img, .page-header-icon {
  width: 100px; height: 80px;
  border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: #7dd8e8;
}
.page-header-text { color: #fff; flex: 1; }
.page-header-text h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: .4rem; }
.page-header-text p  { font-size: 13px; opacity: .75; line-height: 1.6; max-width: 560px; }

/* ── MAIN LAYOUT ────────────────────────────────────────────────── */
.main-wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── PROGRESS BAR ───────────────────────────────────────────────── */
.progress-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.progress-label { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.progress-track { flex: 1; background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-mid));
  border-radius: 4px; transition: width .4s ease; width: 0%;
}
.progress-count { font-size: 13px; font-weight: 700; color: var(--teal); flex-shrink: 0; }

/* ── FILTER TABS ────────────────────────────────────────────────── */
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── LEVEL SECTION ──────────────────────────────────────────────── */
.level-section { margin-bottom: 2rem; }
.level-heading {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: .8rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.level-badge { background: var(--teal-lt); color: var(--teal); border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; }

/* ── EXERCISE LIST ──────────────────────────────────────────────── */
.ex-list { display: flex; flex-direction: column; gap: 2px; }
.ex-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: .75rem 1rem;
  transition: border-color .15s, box-shadow .12s, transform .1s;
  cursor: pointer; position: relative;
}
.ex-row:hover { border-color: var(--teal); box-shadow: 0 2px 10px rgba(39,86,100,.1); transform: translateX(3px); }
.ex-row.done { border-color: #b8e6c8; background: #fafffe; }
.ex-row.coming { opacity: .5; cursor: default; pointer-events: none; }
.ex-check { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ex-arrow { color: var(--teal); flex-shrink: 0; opacity: 0; transition: opacity .15s, transform .15s; }
.ex-row:hover .ex-arrow { opacity: 1; transform: translateX(2px); }
.ex-info { flex: 1; min-width: 0; }
.ex-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.ex-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ex-tag {
  font-size: 11px; padding: 2px 9px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); white-space: nowrap; flex-shrink: 0;
}
.ex-coming-tag {
  font-size: 11px; padding: 2px 9px; border-radius: 12px;
  background: #f5f5f5; color: #aaa; border: 1px solid #eee;
  white-space: nowrap; flex-shrink: 0;
}
.ex-intro {
  background: var(--teal-lt); border: 1px solid #cfe4e9;
  border-radius: var(--r); padding: .8rem 1rem;
  font-size: 13px; color: var(--teal-dk); line-height: 1.55;
  margin-bottom: 1.1rem;
}
.ex-intro i { margin-right: 6px; }

/* ── MODAL / QUIZ ENGINE (shared by listening, reading, grammar) ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
  align-items: flex-start; justify-content: center;
  padding: 1rem; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.ex-modal {
  background: var(--card); border-radius: 12px;
  width: 100%; max-width: 780px;
  margin: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,.22);
  overflow: hidden;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.modal-header {
  background: var(--teal); color: #fff;
  padding: 1rem 1.4rem;
  display: flex; align-items: center; gap: 12px;
}
.modal-num {
  background: rgba(255,255,255,.18); border-radius: 6px;
  padding: 3px 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .05em;
}
.modal-title { flex: 1; font-size: 15px; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px; background: rgba(255,255,255,.15);
  border: none; border-radius: 50%; color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; line-height: 1;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.3); }
.modal-done-badge {
  background: var(--ok); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; font-weight: 600; display: none;
}
.modal-body { padding: 1.4rem; }

/* audio player */
.lp-player { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 1.1rem; }
.lp-player iframe { display: block; width: 100%; height: 120px; border: none; }

/* transcript toggle */
.tog-btn {
  display: flex; align-items: center; gap: 8px; background: none;
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  color: var(--muted); width: 100%; text-align: left;
  margin-bottom: .75rem; transition: background .15s, color .15s;
}
.tog-btn:hover { background: var(--surface); color: var(--ink); }

/* calibration bar (internal authoring tool) */
.calib-bar {
  display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--r);
  padding: 9px 12px; margin-bottom: .75rem; font-size: 12px;
}
.calib-bar.on { display: flex; }
.calib-info { flex: 1; color: #7a5c00; line-height: 1.4; min-width: 120px; }
.calib-info strong { display: block; color: #5a3e00; font-size: 11px; }
.cbtn { border: none; border-radius: 6px; padding: 4px 11px; font-size: 12px; font-family: var(--ff); }
.cbtn.primary { background: var(--accent); color: #fff; }
.cbtn.ghost   { background: #fff; border: 1px solid var(--border); color: var(--muted); }
.cbtn.ghost:hover { background: var(--surface); }
.calib-next-lbl {
  font-size: 11px; color: var(--accent); font-weight: 600;
  background: #fff; border: 1px solid #f5c6c2; border-radius: 5px;
  padding: 3px 8px; max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.ctrl-row { display: none; gap: 8px; flex-wrap: wrap; margin-bottom: .75rem; }
.ctrl-row.on { display: flex; }

/* transcript */
.transcript {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.2rem;
  margin-bottom: 1.1rem; display: none;
}
.transcript.open { display: block; }
.tr-line { display: flex; flex-direction: column; gap: 3px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.tr-line:last-child { border-bottom: none; padding-bottom: 0; }
.tr-line:first-child { padding-top: 0; }
.tr-vi { font-size: 14px; line-height: 1.9; }
.tr-en { font-size: 12px; color: var(--muted); font-style: italic; line-height: 1.6; }
.lp-w { display: inline; border-radius: 3px; padding: 1px 2px; transition: background .1s; }
.lp-w.active { background: var(--hi); color: #222; }
.lp-w.calib-mode { cursor: pointer; border-bottom: 1.5px dashed #bbb; }
.lp-w.calib-mode:hover { background: #f0f0f0; }
.lp-w.calib-stamped { border-bottom: 2px solid var(--ok); }
.lp-w.calib-next { border-bottom: 2px dashed var(--accent); background: #fff5f5; }

/* reading: grammar chip + passage box */
.grammar-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-lt); border: 1px solid rgba(39,86,100,.15);
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: var(--teal);
  margin-bottom: 1.2rem;
}
.grammar-chip .label { color: var(--muted); font-weight: 400; }
.passage-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.25rem 1.4rem; margin-bottom: 1.2rem;
}
.passage-title {
  font-size: 13px; font-weight: 700; color: var(--teal);
  letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: .9rem; display: flex; align-items: center; gap: 7px;
}
.passage-text { font-size: 15px; line-height: 2; color: var(--ink); white-space: pre-wrap; }
.passage-text p { margin-bottom: .9rem; }
.passage-text p:last-child { margin-bottom: 0; }

/* questions */
.q-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: .9rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .9rem; }
.q-text { font-size: 13px; font-weight: 600; margin-bottom: .7rem; line-height: 1.5; }
.q-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; background: var(--teal); color: #fff;
  border-radius: 50%; font-size: 11px; font-weight: 700;
  margin-right: 6px; flex-shrink: 0; vertical-align: middle;
}
.opts { list-style: none; }
.opt {
  display: flex; align-items: flex-start; gap: 8px; padding: 6px 9px;
  border-radius: 6px; border: 1px solid var(--border); margin-bottom: 4px;
  cursor: pointer; font-size: 13px; transition: border-color .12s, background .12s;
  user-select: none; line-height: 1.45;
}
.opt:last-child { margin-bottom: 0; }
.opt:hover:not([data-locked]) { border-color: var(--teal); background: var(--teal-lt); }
.opt.correct        { border-color: var(--ok);    background: var(--ok-bg);    color: #1a5e36; }
.opt.incorrect      { border-color: var(--wrong); background: var(--wrong-bg); color: #7b1a1a; }
.opt.reveal-correct { border-color: var(--ok);    background: var(--ok-bg);    color: #1a5e36; }
.opt-mk {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  margin-top: 1px; font-size: 10px; font-weight: 600; color: var(--muted);
}
.opt.correct .opt-mk, .opt.reveal-correct .opt-mk { background: var(--ok);    border-color: var(--ok);    color: #fff; }
.opt.incorrect .opt-mk                             { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.opt-fb { margin-top: 7px; font-size: 12px; font-style: italic; display: none; color: var(--muted); }
.opt-fb.on { display: block; }
.opt-fb.ok  { color: var(--ok); }
.opt-fb.err { color: var(--wrong); }

/* score */
.score-card {
  display: none; align-items: center; gap: 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem 1.2rem; margin-top: .75rem;
  grid-column: 1 / -1;
}
.score-card.on { display: flex; }
.score-num { font-size: 2rem; font-weight: 800; color: var(--teal); min-width: 50px; text-align: center; }
.score-txt { font-size: 13px; color: var(--muted); line-height: 1.5; }
.score-txt strong { color: var(--ink); font-weight: 600; }

/* export/save-progress modal */
.export-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 2000;
  align-items: center; justify-content: center; padding: 1rem;
}
.export-overlay.open { display: flex; }
.export-box {
  background: #fff; border-radius: 12px; padding: 1.4rem;
  max-width: 500px; width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.export-box h3 { font-size: 14px; font-weight: 700; margin-bottom: .3rem; }
.export-box p  { font-size: 12px; color: var(--muted); margin-bottom: .9rem; }
.export-box textarea {
  width: 100%; height: 100px; font-size: 11px; font-family: monospace;
  border: 1px solid var(--border); border-radius: 6px; padding: 8px; resize: none;
}
.export-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: .9rem; }
.export-btns button { border-radius: 6px; padding: 7px 15px; font-size: 13px; font-family: var(--ff); }
.export-btns .ep { background: var(--teal); color: #fff; border: none; }
.export-btns .eg { background: none; border: 1px solid var(--border); color: var(--muted); cursor:pointer; }
.copy-ok { font-size: 11px; color: var(--ok); margin-top: .4rem; display: none; }

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE ONLY (index.html)
═══════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, rgba(26,61,72,.88) 0%, rgba(30,80,96,.72) 55%, rgba(39,95,80,.6) 100%), url("hero-bg.jpg") center 55%/cover no-repeat;
  min-height: 520px;
  display: flex; align-items: center;
  padding: 4rem 2rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: 960px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; gap: 4rem;
  position: relative;
}
.hero-text { flex: 1; color: #fff; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; color: #7dd8e8;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero-h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 1rem; letter-spacing: -.5px;
}
.hero-h1 em { font-style: normal; color: #7dd8e8; }
.hero-sub { font-size: 16px; opacity: .8; line-height: 1.7; max-width: 480px; margin-bottom: 2rem; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #7dd8e8; color: var(--teal-dk);
  border-radius: 8px; padding: 12px 24px;
  font-size: 14px; font-weight: 700;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.btn-primary:hover { background: #9ae3f0; transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.8); font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  padding: 12px 20px; transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 3px; }
.hero-stat-lbl { font-size: 12px; color: rgba(255,255,255,.55); }
.hero-stat-div { width: 1px; height: 36px; background: rgba(255,255,255,.12); }

.hero-visual { flex-shrink: 0; width: 300px; display: flex; flex-direction: column; gap: 10px; }
.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(4px);
}
.hero-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #7dd8e8;
}
.hero-card-text .lbl { font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 2px; }
.hero-card-text .val { font-size: 13px; font-weight: 600; color: #fff; }
.hero-card-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: rgba(125,216,232,.2); color: #7dd8e8;
  border-radius: 6px; padding: 2px 8px; flex-shrink: 0;
}

.section { max-width: 960px; margin: 0 auto; padding: 4rem 2rem; }
.section-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: .6rem; }
.section-h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.3px; margin-bottom: .75rem; }
.section-sub { font-size: 14px; color: var(--muted); max-width: 520px; line-height: 1.7; margin-bottom: 2.5rem; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.skill-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.4rem;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, box-shadow .15s, transform .12s;
  cursor: pointer; position: relative; overflow: hidden;
}
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--teal); transform: scaleX(0);
  transform-origin: left; transition: transform .2s;
}
.skill-card:hover { border-color: var(--teal); box-shadow: 0 6px 20px rgba(39,86,100,.1); transform: translateY(-3px); }
.skill-card:hover::before { transform: scaleX(1); }
.skill-card.coming { opacity: .55; cursor: default; pointer-events: none; }
.skill-card.coming::before { display: none; }
.skill-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-lt); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.skill-name { font-size: 15px; font-weight: 700; }
.skill-desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.skill-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.skill-count { color: var(--teal); font-weight: 600; }
.skill-tag { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; color: var(--muted); font-size: 11px; }
.skill-tag.soon { background: #f5f5f5; color: #aaa; border-color: #eee; }

.features-bg { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.feature-item { display: flex; flex-direction: column; gap: 12px; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--teal-lt); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.feature-title { font-size: 15px; font-weight: 700; }
.feature-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }

.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: 12px; position: relative; }
.step-num { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); background: var(--teal-lt); border-radius: 6px; padding: 3px 9px; width: fit-content; }
.step-title { font-size: 15px; font-weight: 700; }
.step-desc  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.step-connector { position: absolute; top: 50%; right: -1rem; width: 2rem; height: 2px; background: var(--border); display: none; }
@media(min-width:640px){ .step-card:not(:last-child) .step-connector { display: block; } }

.teacher-bg { background: var(--teal-dk); }
.teacher-section { max-width: 960px; margin: 0 auto; padding: 4rem 2rem; }
.teacher-inner { display: flex; align-items: center; gap: 3rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 2.5rem; }
.teacher-avatar {
  width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-mid), #1a5060);
  border: 3px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 800; color: #fff; letter-spacing: -1px;
}
.teacher-text { flex: 1; color: #fff; min-width: 0; }
.teacher-text .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7dd8e8; margin-bottom: .5rem; }
.teacher-text h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: .3rem; }
.teacher-text .role { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 1rem; }
.teacher-text p { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.7; max-width: 540px; }
.teacher-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1.2rem; }
.teacher-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 4px 12px; font-size: 12px; color: rgba(255,255,255,.8); }

.lessons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1rem; }
.lesson-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.2rem; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .1s; cursor: pointer; }
.lesson-card:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(39,86,100,.1); transform: translateY(-2px); }
.lesson-top { display: flex; align-items: flex-start; gap: 10px; }
.lesson-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; background: var(--teal-lt); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.lesson-meta { flex: 1; min-width: 0; }
.lesson-num { font-size: 11px; font-weight: 700; color: var(--teal); letter-spacing: .05em; text-transform: uppercase; }
.lesson-title { font-size: 14px; font-weight: 700; margin-top: 2px; }
.lesson-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lesson-tag { font-size: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; color: var(--muted); }
.lesson-tag.level { background: var(--teal-lt); border-color: transparent; color: var(--teal); font-weight: 600; }
.lesson-arrow { display: flex; align-items: center; justify-content: flex-end; font-size: 13px; color: var(--teal); font-weight: 600; gap: 4px; }

.cta-section { background: linear-gradient(135deg, var(--teal) 0%, #1e6070 100%); padding: 4rem 2rem; text-align: center; color: #fff; }
.cta-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: .75rem; }
.cta-section p { font-size: 15px; opacity: .75; margin-bottom: 2rem; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--teal-dk);
  border-radius: 8px; padding: 13px 28px;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .12s, box-shadow .12s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

.footer { background: #111d21; color: rgba(255,255,255,.45); padding: 2.5rem 2rem; font-size: 13px; }
.footer-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; text-decoration: none; }
.footer-logo span { color: #7dd8e8; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.45); transition: color .15s; }
.footer-links a:hover { color: rgba(255,255,255,.8); }
.footer-credit { font-size: 12px; }

/* ── SITE FOOTER (listening/reading/grammar/ebook) ─────────────── */
.site-footer { background: #111d21; color: rgba(255,255,255,.45); text-align: center; padding: 1.5rem; font-size: 12px; margin-top: 2rem; }
.site-footer a { color: rgba(255,255,255,.6); }

/* ═══════════════════════════════════════════════════════════════
   EBOOK PAGE ONLY (ebook.html)
═══════════════════════════════════════════════════════════════ */
@page { size: A4; margin: 2cm; }

#gatekeeper {
  position: fixed; top: 54px; left: 0; right: 0; bottom: 0;
  background: var(--surface); z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.gate-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 40px 30px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.05); margin: auto;
}
.gate-icon {
  width: 60px; height: 60px; background: var(--teal-lt); color: var(--teal);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 20px;
}
.gate-card h2 { font-size: 22px; color: var(--teal-dk); margin-bottom: 10px; font-weight: 700; }
.gate-card p { color: var(--muted); font-size: 14px; margin-bottom: 25px; text-align: center; }
.input-group { margin-bottom: 15px; }
.input-group input {
  width: 100%; padding: 12px 15px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 8px; outline: none;
  text-align: center; font-family: var(--ff); transition: border-color .2s;
}
.input-group input:focus { border-color: var(--teal); }
.btn-unlock {
  width: 100%; padding: 12px; background: var(--teal); color: #fff;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .2s; margin-bottom: 20px;
}
.btn-unlock:hover { background: var(--teal-dk); }
.divider { display: flex; align-items: center; text-align: center; color: #aaa; font-size: 12px; margin: 15px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.divider span { padding: 0 10px; text-transform: uppercase; }
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; background: #ffdd00; color: #000;
  border-radius: 8px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: transform .15s, background .15s;
}
.btn-buy:hover { background: #f0d000; transform: translateY(-1px); }
.error-msg { color: var(--wrong); font-size: 13px; margin-top: -8px; margin-bottom: 12px; display: none; }

#ebook-wrapper {
  display: none; /* hidden until unlocked */
  max-width: 210mm; margin: 20px auto; background: #fff;
  padding: 20mm; box-shadow: 0 4px 12px rgba(0,0,0,.05);
  /* copy deterrent */
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.download-button {
  position: fixed; top: 70px; right: 20px;
  background: #2d6b6b; color: #fff; padding: 12px 20px;
  border: none; border-radius: 5px; font-size: 14px; font-weight: 600;
  cursor: pointer; z-index: 100; box-shadow: 0 4px 6px rgba(0,0,0,.2);
  font-family: var(--ff);
}
.download-button:hover { background: #204b4b; }

@media print {
  .nav, .download-button, #gatekeeper { display: none !important; }
  body { margin: 0; padding: 0; background: #fff; }
  #ebook-wrapper { display: block !important; box-shadow: none; padding: 0; margin: 0; }
  .chapter { page-break-before: always; }
}

.cover { text-align: center; padding: 60px 40px; page-break-after: always; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.cover h1 { font-size: 44px; color: #2d6b6b; margin-bottom: 20px; font-weight: 700; letter-spacing: 1px; border-bottom: none; }
.cover .subtitle { font-size: 22px; color: #3c3c3c; margin-bottom: 40px; font-style: italic; }
.toc { page-break-after: always; padding: 40px 0; }
.toc h2 { font-size: 32px; color: #2d6b6b; margin-bottom: 30px; border-bottom: 3px solid #2d6b6b; padding-bottom: 10px; }
.toc-list { list-style: none; padding: 0; column-count: 2; column-gap: 40px; }
.toc-item { padding: 4px 0; border-bottom: 1px solid #ecf0f1; font-size: 14px; break-inside: avoid; }
.chapter { page-break-before: always; padding: 15px 0; }

#ebook-wrapper h1 { font-family: var(--ff); font-size: 26px; color: #2d6b6b; margin-bottom: 12px; border-bottom: 3px solid #2d6b6b; padding-bottom: 6px; }
#ebook-wrapper h2 { font-family: var(--ff); font-size: 19px; color: #234f4f; margin: 14px 0 6px; font-weight: 600; }
#ebook-wrapper h3 { font-family: var(--ff); font-size: 15px; color: #34495e; margin: 10px 0 5px; font-weight: 600; }
#ebook-wrapper p { margin-bottom: 6px; text-align: justify; }
.example { background: #f8f9fa; border-left: 4px solid #3498db; padding: 8px 14px; margin: 6px 0; font-style: italic; }
.note { background: #fff3cd; border-left: 4px solid #ffc107; padding: 8px 14px; margin: 6px 0; }
.note strong { color: #856404; }
#ebook-wrapper table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 14px; font-family: var(--ff); }
#ebook-wrapper th { background: #2d6b6b; color: #fff; padding: 6px 10px; text-align: left; font-weight: 600; }
#ebook-wrapper td { padding: 5px 10px; border: 1px solid #ddd; }
#ebook-wrapper tr:nth-child(even) { background: #f8f9fa; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.vocab-box { background: #ecf0f1; padding: 8px 12px; border-radius: 5px; margin: 5px 0; }
.vocab-box strong { color: #2d6b6b; font-size: 14px; }
#ebook-wrapper ul, #ebook-wrapper ol { margin: 6px 0 6px 26px; }
#ebook-wrapper li { margin: 3px 0; }
.formula { background: #e8f5e9; border: 2px solid #4caf50; padding: 8px 12px; margin: 6px 0; text-align: center; font-weight: 600; border-radius: 5px; }
.warning { background: #ffebee; border-left: 4px solid #f44336; padding: 8px 14px; margin: 6px 0; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile-first breakpoints, applies site-wide
═══════════════════════════════════════════════════════════════ */

/* ── tablet & below ── */
@media(max-width: 768px){
  .hero-inner { flex-direction: column; gap: 2.5rem; text-align: center; }
  .hero-visual { width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { gap: 1rem; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .teacher-inner { flex-direction: column; text-align: center; }
  .teacher-chips { justify-content: center; }
}

/* ── phones: collapse nav into a hamburger menu ── */
@media(max-width: 700px){
  .nav, .site-nav { padding: 0 1rem; position: relative; }
  .nav-burger { display: flex; }
  .nav-links, .skill-tabs, .nav-tabs {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; height: auto; background: var(--teal-dk);
    box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 300;
  }
  .nav-links.open, .skill-tabs.open, .nav-tabs.open { display: flex; }
  .nav-link, .skill-tab, .nav-tab {
    height: auto; padding: 14px 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08);
    border-left: 3px solid transparent;
  }
  .nav-link.active, .skill-tab.active, .nav-tab.active { border-bottom-color: rgba(255,255,255,.08); border-left-color: #7dd8e8; background: rgba(255,255,255,.04); }
  .nav-cta { display: none; }
  .lang-toggle { margin-left: auto; }
  .skill-tab .tab-count, .nav-tab .badge, .nav-link .badge { margin-left: auto; }
}

@media(max-width: 480px){
  .hero { padding: 2.5rem 1rem; min-height: 460px; }
  .hero-h1 { font-size: 1.6rem; }
  .section { padding: 2.5rem 1rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .bmc-btn span { display: none; }
  .bmc-btn { padding: 6px 10px; margin-left: 8px; }

  .page-header { flex-direction: column; gap: 1rem; padding: 1.5rem 1rem; text-align: center; }
  .page-header-img, .page-header-icon { width: 80px; height: 60px; }
  .page-header-text h1 { font-size: 1.3rem; }
  .main-wrap { padding: 1.2rem 1rem 3rem; }

  .q-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1rem; }

  /* ebook: shrink page-print padding and scroll wide tables on phone */
  #ebook-wrapper { padding: 6mm; margin: 10px auto; }
  #ebook-wrapper table { display: block; overflow-x: auto; white-space: nowrap; }
  .cover h1 { font-size: 30px; }
  .cover .subtitle { font-size: 16px; }
  .toc-list { column-count: 1; }
  .two-column { grid-template-columns: 1fr; }
  .download-button { top: auto; bottom: 16px; right: 16px; padding: 10px 16px; font-size: 13px; }
  .gate-card { padding: 28px 20px; }
}
