/* =====================================================================
   assets/reading-skills.css — /reading_skills (Reading 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 "rs-". Day = .cp,
   night = html.dark .cp (the tokens switch by themselves).
   Light on weak phones: no blur, no big shadows, motion only on
   transform/opacity, nothing moves with "reduce motion" or lite mode.
   ===================================================================== */
.rs { --rs-paper: #fbfaf6; --rs-paper-line: #ece8dc; --rs-mark: #fff0bf; --rs-mark-ink: #4a3500; }
html.dark .rs { --rs-paper: #0b1028; --rs-paper-line: rgba(255,255,255,.08); --rs-mark: rgba(255,201,71,.22); --rs-mark-ink: #ffe3a1; }

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

/* ── the type cards ─────────────────────────────────────────────────── */
.rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rs-grid { grid-template-columns: 1fr; gap: 10px; } }
.rs .rs-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; }
.rs .rs-type:hover { transform: translateY(-2px); border-color: var(--r); }
.rs .rs-type:active { transform: translateY(0); }
.rs .rs-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--r-soft); color: var(--r-ink);
  font-family: var(--lab-font); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.rs .rs-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.rs .rs-tx b { font-size: 15px; line-height: 1.25; }
.rs .rs-tx small { color: var(--body); font-size: 13px; line-height: 1.35; }
.rs .rs-meta { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.rs .rs-meta em { font-style: normal; font-weight: 800; }
.rs .hi { color: var(--ok); } .rs .mid { color: var(--s-ink); } .rs .lo { color: var(--bad); }
.rs .rs-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); }
.rs .rs-type:hover .rs-go { background: var(--r); color: #fff; }
.rs .rs-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; }
.rs .rs-type.is-weak { border-color: var(--bad); }
.rs .rs-mix { background: linear-gradient(135deg, var(--r-soft), var(--card) 70%); border-color: var(--r); }
.rs .rs-mix .rs-ico { background: var(--r); color: #fff; }
.rs .rs-bar { display: block; height: 6px; border-radius: 6px; background: var(--line2); overflow: hidden; margin-top: 4px; }
.rs .rs-bar i { display: block; height: 100%; width: 100%; background: var(--r); transform-origin: left center; border-radius: 6px; }
.rs .rs-bar.hi i { background: var(--ok); } .rs .rs-bar.mid i { background: var(--s); } .rs .rs-bar.lo i { background: var(--bad); }

/* ── accuracy by type ──────────────────────────────────────────────── */
.rs-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) { .rs-rows { grid-template-columns: 1fr; } }
.rs .rs-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; }
.rs .rs-rows button:hover .t { color: var(--r-ink); }
.rs .rs-rows .t { font-weight: 700; font-size: 14px; display: flex; flex-direction: column; }
.rs .rs-rows .t small { font-weight: 400; color: var(--mute); font-size: 12px; }
.rs .rs-rows .rs-bar { margin: 0; height: 8px; }
.rs .rs-rows b { text-align: right; font-size: 15px; }

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

.rs-intro h2 { font-size: 22px !important; margin: 4px 0 6px !important; }
.rs .rs-i-what { color: var(--body); font-size: 15px; margin-bottom: 12px; }
.rs-strat { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.rs-strat li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.rs-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; }
.rs .rs-i-note { color: var(--mute); font-size: 13px; margin-bottom: 14px; }

.rs-card { display: flex; flex-direction: column; gap: 14px; }
.rs .rs-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--mute); font-size: 12.5px; }
.rs .rs-chip { background: var(--r-soft); color: var(--r-ink); font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.rs .rs-chip:empty { display: none; }
.rs-ev { background: var(--rs-paper); border: 1px solid var(--rs-paper-line); border-left: 4px solid var(--r); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rs .rs-ex { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--ink); }
.rs .rs-ex + .rs-ex { border-top: 1px dashed var(--rs-paper-line); padding-top: 10px; }
.rs .rs-pl { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; margin-right: 8px; border-radius: 7px; background: var(--r); color: #fff; font-weight: 800; font-size: 13px; vertical-align: 2px; }
.rs .rs-ex.gap::before { content: "…"; display: block; color: var(--mute); line-height: 1; margin: -4px 0 6px; }
.rs .rs-ex mark { background: var(--rs-mark); color: var(--rs-mark-ink); border-radius: 4px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.rs .rs-ex .no-key { opacity: .78; }
.rs .rs-wide { font-size: 12px; color: var(--mute); font-weight: 700; letter-spacing: .04em; }

.rs .rs-ins { color: var(--mute); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.rs .rs-stem { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; }
.rs .rs-stem .gap { display: inline-block; min-width: 64px; border-bottom: 2px solid var(--r); margin: 0 3px; }
.rs-ans { display: flex; flex-direction: column; gap: 8px; }
.rs-ans.tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs .rs-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; }
.rs .rs-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; }
.rs .rs-opt:hover { border-color: var(--r); }
.rs .rs-opt[aria-pressed="true"] { border-color: var(--r); background: var(--r-soft); }
.rs .rs-opt[aria-pressed="true"] .l { background: var(--r); color: #fff; border-color: var(--r); }
.rs-ans.tri .rs-opt { justify-content: center; text-align: center; font-weight: 800; font-size: 14px; letter-spacing: .02em; padding: 12px 6px; }
.rs .rs-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.rs .rs-opt.right .l { background: var(--ok); color: #fff; border-color: var(--ok); }
.rs .rs-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.rs .rs-opt.wrong .l { background: var(--bad); color: #fff; border-color: var(--bad); }
.rs .rs-opt:disabled { cursor: default; }
.rs .rs-opt:disabled:hover { border-color: var(--line); }
.rs .rs-opt.right:disabled, .rs .rs-opt.right:disabled:hover { border-color: var(--ok); }
.rs .rs-opt.wrong:disabled, .rs .rs-opt.wrong:disabled:hover { border-color: var(--bad); }
.rs .rs-opt[aria-pressed="true"]:disabled:hover { border-color: var(--r); }
.rs .rs-pickn { font-size: 13px; color: var(--mute); font-weight: 700; }
.rs .rs-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; }
.rs .rs-in:focus { border-color: var(--r); outline: none; }
.rs .rs-in.right { border-color: var(--ok); background: var(--ok-soft); } .rs .rs-in.wrong { border-color: var(--bad); background: var(--bad-soft); }
.rs .rs-lim { font-size: 12.5px; color: var(--mute); margin-top: 6px; }

.rs-fb { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; animation: rsIn .25s ease-out both; }
.rs-fb.ok { background: var(--ok-soft); } .rs-fb.no { background: var(--bad-soft); }
.rs .rs-fb .v { font-weight: 800; font-size: 16px; }
.rs .rs-fb.ok .v { color: var(--ok); } .rs .rs-fb.no .v { color: var(--bad); }
.rs .rs-fb .k b { font-weight: 800; }
.rs .rs-fb .w { color: var(--body); }
.rs .rs-fb .tip { color: var(--mute); font-size: 13.5px; }
.rs .rs-acts { display: flex; justify-content: flex-end; gap: 10px; }
.rs .rs-acts .cp-btn { min-width: 140px; }
.rs .rs-acts .cp-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

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

.rs-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rs-how > div { display: flex; align-items: center; gap: 10px; background: var(--sub); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; }
.rs-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; }
.rs-how p { font-size: 14px; color: var(--body); }
@media (max-width: 760px) { .rs-how { grid-template-columns: 1fr; gap: 8px; } }

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

@media (max-width: 480px) {
  .rs .rs-stem { font-size: 16px; }
  .rs .rs-ex { font-size: 16px; line-height: 1.65; }
  .rs-ev { padding: 12px; }
  .rs .rs-acts .cp-btn { flex: 1; }
  .rs-ans.tri .rs-opt { font-size: 12.5px; letter-spacing: 0; padding: 12px 2px; }
  .rs .rs-name { font-size: 14.5px; }
}
@keyframes rsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rs-fb { animation: none; } .rs .rs-type, .rs .rs-type:hover { transition: none; transform: none; } }
html.lk-lite .rs-fb { animation: none; }
html.lk-lite .rs .rs-type { box-shadow: none; transition: none; }
/* 23 Nov 2026 (G3): the door to the Reading drills (/reading_drills) */
.rs-drills { margin: 0 0 14px; }
.rs-drills a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; border: 1.5px dashed #2D66B3; border-radius: 12px; text-decoration: none; color: inherit; background: rgba(45, 102, 179, .06); }
.rs-drills a:hover { background: rgba(45, 102, 179, .12); }
.rs-drills b { color: #17467F; } html.dark .rs-drills b { color: #CFE1FF; }
.rs-drills span { font-size: 14.5px; opacity: .85; }
