/* =====================================================================
   assets/listening-skills.css — /listening_skills (Listening by question type), 6 Nov 2026
   ---------------------------------------------------------------------
   Sits on top of assets/pages-ui.css (the Classic page kit: .cp tokens,
   .cp-card, .cp-btn …). Every class here starts with "lq-" (not "lk-": that is the site menu's prefix). Day = .cp,
   night = html.dark .cp (the tokens switch by themselves). The same
   layout as /reading_skills, in the Listening colour (--l), plus the
   clip player and the words of the clip.
   Light on weak phones: no blur, no big shadows, motion only on
   transform/opacity, nothing moves with "reduce motion" or lite mode.
   ===================================================================== */
.lq { --lq-paper: #f7fbfd; --lq-paper-line: #dcebf2; --lq-mark: #fff0bf; --lq-mark-ink: #4a3500; }
html.dark .lq { --lq-paper: #0a1229; --lq-paper-line: rgba(255,255,255,.08); --lq-mark: rgba(255,201,71,.22); --lq-mark-ink: #ffe3a1; }

.lq .lq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 12px; }
.lq .lq-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.lq .lq-head p { color: var(--mute); font-size: 13.5px; }
.lq .lq-wk { font-size: 24px !important; line-height: 1.15; }

/* ── the type cards ─────────────────────────────────────────────────── */
.lq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .lq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lq-grid { grid-template-columns: 1fr; gap: 10px; } }
.lq .lq-type { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 14px 44px 14px 14px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s; font: inherit; }
.lq .lq-type:hover { transform: translateY(-2px); border-color: var(--l); }
.lq .lq-type:active { transform: translateY(0); }
.lq .lq-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--l-soft); color: var(--l-ink);
  font-family: var(--lab-font); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.lq .lq-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lq .lq-tx b { font-size: 15px; line-height: 1.25; }
.lq .lq-tx small { color: var(--body); font-size: 13px; line-height: 1.35; }
.lq .lq-meta { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.lq .lq-meta em { font-style: normal; font-weight: 800; }
.lq .hi { color: var(--ok); } .lq .mid { color: var(--s-ink); } .lq .lo { color: var(--bad); }
.lq .lq-go { position: absolute; right: 12px; top: 50%; margin-top: -14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sub); color: var(--mute); }
.lq .lq-type:hover .lq-go { background: var(--l); color: #fff; }
.lq .lq-badge { position: absolute; top: -9px; right: 12px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.lq .lq-badge.mini { background: var(--gold-fill); color: var(--gold-ink); }
.lq .lq-type.is-weak { border-color: var(--bad); }
.lq .lq-mix { background: linear-gradient(135deg, var(--l-soft), var(--card) 70%); border-color: var(--l); }
.lq .lq-mix .lq-ico { background: var(--l); color: #fff; }
.lq .lq-sp { border-style: dashed; border-color: var(--gold-fill); }
.lq .lq-sp .lq-ico { background: var(--gold-soft); color: var(--gold-txt); }
.lq .lq-bar { display: block; height: 6px; border-radius: 6px; background: var(--line2); overflow: hidden; margin-top: 4px; }
.lq .lq-bar i { display: block; height: 100%; width: 100%; background: var(--l); transform-origin: left center; border-radius: 6px; }
.lq .lq-bar.hi i { background: var(--ok); } .lq .lq-bar.mid i { background: var(--s); } .lq .lq-bar.lo i { background: var(--bad); }

/* ── accuracy by type ──────────────────────────────────────────────── */
.lq-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
@media (max-width: 760px) { .lq-rows { grid-template-columns: 1fr; } }
.lq .lq-rows button { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 48px; align-items: center; gap: 12px; width: 100%; padding: 9px 4px; background: none; border: 0; border-bottom: 1px solid var(--line2); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.lq .lq-rows button:hover .t { color: var(--l-ink); }
.lq .lq-rows .t { font-weight: 700; font-size: 14px; display: flex; flex-direction: column; }
.lq .lq-rows .t small { font-weight: 400; color: var(--mute); font-size: 12px; }
.lq .lq-rows .lq-bar { margin: 0; height: 8px; }
.lq .lq-rows b { text-align: right; font-size: 15px; }

/* ── the drill ─────────────────────────────────────────────────────── */
.lq-drill, .lq-card, .lq-end { scroll-margin-top: 76px; }
.lq-drill { max-width: 820px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lq-bar-top { display: flex; align-items: center; gap: 10px; }
.lq .lq-name { flex: 1; min-width: 0; font-size: 16px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--body); cursor: pointer; user-select: none; }
.lq-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lq-switch .tr { position: relative; width: 38px; height: 22px; border-radius: 22px; background: var(--line); transition: background-color .15s; }
.lq-switch .tr::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.lq-switch input:checked + .tr { background: var(--l); }
.lq-switch input:checked + .tr::after { transform: translateX(16px); }
.lq-switch input:focus-visible + .tr { outline: 3px solid var(--gold); outline-offset: 2px; }
.lq-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lq-dots li { width: 22px; height: 6px; border-radius: 6px; background: var(--line); }
.lq-dots li.now { background: var(--l); }
.lq-dots li.ok { background: var(--ok); } .lq-dots li.no { background: var(--bad); }

.lq-intro h2 { font-size: 22px !important; margin: 4px 0 6px !important; }
.lq .lq-i-what { color: var(--body); font-size: 15px; margin-bottom: 12px; }
.lq-strat { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.lq-strat li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.lq-strat li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-txt); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.lq .lq-i-note { color: var(--mute); font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.lq .lq-intro .cp-btn { margin-top: 4px; }

.lq-card { display: flex; flex-direction: column; gap: 14px; }
.lq .lq-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--mute); font-size: 12.5px; }
.lq .lq-chip { background: var(--l-soft); color: var(--l-ink); font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.lq .lq-chip:empty { display: none; }

/* the player: one big round button, a thin bar, the time */
.lq-player { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--lq-paper); border: 1px solid var(--lq-paper-line); border-left: 4px solid var(--l); }
.lq .lq-play { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--l); color: #fff; box-shadow: 0 6px 16px -8px var(--l); transition: transform .12s; -webkit-tap-highlight-color: transparent; }
html.dark .lq .lq-play { color: #04202b; }
.lq .lq-play:active { transform: scale(.94); }
.lq .lq-play:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.lq .lq-play svg { width: 26px; height: 26px; fill: currentColor; display: none; }
.lq .lq-play .i-again { fill: none; }
.lq-player[data-state="idle"] .i-play, .lq-player[data-state="paused"] .i-play, .lq-player[data-state="error"] .i-play { display: block; }
.lq-player[data-state="playing"] .i-pause { display: block; }
.lq-player[data-state="done"] .i-again { display: block; }
.lq .lq-play .spin { display: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: lqSpin .8s linear infinite; }
.lq-player[data-state="loading"] .spin { display: block; }
.lq-pl-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lq .lq-pl-msg { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.lq-player[data-state="error"] .lq-pl-msg { color: var(--bad); }
.lq-prog { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.lq-prog i { display: block; height: 100%; background: var(--l); transform: scaleX(0); transform-origin: left center; }
.lq .lq-pl-t { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }

.lq .lq-hd { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; color: var(--l-ink); text-transform: uppercase; margin-bottom: 2px; }
.lq .lq-hd[hidden] { display: none; }
.lq .lq-ins { color: var(--mute); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.lq .lq-stem { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; overflow-wrap: anywhere; }
.lq .lq-stem .gap { display: inline-block; min-width: 64px; border-bottom: 2px solid var(--l); margin: 0 3px; }
.lq-img { margin: 0 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.lq-img img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; }
html.dark .lq-img:not(.lite) { background: #000; }
.lq-ans { display: flex; flex-direction: column; gap: 8px; }
.lq-ans.letters { flex-direction: row; flex-wrap: wrap; }
.lq .lq-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 11px 12px; text-align: left; background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font: inherit; font-size: 15px; line-height: 1.4; transition: border-color .12s, background-color .12s; }
.lq-ans.letters .lq-opt { width: auto; min-width: 52px; justify-content: center; padding: 10px; }
.lq .lq-opt .l { flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: var(--sub); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.lq .lq-opt:hover { border-color: var(--l); }
.lq .lq-opt[aria-pressed="true"] { border-color: var(--l); background: var(--l-soft); }
.lq .lq-opt[aria-pressed="true"] .l { background: var(--l); color: #fff; border-color: var(--l); }
.lq .lq-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.lq .lq-opt.right .l { background: var(--ok); color: #fff; border-color: var(--ok); }
.lq .lq-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.lq .lq-opt.wrong .l { background: var(--bad); color: #fff; border-color: var(--bad); }
.lq .lq-opt:disabled { cursor: default; }
.lq .lq-opt:disabled:hover { border-color: var(--line); }
.lq .lq-opt.right:disabled, .lq .lq-opt.right:disabled:hover { border-color: var(--ok); }
.lq .lq-opt.wrong:disabled, .lq .lq-opt.wrong:disabled:hover { border-color: var(--bad); }
.lq .lq-opt[aria-pressed="true"]:disabled:hover { border-color: var(--l); }
.lq .lq-pickn { font-size: 13px; color: var(--mute); font-weight: 700; width: 100%; }
.lq .lq-in { width: 100%; max-width: 420px; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.lq .lq-in:focus { border-color: var(--l); outline: none; }
.lq .lq-in.right { border-color: var(--ok); background: var(--ok-soft); } .lq .lq-in.wrong { border-color: var(--bad); background: var(--bad-soft); }
.lq .lq-lim { font-size: 12.5px; color: var(--mute); margin-top: 6px; }

.lq-fb { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; animation: lqIn .25s ease-out both; }
.lq-fb.ok { background: var(--ok-soft); } .lq-fb.no { background: var(--bad-soft); }
.lq .lq-fb .v { font-weight: 800; font-size: 16px; }
.lq .lq-fb.ok .v { color: var(--ok); } .lq .lq-fb.no .v { color: var(--bad); }
.lq .lq-fb .k b { font-weight: 800; }
.lq .lq-fb .w, .lq .lq-fb .kind { color: var(--body); }
.lq-traps ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lq-traps li { font-size: 14px; color: var(--body); line-height: 1.45; }
.lq-traps li b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); font-size: 12px; margin-right: 4px; color: var(--ink); }
.lq-traps li span { color: var(--mute); }
.lq-tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lq-tr .cp-lab small { text-transform: none; letter-spacing: 0; font-family: Inter, sans-serif; font-weight: 400; color: var(--mute); }
.lq-tr ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lq .lq-tr button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 6px 8px; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.55; cursor: pointer; }
.lq .lq-tr button:hover { background: var(--sub); }
.lq .lq-tr button.now { background: var(--l-soft); }
.lq .lq-tr b { color: var(--l-ink); font-weight: 800; }
.lq .lq-tr mark { background: var(--lq-mark); color: var(--lq-mark-ink); border-radius: 4px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; font-weight: 700; }
.lq .lq-acts { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.lq .lq-acts .cp-btn { min-width: 140px; }
.lq .lq-acts .cp-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.lq .lq-flag { margin-right: auto; background: none; border: 0; padding: 6px 2px; color: var(--mute); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lq .lq-flag[hidden] { display: none; }
.lq .lq-flag:disabled { text-decoration: none; cursor: default; }

.lq-end { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px !important; }
.lq .lq-end .lq-score { font-family: var(--num-font); font-size: 56px; line-height: 1; color: var(--l-num); }
.lq .lq-end .lq-score small { font-size: 26px; color: var(--mute); }
.lq .lq-end p { color: var(--body); font-size: 15px; }
.lq .lq-end .coins { color: var(--gold-txt); font-weight: 800; }
.lq .lq-end .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.lq .lq-err { text-align: center; color: var(--bad); font-weight: 700; }

.lq-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lq-how > div { display: flex; align-items: center; gap: 10px; background: var(--sub); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; }
.lq-how b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-txt); display: grid; place-items: center; font-weight: 800; }
.lq-how p { font-size: 14px; color: var(--body); }
@media (max-width: 760px) { .lq-how { grid-template-columns: 1fr; gap: 8px; } }

/* in a set, the list parts step aside */
.lq.drilling #lq-pick, .lq.drilling #lq-dash, .lq.drilling .lq-how, .lq.drilling .cp-hero, .lq.drilling .cp-note { display: none; }

@media (max-width: 480px) {
  .lq .lq-stem { font-size: 16px; }
  .lq-player { padding: 10px 12px; gap: 12px; }
  .lq .lq-play { width: 52px; height: 52px; }
  .lq .lq-acts .cp-btn { flex: 1; }
  .lq .lq-name { font-size: 14.5px; }
  .lq .lq-tr button { font-size: 14.5px; }
}
@keyframes lqIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lqSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lq-fb { animation: none; } .lq .lq-type, .lq .lq-type:hover { transition: none; transform: none; } .lq .lq-play .spin { animation-duration: 2.4s; } }
html.lk-lite .lq-fb { animation: none; }
html.lk-lite .lq .lq-type { box-shadow: none; transition: none; }
html.lk-lite .lq .lq-play { box-shadow: none; }
