/* Chiga IELTS — crisp "exam room" look: cool white paper, ink navy, one confident blue, the chick's yellow for results.
   Headings and every band score in Plus Jakarta Sans with tabular figures, so scores line up like a real report. */
:root {
  --paper: #F5F7FA; --paper-2: #E9EDF3; --white: #FFFFFF; --ink: #0F1B33; --ink-2: #33415C; --muted: #56627A; --line: #DFE4EC;
  --blue: #2453D6; --blue-d: #1B3FA8; --blue-l: #EAF0FD;
  --sun: #FFC83D; --sun-l: #FFF4D6; --sun-d: #8A5A00;
  --green: #1F8A52; --green-l: #E3F5EA; --red: #B42318; --red-l: #FDECEA; --flame: #FF7A2F;
  --f-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --r: 18px; --r-sm: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; min-height: 100vh; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.025em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }

/* layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.narrow { max-width: 480px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.tight { gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 0; color: var(--muted); }
@media (max-width: 860px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font-family: var(--f-display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand b span { color: var(--blue); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 7px 12px; border-radius: 10px; font-weight: 700; text-decoration: none; color: var(--ink-2); }
.nav a:hover { background: var(--paper); }
.nav a.on { background: var(--ink); color: var(--white); }
@media (max-width: 600px) { .topbar { padding: 10px 16px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 0; background: var(--blue); color: var(--white); font-weight: 800; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; }
.btn:hover { background: var(--blue-d); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.big { min-height: 52px; font-size: 17px; padding: 12px 24px; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper); color: var(--ink); }
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.sun:hover { background: #F5B800; color: var(--ink); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: var(--ink-2); }
.btn.danger { background: var(--red); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-weight: 700; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .legend { font-weight: 800; font-size: 14px; }
.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #CFC8B8; border-radius: 10px; background: var(--white); }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-l); }
.input.sm { min-height: 36px; padding: 4px 10px; width: auto; }
.hint { font-size: 13px; color: var(--muted); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #CFC8B8; border-radius: 10px; cursor: pointer; font-weight: 800; }
.choice label span { font-weight: 600; font-size: 13px; color: var(--muted); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--blue-l); box-shadow: inset 0 0 0 1px var(--blue); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }

/* messages, chips */
.msg { padding: 12px 14px; border-radius: 10px; font-weight: 700; }
.msg.ok { background: var(--green-l); color: var(--green); }
.msg.err { background: var(--red-l); color: var(--red); }
.msg.info { background: var(--sun-l); color: var(--sun-d); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--green-l); color: var(--green); }
.chip.bad { background: var(--red-l); color: var(--red); }
.chip.warn { background: var(--sun-l); color: var(--sun-d); }
.chip.blue { background: var(--blue-l); color: var(--blue-d); }
.chip.dark { background: var(--ink); color: var(--white); }

/* auth shell */
.auth { min-height: 100vh; display: grid; place-items: start center; padding: 48px 16px; }
.auth .box { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 18px; }
.auth .logo { display: flex; align-items: center; gap: 10px; justify-content: center; text-decoration: none; color: var(--ink); }
.auth .logo b { font-family: var(--f-display); font-size: 28px; font-weight: 700; }
.auth .logo b span { color: var(--blue); }

/* landing */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 0 28px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 34ch; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 16px; } }
.scorecard { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 18px 40px -24px rgba(20, 33, 61, .35); transform: rotate(1.2deg); }
.scorecard .bands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.scorecard .band { background: var(--paper); border-radius: 10px; padding: 10px 6px; text-align: center; }
.scorecard .band b { display: block; font-family: var(--f-display); font-size: 28px; }
.scorecard .band span { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.scorecard .overall { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 12px; }
.scorecard .overall > b { font-family: var(--f-display); font-size: 40px; color: var(--blue); }
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature .n { font-family: var(--f-display); font-size: 15px; color: var(--blue); font-weight: 700; }
.plan { display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan.pick { border: 2px solid var(--ink); }
.plan .price { font-family: var(--f-display); font-size: 40px; font-weight: 600; line-height: 1; }
.plan .price small { font-family: var(--f-body); font-size: 15px; color: var(--muted); font-weight: 700; }
.plan ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.plan .tag { position: absolute; top: -12px; left: 20px; }
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; color: var(--muted); font-size: 13px; }

/* learner home */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--white); }
.step.locked { background: transparent; border-style: dashed; color: var(--muted); }
.step .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--white); font-weight: 800; }
.step.locked .num { background: var(--paper-2); color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.skill { padding: 14px; border-radius: 12px; background: var(--paper); text-align: center; }
.skill b { display: block; font-family: var(--f-display); font-size: 26px; color: var(--muted); }
@media (max-width: 560px) { .skills { grid-template-columns: repeat(2, 1fr); } }

/* admin */
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 62px); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; border-right: 1px solid var(--line); background: var(--white); }
.admin-nav a { padding: 9px 12px; border-radius: 10px; font-weight: 700; text-decoration: none; color: var(--ink-2); }
.admin-nav a.on { background: var(--ink); color: var(--white); }
.admin-nav a .count { float: right; background: var(--red); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } .admin-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; } }
.stat .v { font-family: var(--f-display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.tablebox { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
code.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; background: var(--paper); padding: 2px 8px; border-radius: 6px; letter-spacing: .05em; }

/* misc */
.loader { min-height: 60vh; display: grid; place-items: center; }
/* loading skeleton + AI progress panel */
.topload { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 95; overflow: hidden; background: var(--blue-l); }
.topload i { position: absolute; top: 0; bottom: 0; width: 40%; background: var(--blue); border-radius: 3px; animation: topload 1.1s ease-in-out infinite; }
@keyframes topload { 0% { left: -40%; } 100% { left: 100%; } }
.skel { display: flex; flex-direction: column; gap: 16px; }
.sk { background: linear-gradient(90deg, var(--paper-2) 0%, #F3F0E8 40%, var(--paper-2) 80%); background-size: 300% 100%; border-radius: 12px; animation: shimmer 1.4s linear infinite; }
.sk-h { height: 40px; width: 42%; } .sk-l { height: 16px; } .sk-card { height: 120px; } .sk-block { height: 220px; }
.grid-sk { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.prog-bg { background: rgba(20, 33, 61, .35); backdrop-filter: blur(2px); }
.modal.prog { max-width: 480px; gap: 16px; box-shadow: 0 20px 60px rgba(20, 33, 61, .25); }
.prog h2 { font-size: 21px; }
.prog-time { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--muted); }
.prog-bar { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s linear;
  background: repeating-linear-gradient(45deg, var(--blue) 0 12px, #3D74E3 12px 24px); background-size: 34px 34px; animation: stripes 1s linear infinite; }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 34px 0; } }
.prog-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prog-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.prog-steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.prog-steps li.now { color: var(--ink); }
.prog-steps li.now .dot { border-color: var(--blue); border-top-color: transparent; animation: spin .8s linear infinite; }
.prog-steps li.ok { color: var(--ink-2); }
.prog-steps li.ok .dot { background: var(--green); border-color: var(--green); }
.prog-steps li.ok .dot::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.prog.failed .prog-bar i { background: var(--red); animation: none; }
@media (prefers-reduced-motion: reduce) { .topload i, .sk, .prog-bar i, .prog-steps li.now .dot { animation: none; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 700; z-index: 100; max-width: calc(100vw - 32px); }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 33, 61, .45); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--white); border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 14px; }

/* ---------- phase 2 ---------- */
.lead { font-size: 18px; color: var(--ink-2); }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-family: var(--f-display); font-size: 30px; font-weight: 600; line-height: 1.1; }
.skill.has b { color: var(--ink); }
.skill .src { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.overall-tile { background: var(--ink); color: #fff; }
.overall-tile b { color: var(--sun) !important; }
.overall-tile span { color: #C9D1E6 !important; }
.meter { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.meter.green i { background: var(--green); }
.task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--paper-2); }
.task:last-child { border-bottom: 0; }
.task .meter { grid-column: 1 / -1; }
.task.later { color: var(--muted); }
.streak { display: flex; align-items: center; gap: 12px; }
.streak .num { font-family: var(--f-display); font-size: 40px; font-weight: 600; line-height: 1; }
.weekdots { display: flex; gap: 6px; }
.weekdots span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--paper-2); color: var(--muted); }
.weekdots span.on { background: var(--green); color: #fff; }
.weekdots span.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.status { padding: 14px 16px; border-radius: 12px; border: 1px solid; display: flex; flex-direction: column; gap: 6px; }
.status.on_track, .status.at_target { background: var(--green-l); border-color: #BFE5CD; color: #145C37; }
.status.tight, .status.no_date { background: var(--sun-l); border-color: #F2DC9C; color: #6B4600; }
.status.unrealistic { background: var(--red-l); border-color: #F5C2BD; color: #8C1C13; }
.split { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.split div { padding: 12px; border-radius: 12px; background: var(--paper); }
.split b { font-family: var(--f-display); font-size: 22px; display: block; }
@media (max-width: 600px) { .split { grid-template-columns: repeat(2, 1fr); } }

/* test runner (computer-delivered look) */
.runner { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; background: var(--white); }
.runbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: var(--ink); color: #fff; }
.runbar .t { font-weight: 800; }
.runbar .clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; padding: 4px 12px; border-radius: 8px; background: rgba(255,255,255,.1); }
.runbar .clock.low { background: var(--red); }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
.pane { overflow-y: auto; padding: 24px 28px 40px; min-height: 0; }
.pane.passage { border-right: 1px solid var(--line); background: #FCFBF8; }
.pane.passage h2 { margin-bottom: 14px; }
.pane.passage p { margin: 0 0 14px; line-height: 1.7; font-size: 16.5px; }
.pane.passage p b.lab { font-family: var(--f-display); margin-right: 8px; color: var(--blue); }
.qgroup { display: flex; flex-direction: column; gap: 12px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--paper-2); }
.qgroup .qhead { display: flex; flex-direction: column; gap: 4px; }
.qgroup .qhead b { font-size: 15px; }
.qgroup .ins { font-size: 14px; color: var(--ink-2); font-style: italic; }
.optlist { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 14px; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.optlist b { display: inline-block; min-width: 34px; }
.q { display: flex; gap: 12px; align-items: flex-start; scroll-margin-top: 16px; }
.q .qn { flex: 0 0 auto; min-width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--paper-2); }
.q.answered .qn { background: var(--ink); color: #fff; }
.q .qb { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills label { position: relative; padding: 6px 12px; border: 1px solid #CFC8B8; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pills label:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.pills input, .mcopts input { position: absolute; opacity: 0; pointer-events: none; }
.pills label:has(input:focus-visible), .mcopts label:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.mcopts { display: flex; flex-direction: column; gap: 6px; }
.mcopts label { position: relative; display: flex; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 15px; }
.mcopts label b { min-width: 18px; }
.mcopts label:has(input:checked) { border-color: var(--blue); background: var(--blue-l); box-shadow: inset 0 0 0 1px var(--blue); }
.gap { display: inline-block; width: 150px; min-height: 32px; padding: 3px 8px; margin: 0 4px; border: 1px solid #A9A08D; border-radius: 6px; font: inherit; vertical-align: baseline; background: #fff; }
.gap:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
select.sel { min-height: 36px; padding: 4px 8px; border: 1px solid #A9A08D; border-radius: 8px; background: #fff; max-width: 100%; }
.navbar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); background: var(--white); overflow-x: auto; }
.navbar .nums { display: flex; gap: 4px; flex: 1; }
.navbar .nums button { min-width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 13px; cursor: pointer; }
.navbar .nums button.done { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabsw { display: none; }
@media (max-width: 860px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .runbar { flex-wrap: wrap; gap: 8px; }
  .runbar .t { display: none; }
  .runbar .clock { font-size: 15px; padding: 3px 8px; }
  .runbar .btn.sm { padding: 6px 10px; }
  .pane.passage { border-right: 0; }
  .runner[data-tab="q"] .pane.passage, .runner[data-tab="p"] .pane.questions { display: none; }
  .tabsw { display: flex; gap: 4px; background: rgba(255,255,255,.1); padding: 3px; border-radius: 8px; }
  .tabsw button { border: 0; background: transparent; color: #fff; font-weight: 800; padding: 4px 10px; border-radius: 6px; }
  .tabsw button.on { background: #fff; color: var(--ink); }
  .pane { padding: 18px 16px 32px; }
  .runbar { padding: 8px 12px; }
  .runbar .t small { display: none; }
}

/* review */
.rv { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--paper-2); }
.rv:last-child { border-bottom: 0; }
.rv .mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.rv .mark.ok { background: var(--green-l); color: var(--green); }
.rv .mark.no { background: var(--red-l); color: var(--red); }
.rv .ans { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.rv blockquote { margin: 4px 0 0; padding: 6px 12px; border-left: 3px solid var(--sun); background: var(--sun-l); font-size: 14px; color: var(--ink-2); }
.bandbig { font-family: var(--f-display); font-size: 64px; font-weight: 600; line-height: 1; color: var(--blue); }
details.pass summary { cursor: pointer; font-weight: 800; }
details.pass p { line-height: 1.7; margin: 10px 0; }

/* drills & cards */
.drill { max-width: 640px; margin: 0 auto; width: 100%; }
.drill .prompt { font-size: 19px; line-height: 1.5; }
.fb { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.fb.ok { background: var(--green-l); color: #145C37; }
.fb.no { background: var(--red-l); color: #8C1C13; }
.card3d { min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; cursor: pointer; }
.card3d .front { font-family: var(--f-display); font-size: 30px; }
.card3d .ex { font-style: italic; color: var(--muted); max-width: 46ch; }
.chart { width: 100%; height: auto; }

.grid2.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 860px) { .grid2.wide-left { grid-template-columns: minmax(0, 1fr); } }
.drill .q > .mcopts, .drill .q > .input { align-self: stretch; }
/* listening runner */
.lbody { overflow-y: auto; min-height: 0; }
.lcol { max-width: 780px; margin: 0 auto; padding: 22px 20px 48px; display: flex; flex-direction: column; gap: 18px; }
.audiocard { position: sticky; top: 0; z-index: 5; box-shadow: 0 8px 20px -16px rgba(20,33,61,.4); }
@media (max-width: 860px) { .lcol { padding: 14px 12px 36px; } .audiocard { position: static; } }
/* writing */
.wpane { display: flex; flex-direction: column; gap: 8px; }
.essay { flex: 1; min-height: 360px; width: 100%; resize: none; padding: 16px; border: 1px solid #CFC8B8; border-radius: 10px; font: 16.5px/1.7 var(--f-body); background: #fff; }
.essay:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chartbox { margin: 8px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.chartbox figcaption { font-weight: 800; text-align: center; }
.chart-table th[scope=row] { text-align: left; }
.process { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.process li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); position: relative; }
.process li:not(:last-child)::after { content: '↓'; position: absolute; left: 22px; bottom: -14px; color: var(--muted); font-weight: 800; z-index: 1; }
.process .pn { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.crit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.critbox { padding: 12px 14px; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.critbox .cb { font-family: var(--f-display); font-size: 28px; font-weight: 600; color: var(--blue); line-height: 1; }
@media (max-width: 860px) { .crit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .crit { grid-template-columns: 1fr; } }
.essayview { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; line-height: 1.75; }
.essayview p { margin: 0 0 10px; }
mark.corr { background: #FDECEA; border-bottom: 2px solid var(--red); padding: 0 1px; border-radius: 2px; cursor: help; }
mark.corr.vocabulary { background: #FFF4D6; border-color: #D99A00; }
mark.corr.cohesion, mark.corr.register { background: #E8EFFC; border-color: var(--blue); }
mark.corr sup { font-size: 10px; font-weight: 800; color: var(--red); margin-left: 1px; }

.plans2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .plans2 { grid-template-columns: minmax(0, 1fr); } }
.modal > *, .modal.stack > * { flex-shrink: 0; }
/* ---------- Speaking ---------- */
.runner.speak { grid-template-rows: auto minmax(0, 1fr); background: var(--paper); }
.speakmain { overflow-y: auto; padding-top: 28px; padding-bottom: 40px; width: 100%; }
.examiner .avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; }
.examiner .eq { margin: 0; font-size: 19px; line-height: 1.45; }
.cuecard { border: 2px solid var(--ink); background: var(--white); }
.clock.dark { font-variant-numeric: tabular-nums; font-weight: 800; padding: 3px 10px; border-radius: 8px; background: var(--paper-2); }
.recbox .live { min-height: 3em; margin: 0; }
.recdot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); display: inline-block; animation: recblink 1.2s infinite; }
@keyframes recblink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .recdot { animation: none; } }
.card.soft { background: var(--paper); box-shadow: none; }
.answerbox { padding: 14px 0; border-bottom: 1px solid var(--paper-2); }
u.pron { text-decoration: underline wavy var(--red); text-underline-offset: 3px; }

.plans3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.meter.bad i { background: var(--red); }

/* plan comparison */
.cmpbox { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 560px; }
.cmp th, .cmp td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp thead th { vertical-align: top; text-align: center; padding: 16px 10px 14px; border-bottom: 2px solid var(--line); }
.cmp thead th.corner { text-align: left; vertical-align: bottom; }
.cmp .pname { font-family: var(--f-display); font-weight: 600; font-size: 22px; margin-top: 8px; }
.cmp .pprice { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.1; }
.cmp .pprice s { font-size: .55em; color: var(--muted); font-weight: 500; }
.cmp .pcta { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cmp .pcta .btn { min-height: 38px; padding: 8px 12px; font-size: 14px; width: 100%; }
.cmp .chip.ghostchip { visibility: hidden; }
.cmp tbody th { text-align: left; font-weight: 400; width: 46%; }
.cmp .fname { font-weight: 800; font-size: 15px; }
.cmp .fdesc { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.cmp td { text-align: center; font-size: 14px; width: 18%; }
.cmp td .yes { color: var(--green); font-weight: 800; font-size: 18px; }
.cmp td .no { color: var(--line); font-weight: 800; font-size: 18px; }
.cmp tr.grp th { background: var(--paper); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 14px; }
.cmp .cur { background: var(--blue-l); }
.cmp thead th.cur { box-shadow: inset 0 3px 0 var(--blue); }
.cmp tr.grp th { position: relative; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) {
  .cmp { min-width: 0; display: block; }
  .cmp thead, .cmp tbody { display: block; }
  .cmp tr { display: grid; grid-template-columns: repeat(3, 1fr); }
  .cmp thead th.corner { display: none; }
  .cmp tbody th[scope=row], .cmp tr.grp th { grid-column: 1 / -1; width: auto; border-bottom: 0; padding: 12px 12px 4px; }
  .cmp tr.grp th { padding: 8px 12px; }
  .cmp td { width: auto; padding: 6px 4px 12px; font-size: 13px; }
  .cmp thead th { padding: 12px 6px; }
  .cmp .pname { font-size: 18px; } .cmp .pprice { font-size: 22px; }
  .cmp .pcta .btn { font-size: 13px; padding: 6px 8px; }
  .cmp thead .chip { font-size: 10px; padding: 2px 6px; }
}


/* ---------- UX round: next card, week ring, levels, charts, locked buttons, phone tab bar ---------- */
.card.next { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 2px solid var(--blue); background: var(--white); }
.card.next h2 { margin: 0; }
.card.next p { margin: 0; }
.card.next.compact { border-width: 1px; }
@media (max-width: 600px) { .card.next { flex-direction: column; align-items: stretch; } .card.next .btn { width: 100%; } }
.weekhead { display: flex; align-items: center; gap: 16px; }
.weekhead h2 { margin: 0; }
.ring { flex-shrink: 0; }
.chip.count { font-size: 14px; padding: 6px 12px; }
.skill .src { font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
.task.level { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 600px) {
  .task, .task.level { grid-template-columns: minmax(0, 1fr); }
  .task > .row, .task > .btn, .task > a.btn { justify-self: start; }
}
.btn.locked { background: var(--paper); color: var(--muted); border: 1px dashed var(--line); }
.btn.locked:hover { background: var(--paper-2); color: var(--ink); }
.chart.fixed { width: auto; max-width: 100%; display: block; }
.bars { position: relative; height: 170px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; padding-top: 20px; border-bottom: 1px solid var(--line); }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar i { display: block; width: 100%; max-width: 56px; background: #9DB7EE; border-radius: 6px 6px 0 0; min-height: 2px; }
.bar.now i { background: var(--blue); }
.bar .v { font-size: 12px; font-weight: 700; color: var(--muted); }
.bars-goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); pointer-events: none; }
.bars-goal span { position: absolute; right: 0; bottom: 2px; font-size: 12px; font-weight: 800; background: var(--white); padding: 0 4px; }
.bars-x { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.t.hist a.tap { display: inline-block; padding: 10px 4px; }
@media (max-width: 600px) { .bars, .bars-x { gap: 4px; } .bars-x { font-size: 10px; } }

/* bigger tap targets on touch screens */
@media (pointer: coarse), (max-width: 600px) {
  .btn.sm { min-height: 44px; padding: 8px 14px; }
  .linkbtn { padding: 10px 0; }
}

/* phone: main menu becomes a bottom tab bar (only when it has the full menu) */
@media (max-width: 720px) {
  .topbar .nav:has(a:nth-child(3)) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--white); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(20, 33, 61, .06); }
  .topbar .nav:has(a:nth-child(3)) a { text-align: center; font-size: 13px; padding: 12px 2px; min-height: 44px; border-radius: 10px; }
  .topbar:has(.nav a:nth-child(3)) [data-logout] { display: none; }
  body:has(.topbar .nav a:nth-child(3)) { padding-bottom: 80px; }
  .topbar { flex-wrap: nowrap; }
}
.t.hist td { vertical-align: middle; }
.nowrap { white-space: nowrap; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* mock tests */
.mockfmt { list-style: none; margin: 0; padding: 0; counter-reset: m; display: flex; flex-direction: column; }
.mockfmt li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--paper-2); position: relative; counter-increment: m; }
.mockfmt li::before { content: counter(m); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--white); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.mockfmt li.brk::before { content: "☕"; background: var(--sun-l); }
.mockfmt li:last-child { border-bottom: 0; }
.mockcount { font-size: 15px; } .mockcount b { font-family: var(--f-display); font-size: 28px; }
.mockbuy { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.buyopt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); cursor: pointer; text-align: left; font: inherit; color: var(--ink); min-height: 44px; }
.buyopt:hover { border-color: var(--blue); }
.buyopt.best { border: 2px solid var(--ink); }
.buyopt .chip { position: absolute; top: -11px; right: 12px; }
.buyopt b { font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.buyopt b s { font-size: .6em; }
.bigclock { font-family: var(--f-display); font-size: 56px; font-weight: 600; line-height: 1; }
.bigclock.over { color: var(--red); }
@media (max-width: 420px) { .mockbuy { grid-template-columns: 1fr; } }

/* instructions screens */
.instr { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.mocksteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.mocksteps li { counter-increment: s; padding: 8px 10px; border-radius: 10px; background: var(--paper-2); color: var(--muted); font-weight: 800; font-size: 13px; text-align: center; }
.mocksteps li::before { content: counter(s) ". "; }
.mocksteps li.done { background: var(--green-l); color: var(--green); }
.mocksteps li.done::before { content: "✓ "; }
.mocksteps li.now { background: var(--ink); color: var(--white); }
.startbar { border: 2px solid var(--blue); }
@media (max-width: 600px) { .mocksteps li { font-size: 11px; padding: 6px 4px; } .startbar { flex-direction: column; align-items: stretch; } .startbar .btn { width: 100%; } }


/* ---------- identity: numbers, surfaces, focus ---------- */
.bandbig, .kpi b, .skill b, .streak .num, .plan .price, .cmp .pprice, .buyopt b, .mockcount b, .bigclock, .clock, .ring text { font-family: var(--f-display); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -0.03em; }
.bandbig { font-size: 72px; }
.skill { background: var(--paper); border-radius: 14px; }
.skill b { font-size: 28px; }
.card { border-color: var(--line); }
.input, .sel, select.input { border-radius: var(--r-sm); }
.btn { border-radius: var(--r-sm); font-family: var(--f-body); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }
.tiny { font-size: 13px; }
.muted { color: var(--muted); }
.cmp tr.grp th { letter-spacing: .08em; }

/* ---------- landing ---------- */
.landbar { position: sticky; top: 0; z-index: 30; }
.landnav a { font-size: 15px; }
@media (max-width: 900px) { .landnav { display: none; } }
.hero2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 48px; }
.hero2 h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -0.035em; max-width: 14ch; }
.hero2 .lede { font-size: 19px; color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
@media (max-width: 900px) { .hero2 { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; padding-bottom: 32px; } }
.herofig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.device { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: 0 30px 60px -30px rgba(15, 27, 51, .35), 0 2px 6px rgba(15, 27, 51, .05); display: flex; flex-direction: column; gap: 14px; }
.dv-top { display: flex; align-items: center; gap: 8px; }
.dv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.dv-overall { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; }
.dv-overall b { grid-row: span 2; font-family: var(--f-display); font-size: 64px; line-height: .9; color: var(--blue); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.dv-overall .chip { justify-self: start; }
.dv-skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dv-skills div { background: var(--paper); border-radius: 12px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.dv-skills b { font-family: var(--f-display); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dv-skills span { font-size: 12px; font-weight: 700; }
.dv-skills i { font-style: normal; font-size: 11px; color: var(--muted); }
.dv-crit { display: flex; flex-direction: column; gap: 6px; }
.dv-crit .cr { display: grid; grid-template-columns: 11.5em 1fr 2.2em; align-items: center; gap: 8px; font-size: 13px; }
.dv-crit em { height: 6px; border-radius: 9px; background: linear-gradient(90deg, var(--blue) var(--w), var(--paper-2) var(--w)); }
.dv-crit b { text-align: right; font-variant-numeric: tabular-nums; }
.dv-tip { background: var(--sun-l); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink); }
.dv-tip b { display: block; font-size: 13px; color: var(--sun-d); }
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.proofrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.proofrow div { display: flex; flex-direction: column; }
.proofrow b { font-family: var(--f-display); font-size: 17px; letter-spacing: -0.01em; }
.proofrow span { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .proofrow { grid-template-columns: 1fr 1fr; } }
.lsec { padding-top: 64px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 22px; }
.lsec > h2 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: h; }
.how li { counter-increment: h; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--ink); }
.how li::before { content: counter(h); font-family: var(--f-display); font-weight: 800; font-size: 15px; color: var(--blue); }
.how b { font-family: var(--f-display); font-size: 19px; letter-spacing: -0.01em; }
.how p { color: var(--ink-2); }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.skillgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sk4 { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.sk4 p { color: var(--ink-2); }
.snip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
@media (max-width: 760px) { .skillgrid { grid-template-columns: 1fr; } }
.mockband { background: var(--ink); color: #fff; margin-top: 64px; }
.mockband h2 { color: #fff; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; }
.mockband .lede { color: #C9D1E6; font-size: 18px; }
.mockgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 860px) { .mockgrid { grid-template-columns: 1fr; gap: 28px; } }
.mockline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mockline li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.mockline li:nth-child(4) { color: var(--sun); }
.mockline b { font-family: var(--f-display); font-size: 17px; }
.mockline span { color: #C9D1E6; font-size: 15px; }
.sunbtn { background: var(--sun); color: var(--ink); }
.sunbtn:hover { background: #FFD666; color: var(--ink); }
.pc-price { font-family: var(--f-display); font-size: 40px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; }
.pc-price small { font-family: var(--f-body); font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.pc-price s { font-size: .55em; color: var(--muted); font-weight: 600; }
.pc-price.light small { color: #C9D1E6; }
.pcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.pcard.top { border: 2px solid var(--ink); }
.pcard ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard li { padding-left: 24px; position: relative; font-size: 15px; }
.pcard li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
@media (max-width: 860px) { .pcards { grid-template-columns: 1fr; } }
.cmpdetails > summary { cursor: pointer; font-weight: 800; color: var(--blue); padding: 10px 0; list-style: none; }
.cmpdetails > summary::-webkit-details-marker { display: none; }
.cmpdetails > summary::after { content: " ▾"; }
.cmpdetails[open] > summary::after { content: " ▴"; }
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 17px; padding: 14px 32px 14px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { padding: 0 0 16px; color: var(--ink-2); max-width: 70ch; }
.endcta { align-items: flex-start; padding-bottom: 72px; }
.sitefoot { background: var(--white); border-top: 1px solid var(--line); padding: 36px 0 28px; }
.sitefoot .wrap { padding-top: 0; padding-bottom: 0; display: flex; flex-direction: column; gap: 20px; }
.footlinks { display: flex; gap: 20px; flex-wrap: wrap; }
.footlinks a { color: var(--ink-2); font-weight: 700; text-decoration: none; }
.footlinks a:hover { color: var(--blue); }
.legal h2 { font-size: 19px; }
.legal p { color: var(--ink-2); line-height: 1.65; }
@media (max-width: 900px) { .topbar .landnav { display: none !important; } }
.brand b { white-space: nowrap; }
.landbar { flex-wrap: nowrap; }
.landbar .row { flex-wrap: nowrap; }
@media (max-width: 520px) { .landbar .btn:not(.ghost) { display: none; } }

/* ---------- test screens ---------- */
.runbar .clock.untimed { font-size: 14px; font-family: var(--f-body); font-weight: 700; letter-spacing: 0; background: transparent; color: #C9D1E6; }
.q { position: relative; padding-right: 40px; }
.flagq { position: absolute; top: 4px; right: 0; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--line); font-size: 17px; cursor: pointer; }
.flagq:hover { color: var(--muted); border-color: var(--line); }
.flagq.on { color: #B45309; background: var(--sun-l); border-color: #F5D58A; }
.navbar .nums button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); font-family: var(--f-display); font-weight: 700; font-size: 13px; position: relative; }
.navbar .nums button.done { background: var(--blue-l); color: var(--blue-d); border-color: #C6D5F8; }
.navbar .nums button.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.navbar .nums button.flag::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #F59E0B; border: 2px solid var(--white); }
.reportq { align-self: flex-start; border: 0; background: none; padding: 6px 0; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; opacity: .75; }
.reportq:hover { opacity: 1; color: var(--ink); }
@media (max-width: 860px) {
  .runbar { flex-wrap: nowrap; }
  .leavebtn { font-size: 0 !important; width: 38px; padding: 0 !important; }
  .leavebtn::before { content: "✕"; font-size: 16px; }
}

/* slim audio player */
.player { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.player.on { border-color: #C6D5F8; background: var(--blue-l); }
.player.err { opacity: .6; }
.pl-btn { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 13px; cursor: pointer; display: grid; place-items: center; }
.pl-btn:disabled { background: var(--muted); }
.pl-seek { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 9px; background: linear-gradient(90deg, var(--blue) var(--p, 0%), var(--paper-2) var(--p, 0%)); cursor: pointer; }
.pl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue); }
.pl-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; }
.pl-time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.verdict { margin-top: -4px; }

/* ---------- home ---------- */
.todaystrip { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.todaystrip .card.next { height: 100%; }
.streakcard { justify-content: space-between; }
@media (max-width: 860px) { .todaystrip { grid-template-columns: minmax(0, 1fr); } }
h2.zone { margin-top: 18px; font-size: 24px; }
.ring .rp { transition: stroke-dashoffset 900ms cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .ring .rp { transition: none; } }
details.info { position: relative; }
details.info > summary { list-style: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; }
details.info > summary::-webkit-details-marker { display: none; }
details.info[open] > summary { background: var(--ink); color: #fff; border-color: var(--ink); }
details.info > p { position: absolute; right: 0; top: 32px; width: min(320px, 80vw); background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 14px; z-index: 5; box-shadow: 0 12px 30px rgba(15, 27, 51, .25); }

/* ---------- flashcards & empty states ---------- */
.flipwrap { perspective: 1200px; }
.flipcard { position: relative; width: 100%; min-height: 260px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; transform-style: preserve-3d; transition: transform 500ms cubic-bezier(.2, .7, .2, 1); }
.flipcard.flipped { transform: rotateY(180deg); cursor: default; }
.flipcard .fc { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 40px -28px rgba(15, 27, 51, .4); text-align: center; }
.flipcard .fc b { font-family: var(--f-display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.flipcard .back { transform: rotateY(180deg); }
.flipcard .back b { font-size: 20px; color: var(--muted); }
.flipcard .mean { font-size: 19px; }
.flipcard .ex { font-size: 15px; color: var(--ink-2); font-style: italic; max-width: 46ch; }
@media (prefers-reduced-motion: reduce) { .flipcard { transition: none; } }
@media (pointer: coarse) { .kbd { display: none; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 28px 16px; }
.empty svg { width: 120px; height: 80px; }
.empty .stack { align-items: center; max-width: 42ch; }
.sk-run { height: 56px; background: var(--ink); }
@media (max-width: 860px) {
  .runbar .row { flex-wrap: nowrap; gap: 6px; }
  .runbar .clock.untimed { display: none; }
  .tabsw button { padding: 6px 10px; }
}

/* checkout */
.paybox { max-width: 440px; }
.payline { padding: 14px 16px; background: var(--paper); border-radius: 12px; }
.payline b { font-family: var(--f-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.ppbtns { min-height: 110px; display: flex; flex-direction: column; gap: 8px; }
.paid { width: 56px; height: 56px; border-radius: 50%; background: var(--green-l); color: var(--green); display: grid; place-items: center; font-size: 28px; font-weight: 800; }

/* promotion banner */
.promo { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 22px 26px; border-radius: var(--r); background: linear-gradient(120deg, #0F1B33 0%, #1B3FA8 100%); color: #fff; overflow: hidden; }
.promo::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 200, 61, .14); pointer-events: none; }
.pr-art { width: 96px; height: 80px; flex-shrink: 0; }
.pr-body { display: flex; flex-direction: column; gap: 6px; }
.pr-body h2 { color: #fff; font-size: 22px; }
.pr-body p { color: #C9D1E6; font-size: 15px; max-width: 60ch; }
.pr-tag { align-self: flex-start; font-size: 13px; font-weight: 800; color: var(--sun); }
.pr-act { display: flex; flex-direction: column; align-items: stretch; gap: 6px; position: relative; z-index: 1; }
.pr-act .btn { white-space: nowrap; }
.pr-alt { color: #fff; font-size: 14px; text-align: center; }
.pr-more { color: #C9D1E6; font-size: 13px; text-align: center; }
.pr-more:hover, .pr-alt:hover { color: var(--sun); }
.pr-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.pr-x:hover { background: rgba(255, 255, 255, .25); }
@media (max-width: 760px) { .promo { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 14px; } .pr-art { display: none; } .pr-act { align-items: stretch; } }

/* Admin → Read me */
.rmtoc { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rmtoc a { font-weight: 700; }
details.rm > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.rm > summary::-webkit-details-marker { display: none; }
details.rm > summary h2 { margin: 0; }
details.rm > summary::after { content: "+"; font-size: 22px; font-weight: 800; color: var(--blue); }
details.rm[open] > summary::after { content: "–"; }
.rmbody { margin-top: 14px; }
.rmbody h3 { margin: 10px 0 0; }
.rmsteps, .rmlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.rmsteps li::marker { font-weight: 800; color: var(--blue); }
