:root {
  --bg: #0f1729;
  --bg-2: #151f38;
  --panel: #1b2743;
  --panel-2: #22315a;
  --line: #2c3c66;
  --text: #e8ecf6;
  --muted: #93a0c2;
  --brand: #23c483;
  --brand-2: #12a06a;
  --accent: #5b8cff;
  --amber: #f6b93b;
  --rose: #ff6b81;
  --violet: #a855f7;
  --ai: linear-gradient(100deg, #5b8cff 0%, #a855f7 45%, #23c483 100%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(168,85,247,.14), transparent 60%),
    radial-gradient(800px 500px at 10% 2%, rgba(91,140,255,.12), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.ai-text { background: var(--ai); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Top navigation (single-site shell) ===== */
.topnav { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
  background: rgba(15,23,41,.78); border-bottom: 1px solid var(--line); }
.topnav-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 22px; }
.topnav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.topnav-links { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.topnav-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: 14px; padding: 7px 10px; border-radius: 9px; white-space: nowrap; border: 1px solid transparent; transition: background .12s, color .12s; }
.topnav-links a .ni { font-size: 15px; line-height: 1; }
.topnav-links a:hover { color: var(--text); background: var(--panel); }
.topnav-links a.active { color: var(--nc); background: color-mix(in srgb, var(--nc) 13%, transparent); border-color: color-mix(in srgb, var(--nc) 35%, transparent); }
@supports not (background: color-mix(in srgb, red, blue)) { .topnav-links a.active { color: var(--nc); background: var(--panel-2); } }
.nav-div { width: 1px; height: 22px; background: var(--line); margin: 0 5px; flex-shrink: 0; }
.topnav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* compact persona chip (click to rename) — replaces the old wide "Your AI tutor:" flag */
.ai-flag { font-size: 12.5px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; cursor: pointer; white-space: nowrap; }
.ai-flag:hover { border-color: var(--brand); }
.ai-flag b { color: var(--text); }
/* "More ▾" nav dropdown */
.nav-more { position: relative; }
.nav-more-btn { background: none; border: none; color: var(--muted); font-weight: 500; font-size: 14.5px; padding: 8px 13px; border-radius: 10px; cursor: pointer; font-family: inherit; }
.nav-more-btn:hover { color: var(--text); background: var(--panel); }
.nav-more-menu { position: absolute; top: 42px; left: 0; min-width: 190px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow); z-index: 80; display: flex; flex-direction: column; gap: 2px; }
.nav-more-menu[hidden] { display: none; }
.nav-more-menu a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; padding: 9px 12px; border-radius: 8px; }
.nav-more-menu a:hover { background: var(--panel-2); color: var(--text); }
.ai-credits { font-size: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap; cursor: default; }
.ai-credits b { color: var(--brand); }
.ai-credits.spent, .ai-credits.spent b { color: var(--amber); }
.icon-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 16px;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); }

/* auth */
.auth-area { position: relative; display: inline-flex; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--brand)); color: #08120c; position: relative; }
.avatar .pro-dot { position: absolute; top: -4px; right: -4px; font-size: 11px; background: var(--amber); color: #3a2c05;
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; }
.auth-dd { position: absolute; right: 0; top: 46px; width: 230px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); z-index: 80; }
/* display:flex above would otherwise defeat the hidden attribute — this keeps [hidden] authoritative */
.auth-dd[hidden] { display: none !important; }
.auth-dd .dd-name { font-weight: 700; font-size: 14px; }
.auth-dd .dd-name span { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; word-break: break-all; }
.auth-dd .dd-pro { color: var(--amber); font-weight: 700; font-size: 13px; }
.auth-dd .dd-ai { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.auth-dd .dd-ai b { color: var(--text); }
.auth-dd .dd-ai a { color: var(--accent); text-decoration: none; }

/* ===== Light theme ===== */
body.light {
  --bg: #f3f5fb; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #edf0f8; --line: #d9e0ef;
  --text: #16203a; --muted: #5c6884; --shadow: 0 10px 30px rgba(30, 50, 90, .12);
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(168,85,247,.08), transparent 60%),
    radial-gradient(800px 500px at 10% 2%, rgba(91,140,255,.08), transparent 55%),
    var(--bg);
}
body.light .topnav { background: rgba(255,255,255,.85); }
body.light .modal { background: linear-gradient(180deg, #ffffff, #f4f6fc); }
body.light .mock-bar, body.light .hero-demo { box-shadow: 0 6px 18px rgba(30,50,90,.08); }
body.light .banner { background: linear-gradient(120deg, rgba(91,140,255,.10), rgba(35,196,131,.08)); }
.menu-toggle { display: none; margin-left: 6px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-size: 20px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; color: #08120c;
  background: linear-gradient(100deg, #5b8cff, #a855f7 50%, #23c483); }
.brand-text { font-weight: 800; font-size: 20px; letter-spacing: -.5px; display: flex; align-items: center; gap: 7px; }
.brand-text span { color: var(--brand); }
.ai-pill { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: .5px; color: #08120c;
  background: linear-gradient(100deg, #5b8cff, #a855f7 50%, #23c483); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-weight: 500;
  transition: all .15s ease;
}
.nav a .ic { font-size: 16px; width: 20px; text-align: center; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(35,196,131,.18), rgba(35,196,131,.04)); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.sidebar-foot { margin-top: auto; }
.streak-card {
  background: linear-gradient(135deg, rgba(246,185,59,.15), rgba(255,107,129,.12));
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center;
}
.streak-num { font-size: 26px; font-weight: 800; }
.streak-label { color: var(--muted); font-size: 12px; }

/* Main */
.main { padding: 30px 24px 96px; max-width: 1120px; margin: 0 auto; }
/* when the AI chat is open on a big screen, give it its own column — never cover content */
@media (min-width: 1024px) {
  body.coach-open .main {
    margin-right: calc(370px + 44px);
    margin-left: max(24px, calc((100vw - 370px - 44px - 1120px) / 2));
  }
}

/* ===== Home / landing (in-app) ===== */
.home-hero { text-align: center; padding: 46px 0 30px; }
.badge-ai { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(168,85,247,.10); margin-bottom: 20px; }
.badge-ai .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.home-hero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -1.2px; margin: 0 auto 16px; max-width: 760px; font-weight: 800; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 auto 26px; line-height: 1.55; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: 12px; }

/* animated hero demo ("video") */
.hero-demo { max-width: 560px; margin: 36px auto 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; text-align: left; box-shadow: var(--shadow); }
.hd-head { font-size: 12px; color: var(--muted); margin-bottom: 10px; letter-spacing: .4px; display: flex; justify-content: space-between; }
.hd-live { color: var(--brand); font-weight: 700; }
.hd-line { min-height: 48px; font-size: 15px; line-height: 1.6; }
.hd-caret { color: var(--brand); animation: blink 1s infinite; }
.hd-score { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
.hd-score svg text { fill: var(--text); }
.hd-ring-fg { transition: stroke-dashoffset 1.1s ease; }
.hd-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hd-bar { height: 8px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.hd-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1s ease; }
.hd-hidden { visibility: hidden; }

.home-section { padding: 40px 0 8px; }
.home-section .eyebrow { margin-bottom: 8px; }
.home-h2 { font-size: 28px; letter-spacing: -.6px; margin: 0 0 22px; font-weight: 800; }

.home-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hstep { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.hstep .n { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--ai); color: #08120c; margin-bottom: 14px; }
.hstep h4 { margin: 0 0 6px; font-size: 17px; }
.hstep p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.home-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.hplan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.hplan.pop { border: 2px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--ai) border-box; position: relative; }
.hplan .poptag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--ai); color: #08120c; font-size: 11px; font-weight: 800; padding: 4px 13px; border-radius: 999px; letter-spacing: .5px; }
.hplan h3 { margin: 0 0 6px; font-size: 19px; }
.hplan .price { font-size: 34px; font-weight: 800; margin: 6px 0 2px; }
.hplan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.hplan .pdesc { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; min-height: 38px; }
.hplan ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hplan li { font-size: 14px; display: flex; gap: 9px; color: var(--muted); }
.hplan li .ck { color: var(--brand); flex-shrink: 0; }
.hplan li b { color: var(--text); font-weight: 600; }
.hplan .btn { width: 100%; justify-content: center; }

.home-footer { border-top: 1px solid var(--line); margin-top: 44px; padding: 30px 0 10px; text-align: center; }
.home-footer .disc { color: var(--muted); font-size: 12px; line-height: 1.6; max-width: 720px; margin: 0 auto; opacity: .85; }
.home-footer .copy { color: var(--muted); font-size: 13px; margin-top: 12px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.5px; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--brand); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; position: relative; overflow: hidden;
}
.stat .val { font-size: 28px; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat .spark { position: absolute; right: 14px; top: 16px; font-size: 22px; opacity: .8; }
.bar { height: 6px; background: var(--panel-2); border-radius: 6px; margin-top: 12px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; }

/* Section cards */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.section-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; cursor: pointer; transition: transform .15s ease, border-color .15s ease;
  text-decoration: none; color: inherit; display: block;
}
.section-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.section-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-card .emoji {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; background: var(--panel-2);
}
.section-card h3 { margin: 0; font-size: 18px; }
.section-card .sub { color: var(--muted); font-size: 13px; }
.section-card .desc { color: var(--muted); font-size: 14px; line-height: 1.5; }
.section-card .meta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }

/* Question type list */
.qt-list { display: flex; flex-direction: column; gap: 10px; }
.qt-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; cursor: pointer; transition: border-color .15s, background .15s;
}
.qt-item:hover { border-color: var(--brand); background: var(--panel-2); }
.qt-item .qt-badge {
  min-width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: var(--panel-2); color: var(--brand);
}
.qt-item .qt-info { flex: 1; }
.qt-item .qt-info h4 { margin: 0 0 2px; font-size: 15px; }
.qt-item .qt-info p { margin: 0; color: var(--muted); font-size: 13px; }
.qt-item .qt-count { color: var(--muted); font-size: 13px; }
.qt-item .arrow { color: var(--muted); font-size: 18px; }

/* Buttons */
.btn {
  border: none; border-radius: 11px; padding: 11px 20px; font-weight: 600; font-size: 14px;
  cursor: pointer; font-family: inherit; transition: filter .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #04140d; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-danger { background: transparent; color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 12%, transparent); border-color: var(--rose); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- account & plan (#/account) ---- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: start; }
.acct-card { padding: 20px; }
.acct-h { font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.acct-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.acct-row:first-of-type { border-top: none; }
.acct-row span { color: var(--muted); flex-shrink: 0; }
.acct-row b { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.acct-plan .plan-badge { margin-bottom: 4px; }
.plan-badge { display: inline-block; font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }
.plan-badge.free { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.plan-badge.pro { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.plan-badge.sm { padding: 2px 9px; font-size: 11px; margin-left: 4px; }

/* ---- account dropdown link ---- */
.auth-dd .dd-acct { display: block; text-align: center; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 9px; font-size: 13.5px; font-weight: 600; margin: 4px 0; }
.auth-dd .dd-acct:hover { border-color: var(--brand); }

/* ---- admin console ---- */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.stat-box .sv { font-size: 26px; font-weight: 800; color: var(--brand); }
.stat-box .sl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.adm-h { font-size: 15px; font-weight: 700; margin: 8px 0 12px; display: flex; align-items: center; gap: 12px; }
.adm-search { flex: 1; max-width: 280px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); padding: 8px 12px; font-family: inherit; font-size: 13px; }
.utable { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.urow { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.uinfo { min-width: 220px; }
.uinfo .uemail { display: block; color: var(--accent); font-size: 13px; margin-top: 3px; }
.uinfo .umeta { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.uacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.urow.banned { opacity: .62; }
.u-days { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 6px 8px; font-family: inherit; font-size: 12.5px; }
.plan-badge.ban { background: color-mix(in srgb, var(--rose) 15%, transparent); color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 45%, transparent); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .3px; }

/* password strength tag (admin) + meter (forms) */
.pw-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 4px; text-transform: uppercase; letter-spacing: .3px; }
.pw-tag.weak { background: color-mix(in srgb, var(--rose) 15%, transparent); color: var(--rose); }
.pw-tag.fair { background: color-mix(in srgb, #c98a00 16%, transparent); color: #c98a00; }
.pw-tag.strong { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.pw-tag.unk { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pw-meter { margin: 9px 0 2px; }
.pw-bar { display: flex; gap: 5px; }
.pw-bar i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .2s; }
.pw-lbl { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 600; }

/* promo code generator */
.promo-new { padding: 16px; margin-bottom: 12px; }
.promo-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promo-form input { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 8px 11px; font-family: inherit; font-size: 12.5px; flex: 1 1 150px; min-width: 0; }
.promo-form .pc-make { flex: 0 0 auto; }

/* activity log */
.log-list { display: flex; flex-direction: column; gap: 4px; }
.log-row { font-size: 12.5px; color: var(--muted); padding: 7px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.log-row b { color: var(--text); }
.log-row i { color: var(--muted); font-style: normal; }
.log-row .log-t { margin-left: auto; font-size: 11px; opacity: .8; }

/* Practice player */
.player {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin-top: 6px;
}
.player-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 14px; flex-wrap: wrap; }
.player-head .tag { font-size: 12px; color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.player-head h2 { margin: 4px 0 0; font-size: 20px; }
.timer { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.warn { color: var(--amber); border-color: var(--amber); }
.timer.danger { color: var(--rose); border-color: var(--rose); }

.prompt { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 20px; line-height: 1.7; font-size: 16px; }
.prompt.passage { max-height: 340px; overflow-y: auto; }
.instructions { color: var(--muted); font-size: 14px; margin: 4px 0 16px; line-height: 1.5; }

textarea.answer {
  width: 100%; min-height: 160px; resize: vertical; margin-top: 16px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); padding: 14px 16px; font-family: inherit; font-size: 15px; line-height: 1.6;
}
textarea.answer:focus { outline: none; border-color: var(--brand); }
.wordcount { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; justify-content: space-between; }
.wordcount.bad { color: var(--rose); }
.wordcount.good { color: var(--brand); }

/* MCQ */
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--bg-2);
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--brand); }
.option .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.option.radio .box { border-radius: 50%; }
.option.selected { border-color: var(--brand); background: rgba(35,196,131,.08); }
.option.selected .box { background: var(--brand); border-color: var(--brand); color: #04140d; }
.option.correct { border-color: var(--brand); background: rgba(35,196,131,.14); }
.option.wrong { border-color: var(--rose); background: rgba(255,107,129,.12); }
.option .txt { line-height: 1.5; }

/* Fill in blanks */
.blank-select {
  background: var(--panel-2); border: 1px solid var(--brand); color: var(--text);
  border-radius: 8px; padding: 3px 8px; margin: 0 3px; font-family: inherit; font-size: 15px;
}
.blank-select.correct { border-color: var(--brand); background: rgba(35,196,131,.18); }
.blank-select.wrong { border-color: var(--rose); background: rgba(255,107,129,.18); }

/* Reading Fill in the Blanks (word bank) */
.fib-blank { display: inline-block; min-width: 92px; border-bottom: 2px solid var(--brand); margin: 0 3px; padding: 2px 8px; text-align: center; cursor: pointer; border-radius: 6px 6px 0 0; color: var(--text); }
.fib-blank:empty::before { content: "⌄"; color: var(--muted); }
.fib-blank.active { background: rgba(91,140,255,.18); border-color: var(--accent); }
.fib-blank.filled { background: var(--panel-2); }
.fib-blank.correct { background: rgba(35,196,131,.18); border-color: var(--brand); }
.fib-blank.wrong { background: rgba(255,107,129,.18); border-color: var(--rose); }
.word-bank { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bank-word { padding: 8px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.bank-word:hover { border-color: var(--brand); }
.bank-word.used { opacity: .35; pointer-events: none; text-decoration: line-through; }

/* Highlight Incorrect Words */
.prompt.hiw { line-height: 2.3; }
.hiw-word { cursor: pointer; padding: 1px 3px; border-radius: 5px; }
.hiw-word:hover { background: var(--panel-2); }
.hiw-word.sel { background: rgba(246,185,59,.25); box-shadow: inset 0 -2px 0 var(--amber); }
.hiw-word.is-wrong { background: rgba(35,196,131,.2); box-shadow: inset 0 -2px 0 var(--brand); }
.hiw-word.bad-pick { background: rgba(255,107,129,.2); box-shadow: inset 0 -2px 0 var(--rose); }

/* Timed mock header */
.mock-bar { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; margin-bottom: 16px; position: sticky; top: 72px; z-index: 20; }
.mock-title { font-weight: 700; }
.mock-prog { color: var(--muted); font-size: 13px; }
.mock-prog b { color: var(--text); }
.mock-timer { margin-left: auto; }

/* 20 mock tests grid */
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mock-card { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; transition: transform .15s, border-color .15s; }
.mock-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.mock-card.done { border-color: rgba(35,196,131,.4); }
.mock-num { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--panel-2); color: var(--muted); flex-shrink: 0; }
.mock-card.done .mock-num { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #04140d; }
.mock-card-info { flex: 1; min-width: 0; }
.mock-card-info h4 { margin: 0; font-size: 15px; }
.mock-card-info p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.mock-go { color: var(--muted); font-size: 18px; }

/* Progress dashboard */
.progress-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.spark-row { display: flex; align-items: flex-end; gap: 4px; height: 50px; margin-top: 16px; }
.spark-row i { flex: 1; border-radius: 3px 3px 0 0; min-height: 6px; display: block; }
.weak-list { display: flex; flex-direction: column; gap: 10px; }
.weak-card { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; transition: border-color .15s; }
.weak-card:hover { border-color: var(--brand); }
.weak-card span { display: block; color: var(--muted); font-size: 12.5px; }
.weak-score { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Reorder */
.reorder { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.reorder li {
  list-style: none; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; cursor: grab; display: flex; gap: 12px; align-items: flex-start;
  line-height: 1.5;
}
.reorder li.dragging { opacity: .4; }
.reorder li.over { border-color: var(--brand); }
.reorder li .handle { color: var(--muted); font-weight: 700; cursor: grab; }
.reorder { padding: 0; margin: 16px 0 0; }

/* Recorder */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 20px; padding: 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.rec-btn {
  width: 76px; height: 76px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--rose), #d63447); color: white; font-size: 28px;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(255,107,129,.4);
  transition: transform .15s;
}
.rec-btn:hover { transform: scale(1.05); }
.rec-btn.recording { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,129,.5); } 50% { box-shadow: 0 0 0 16px rgba(255,107,129,0); } }
.rec-status { color: var(--muted); font-size: 14px; }
audio { margin-top: 6px; width: 100%; }

/* Feedback panel */
.feedback {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  background: linear-gradient(135deg, rgba(35,196,131,.08), transparent);
}
.feedback.hidden { display: none; }
.feedback h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.score-badge { font-size: 24px; font-weight: 800; color: var(--brand); }
.feedback ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.feedback .kv { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.feedback .kv div b { color: var(--text); }

/* Nav within player */
.player-nav { display: flex; justify-content: space-between; margin-top: 22px; }

/* misc */
.back-link { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; gap: 6px; margin-bottom: 14px; }
.back-link:hover { color: var(--brand); }

/* question jump navigation */
.qnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; max-height: 120px; overflow-y: auto; }
.qnav button { min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 12.5px; cursor: pointer; font-family: inherit; }
.qnav button:hover { border-color: var(--brand); }
.qnav button.cur { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #04140d; border-color: transparent; font-weight: 700; }
.qnav button.lockd { opacity: .55; }
.qjump { display: inline-flex; gap: 6px; margin-left: 8px; }
.qjump input { width: 84px; height: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 0 10px; font-family: inherit; font-size: 12.5px; }
.qjump input:focus { outline: none; border-color: var(--brand); }
.qjump .btn { padding: 4px 12px; font-size: 12.5px; border-radius: 8px; }

/* locked question / upgrade */
.lock-card { text-align: center; padding: 46px 24px; }
.lock-card .big-lock { font-size: 46px; margin-bottom: 12px; }
.lock-card h3 { margin: 0 0 8px; font-size: 20px; }
.lock-card p { color: var(--muted); margin: 0 0 20px; }
.benefits { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; text-align: left; }
.benefits li { font-size: 14px; display: flex; gap: 9px; }
.benefits li .ck { color: var(--brand); }
.code-row { display: flex; gap: 8px; margin-top: 12px; }
.code-row input { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 10px 12px; font-family: inherit; font-size: 14px; text-align: left; font-weight: 400; }
.pill-progress { display: flex; gap: 6px; margin: 10px 0 18px; }
.pill-progress i { flex: 1; height: 5px; border-radius: 5px; background: var(--panel-2); }
.pill-progress i.done { background: var(--brand); }
.pill-progress i.current { background: var(--accent); }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }
.image-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-top: 16px; }
.image-card svg { display: block; width: 100%; height: auto; background: #fff; }

.banner {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
  background: linear-gradient(120deg, rgba(91,140,255,.15), rgba(35,196,131,.12));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
}
.banner .big { font-size: 40px; }
.banner h2 { margin: 0 0 4px; font-size: 20px; }
.banner p { margin: 0; color: var(--muted); }
.banner .btn { margin-left: auto; white-space: nowrap; }

/* ===== AI Examiner ===== */
.ai-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: linear-gradient(90deg, rgba(91,140,255,.16), rgba(35,196,131,.10)); border-bottom: 1px solid var(--line); }
.ai-head .ai-avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--brand)); font-size: 16px; }
.ai-head h4 { margin: 0; font-size: 15px; }
.ai-head .ai-sub { color: var(--muted); font-size: 12px; }
.ai-body { padding: 18px; }
.ai-thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 6px 0; }
.ai-dots span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.ai-dots span:nth-child(2) { animation-delay: .2s; } .ai-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .3; } 40% { opacity: 1; } }

.score-ring { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.score-ring .ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.score-ring .ring svg { transform: rotate(-90deg); }
.score-ring .ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.score-ring .ring .num small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; text-align: center; }
.score-ring .verdict h3 { margin: 0 0 3px; font-size: 17px; }
.score-ring .verdict p { margin: 0; color: var(--muted); font-size: 13px; }

.criteria { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 18px; }
.crit { }
.crit .crit-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.crit .crit-top b { font-weight: 600; }
.crit .crit-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.crit .track { height: 7px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.crit .track > i { display: block; height: 100%; border-radius: 6px; }
.crit .note { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.5; }

.obs { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 9px; }
.obs li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.obs li .oi { flex-shrink: 0; font-size: 15px; }
.obs li.good .oi { color: var(--brand); } .obs li.warn .oi { color: var(--amber); } .obs li.fix .oi { color: var(--rose); }
.obs li q { color: var(--text); font-style: italic; opacity: .9; }

.ai-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ai-model { margin-top: 14px; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; background: rgba(35,196,131,.05); }
.ai-model h5 { margin: 0 0 8px; font-size: 13px; color: var(--brand); text-transform: uppercase; letter-spacing: .5px; }
.ai-model p { margin: 0; line-height: 1.7; font-size: 15px; }

/* ===== AI Coach chat (fixed side panel; collapses to a small bubble) ===== */
.coach { position: fixed; right: 16px; bottom: 16px; width: min(370px, calc(100vw - 32px)); z-index: 70;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.coach-msgs { max-height: 40vh; }
/* collapsed = a clearly-labelled "Ask <name> 💬" pill (discoverable), not a bare dot */
.coach:not(.open) { width: auto; border-radius: 999px; animation: coachpulse 2.8s ease-out infinite; }
.coach:not(.open) .coach-head { padding: 11px 18px 11px 12px; justify-content: flex-start; gap: 9px; }
.coach:not(.open) .coach-head h4, .coach:not(.open) .coach-role, .coach:not(.open) .toggle { display: none; }
.coach-cta { display: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.coach:not(.open) .coach-cta { display: inline; }
@keyframes coachpulse {
  0%   { box-shadow: var(--shadow), 0 0 0 0 rgba(91,140,255,.45); }
  70%  { box-shadow: var(--shadow), 0 0 0 13px rgba(91,140,255,0); }
  100% { box-shadow: var(--shadow), 0 0 0 0 rgba(91,140,255,0); }
}
.coach-head .toggle { font-size: 15px; }
.coach-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; background: var(--panel); }
.coach-head .ca { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--accent)); font-size: 15px; }
.coach-head h4 { margin: 0; font-size: 14px; flex: 1; }
.coach-head .toggle { color: var(--muted); font-size: 13px; }
.coach-body { display: none; flex-direction: column; }
.coach.open .coach-body { display: flex; }
.coach-msgs { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; }
.msg { display: flex; gap: 10px; max-width: 90%; }
.msg .bubble { padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.msg.ai .bubble { background: var(--panel-2); border: 1px solid var(--line); border-top-left-radius: 3px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #04140d; border-top-right-radius: 3px; }
.msg .mav { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; background: var(--panel-2); }
.msg.ai .bubble b { color: var(--text); }
.coach-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
.suggest-chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.suggest-chip:hover { border-color: var(--brand); }
.coach-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.coach-input input { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 14px; font-family: inherit; font-size: 14px; }
.coach-input input:focus { outline: none; border-color: var(--brand); }
.why-chip { font-size: 12px; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--accent); cursor: pointer; }
.why-chip:hover { border-color: var(--accent); }

/* persona avatars carry the AI's initial */
.ai-head .ai-avatar, .coach-head .ca { color: #08120c; font-weight: 800; }
.msg.ai .mav { background: linear-gradient(135deg, var(--accent), var(--brand)); color: #08120c; font-weight: 800; }
.coach-head .coach-role { color: var(--muted); font-size: 12px; margin-left: -4px; }

/* ---- global floating AI tutor chat (every non-practice page) ---- */
#gcoach.hidden { display: none; }
.gcoach-fab { position: fixed; right: 16px; bottom: 16px; z-index: 68; display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--accent), var(--brand)); color: #04140d; border: none; cursor: pointer;
  padding: 11px 18px 11px 11px; border-radius: 999px; font-weight: 700; font-size: 14.5px; font-family: inherit;
  box-shadow: 0 10px 26px rgba(30, 50, 90, .3); animation: coachpulse 2.8s ease-out infinite; }
.gcoach-fab:hover { filter: brightness(1.06); }
.gcoach-fab.collapsed { display: none; }
.gcoach-fab .gc-ava { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .28); font-weight: 800; }
.gcoach-panel { position: fixed; right: 16px; bottom: 16px; z-index: 69; width: min(380px, calc(100vw - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.gcoach-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.gcoach-top .ca { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #08120c; font-weight: 800; font-size: 15px; }
.gc-meta { flex: 1; line-height: 1.2; } .gc-meta b { font-size: 14.5px; } .gc-meta span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.gc-x { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 7px; border-radius: 8px; line-height: 1; }
.gc-x:hover { color: var(--text); background: var(--panel-2); }
.gcoach-msgs { max-height: min(56vh, 440px); }

.hero-mini-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.mock-promise { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin: 0 0 16px; font-size: 14px; color: var(--text); }
.banner.free-sample { border: 1px solid var(--brand); }
.free-badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #08120c; background: var(--brand); border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.mock-report { margin: 18px 0 6px; padding: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.mock-report h4 { margin: 0 0 10px; font-size: 15px; }
.mock-report p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.mock-report .weak-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

/* templates & strategies */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tpl-card h4 { margin: 0 0 10px; font-size: 15px; }
.tpl-strat { margin: 0; padding-left: 18px; }
.tpl-strat li { font-size: 13.5px; line-height: 1.6; margin-bottom: 6px; color: var(--text); }
/* templates page: section jump chips + task accordion */
.tpl-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.tpl-jump-chip { font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-family: inherit; }
.tpl-jump-chip:hover { border-color: var(--brand); color: var(--brand); }
.tpl-acc { display: flex; flex-direction: column; gap: 8px; }
.tpl-acc-item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.tpl-acc-item.open { border-color: var(--brand); }
.tpl-acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; color: var(--text); }
.tpl-acc-head:hover { background: var(--panel-2); }
.tpl-acc-title { font-weight: 600; font-size: 15px; flex: 1; }
.tpl-acc-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tpl-acc-badge { font-size: 11.5px; font-weight: 600; color: var(--brand); background: rgba(35,196,131,.12); border: 1px solid var(--brand); border-radius: 999px; padding: 2px 9px; }
.tpl-acc-sub { font-size: 12px; color: var(--muted); }
.tpl-acc-chev { color: var(--muted); transition: transform .2s; }
.tpl-acc-item.open .tpl-acc-chev { transform: rotate(180deg); }
.tpl-acc-body { padding: 2px 16px 16px; }
.tpl-acc-body .tpl-strat { margin-top: 4px; }
@media (max-width: 560px) { .tpl-acc-sub { display: none; } }

/* multiple template options, tagged by target score */
.tpl-options { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.tpl-opt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.tpl-opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tpl-opt-head b { font-size: 14px; }
.tpl-target { font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--brand); background: rgba(35,196,131,.12); border: 1px solid var(--brand); border-radius: 999px; padding: 3px 9px; }
.tpl-target.is-pro { color: var(--amber); background: rgba(245,179,1,.12); border-color: var(--amber); }
.tpl-opt .tpl-fill { margin-top: 0; }
.tpl-opt.locked { background: var(--panel-2); }
.tpl-locked { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 6px 6px; }
.tpl-locked > span { font-size: 26px; }
.tpl-locked p { margin: 0; font-size: 13px; color: var(--muted); max-width: 340px; }
.tpl-locked .btn { padding: 8px 16px; font-size: 13px; }

.tpl-fill { margin-top: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tpl-fill-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tpl-fill-head b { font-size: 12.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tpl-fill-head .btn { padding: 4px 12px; font-size: 12px; }
.tpl-fill pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 13.5px; line-height: 1.65; color: var(--text); }
.tpl-inline { margin: 4px 0 14px; }
.tpl-inline .tpl-toggle { padding: 7px 14px; font-size: 13px; }
.tpl-panel { margin-top: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tpl-panel .tpl-strat li { color: var(--text); }

/* speaking waveform + pause highlight (A1) */
.ai-wave { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.ai-wave h5 { margin: 0 0 8px; font-size: 13px; }
.wave-canvas { width: 100%; overflow: hidden; border-radius: 8px; background: var(--bg-2); }
.wave-canvas canvas { width: 100%; height: 120px; display: block; }
.ai-wave .wave-note { margin: 8px 0 0; }

/* describe-image table variant (A2) — always on a white surface like the SVG charts */
.tbl-chart { background: #fff; color: #1b2743; padding: 18px 20px; }
.tbl-chart h4 { margin: 0 0 12px; text-align: center; font-size: 16px; color: #1b2743; }
.tbl-chart table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl-chart th, .tbl-chart td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e3e8f0; }
.tbl-chart th { color: #667; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl-chart td:last-child, .tbl-chart th:last-child { text-align: right; font-weight: 700; }
.tc-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }

/* full-length mock (A3) */
.full-mock .pill-2hr { font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin-left: 8px; vertical-align: middle; color: var(--muted); }
.mock-prog .mock-sec { color: var(--accent); font-weight: 600; }

/* freemium tag + lazy bank loader (A4/A5) */
.free-tag { color: var(--brand); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.bank-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 0; color: var(--muted); }
.bank-loading .spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* speaking transcript feedback (word-by-word colouring) */
.ai-transcript { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.ai-transcript h5 { margin: 0 0 8px; font-size: 13px; }
.ai-transcript .t-marked { margin: 0; line-height: 1.9; font-size: 15px; }
.w-ok { color: var(--brand); font-weight: 600; }
.w-sub { color: #c98a00; font-weight: 600; text-decoration: underline; text-decoration-style: wavy; }
body.light .w-sub { color: #a06b00; }
.w-miss { color: var(--rose); font-weight: 600; text-decoration: underline; text-decoration-style: dotted; }
.ai-transcript .t-heard { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.ai-transcript .t-chips span { display: inline-block; margin: 2px 4px 2px 0; padding: 4px 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); }
.ai-transcript .kw-ok { background: rgba(35,196,131,.12); color: var(--brand); border-color: var(--brand); }
.ai-transcript .kw-miss { background: rgba(255,107,129,.10); color: var(--rose); border-color: var(--rose); }

/* PTE guide page */
.gt { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 12px; }
.gt-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; }
.gt-label b { display: block; font-size: 14px; }
.gt-label span { color: var(--muted); font-size: 12.5px; }
.gt-track { height: 22px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.gt-track i { display: block; height: 100%; border-radius: 999px; }
@media (max-width: 640px) { .gt-row { grid-template-columns: 1fr; gap: 5px; } }
.gsub { color: var(--muted); max-width: 720px; margin: 0 0 16px; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.gcard h4 { margin: 0 0 8px; font-size: 15px; }
.gcard p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text); }
.gcard p + p { margin-top: 8px; }
.gchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gchips .chip { text-decoration: none; cursor: pointer; }
.gchips .chip:hover { border-color: var(--brand); color: var(--brand); }
.gscale { position: relative; height: 14px; border-radius: 999px; margin: 42px 8px 84px; background: linear-gradient(90deg, var(--rose), var(--amber), var(--accent), var(--brand)); }
.gscale > i { position: absolute; inset: 0; border-radius: 999px; border: 1px solid var(--line); }
.gmark { position: absolute; top: 20px; transform: translateX(-50%); text-align: center; font-size: 12px; color: var(--muted); width: 130px; }
.gmark b { display: block; font-size: 16px; color: var(--text); }
.gmark::before { content: ""; position: absolute; left: 50%; top: -22px; width: 2px; height: 18px; background: var(--text); opacity: .6; }
@media (max-width: 860px) { .gmark { width: auto; font-size: 0; } .gmark b { font-size: 15px; } .gscale { margin-bottom: 56px; } }
.gtypes .gcard h4 small { color: var(--muted); font-weight: 500; }

/* contact / support */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid input, .contact-grid textarea { width: 100%; box-sizing: border-box; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 11px 14px; font-family: inherit; font-size: 14.5px; margin-bottom: 10px; }
.contact-grid textarea { min-height: 130px; resize: vertical; }
.contact-grid input:focus, .contact-grid textarea:focus { outline: none; border-color: var(--brand); }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.faq details[open] summary { color: var(--brand); }
.foot-links { margin: 0 0 14px; }
.foot-links a { color: var(--accent); text-decoration: none; font-size: 14px; }
.foot-links a:hover { text-decoration: underline; }

/* testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }
.testi { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.testi .stars { color: #f5b301; font-size: 13px; letter-spacing: 2px; }
.testi blockquote { margin: 0; font-size: 14.5px; line-height: 1.65; }
.testi figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.testi .tava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #08120c; }
.testi figcaption b { display: block; font-size: 13.5px; }
.testi .trole { color: var(--muted); font-size: 12px; }

/* name-your-AI onboarding modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(7,11,20,.74); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 20px; padding: 32px; max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.modal .m-ava { width: 74px; height: 74px; border-radius: 20px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 34px; color: #08120c;
  background: linear-gradient(100deg, #5b8cff, #a855f7 50%, #23c483); }
.modal h2 { margin: 0 0 8px; font-size: 24px; }
.modal p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; font-size: 15px; }
.modal input { width: 100%; text-align: center; font-size: 20px; font-weight: 700; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); padding: 14px; font-family: inherit; }
.modal input:focus { outline: none; border-color: var(--brand); }
.name-sugs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 22px; }
.name-sug { font-size: 13px; padding: 7px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.name-sug:hover { border-color: var(--brand); }
.modal p:last-child { margin: 14px 0 0; color: var(--muted); }

@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topnav-inner { flex-wrap: wrap; padding: 12px 16px; }
  .topnav-links { display: none; order: 3; width: 100%; margin-left: 0; flex-direction: column; gap: 4px; padding-top: 8px; }
  body.nav-open .topnav-links { display: flex; }
  .topnav-links a { padding: 12px 14px; }
  .nav-div { display: none; }
  /* flatten the "More" dropdown into the mobile list */
  .nav-more { width: 100%; }
  .nav-more-btn { display: none; }
  .nav-more-menu { position: static; box-shadow: none; border: none; padding: 0; min-width: 0; }
  body.nav-open .nav-more-menu[hidden] { display: flex; }
  .nav-more-menu a { padding: 12px 14px; }
  .topnav-cta .ai-flag, .topnav-cta .ai-credits { display: none; }
  .home-hero h1 { font-size: 32px; }
  .home-steps, .home-plans, .progress-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .main { padding: 20px 16px; }
}
