/* Figtree (SIL Open Font License, see fonts/OFL-Figtree.txt) */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-ext-400-italic.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-ext-700-italic.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --navy: #0e1b3d;
  --navy-2: #3b5bdb;
  --amber: #f5a524;
  --amber-ink: #3a2400;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #141b2d;
  --ink-2: #3c465c;
  --muted: #6b7489;
  --line: #e3e7ef;
  --line-2: #cfd6e3;
  --sel: #3b5bdb;
  --sel-bg: #eef3ff;
  --ok: #138a46;
  --ok-bg: #e8f7ee;
  --bad: #c62f2f;
  --bad-bg: #fdeeee;
  --warn: #b7791f;
  --radius: 14px;
  --serif: "Noto Serif", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { max-width: 100%; }

/* ---------- generic ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font-weight: 650; font-size: 16px; background: var(--navy); color: #fff; transition: transform .08s ease, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.amber { background: var(--amber); color: var(--amber-ink); }
.btn.ghost { background: transparent; color: var(--navy-2); border: 1.5px solid var(--line-2); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 650;
  background: #eef1f7; color: var(--ink-2); white-space: nowrap; }
.chip.full { background: #fff3d6; color: #8a5a00; }
.chip.done { background: var(--ok-bg); color: var(--ok); }
.chip.prog { background: var(--sel-bg); color: var(--sel); }

/* ---------- home ---------- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 26px 0 64px; position: relative; overflow: hidden; }
.hero:after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94,234,212,.30), rgba(94,234,212,0) 70%); }
.hero .tag { display: inline-block; background: var(--amber); color: var(--amber-ink); font-weight: 750; font-size: 11px; letter-spacing: .06em;
  padding: 5px 10px; border-radius: 20px; text-transform: uppercase; }
.hero h1 { font-size: 34px; line-height: 1.05; margin: 14px 0 6px; letter-spacing: -.02em; font-weight: 800; }
.hero h1 span { color: var(--amber); }
.hero p { margin: 0; color: #dbe5ff; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -42px; position: relative; z-index: 2; }
.stat { background: var(--card); border-radius: var(--radius); padding: 12px 12px 10px; box-shadow: 0 6px 18px rgba(13,27,64,.08); }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); font-weight: 650; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.filter.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.group-title { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 20px 2px 10px; }
.tests { display: grid; gap: 10px; }
.tcard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border-radius: var(--radius);
  padding: 14px; border: 1.5px solid transparent; box-shadow: 0 1px 2px rgba(13,27,64,.05); }
.tcard:active { border-color: var(--line-2); }
.tcard .cal { flex: 0 0 52px; height: 56px; border-radius: 12px; background: #eef3ff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tcard .cal b { font-size: 15px; color: var(--navy-2); letter-spacing: .02em; }
.tcard .cal span { font-size: 12px; color: var(--muted); font-weight: 650; }
.tcard .meta { flex: 1; min-width: 0; }
.tcard .meta h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.tcard .meta .row { display: flex; gap: 6px; flex-wrap: wrap; }
.tcard .go { color: var(--line-2); font-size: 22px; }
.score-pill { font-weight: 800; color: var(--ok); font-size: 18px; }
.foot { text-align: center; padding: 26px 0 40px; font-size: 12px; color: var(--muted); }

/* ---------- intro ---------- */
.page-head { padding: 18px 0 8px; }
.page-head h2 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -.02em; }
.panel { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: 0 1px 2px rgba(13,27,64,.05); }
.mod-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mod-row:last-child { border-bottom: 0; }
.mod-row b { font-size: 15px; }
.rules { margin: 0; padding-left: 18px; color: var(--ink-2); line-height: 1.55; font-size: 14.5px; }
.actions { display: grid; gap: 10px; margin: 18px 0 30px; }

/* ---------- runner ---------- */
.run { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.topbar .in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; max-width: 1180px; margin: 0 auto; padding: 0 12px; }
.topbar .lbl { font-size: 12.5px; color: var(--muted); font-weight: 650; line-height: 1.2; }
.topbar .lbl b { display: block; color: var(--ink); font-size: 14px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; padding: 6px 12px; border-radius: 10px; letter-spacing: .02em; }
.timer.low { color: var(--bad); background: var(--bad-bg); }
.timer.hidden { font-size: 13px; color: var(--muted); font-weight: 650; }
.topbar .right { justify-self: end; }
.icon-btn { height: 38px; padding: 0 12px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--navy-2); }
.icon-btn:active { background: #f1f4fa; }

.qwrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; }
.split { display: block; }
.pane { padding: 16px; }
.passage { font-family: var(--serif); font-size: 17px; line-height: 1.62; color: #111; background: #fff; }
.passage p { margin: 0 0 12px; }
.passage p:last-child { margin-bottom: 0; }
.passage img.fig { display: block; max-width: 100%; height: auto; margin: 6px auto 14px; border-radius: 6px; cursor: zoom-in; }
.passage img.fig.dw { width: var(--w); }
.choice .txt sub, .choice .txt sup { line-height: 0; }
.passage u { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.passage ul.notes { list-style: disc outside; margin: 2px 0 14px; padding: 0 0 0 1.4em; }
.passage ul.notes li { margin: 0 0 6px; padding-left: 0.2em; }
.passage ul.notes li:last-child { margin-bottom: 0; }
.passage ul.notes li::marker { color: currentColor; }
.passage-card { border-bottom: 8px solid var(--bg); }
.qhead { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.qnum { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; color: var(--ink-2); padding: 6px 8px; border-radius: 8px; }
.mark svg { width: 16px; height: 16px; }
.mark.on { color: #b7791f; background: #fff5e3; }
.qhead .sp { flex: 1; }
.elim { font-size: 12px; font-weight: 800; letter-spacing: .02em; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 5px 8px; color: var(--ink-2); }
.elim.on { background: var(--navy); color: #fff; border-color: var(--navy); text-decoration: line-through; }
.stem { font-family: var(--serif); font-size: 17px; line-height: 1.55; margin: 0 0 16px; color: #111; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: stretch; gap: 0; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; overflow: hidden; }
.choice .pick { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 12px; text-align: left; min-height: 54px; }
.choice .letter { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1.5px solid #9aa4b8; display: flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: 14px; color: var(--ink-2); font-family: var(--sans); }
.choice .txt { font-family: var(--serif); font-size: 16px; line-height: 1.45; color: #111; }
.choice .x { flex: 0 0 44px; border-left: 1px solid var(--line); color: #9aa4b8; font-size: 18px; display: none; }
.elim-mode .choice .x { display: block; }
.choice.sel { border-color: var(--sel); background: var(--sel-bg); box-shadow: 0 0 0 1px var(--sel) inset; }
.choice.sel .letter { background: var(--sel); border-color: var(--sel); color: #fff; }
.choice.struck .txt, .choice.struck .letter { opacity: .45; }
.choice.struck .txt { text-decoration: line-through; }
.choice.correct { border-color: var(--ok); background: var(--ok-bg); }
.choice.correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-bg); }
.choice.wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.spr { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.spr input { flex: 1; height: 54px; font-size: 22px; font-weight: 700; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); font-family: var(--sans); }
.spr input:focus { outline: none; border-color: var(--sel); box-shadow: 0 0 0 3px rgba(35,72,196,.18); }
.spr-note { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.orig-link { display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 6px; font-size: 13.5px; color: var(--navy-2); font-weight: 650; padding: 6px 0; }
.math { display: inline-block; vertical-align: middle; }
img.m { height: 1.1em; vertical-align: -0.25em; }
.review-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.review-note.ok { background: var(--ok-bg); color: var(--ok); }
.review-note.bad { background: var(--bad-bg); color: var(--bad); }
.review-note.skip { background: #f1f3f8; color: var(--ink-2); }

.bottombar { position: sticky; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bottombar .in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; max-width: 1180px; margin: 0 auto; padding: 0 12px; gap: 8px; }
.nav-btn { height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; background: var(--navy); color: #fff; }
.nav-btn.sec { background: #eef1f7; color: var(--ink); }
.nav-btn[disabled] { opacity: .35; }
.bottombar .l { justify-self: start; }
.bottombar .r { justify-self: end; }
.qpill { height: 40px; padding: 0 14px; border-radius: 20px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.qpill svg { width: 14px; height: 14px; }

/* navigator / review grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.cell { position: relative; height: 44px; border-radius: 10px; border: 1.5px dashed #a9b2c5; font-weight: 750; color: var(--ink-2); background: #fff; }
.cell.ans { border: 1.5px solid var(--sel); background: var(--sel); color: #fff; }
.cell.cur { box-shadow: 0 0 0 3px rgba(255,193,69,.9); }
.cell .flag { position: absolute; top: -6px; right: -5px; width: 14px; height: 14px; }
.cell.ok { border: 1.5px solid var(--ok); background: var(--ok); color: #fff; }
.cell.no { border: 1.5px solid var(--bad); background: var(--bad); color: #fff; }
.cell.skip { border: 1.5px dashed #a9b2c5; background: #fff; color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* sheets & modals */
.overlay { position: fixed; inset: 0; background: rgba(10,16,32,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 640px; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); max-height: 86vh; overflow: auto; animation: up .2s ease; }
.sheet h3 { margin: 0 0 4px; font-size: 18px; }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: -6px auto 12px; }
.dialog { margin: auto 16px; max-width: 420px; width: 100%; background: #fff; border-radius: 18px; padding: 20px; animation: pop .15s ease; align-self: center; }
.dialog h3 { margin: 0 0 8px; font-size: 19px; }
.dialog p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.5; font-size: 15px; }
.dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #0b0f1a; display: flex; flex-direction: column; }
.viewer .vbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; color: #fff; }
.viewer .vbar button { color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.12); }
.viewer .vbody { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: block; }
.viewer .vbody img { display: block; width: 100%; height: auto; max-width: none; margin: 0 auto; background: #fff; }
.viewer.zoom .vbody img { width: 230%; }
.viewer .vhint { color: #9aa6c4; font-size: 12.5px; text-align: center; padding: 8px 12px calc(10px + var(--safe-b)); }
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(40px); opacity: .6 } }
@keyframes pop { from { transform: scale(.96); opacity: .6 } }

/* break & results */
.center-card { text-align: center; padding: 30px 18px; }
.big-timer { font-size: 54px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--navy); margin: 10px 0; }
.score-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: 20px; padding: 22px 18px; margin: 16px 0; text-align: center; }
.score-card .lbl { color: #dbe5ff; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.score-card .total { font-size: 64px; font-weight: 850; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0; }
.score-card .total small { font-size: 20px; color: #c3d4ff; font-weight: 700; }
.score-card .parts { display: flex; justify-content: center; gap: 22px; margin-top: 8px; }
.score-card .parts div b { display: block; font-size: 24px; color: var(--amber); }
.score-card .parts div span { font-size: 12px; color: #dbe5ff; }
.mod-res h4 { margin: 0 0 4px; font-size: 16px; }
.mod-res .sub { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }

/* toast */
.toast { pointer-events: none; position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 70; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: pop .15s ease; max-width: 90vw; }

/* loading */
.loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--muted); font-weight: 600; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy-2); animation: spin .8s linear infinite; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg) } }

/* wide screens: Bluebook-style two columns */
@media (min-width: 900px) {
  .split.two { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 120px); }
  .split.two .passage-card { border-bottom: 0; border-right: 6px solid var(--bg); max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 56px; }
  .pane { padding: 24px 28px; }
  .hero h1 { font-size: 42px; }
}

/* content extras */
.passage .note { font-family: var(--sans); font-size: 14px; background: #fff7e6; color: #7a4b00; border-radius: 10px; padding: 10px 12px; }
.passage .tcap, .stem .tcap { font-family: var(--sans); font-weight: 700; font-size: 14px; text-align: center; margin: 4px 0 8px; color: var(--ink); }
table.tbl { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-family: var(--sans); font-size: 13.5px; line-height: 1.35; }
table.tbl th, table.tbl td { border: 1px solid #c9d0dc; padding: 6px 7px; text-align: left; vertical-align: top; }
table.tbl th { background: #f3f5f9; font-weight: 700; }
.table-scroll { overflow-x: auto; }
p.disp { text-align: center; margin: 6px 0 10px !important; }
.choice .txt p.disp { text-align: left; margin: 0 !important; }
.stem p { margin: 0 0 10px; }
.stem p:last-child { margin-bottom: 0; }
img.m { display: inline-block; max-width: none; }
/* wide tables scroll inside their own box instead of widening the page */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 14px; max-width: 100%; }
.tblwrap table.tbl { margin: 0; }
.passage .tnote, .stem .tnote { font-family: var(--sans); font-size: 12.5px; line-height: 1.4; color: var(--muted); margin: -6px 0 14px; }
table.tbl th, table.tbl td { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 480px) {
  table.tbl { font-size: 12.5px; }
  .run.bb table.tbl { font-size: calc(12.5px * var(--zoom, 1)); }
  table.tbl th, table.tbl td { padding: 5px 4px; }
}

.topbar .lbl .sname { display: block; white-space: nowrap; }
@media (max-width: 440px) { .topbar .lbl .sname { display: none; } .topbar .lbl b { font-size: 15px; } }

/* =====================================================================
   Test screens: digital-SAT style layout
   ===================================================================== */
:root {
  --bb-blue: #3b5bdb;      /* question number, question list button */
  --bb-btn: #2f4ac0;       /* Back / Next */
  --bb-ink: #202937;
  --bb-label: #384151;
  --bb-foot: #e7efed;
  --bb-divider: #d2d5db;
  --bb-qbar: #f0f0f0;
  --bb-red: #c52233;
}
.run.bb { background: #fff; color: var(--bb-ink); font-family: var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
.run.bb button { font-family: var(--sans); }

/* coloured dashed rules */
.bb-dash { height: 3px; flex: 0 0 auto; background: repeating-linear-gradient(90deg,
  #3b5bdb 0 48px, transparent 48px 55px, #f4b740 55px 103px, transparent 103px 110px,
  #0e1b3d 110px 158px, transparent 158px 165px, #9db8ff 165px 213px, transparent 213px 220px); }
.bb-qdash { height: 3px; background: repeating-linear-gradient(90deg,
  #3b5bdb 0 22px, transparent 22px 25px, #f4b740 25px 47px, transparent 47px 50px,
  #0e1b3d 50px 72px, transparent 72px 75px, #9db8ff 75px 97px, transparent 97px 100px); }

/* header */
.bb-head { position: sticky; top: 0; z-index: 25; background: #fff; flex: 0 0 auto; }
.bb-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 84px; padding: 10px 28px 8px; }
.bb-left { min-width: 0; }
.bb-title { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--bb-ink); }
.bb-sub { margin-top: 5px; font-size: 15px; font-weight: 600; color: var(--bb-blue); }
.bb-dir { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; padding: 0; font-size: 16px; font-weight: 600; color: #3b5bdb; }
.bb-dir svg { width: 17px; height: 17px; }
.bb-center { text-align: center; }
.bb-timer { display: flex; align-items: center; justify-content: center; min-height: 28px; font-size: 22px; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums; color: var(--bb-ink); }
.bb-timer.low { color: #c62f2f; }
.bb-timer.paused { color: #6b7280; }
.bb-timer svg { width: 24px; height: 24px; color: var(--bb-label); }
.bb-tbtns { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.bb-pill { height: 26px; padding: 0 12px; border-radius: 13px; border: 1.5px solid #6b7280; background: #fff; color: var(--bb-ink); font-size: 13px; font-weight: 600; }
.bb-pill:hover { background: #f3f5f9; }
.bb-pill.on { background: var(--bb-blue); border-color: var(--bb-blue); color: #fff; }
.bb-right { justify-self: end; display: flex; align-items: flex-start; gap: 22px; }
.bb-tool { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 2px 4px; color: var(--bb-label); font-size: 15px; font-weight: 500; white-space: nowrap; }
.bb-tool svg { width: 26px; height: 26px; }
.bb-more { position: relative; }
.bb-menu { position: absolute; right: -6px; top: calc(100% + 10px); z-index: 46; min-width: 252px; padding: 6px; background: #fff;
  border: 1px solid #e3e6ec; border-radius: 12px; box-shadow: 0 12px 30px rgba(16,24,40,.16); animation: pop .12s ease; }
.bb-menu button { display: block; width: 100%; padding: 12px 16px; border-radius: 8px; text-align: left; font-size: 17px; color: var(--bb-ink); white-space: nowrap; }
.bb-menu button:hover { background: #f3f5f9; }
.bb-mrow { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 16px; }
.bb-mlbl { flex: 1; font-size: 17px; color: var(--bb-ink); white-space: nowrap; }
.bb-menu .bb-zb { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border: 1.5px solid #cfd3da;
  border-radius: 50%; color: var(--bb-ink); touch-action: manipulation; }
.bb-menu .bb-zb svg { width: 18px; height: 18px; }
.bb-menu .bb-zb:disabled { opacity: .35; cursor: default; background: none; }
.bb-menu .bb-zv { flex: 0 0 auto; width: 58px; padding: 9px 0; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--bb-label); touch-action: manipulation; }
.bb-menu .bb-mswitch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bb-sw { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 12px; background: #c3c9d3; transition: background-color .2s ease; }
.bb-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.3); transition: transform .2s ease; }
.bb-mswitch[aria-checked="true"] .bb-sw { background: var(--bb-blue); }
.bb-mswitch[aria-checked="true"] .bb-sw::after { transform: translateX(18px); }
html.theme-anim .bb-sw::after { transition: transform .2s ease !important; }
.bb-msep { height: 1px; margin: 5px 10px; background: #e3e6ec; }

/* directions */
.bb-dirpanel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; background: rgba(16,24,40,.18); animation: fade .12s ease; }
.bb-dirbox { max-width: 760px; margin: 8px 0 0 20px; padding: 20px 22px 16px; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(16,24,40,.22);
  max-height: 70vh; overflow: auto; animation: pop .12s ease; }
.bb-dirtext { font-size: 16px; line-height: 1.6; color: var(--bb-ink); }
.bb-dirtext p { margin: 0 0 12px; }
.bb-dirtext ul { margin: 0 0 6px; padding-left: 20px; }
.bb-dirtext li { margin-bottom: 6px; }
.bb-dirfoot { display: flex; justify-content: flex-end; margin-top: 10px; }

/* panes */
.run.bb .qwrap { flex: 1; width: 100%; max-width: none; margin: 0; }
.run.bb .pane { padding: 26px 32px; }
.run.bb .passage { font-family: var(--sans); font-size: calc(18px * var(--zoom, 1)); line-height: 1.75; color: #1b1b1b; }
.run.bb .passage p { margin: 0 0 14px; }
.run.bb .passage p:last-child { margin-bottom: 0; }
.run.bb .passage-card { border-bottom: 0; }
.run.bb .qcol { width: 100%; }
.run.bb .split:not(.two) .qcol { max-width: 780px; margin: 0 auto; }
.run.bb .stem { font-family: var(--sans); font-size: calc(18px * var(--zoom, 1)); line-height: 1.65; color: #1b1b1b; margin: 20px 0 22px; }
.run.bb .passage .tcap, .run.bb .stem .tcap { font-size: calc(15px * var(--zoom, 1)); }
.run.bb .passage .tnote, .run.bb .stem .tnote { font-size: calc(12.5px * var(--zoom, 1)); }
.run.bb .passage .note { font-size: calc(14px * var(--zoom, 1)); }
.run.bb table.tbl { font-size: calc(13.5px * var(--zoom, 1)); }
.run.bb .passage img.fig.dw { width: calc(var(--w) * var(--zoom, 1)); }

/* question bar */
.bb-qbar { display: flex; align-items: center; height: 46px; background: var(--bb-qbar); }
.bb-qnum { flex: 0 0 38px; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bb-blue); color: #fff; font-size: 18px; font-weight: 700; }
.bb-mark { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px; color: var(--bb-label); font-size: 17px; font-weight: 500; }
.bb-mark svg { width: 22px; height: 22px; }
.bb-qbar .sp { flex: 1; }
.bb-abc { position: relative; width: 52px; height: 34px; margin-right: 6px; border: 1.5px solid #cfd3da; border-radius: 8px; background: #fff; color: var(--bb-label);
  font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.bb-abc::after { content: ''; position: absolute; left: 7px; right: 7px; top: 50%; border-top: 1.5px solid currentColor; transform: rotate(-17deg); }
.bb-abc.on { background: var(--bb-blue); border-color: var(--bb-blue); color: #fff; }

/* answer choices */
.run.bb .choices { display: grid; gap: 14px; }
.run.bb .choice { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 0; background: none; overflow: visible; box-shadow: none; }
.run.bb .choice .pick { position: relative; flex: 1; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 16px;
  border: 2px solid #1f1f1f; border-radius: 10px; background: #fff; text-align: left; }
.run.bb .choice .letter { flex: 0 0 calc(28px * var(--zoom, 1)); height: calc(28px * var(--zoom, 1)); display: flex; align-items: center; justify-content: center; border: 2px solid #1f1f1f; border-radius: 50%;
  font-family: var(--sans); font-size: calc(13px * var(--zoom, 1)); font-weight: 700; color: #1f1f1f; }
.run.bb .choice .txt { font-family: var(--sans); font-size: calc(18px * var(--zoom, 1)); line-height: 1.45; color: #1b1b1b; }
/* when zoomed in, a word longer than the line wraps inside its box instead of pushing the page sideways */
.run.bb .choice .pick, .run.bb .choice .txt { min-width: 0; }
.run.bb .passage, .run.bb .stem, .run.bb .choice .txt { word-break: break-word; overflow-wrap: anywhere; }
.run.bb .choice.sel .pick { border-color: var(--bb-blue); box-shadow: 0 0 0 1.5px var(--bb-blue); }
.run.bb .choice.sel .letter { background: var(--bb-blue); border-color: var(--bb-blue); color: #fff; }
.run.bb .choice .x { display: none; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 2px; }
.run.bb.elim-mode .choice .x { display: inline-flex; }
.run.bb .choice .x .xl { position: relative; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #1f1f1f; border-radius: 50%; font-size: 12px; font-weight: 700; color: #1f1f1f; }
.run.bb .choice .x .xl::after { content: ''; position: absolute; left: -5px; right: -5px; top: 50%; border-top: 1.5px solid #1f1f1f; }
.run.bb .choice .x .undo { font-size: 15px; font-weight: 700; text-decoration: underline; color: #1f1f1f; }
.run.bb .choice.struck .pick { opacity: .5; }
.run.bb .choice.struck .pick::after { content: ''; position: absolute; left: -8px; right: -8px; top: 50%; border-top: 2px solid #1f1f1f; }
.run.bb .choice.struck .txt { text-decoration: none; }
.run.bb .choice.correct .pick { border-color: var(--ok); background: var(--ok-bg); }
.run.bb .choice.correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.run.bb .choice.wrong .pick { border-color: var(--bad); background: var(--bad-bg); }
.run.bb .choice.wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.run.bb .review-note { margin: 16px 0 0; }
.run.bb .orig-link { color: #3b5bdb; }

/* footer */
.bb-foot { position: sticky; bottom: 0; z-index: 20; flex: 0 0 auto; background: var(--bb-foot); padding-bottom: var(--safe-b); }
.bb-fin { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-height: 66px; padding: 8px 28px; }
.bb-fr { justify-self: end; display: flex; gap: 10px; }
.bb-qpill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; background: var(--bb-blue); color: #fff;
  font-size: 17px; font-weight: 600; white-space: nowrap; }
.bb-qpill svg { width: 18px; height: 18px; }
.bb-qpill.static { cursor: default; }
.bb-btn { height: 44px; min-width: 84px; padding: 0 22px; border-radius: 22px; background: var(--bb-btn); color: #fff; font-size: 17px; font-weight: 600; }
.bb-btn:hover { filter: brightness(1.08); }
.bb-btn[disabled] { opacity: .5; cursor: default; filter: none; }
.bb-btn.wide { width: 100%; }
.bb-outline { height: 42px; padding: 0 22px; border-radius: 21px; border: 1.5px solid var(--bb-btn); background: #fff; color: var(--bb-btn); font-size: 16px; font-weight: 600; }

/* question list (navigator) and Check Your Work */
.nav-ov { background: rgba(16,24,40,.25); align-items: flex-end; }
.bb-navpop { width: calc(100% - 24px); max-width: 600px; max-height: 72vh; overflow: auto; margin: 0 auto calc(86px + var(--safe-b)); padding: 16px 18px 18px;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 44px rgba(16,24,40,.28); animation: up .18s ease; }
.bb-navhead { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #e3e6ec; }
.bb-navhead h3 { flex: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 700; color: var(--bb-ink); }
.bb-x { padding: 0 4px; font-size: 18px; line-height: 1; color: var(--bb-label); }
.bb-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0 0 16px; font-size: 14px; color: var(--bb-label); }
.bb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bb-legend i { display: inline-flex; width: 16px; height: 16px; }
.bb-legend i svg { width: 16px; height: 16px; }
.bb-legend .lg-un { width: 14px; height: 14px; border: 1.5px dashed #5f6b7f; border-radius: 3px; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 16px 10px; padding-top: 8px; }
.bb-cell { position: relative; height: 42px; border: 1.5px dashed #5f6b7f; border-radius: 4px; background: #fff; color: var(--bb-blue); font-size: 16px; font-weight: 700; }
.bb-cell.ans { border: 1.5px solid var(--bb-blue); background: var(--bb-blue); color: #fff; }
.bb-cell .pin { position: absolute; top: -17px; left: 50%; width: 16px; height: 16px; transform: translateX(-50%); color: var(--bb-ink); }
.bb-cell .bm { position: absolute; top: -8px; right: -7px; width: 16px; height: 16px; }
.bb-cell .pin svg, .bb-cell .bm svg { display: block; width: 100%; height: 100%; }
.bb-navfoot { display: flex; justify-content: center; margin-top: 18px; }
.bb-check { max-width: 820px; margin: 0 auto; padding: 32px 20px 40px; text-align: center; }
.bb-check h1 { margin: 0 0 12px; font-size: 30px; font-weight: 700; color: var(--bb-ink); }
.bb-check > p { max-width: 640px; margin: 0 auto 26px; font-size: 17px; line-height: 1.6; color: var(--bb-label); }
.bb-card { padding: 20px 22px 26px; background: #fff; border-radius: 14px; box-shadow: 0 4px 24px rgba(16,24,40,.12); text-align: left; }
.bb-cardhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid #e3e6ec; }
.bb-cardhead h3 { margin: 0; font-size: 18px; font-weight: 700; }
.bb-cardhead .bb-legend { margin: 0; }

/* pause */
.pause-ov { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: 20px 16px calc(20px + var(--safe-b)); background: #f4f6fa; animation: fade .15s ease; }
.pause-card { width: 100%; max-width: 380px; padding: 28px 22px 22px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(16,24,40,.1); text-align: center; }
.pause-ico { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; border-radius: 50%; background: #dbe5ff; color: var(--bb-blue); }
.pause-ico svg { width: 24px; height: 24px; }
.pause-card h2 { margin: 0 0 6px; font-size: 22px; color: var(--bb-ink); }
.pause-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--bb-label); }
.pause-left { margin-bottom: 18px; font-size: 14px; color: #6b7280; }
.pause-left b { margin-right: 2px; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--bb-ink); }

/* highlights & notes */
mark.hl { padding: 0; border-radius: 2px; color: inherit; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.hl-y { background: #ffe27a; }
mark.hl-b { background: #bde0ff; }
mark.hl-p { background: #ffcce0; }
mark.hl.has-note.end::after { content: '✎'; margin-left: 2px; font-size: .72em; vertical-align: super; color: var(--bb-blue); }
.hlbar, .vhlbar { position: fixed; left: 0; top: 0; z-index: 45; display: flex; align-items: center; gap: 2px; padding: 5px; background: #fff;
  border: 1px solid #e3e6ec; border-radius: 12px; box-shadow: 0 10px 28px rgba(16,24,40,.22); -webkit-user-select: none; user-select: none; }
.hlbar[hidden], .vhlbar[hidden] { display: none; }
.hlbar button, .vhlbar button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 8px; font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--bb-ink); white-space: nowrap; }
.hlbar button:hover, .vhlbar button:hover { background: #f3f5f9; }
.hlbar button svg, .vhlbar button svg { width: 17px; height: 17px; }
.hlbar .sw { display: flex; gap: 7px; padding: 0 6px 0 4px; }
.hlbar .swatch { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #c9ced8; }
.hlbar .swatch.on { box-shadow: 0 0 0 2.5px var(--bb-ink); }
.hlbar .s-y { background: #ffe27a; } .hlbar .s-b { background: #9fd0ff; } .hlbar .s-p { background: #ffb8d4; }
.overlay.top { align-items: flex-start; }
.dialog.note-dialog { align-self: flex-start; margin: 10vh 16px 0; }
.note-quote { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; font-size: 14px; line-height: 1.45; color: var(--bb-ink); }
.note-quote.hl-y { background: #fff3c4; } .note-quote.hl-b { background: #e3f1ff; } .note-quote.hl-p { background: #ffe6f0; }
.note-dialog textarea { width: 100%; min-height: 110px; margin-bottom: 14px; padding: 10px 12px; border: 1.5px solid #cfd6e3; border-radius: 10px;
  font-family: var(--sans); font-size: 16px; line-height: 1.45; resize: vertical; }
.note-dialog textarea:focus { outline: none; border-color: var(--bb-blue); box-shadow: 0 0 0 3px rgba(35,72,196,.18); }
.btn.bbblue { background: var(--bb-btn); color: #fff; }
.bb-head, .bb-foot, .bb-qbar, .run.bb .choices { -webkit-user-select: none; user-select: none; }

/* wide screens: fixed two-pane layout, each pane scrolls on its own */
@media (min-width: 900px) {
  .run.bb { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .run.bb .qwrap { min-height: 0; overflow: auto; }
  .run.bb .split { min-height: 0; }
  .run.bb .split.two { display: grid; grid-template-columns: 1fr 1fr; height: 100%; min-height: 0; overflow: hidden; }
  .run.bb .split.two .passage-card { position: static; top: auto; height: 100%; max-height: none; overflow: auto; border-right: 7px solid var(--bb-divider); }
  .run.bb .split.two .qpane { height: 100%; overflow: auto; }
}
/* phones and narrow windows */
@media (max-width: 899px) {
  .bb-in { gap: 8px; min-height: 64px; padding: 8px 12px 6px; }
  .bb-title { font-size: 15px; }
  .bb-dir { margin-top: 3px; font-size: 13.5px; }
  .bb-dir svg { width: 15px; height: 15px; }
  .bb-timer { min-height: 24px; font-size: 18px; }
  .bb-timer svg { width: 21px; height: 21px; }
  .bb-pill { height: 24px; padding: 0 9px; font-size: 12px; }
  .bb-right { gap: 2px; }
  .bb-tool { padding: 6px; }
  .bb-tool span { display: none; }
  .bb-tool svg { width: 24px; height: 24px; }
  .bb-dirbox { margin: 8px 12px 0; }
  .run.bb .pane { padding: 16px; }
  .run.bb .passage-card { border-bottom: 7px solid var(--bb-divider); }
  .run.bb .passage, .run.bb .stem, .run.bb .choice .txt { font-size: calc(17px * var(--zoom, 1)); }
  .run.bb .stem { margin: 16px 0 18px; }
  .run.bb .choice .pick { min-height: 54px; padding: 10px 12px; gap: 12px; }
  .bb-qbar { height: 42px; }
  .bb-qnum { flex-basis: 34px; font-size: 16px; }
  .bb-mark { font-size: 15px; gap: 6px; }
  .bb-mark svg { width: 20px; height: 20px; }
  .bb-fin { grid-template-columns: auto 1fr; min-height: 60px; padding: 8px 12px; }
  .bb-fl { display: none; }
  .bb-qpill { height: 40px; padding: 0 12px; font-size: 15px; gap: 6px; }
  .bb-btn { height: 40px; min-width: 0; padding: 0 16px; font-size: 15px; }
  .bb-check { padding: 22px 14px 30px; }
  .bb-check h1 { font-size: 24px; }
  .bb-check > p { font-size: 15px; }
  .bb-card { padding: 16px 14px 22px; }
  .bb-navpop { margin-bottom: calc(76px + var(--safe-b)); }
}
@media (max-width: 440px) { .bb-sec { display: none; } }
/* the narrowest phones (320px): Question N of 27, Back and Next stay on screen */
@media (max-width: 340px) {
  .bb-fin { gap: 6px; padding: 8px; }
  .bb-fr { gap: 6px; }
  .bb-qpill { padding: 0 10px; }
  .bb-btn { padding: 0 13px; }
}
/* sizes matched to the reference layout on wide screens */
@media (min-width: 900px) {
  .bb-in { min-height: 88px; padding: 12px 30px 10px; }
  .bb-title { font-size: 25px; }
  .bb-dir { font-size: 17px; }
  .bb-tool { font-size: 16px; }
  .bb-tool svg { width: 28px; height: 28px; }
  .run.bb .pane { padding: 24px 22px; }
  .run.bb .passage { font-size: calc(22px * var(--zoom, 1)); line-height: 1.66; }
  .run.bb .passage p { margin-bottom: 16px; }
  .run.bb .stem { font-size: calc(22px * var(--zoom, 1)); line-height: 1.6; margin: 22px 0 24px; }
  .run.bb .passage .tcap, .run.bb .stem .tcap { font-size: calc(17px * var(--zoom, 1)); }
  .run.bb .passage table.tbl { font-size: calc(16px * var(--zoom, 1)); }
  .bb-qbar { height: 48px; }
  .bb-qnum { flex-basis: 38px; font-size: 20px; }
  .bb-mark { font-size: 18px; }
  .run.bb .choices { gap: 12px; }
  .run.bb .choice .pick { min-height: 70px; padding: 12px 16px; gap: 16px; border-width: 2.5px; }
  .run.bb .choice .letter { flex-basis: calc(30px * var(--zoom, 1)); height: calc(30px * var(--zoom, 1)); font-size: calc(14px * var(--zoom, 1)); }
  .run.bb .choice .txt { font-size: calc(22px * var(--zoom, 1)); }
  .bb-fin { min-height: 70px; padding: 9px 30px; }
  .bb-qpill { height: 48px; padding: 0 20px; font-size: 19px; }
  .bb-btn { height: 44px; padding: 0 24px; font-size: 19px; }
}
.run.bb .choice .x { width: 44px; min-width: 44px; }
@media (max-width: 440px) { .bb-secname { display: none; } .bb-title { font-size: 17px; } }

/* full screen */
.hero .wrap { position: relative; }
.hero-fs { position: absolute; top: -4px; right: 16px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 650; }
.hero-fs svg { width: 15px; height: 15px; }
.hero-fs:hover { background: rgba(255,255,255,.2); }
/* in Telegram's full-screen mode its own buttons float over the top of the page: keep content below them */
.bb-head { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.hero { padding-top: calc(26px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
#app > .wrap:first-child { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.viewer .vbar { padding-top: calc(10px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.hero .wrap { z-index: 2; }
.hero-fs { z-index: 3; }

/* locked (not yet accepted) */
.lock-card { text-align: center; padding: 26px 20px 22px; margin-top: -40px; position: relative; }
.lock-ico { font-size: 34px; line-height: 1; }
.lock-card h3 { margin: 12px 0 8px; font-size: 20px; color: var(--ink); }
.lock-card p { margin: 0 0 10px; color: var(--ink-2); line-height: 1.55; font-size: 15px; }
.lock-card p.muted { color: var(--muted); font-size: 14px; }

/* home: test cards */
.pr-page { min-height: 100vh; background: #fff; color: #0b0b0b; }
.pr-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.pr-top { border-bottom: 1px solid #e4e4e4; padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.pr-topin { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.pr-welcome { font-size: 19px; font-weight: 600; color: #0b0b0b; }
.pr-fs { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 10px; background: #fff;
  color: #4b5563; font-size: 14px; font-weight: 600; }
.pr-fs svg { width: 15px; height: 15px; }
.pr-title { margin: 28px 0 8px; font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: #0b080a; line-height: 1.15; }
.pr-sub { margin: 0 0 26px; font-size: 17px; line-height: 1.5; color: #4b5563; }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pr-card { display: flex; flex-direction: column; padding: 22px 22px 22px; border: 1px solid #d9d9d9; border-radius: 16px; background: #fff; }
.pr-head { display: flex; align-items: center; gap: 10px; }
.pr-cal { flex: 0 0 auto; width: 24px; height: 24px; color: #3b5bdb; }
.pr-head h3 { margin: 0; font-size: 20px; font-weight: 700; color: #0b0b0b; letter-spacing: -.01em; }
.pr-form { margin: 8px 0 0; font-size: 16px; color: #4b5563; }
.pr-btn { margin-top: 22px; height: 44px; width: 100%; border-radius: 10px; background: #3b5bdb; color: #fff; font-size: 17px; font-weight: 600; }
.pr-btn:hover { background: #2f4ac0; }
.pr-btn:active { transform: scale(.99); }
.pr-page .foot { padding: 26px 0 34px; }
@media (max-width: 999px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .pr-in { padding: 0 16px; }
  .pr-grid { grid-template-columns: 1fr; gap: 14px; }
  .pr-title { margin-top: 22px; font-size: 28px; }
  .pr-sub { font-size: 15.5px; margin-bottom: 20px; }
  .pr-card { padding: 18px; }
  .pr-head h3 { font-size: 19px; }
  .pr-btn { margin-top: 18px; }
}
/* main action buttons match the test cards */
.btn.amber { background: #3b5bdb; color: #fff; }

.pr-btn[disabled] { opacity: .7; cursor: default; }
.pr-link { align-self: center; margin-top: 10px; padding: 4px 6px; font-size: 14px; font-weight: 600; color: #3b5bdb; }
.pr-link:hover { text-decoration: underline; }
.pr-lock { max-width: 560px; margin: 4px auto 0; align-items: center; text-align: center; padding: 28px 24px 24px; }
.pr-lockico { font-size: 34px; line-height: 1; }
.pr-lock h3 { margin: 12px 0 8px; font-size: 21px; font-weight: 700; color: #0b080a; }
.pr-lock p { margin: 0 0 10px; font-size: 16px; line-height: 1.55; color: #374151; }
.pr-lock .pr-muted { color: #6b7280; font-size: 14.5px; }
.pr-lock .pr-btn { margin-top: 16px; }
.pr-btn2 { margin-top: 10px; height: 44px; width: 100%; border-radius: 10px; border: 1.5px solid #3b5bdb; background: #fff; color: #3b5bdb; font-size: 16px; font-weight: 600; }

/* =====================================================================
   Vocabulary
   ===================================================================== */
/* --ac fills (buttons, bars), --acfg accent text and icons, --actext emphasised words, --acdeep the dark end of gradients */
.c-cp  { --ac: #4338ca; --ac2: #818cf8; --acbg: #eef0ff; --acfg: #4338ca; --actext: #1e1b6b; --acdeep: #1e1b6b; }
.c-sat { --ac: #3b5bdb; --ac2: #7aa0ff; --acbg: #eaf0ff; --acfg: #3b5bdb; --actext: #14215a; --acdeep: #14215a; }
.c-ivy { --ac: #1b2a6b; --ac2: #5f7fe0; --acbg: #e9edfa; --acfg: #1b2a6b; --actext: #101a45; --acdeep: #101a45; }
.c-adv { --ac: #334155; --ac2: #94a3b8; --acbg: #eef2f6; --acfg: #334155; --actext: #0f172a; --acdeep: #0f172a; }

/* home tabs */
.hm-tabs { display: inline-flex; gap: 4px; margin: 20px 0 0; padding: 4px; border-radius: 14px; background: #f1f4f3; border: 1px solid #e3e8e6; }
.hm-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 600; color: #4b5563;
  transition: background .15s, color .15s, box-shadow .15s; }
.hm-tab svg { width: 18px; height: 18px; }
.hm-tab:hover { color: #0b0b0b; }
.hm-tab.on { background: #fff; color: #3b5bdb; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.06); }
.hm-tabs + .pr-title { margin-top: 22px; }
@media (max-width: 639px) {
  .hm-tabs { display: flex; margin-top: 14px; }
  .hm-tab { flex: 1; padding: 0 8px; }
  .hm-tabs + .pr-title { margin-top: 18px; }
}

/* vocabulary home */
.vc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.vc-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.vc-sico { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.vc-sico svg { width: 21px; height: 21px; }
.s-k .vc-sico { background: #eaf0ff; color: #3b5bdb; }
.s-m .vc-sico { background: #fff4db; color: #b7791f; }
.s-s .vc-sico { background: #ffece4; color: #ea580c; }
.vc-stxt { min-width: 0; }
.vc-stxt b { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.vc-stxt em { font-style: normal; font-size: 13px; color: #6b7280; }
@media (max-width: 639px) {
  .vc-stats { gap: 8px; }
  .vc-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .vc-sico { flex-basis: auto; width: 36px; height: 36px; border-radius: 10px; }
  .vc-sico svg { width: 18px; height: 18px; }
  .vc-stxt b { font-size: 20px; }
  .vc-stxt em { font-size: 12px; }
}
.vc-cont { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; margin: 0 0 6px; padding: 18px 20px; overflow: hidden; border-radius: 18px;
  text-align: left; color: #fff; background: linear-gradient(125deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 14px 30px -18px var(--acdeep); }
.vc-cont::after { content: ''; position: absolute; right: -50px; top: -70px; width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 70%); }
.vc-contl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-contl em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .78; }
.vc-contl b { margin: 4px 0 10px; font-size: 19px; font-weight: 700; }
.vc-contn { margin-top: 8px; font-size: 14px; opacity: .9; }
.vc-seg4 { display: flex; gap: 5px; max-width: 240px; }
.vc-seg4 i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.26); }
.vc-seg4 i.on { background: #fff; }
.vc-contgo { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 12px;
  background: #fff; color: var(--acdeep); font-size: 15px; font-weight: 700; }
.vc-contgo svg { width: 17px; height: 17px; }
.vc-h2 { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 18px; font-weight: 700; color: #0b0b0b; }
.vc-h2 span { padding: 2px 8px; border-radius: 8px; background: #f3f4f6; font-size: 13px; font-weight: 700; color: #6b7280; }
.vc-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vc-cat { position: relative; display: flex; align-items: flex-start; gap: 16px; width: 100%; padding: 20px; text-align: left; border: 1px solid #e5e7eb; border-radius: 18px;
  background: #fff; transition: border-color .15s, box-shadow .15s, transform .1s; }
.vc-cat:hover { border-color: #d0d5dd; box-shadow: 0 12px 30px -16px rgba(16,24,40,.24); }
.vc-cat:active { transform: scale(.995); }
.vc-ico { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--acbg); color: var(--acfg); }
.vc-ico svg { width: 24px; height: 24px; }
.vc-catb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-cath { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vc-cath b { font-size: 18px; font-weight: 700; color: #0b0b0b; }
.vc-tag { padding: 3px 8px; border-radius: 999px; background: var(--acbg); color: var(--acfg); font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; }
.vc-catp { margin: 4px 0 8px; font-size: 14.5px; line-height: 1.45; color: #4b5563; }
.vc-catm { font-size: 13px; font-weight: 700; color: var(--acfg); }
.vc-bar { display: block; height: 8px; margin: 12px 0 8px; overflow: hidden; border-radius: 4px; background: #eef0f3; }
.vc-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ac); transition: width .5s ease; }
.vc-catf { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #6b7280; }
.vc-chev { flex: 0 0 auto; align-self: center; color: #c3c8d0; transition: color .15s, transform .15s; }
.vc-chev svg { width: 20px; height: 20px; }
.vc-cat:hover .vc-chev { color: var(--acfg); transform: translateX(2px); }
@media (max-width: 799px) {
  .vc-cats { grid-template-columns: 1fr; gap: 12px; }
  .vc-cat { padding: 16px; gap: 14px; }
  .vc-ico { flex-basis: 44px; width: 44px; height: 44px; }
  .vc-chev { display: none; }
}
@media (max-width: 480px) {
  .vc-cont { padding: 16px; gap: 12px; }
  .vc-contl b { font-size: 17px; }
  .vc-contgo { height: 38px; padding: 0 12px; font-size: 14px; }
}
.vc-err { max-width: 460px; margin: 40px auto; padding: 24px; text-align: center; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.vc-err b { font-size: 18px; }
.vc-err p { margin: 8px 0 16px; color: #4b5563; }
.vc-err .vg-btn { background: #3b5bdb; }

/* a word list page and a set page */
.vc-page { min-height: 100vh; background: #fff; color: #0b0b0b; }
.vc-page .foot { padding: 26px 0 34px; }
.vc-top { position: sticky; top: 0; z-index: 15; background: rgba(255,255,255,.96); border-bottom: 1px solid #ececec;
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.vc-topin { display: flex; align-items: center; min-height: 54px; }
.vc-back { display: inline-flex; align-items: center; gap: 2px; height: 38px; margin-left: -8px; padding: 0 12px 0 4px; border-radius: 10px; font-size: 15.5px; font-weight: 600; color: #374151; }
.vc-back:hover { background: #f3f4f6; }
.vc-back svg { width: 22px; height: 22px; }
.vc-hero { display: flex; align-items: center; gap: 16px; margin: 24px 0 18px; }
.vc-hero .vc-ico { flex-basis: 58px; width: 58px; height: 58px; border-radius: 16px; }
.vc-hero .vc-ico svg { width: 28px; height: 28px; }
.vc-hero h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.vc-hero p { margin: 4px 0 0; font-size: 15.5px; color: #4b5563; }
.vc-over { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px 28px; margin-bottom: 20px; padding: 16px 20px; border-radius: 16px; background: var(--acbg); }
.vc-overn b { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--actext); font-variant-numeric: tabular-nums; }
.vc-overn b small { font-size: 14px; font-weight: 600; color: var(--acfg); }
.vc-overn span { font-size: 13px; color: #4b5563; }
.vc-overb .vc-bar { height: 10px; margin: 0; border-radius: 5px; background: rgba(255,255,255,.85); }
.vc-sets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vc-set { display: flex; flex-direction: column; gap: 10px; padding: 16px; text-align: left; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .1s; }
.vc-set:hover { border-color: #d0d5dd; box-shadow: 0 10px 24px -16px rgba(16,24,40,.28); }
.vc-set:active { transform: scale(.99); }
.vc-set.mastered { border-color: #c6e9d3; background: linear-gradient(180deg, #f2fbf5 0%, #fff 75%); }
.vc-seth { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vc-seth b { font-size: 17px; font-weight: 700; }
.vc-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.vc-chip svg { width: 13px; height: 13px; }
.vc-chip.new { background: #f3f4f6; color: #6b7280; }
.vc-chip.prog { background: var(--acbg); color: var(--acfg); }
.vc-chip.done { background: #dcfce7; color: #15803d; }
.vc-seg { display: flex; gap: 4px; }
.vc-seg i { flex: 1; height: 5px; border-radius: 3px; background: #eceef2; }
.vc-seg i.on { background: var(--ac); }
.vc-set.mastered .vc-seg i.on { background: #16a34a; }
.vc-setf { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: #6b7280; }
@media (max-width: 999px) { .vc-sets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .vc-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vc-set { gap: 9px; padding: 14px 12px; }
  .vc-seth b { font-size: 16px; }
  .vc-over { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
  .vc-overb { grid-column: 1 / -1; }
  .vc-hero { margin-top: 18px; }
  .vc-hero h1 { font-size: 24px; }
  .vc-hero .vc-ico { flex-basis: 50px; width: 50px; height: 50px; }
}
.vc-narrow { max-width: 780px; }
.vc-shero { margin: 22px 0 6px; }
.vc-eyebrow { font-style: normal; font-size: 13px; font-weight: 700; color: var(--acfg); }
.vc-shero h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 4px 0 14px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.vc-badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 14px; font-weight: 700; letter-spacing: 0; }
.vc-badge svg { width: 16px; height: 16px; }
.vc-wst { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; font-size: 14px; color: #4b5563; }
.vc-wst span { display: inline-flex; align-items: center; gap: 6px; }
.vc-wst b { color: #0b0b0b; }
.vc-wst .dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #d1d5db; }
.vc-wst .dot.k { background: #16a34a; }
.vc-wst .dot.l { background: #f59e0b; }
.vc-stack { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: #eceef2; }
.vc-stack i { display: block; height: 100%; transition: width .5s ease; }
.vc-stack i.k { background: #16a34a; }
.vc-stack i.l { background: #f59e0b; }
.vc-steps { display: grid; gap: 12px; }
.vc-step { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff;
  transition: border-color .15s, box-shadow .15s; }
.vc-step:hover { border-color: #d0d5dd; box-shadow: 0 8px 22px -16px rgba(16,24,40,.32); }
.vc-stepi { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--acbg); color: var(--acfg); }
.vc-stepi svg { width: 22px; height: 22px; }
.vc-stepb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-stepb em { font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #9ca3af; }
.vc-stepb b { margin-top: 1px; font-size: 17px; font-weight: 700; color: #0b0b0b; }
.vc-stepb > span { margin-top: 3px; font-size: 14px; line-height: 1.4; color: #4b5563; }
.vc-stepb strong { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #15803d; }
.vc-stepa { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 38px; padding: 0 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 700; background: #fff; color: var(--acfg); border: 1.5px solid var(--ac); }
.vc-stepa svg { width: 18px; height: 18px; }
.vc-step.cur { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac) inset, 0 12px 26px -20px var(--ac); }
.vc-step.cur .vc-stepa { background: var(--ac); color: #fff; }
.vc-step.done .vc-stepi { background: #dcfce7; color: #15803d; }
.vc-step.done .vc-stepa { border-color: #d6dae1; color: #374151; }
.vc-step.lock { background: #fafafa; }
.vc-step.lock:hover { box-shadow: none; border-color: #e5e7eb; }
.vc-step.lock .vc-stepi { background: #f1f2f4; color: #a3a9b3; }
.vc-step.lock .vc-stepb b, .vc-step.lock .vc-stepb > span { color: #9ca3af; }
.vc-step.lock .vc-stepa { min-width: 0; padding: 0 4px; border: 0; background: transparent; color: #c3c8d0; }
@media (max-width: 480px) {
  .vc-shero h1 { font-size: 28px; }
  .vc-step { gap: 12px; padding: 14px 12px; }
  .vc-stepi { flex-basis: 40px; width: 40px; height: 40px; border-radius: 12px; }
  .vc-stepi svg { width: 20px; height: 20px; }
  .vc-stepb > span { font-size: 13.5px; }
  .vc-stepa { min-width: 0; height: 36px; padding: 0 12px; font-size: 14px; }
}
.fc-rel em { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 6px; background: #eef0f3; color: #6b7280;
  font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
.vc-pos { font-size: .82em; font-style: italic; font-weight: 500; color: #6b7280; }
.vc-setnav { display: flex; justify-content: space-between; margin: 20px 0 40px; }
.vc-navb { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid #e5e7eb; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: #374151; }
.vc-navb:hover { border-color: #d0d5dd; background: #fafbfc; }
.vc-navb svg { width: 17px; height: 17px; }

/* game screens */
.vg { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: #f6f7f9; }
.vg-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #eceef1;
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.vg-topin { display: grid; grid-template-columns: 84px 1fr 84px; align-items: center; gap: 8px; max-width: 780px; min-height: 58px; margin: 0 auto; padding: 0 12px; }
.vg-x { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: #374151; }
.vg-x:hover { background: #f3f4f6; }
.vg-x svg { width: 22px; height: 22px; }
.vg-title { min-width: 0; text-align: center; line-height: 1.25; }
.vg-title b { display: block; font-size: 16px; font-weight: 700; }
.vg-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: #6b7280; }
.vg-count { justify-self: end; font-size: 14px; font-weight: 700; color: #374151; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vg-bar { height: 4px; background: #eef0f3; }
.vg-bar i { display: block; width: 0; height: 100%; background: var(--ac); transition: width .35s ease; }
.vg-body { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 780px; margin: 0 auto; padding: 20px 16px calc(24px + var(--safe-b)); }
.vg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 14px; background: var(--ac); color: #fff;
  font-size: 16.5px; font-weight: 700; transition: filter .15s, transform .08s; }
.vg-btn:hover { filter: brightness(1.08); }
.vg-btn:active { transform: scale(.99); }
.vg-btn svg { width: 19px; height: 19px; }
.vg-btn2 { width: 100%; height: 50px; border: 1.5px solid #d6dae1; border-radius: 14px; background: #fff; color: #1f2937; font-size: 16px; font-weight: 700; }
.vg-btn2:hover { background: #f9fafb; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* step 1: flashcards */
.fc-round { display: inline-flex; align-self: center; align-items: center; gap: 6px; margin-bottom: 6px; padding: 6px 12px; border-radius: 999px; background: #fff4db; color: #b7791f; font-size: 13px; font-weight: 700; }
.fc-round svg { width: 15px; height: 15px; }
.fc-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 6px 0; perspective: 1600px; }
.fc-card { position: relative; width: 100%; max-width: 560px; height: 420px; min-height: 290px; max-height: calc(100vh - 290px); max-height: calc(100dvh - 290px);
  cursor: pointer; outline: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.fc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.75,.25,1); }
.fc-card.flip .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 26px 24px; overflow: hidden; border-radius: 24px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.fc-front { align-items: center; justify-content: center; text-align: center; color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, rgba(255,255,255,.17) 0%, rgba(255,255,255,0) 55%), linear-gradient(150deg, var(--ac) 0%, var(--acdeep) 100%);
  box-shadow: 0 22px 44px -24px var(--acdeep); }
.fc-word { max-width: 100%; font-size: 42px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.fc-note { margin-top: 10px; font-size: 16px; font-style: italic; opacity: .82; }
.fc-hint { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; font-weight: 600; opacity: .75; }
.fc-hint svg { width: 16px; height: 16px; }
.fc-back { transform: rotateY(180deg); overflow-y: auto; border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 22px 44px -28px rgba(16,24,40,.45); }
.fc-bword { padding-right: 44px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--acfg); }
.fc-def { margin: 10px 0 16px; font-size: 22px; font-weight: 600; line-height: 1.35; color: #0b0b0b; }
.fc-ex { padding: 12px 14px; border-left: 3px solid var(--ac2); border-radius: 0 12px 12px 0; background: var(--acbg); font-size: 16px; font-style: italic; line-height: 1.5; color: #374151; }
.fc-ex b { font-style: normal; color: var(--actext); }
.fc-rel { margin-top: auto; padding-top: 14px; font-size: 15.5px; color: #1f2937; }
.fc-tag { position: absolute; top: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-size: 14px; font-weight: 700;
  color: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.fc-tag svg { width: 16px; height: 16px; }
.fc-tag.k { left: 18px; background: #16a34a; transform: rotate(-8deg); }
.fc-tag.l { right: 18px; background: #f59e0b; transform: rotate(8deg); }
.fc-card.go-r .fc-tag.k, .fc-card.go-l .fc-tag.l { opacity: 1; }
.fc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 560px; margin: 16px auto 0; }
.fc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 16px; font-size: 16px; font-weight: 700; transition: transform .08s, filter .15s, background .15s; }
.fc-btn:active { transform: scale(.98); }
.fc-btn svg { width: 20px; height: 20px; }
.fc-btn.learn { border: 1.5px solid #fcd9a0; background: #fff; color: #b7791f; }
.fc-btn.learn:hover { background: #fffaf0; }
.fc-btn.know { background: #16a34a; color: #fff; }
.fc-btn.know:hover { filter: brightness(1.06); }
.fc-tip { margin-top: 12px; text-align: center; font-size: 12.5px; color: #9ca3af; }
@media (max-width: 480px) {
  .fc-card { height: 390px; }
  .fc-face { padding: 22px 18px; }
  .fc-word { font-size: 34px; }
  .fc-def { font-size: 19px; }
  .fc-ex { font-size: 15px; }
}

/* step 2: multiple choice (option styles shared with the quiz) */
.mq-retry { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; margin-bottom: 10px; padding: 5px 10px; border-radius: 999px; background: #fff4db; color: #b7791f; font-size: 12.5px; font-weight: 700; }
.mq-retry svg { width: 14px; height: 14px; }
.mq-kind { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--acbg); color: var(--acfg);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mq-kind svg { width: 15px; height: 15px; }
.mq-ask { margin: 14px 0 6px; font-size: 15px; color: #6b7280; }
.mq-word { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: #0b0b0b; }
.mq-word .vc-pos { font-size: 18px; letter-spacing: 0; }
.mq-stem { margin: 0 0 20px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; font-size: 18.5px; line-height: 1.6; color: #111827; }
.vc-blank { display: inline-block; width: 88px; height: 1em; margin: 0 3px; border-bottom: 2.5px solid var(--ac); vertical-align: -0.12em; }
.mq-opts, .qz-opts { display: grid; gap: 10px; }
.mq-opt, .qz-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 11px 14px; text-align: left; border: 1.5px solid #dde1e7; border-radius: 14px;
  background: #fff; font-size: 16.5px; line-height: 1.4; color: #111827; transition: border-color .12s, background .12s, opacity .2s, transform .08s; }
.mq-opt:hover, .qz-opt:hover { border-color: var(--ac2); }
.mq-opt:active, .qz-opt:active { transform: scale(.99); }
.mq-opt .l, .qz-opt .l { flex: 0 0 30px; display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 9px; background: #f1f3f6; color: #4b5563; font-size: 13.5px; font-weight: 700; }
.mq-opt .t, .qz-opt .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mq-opts:not(.defs) .mq-opt .t { font-weight: 600; }
.mq-opt.ok, .qz-opt.ok { border-color: #16a34a; background: #effcf3; }
.mq-opt.ok .l, .qz-opt.ok .l { background: #16a34a; color: #fff; }
.mq-opt.bad, .qz-opt.bad { border-color: #dc2626; background: #fef1f1; animation: shake .35s; }
.mq-opt.bad .l, .qz-opt.bad .l { background: #dc2626; color: #fff; }
.mq-opt.dim, .qz-opt.dim { opacity: .5; }
.locked .mq-opt, .locked .qz-opt { pointer-events: none; }
.mq-fbw { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding-top: 16px; }
.mq-fb { padding: 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 -12px 30px -22px rgba(16,24,40,.4); animation: up .2s ease; }
.mq-fb.ok { border-top: 3px solid #16a34a; }
.mq-fb.bad { border-top: 3px solid #dc2626; }
.mq-fbh { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.mq-fbh svg { width: 22px; height: 22px; }
.mq-fb.ok .mq-fbh { color: #15803d; }
.mq-fb.bad .mq-fbh { color: #b91c1c; }
.mq-fbx { margin: 8px 0 14px; font-size: 15px; line-height: 1.5; color: #374151; }
.mq-fbx b { color: #0b0b0b; }
.mq-fbx em { display: block; margin-top: 4px; color: #6b7280; }
.mq-fbx em b { font-style: normal; color: var(--actext); }
@media (max-width: 699px) {
  .mq-fb { margin: 0 -16px calc(-24px - var(--safe-b)); padding: 14px 16px calc(16px + var(--safe-b)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .mq-word { font-size: 31px; }
  .mq-stem { padding: 16px; font-size: 17.5px; }
  .mq-opt, .qz-opt { font-size: 16px; }
}

/* step 3: matching */
.mt-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.mt-r { font-size: 14px; color: #4b5563; }
.mt-r b { color: #0b0b0b; }
.mt-t { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-size: 16px; font-variant-numeric: tabular-nums; }
.mt-t svg { width: 17px; height: 17px; color: var(--acfg); }
.mt-m { font-size: 13.5px; font-weight: 600; color: #6b7280; }
.mt-m.on { color: #b91c1c; }
.mt-help { margin: 4px 0 14px; font-size: 14px; color: #6b7280; }
.mt-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px; }
.mt-tile { display: flex; align-items: center; min-height: 66px; padding: 10px 12px; text-align: left; border: 1.5px solid #dde1e7; border-radius: 14px; background: #fff;
  font-size: 14px; line-height: 1.35; color: #1f2937; transition: border-color .12s, background .12s, opacity .3s, transform .2s; }
.mt-tile.w { font-size: 16px; font-weight: 700; color: #0b0b0b; overflow-wrap: anywhere; }
.mt-tile:hover { border-color: var(--ac2); }
.mt-tile.sel { border-color: var(--ac); background: var(--acbg); box-shadow: 0 0 0 1px var(--ac) inset; }
.mt-tile.ok { border-color: #16a34a; background: #effcf3; }
.mt-tile.bad { border-color: #dc2626; background: #fef1f1; animation: shake .35s; }
.mt-tile.gone { opacity: 0; transform: scale(.94); pointer-events: none; }
@media (max-width: 480px) {
  .mt-grid { gap: 8px; }
  .mt-tile { min-height: 60px; padding: 9px 10px; font-size: 13.5px; }
  .mt-tile.w { font-size: 15px; }
}

/* step 4: timed quiz */
.qz-intro { margin: auto 0; padding: 12px 0; text-align: center; }
.qz-ico { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 26px; background: var(--acbg); color: var(--acfg); }
.qz-ico svg { width: 40px; height: 40px; }
.qz-intro h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.qz-meta { margin: 0 0 20px; font-size: 16px; font-weight: 700; color: var(--acfg); }
.qz-rules { display: grid; gap: 12px; max-width: 440px; margin: 0 auto 22px; padding: 16px 18px; list-style: none; text-align: left; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.qz-rules li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: #374151; }
.qz-rules svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; color: var(--acfg); }
.qz-best { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 700; color: #15803d; }
.qz-best svg { width: 16px; height: 16px; }
.qz-intro .vg-btn { max-width: 440px; }
.qz-cd { margin: auto; text-align: center; }
.qz-cd span { display: block; font-size: 110px; font-weight: 700; line-height: 1; color: var(--acfg); animation: cd .7s ease both; }
.qz-cd em { display: block; margin-top: 12px; font-style: normal; font-size: 16px; font-weight: 600; color: #6b7280; }
@keyframes cd { 0% { transform: scale(1.7); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.qz-hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qz-timer { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
  font-size: 18px; color: #0b0b0b; font-variant-numeric: tabular-nums; transition: background .2s, color .2s, border-color .2s; }
.qz-timer svg { width: 18px; height: 18px; color: var(--acfg); }
.qz-timer.low { border-color: #fecaca; background: #fef1f1; color: #dc2626; }
.qz-timer.low svg { color: #dc2626; }
.qz-score { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: #4b5563; }
.qz-score svg { width: 17px; height: 17px; color: #16a34a; }
.qz-score b { font-size: 16px; color: #0b0b0b; }
.qz-tbar { height: 6px; margin-bottom: 20px; overflow: hidden; border-radius: 3px; background: #e7eaee; }
.qz-tbar i { display: block; height: 100%; border-radius: 3px; background: var(--ac); transition: width .2s linear, background .2s; }
.qz-tbar.low i { background: #dc2626; }
.qz-def { margin: 12px 0 20px; font-size: 23px; font-weight: 600; line-height: 1.4; color: #0b0b0b; }
.qz-sent { margin: 12px 0 20px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; font-size: 19px; line-height: 1.6; color: #111827; }
.qz-opts { grid-template-columns: 1fr 1fr; }
.qz-opt { min-height: 64px; font-size: 17px; font-weight: 600; }
@media (max-width: 400px) {
  .qz-opts { grid-template-columns: 1fr; }
  .qz-opt { min-height: 54px; }
  .qz-def { font-size: 20px; }
  .qz-sent { font-size: 17.5px; padding: 16px; }
}

/* results */
.vr { margin: auto 0; padding: 8px 0 12px; text-align: center; }
.vr-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: #fff4db; color: #b7791f; font-size: 14px; font-weight: 700; }
.vr-badge svg { width: 16px; height: 16px; }
.vr-ring { position: relative; width: 150px; height: 150px; margin: 0 auto 16px; }
.vr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.vr-ring circle { fill: none; stroke-width: 10; }
.vr-ring .trk { stroke: #e7eaee; }
.vr-ring .val { stroke: var(--acfg); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.75,.25,1); }
.vr.good .vr-ring .val { stroke: #16a34a; }
.vr-ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vr-ring .num b { font-size: 36px; font-weight: 700; line-height: 1; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.vr-ring .num b small { font-size: 18px; font-weight: 600; color: #9ca3af; }
.vr-ring .num span { margin-top: 4px; font-size: 12.5px; color: #6b7280; }
.vr-big { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 16px; padding: 14px 24px; border-radius: 20px; background: var(--acbg); color: var(--actext); }
.vr-big svg { width: 30px; height: 30px; color: var(--acfg); }
.vr-big b { font-size: 44px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vr h2 { margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.vr > p { max-width: 460px; margin: 0 auto 18px; font-size: 16px; line-height: 1.55; color: #4b5563; }
.vr > p b { color: #0b0b0b; }
.vr-stats { display: flex; justify-content: center; gap: 10px; margin: 0 0 18px; }
.vr-stats div { min-width: 110px; padding: 10px 16px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.vr-stats b { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vr-stats span { font-size: 12.5px; color: #6b7280; }
.vr-btns { display: grid; gap: 10px; max-width: 440px; margin: 0 auto; }
.vr-list { max-width: 560px; margin: 22px auto 0; overflow: hidden; text-align: left; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.vr-list h4 { margin: 0; padding: 12px 16px; border-bottom: 1px solid #f0f1f3; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.vr-list div { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #f0f1f3; }
.vr-list div:last-child { border-bottom: 0; }
.vr-list div b { flex: 0 0 auto; max-width: 45%; font-size: 15px; }
.vr-list div span { font-size: 14px; line-height: 1.4; color: #4b5563; }
.cf { position: fixed; top: -14px; z-index: 90; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; animation: cf 2.6s cubic-bezier(.25,.6,.35,1) forwards; }
@keyframes cf { 0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; } 100% { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); opacity: .85; } }
@media (prefers-reduced-motion: reduce) {
  .fc-inner, .vr-ring .val, .vg-bar i { transition: none; }
  .cf { display: none; }
}
/* long words shrink so they fit on one line */
.fc-word.l { font-size: 36px; }
.fc-word.xl { font-size: 31px; }
.mq-word.l { font-size: 31px; }
.mq-word.xl { font-size: 27px; }
.fc-card { height: clamp(300px, calc(100vh - 300px), 460px); height: clamp(300px, calc(100dvh - 300px), 460px); max-height: none; }
@media (max-width: 480px) {
  .fc-card { height: clamp(290px, calc(100vh - 290px), 520px); height: clamp(290px, calc(100dvh - 290px), 520px); }
  .fc-word.l { font-size: 30px; }
  .fc-word.xl { font-size: 26px; }
  .mq-word.l { font-size: 27px; }
  .mq-word.xl { font-size: 23px; }
}
@media (max-width: 380px) { .vg-topin { grid-template-columns: 56px 1fr 56px; padding: 0 8px; } }

/* theme switch (top left of the home screen) */
.pr-topl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.th-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #e3e6ea; border-radius: 12px;
  background: #fff; color: #374151; transition: background .15s, transform .1s; }
.th-btn:hover { background: #f3f4f6; }
.th-btn:active { transform: scale(.94); }
.th-btn svg { width: 19px; height: 19px; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, stroke .35s ease, box-shadow .35s ease !important; }
.vc-title { margin-bottom: 18px; }

/* flashcards: the answer buttons unlock 3 seconds after each card appears */
.fc-btn { position: relative; overflow: hidden; }
.fc-lbl { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.fc-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: currentColor; opacity: .55; pointer-events: none;
  transform: scaleX(0); transform-origin: left center; }
.fc-actions.wait .fc-btn { opacity: .5; cursor: not-allowed; }
.fc-actions.wait .fc-fill { animation: fcfill var(--wait, 3000ms) linear forwards; }
.fc-actions.ready .fc-fill { display: none; }
.fc-actions.ready .fc-btn { animation: fcpop .28s ease; }
.fc-cd { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: rgba(255,255,255,.28);
  font-style: normal; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fc-actions.ready .fc-cd { display: none; }
.fc-actions.shake { animation: shake .35s; }
@keyframes fcfill { to { transform: scaleX(1); } }
@keyframes fcpop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* heading above the word list */
.vc-wh { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 26px 0 12px; }
.vc-wh .vc-h2 { margin: 0; }
.pr-page, .vc-page { min-height: 100vh; min-height: 100dvh; }

/* paused timer: a pause sign before the time; the questions stay open */
.bb-timer .bb-pz { display: inline-flex; align-items: center; margin-right: 6px; }
.bb-timer .bb-pz svg { width: 15px; height: 15px; color: currentColor; }
.bb-timer.paused { color: #6b7280; }

/* the Practice button at the bottom of every set card */
.vc-play { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-top: 4px; border-radius: 11px; background: var(--ac); color: #fff;
  font-size: 15px; font-weight: 700; transition: filter .15s; }
.vc-play svg { width: 16px; height: 16px; }
.vc-set:hover .vc-play { filter: brightness(1.08); }
@media (max-width: 639px) { .vc-play { height: 40px; font-size: 14.5px; } }

/* word list: one card per word (the word and how well it's known, the definition, an example, then antonyms or synonyms);
   select any words to highlight them */
.vc-hlhint { display: flex; align-items: flex-start; gap: 7px; margin: -4px 0 14px; font-size: 13.5px; line-height: 1.45; color: #6b7280; text-wrap: balance; }
.vc-hlhint svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; }
.vc-words { display: grid; gap: 12px; }
.vc-wcard { position: relative; padding: 18px 20px 18px 22px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.vc-wcard::before { content: ""; position: absolute; left: -1px; top: 21px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--ac); }
.vc-wch { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vc-wct { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; padding-top: 1px; }
.vc-ww { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: #0b0b0b; overflow-wrap: anywhere; }
.vc-wpos { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9ca3af; -webkit-user-select: none; user-select: none; }
.vc-wstat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: #f3f4f6; color: #4b5563;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; -webkit-user-select: none; user-select: none; }
.vc-wstat i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #9ca3af; box-sizing: border-box; }
.vc-wstat.l { background: #fef3c7; color: #92400e; }
.vc-wstat.l i { border: 0; background: #f59e0b; }
.vc-wstat.k { background: #dcfce7; color: #166534; }
.vc-wstat.k i { border: 0; background: #16a34a; }
.vc-wd { margin: 8px 0 0; font-size: 15.5px; line-height: 1.6; color: #1f2937; }
.vc-wex { position: relative; margin: 14px 0 0; padding: 12px 16px 12px 42px; border-radius: 12px; background: var(--acbg); font-size: 14.5px; font-style: italic; line-height: 1.6; color: #374151; }
.vc-wex::before { content: "\201C"; position: absolute; left: 13px; top: 7px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-style: normal; font-weight: 700; line-height: 1; color: var(--ac2); }
.vc-wex b { font-style: normal; font-weight: 700; color: var(--actext); }
.vc-wrel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f1f3; -webkit-user-select: none; user-select: none; }
.vc-wrel em { margin-right: 4px; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9ca3af; }
.vc-wrel span { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 1px solid #e5e7eb; border-radius: 999px; background: #f9fafb; font-size: 13.5px; font-weight: 500; color: #374151; }
.vc-wcard mark.hl { border-radius: 3px; }
@media (max-width: 480px) {
  .vc-wcard { padding: 16px 16px 16px 18px; }
  .vc-wcard::before { top: 19px; }
  .vc-ww { font-size: 18px; }
  .vc-wex { padding: 11px 14px 11px 38px; }
  .vc-wex::before { left: 11px; font-size: 31px; }
}

/* ===== DARK MODE: generated by make_dark.py from the rules above, then hand-written overrides ===== */
html.dark, html.dark body { background: var(--bg); color: var(--ink); }
html.dark button { color: inherit; border: 0; background: none; }
html.dark .btn { background: var(--navy); color: #ffffff; }
html.dark .btn.amber { background: var(--amber); color: var(--amber-ink); }
html.dark .btn.ghost { background: transparent; color: var(--navy-2); border: 1.5px solid var(--line-2); }
html.dark .muted { color: var(--muted); }
html.dark .chip { background: #232931; color: var(--ink-2); }
html.dark .chip.full { background: #433616; color: #f0c575; }
html.dark .chip.done { background: var(--ok-bg); color: var(--ok); }
html.dark .chip.prog { background: var(--sel-bg); color: var(--sel); }
html.dark .hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #ffffff; }
html.dark .hero:after { background: radial-gradient(circle, rgba(94,234,212,0.3), rgba(94,234,212,0) 70%); }
html.dark .hero .tag { background: var(--amber); color: var(--amber-ink); }
html.dark .hero h1 span { color: var(--amber); }
html.dark .hero p { color: #dbe5ff; }
html.dark .stat { background: var(--card); box-shadow: 0 6px 18px rgba(13,27,64,0.08); }
html.dark .stat span { color: var(--muted); }
html.dark .filter { background: var(--card); border: 1.5px solid var(--line); color: var(--ink-2); }
html.dark .filter.on { background: var(--navy); border-color: var(--navy); color: #ffffff; }
html.dark .group-title { color: var(--muted); }
html.dark .tcard { background: var(--card); border: 1.5px solid transparent; box-shadow: 0 1px 2px rgba(13,27,64,0.05); }
html.dark .tcard:active { border-color: var(--line-2); }
html.dark .tcard .cal { background: #21262e; }
html.dark .tcard .cal b { color: var(--navy-2); }
html.dark .tcard .cal span { color: var(--muted); }
html.dark .tcard .go { color: var(--line-2); }
html.dark .score-pill { color: var(--ok); }
html.dark .foot { color: var(--muted); }
html.dark .panel { background: var(--card); box-shadow: 0 1px 2px rgba(13,27,64,0.05); }
html.dark .mod-row { border-bottom: 1px solid var(--line); }
html.dark .mod-row:last-child { border-bottom: 0; }
html.dark .rules { color: var(--ink-2); }
html.dark .run { background: #1f242d; }
html.dark .topbar { background: #1f242d; border-bottom: 1px solid var(--line); }
html.dark .topbar .lbl { color: var(--muted); }
html.dark .topbar .lbl b { color: var(--ink); }
html.dark .timer.low { color: var(--bad); background: var(--bad-bg); }
html.dark .timer.hidden { color: var(--muted); }
html.dark .icon-btn { color: var(--navy-2); }
html.dark .icon-btn:active { background: #22272f; }
html.dark .passage { color: #e8eaed; background: #1f242d; }
html.dark .passage ul.notes li::marker { color: currentColor; }
html.dark .passage-card { border-bottom: 8px solid var(--bg); }
html.dark .qhead { border-bottom: 1px solid var(--line); }
html.dark .qnum { background: var(--navy); color: #ffffff; }
html.dark .mark { color: var(--ink-2); }
html.dark .mark.on { color: #f0aa75; background: #3f3015; }
html.dark .elim { border: 1.5px solid var(--line-2); color: var(--ink-2); }
html.dark .elim.on { background: var(--navy); color: #ffffff; border-color: var(--navy); }
html.dark .stem { color: #e8eaed; }
html.dark .choice { border: 1.5px solid var(--line-2); background: #1f242d; }
html.dark .choice .letter { border: 1.5px solid #444e5d; color: var(--ink-2); }
html.dark .choice .txt { color: #e8eaed; }
html.dark .choice .x { border-left: 1px solid var(--line); color: #535f6e; }
html.dark .choice.sel { border-color: var(--sel); background: var(--sel-bg); box-shadow: 0 0 0 1px var(--sel) inset; }
html.dark .choice.sel .letter { background: var(--sel); border-color: var(--sel); color: #ffffff; }
html.dark .choice.correct { border-color: var(--ok); background: var(--ok-bg); }
html.dark .choice.correct .letter { background: var(--ok); border-color: var(--ok); color: #ffffff; }
html.dark .choice.wrong { border-color: var(--bad); background: var(--bad-bg); }
html.dark .choice.wrong .letter { background: var(--bad); border-color: var(--bad); color: #ffffff; }
html.dark .spr input { border: 1.5px solid var(--line-2); }
html.dark .spr input:focus { outline: none; border-color: var(--sel); box-shadow: 0 0 0 3px rgba(35,72,196,0.18); }
html.dark .spr-note { color: var(--muted); }
html.dark .orig-link { color: var(--navy-2); }
html.dark .review-note.ok { background: var(--ok-bg); color: var(--ok); }
html.dark .review-note.bad { background: var(--bad-bg); color: var(--bad); }
html.dark .review-note.skip { background: #22282f; color: var(--ink-2); }
html.dark .bottombar { background: #1f242d; border-top: 1px solid var(--line); }
html.dark .nav-btn { background: var(--navy); color: #ffffff; }
html.dark .nav-btn.sec { background: #232931; color: var(--ink); }
html.dark .qpill { background: var(--navy); color: #ffffff; }
html.dark .cell { border: 1.5px dashed #3d4754; color: var(--ink-2); background: #1f242d; }
html.dark .cell.ans { border: 1.5px solid var(--sel); background: var(--sel); color: #ffffff; }
html.dark .cell.cur { box-shadow: 0 0 0 3px rgba(255,193,69,0.9); }
html.dark .cell.ok { border: 1.5px solid var(--ok); background: var(--ok); color: #ffffff; }
html.dark .cell.no { border: 1.5px solid var(--bad); background: var(--bad); color: #ffffff; }
html.dark .cell.skip { border: 1.5px dashed #3d4754; background: #1f242d; color: var(--muted); }
html.dark .legend { color: var(--muted); }
html.dark .overlay { background: rgba(10,16,32,0.5); }
html.dark .sheet { background: #1f242d; }
html.dark .sheet .handle { background: var(--line-2); }
html.dark .dialog { background: #1f242d; }
html.dark .dialog p { color: var(--ink-2); }
html.dark .viewer { background: #0b0f1a; }
html.dark .viewer .vbar { color: #ffffff; }
html.dark .viewer .vbar button { color: #ffffff; background: rgba(255,255,255,0.12); }
html.dark .viewer .vbody img { background: #1f242d; }
html.dark .viewer .vhint { color: #9aa6c4; }
html.dark .big-timer { color: var(--navy); }
html.dark .score-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #ffffff; }
html.dark .score-card .lbl { color: #dbe5ff; }
html.dark .score-card .total small { color: #c3d4ff; }
html.dark .score-card .parts div b { color: var(--amber); }
html.dark .score-card .parts div span { color: #dbe5ff; }
html.dark .mod-res .sub { color: var(--muted); }
html.dark .toast { background: var(--navy); color: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,0.49); }
html.dark .loading { color: var(--muted); }
html.dark .spinner { border: 3px solid var(--line); border-top-color: var(--navy-2); }
@media (min-width: 900px) {
  html.dark .split.two .passage-card { border-bottom: 0; border-right: 6px solid var(--bg); }
}
html.dark .passage .note { background: #3f3115; color: #f0c175; }
html.dark .passage .tcap, html.dark .stem .tcap { color: var(--ink); }
html.dark table.tbl th, html.dark table.tbl td { border: 1px solid #303843; }
html.dark table.tbl th { background: #21272e; }
html.dark .passage .tnote, html.dark .stem .tnote { color: var(--muted); }
html.dark .run.bb { background: #1f242d; color: var(--bb-ink); }
html.dark .bb-dash { background: repeating-linear-gradient(90deg,
  #3b5bdb 0 48px, transparent 48px 55px, #f4b740 55px 103px, transparent 103px 110px,
  #0e1b3d 110px 158px, transparent 158px 165px, #9db8ff 165px 213px, transparent 213px 220px); }
html.dark .bb-qdash { background: repeating-linear-gradient(90deg,
  #3b5bdb 0 22px, transparent 22px 25px, #f4b740 25px 47px, transparent 47px 50px,
  #0e1b3d 50px 72px, transparent 72px 75px, #9db8ff 75px 97px, transparent 97px 100px); }
html.dark .bb-head { background: #1f242d; }
html.dark .bb-title { color: var(--bb-ink); }
html.dark .bb-sub { color: var(--bb-blue); }
html.dark .bb-dir { color: #b3c7ff; }
html.dark .bb-timer { color: var(--bb-ink); }
html.dark .bb-timer.low { color: #e28383; }
html.dark .bb-timer.paused { color: #808d9f; }
html.dark .bb-timer svg { color: var(--bb-label); }
html.dark .bb-pill { border: 1.5px solid #5a687c; background: #1f242d; color: var(--bb-ink); }
html.dark .bb-pill:hover { background: #21272e; }
html.dark .bb-pill.on { background: var(--bb-blue); border-color: var(--bb-blue); color: #ffffff; }
html.dark .bb-tool { color: var(--bb-label); }
html.dark .bb-menu { background: #1f242d; border: 1px solid #272d35; box-shadow: 0 12px 30px rgba(16,24,40,0.16); }
html.dark .bb-menu button { color: var(--bb-ink); }
html.dark .bb-menu button:hover { background: #21272e; }
html.dark .bb-dirpanel { background: rgba(16,24,40,0.18); }
html.dark .bb-dirbox { background: #1f242d; box-shadow: 0 16px 40px rgba(16,24,40,0.22); }
html.dark .bb-dirtext { color: var(--bb-ink); }
html.dark .run.bb .passage { color: #e2e5e9; }
html.dark .run.bb .passage-card { border-bottom: 0; }
html.dark .run.bb .stem { color: #e2e5e9; }
html.dark .bb-qbar { background: var(--bb-qbar); }
html.dark .bb-qnum { background: var(--bb-blue); color: #ffffff; }
html.dark .bb-mark { color: var(--bb-label); }
html.dark .bb-abc { border: 1.5px solid #2f3742; background: #1f242d; color: var(--bb-label); }
html.dark .bb-abc::after { border-top: 1.5px solid currentColor; }
html.dark .bb-abc.on { background: var(--bb-blue); border-color: var(--bb-blue); color: #ffffff; }
html.dark .run.bb .choice { border: 0; background: none; box-shadow: none; }
html.dark .run.bb .choice .pick { border: 2px solid #c4cbd4; background: #1f242d; }
html.dark .run.bb .choice .letter { border: 2px solid #c4cbd4; color: #dde1e6; }
html.dark .run.bb .choice .txt { color: #e2e5e9; }
html.dark .run.bb .choice.sel .pick { border-color: var(--bb-blue); box-shadow: 0 0 0 1.5px var(--bb-blue); }
html.dark .run.bb .choice.sel .letter { background: var(--bb-blue); border-color: var(--bb-blue); color: #ffffff; }
html.dark .run.bb .choice .x .xl { border: 1.5px solid #c4cbd4; color: #dde1e6; }
html.dark .run.bb .choice .x .xl::after { border-top: 1.5px solid #c4cbd4; }
html.dark .run.bb .choice .x .undo { color: #dde1e6; }
html.dark .run.bb .choice.struck .pick::after { border-top: 2px solid #c4cbd4; }
html.dark .run.bb .choice.correct .pick { border-color: var(--ok); background: var(--ok-bg); }
html.dark .run.bb .choice.correct .letter { background: var(--ok); border-color: var(--ok); color: #ffffff; }
html.dark .run.bb .choice.wrong .pick { border-color: var(--bad); background: var(--bad-bg); }
html.dark .run.bb .choice.wrong .letter { background: var(--bad); border-color: var(--bad); color: #ffffff; }
html.dark .run.bb .orig-link { color: #b3c7ff; }
html.dark .bb-foot { background: var(--bb-foot); }
html.dark .bb-qpill { background: var(--bb-blue); color: #ffffff; }
html.dark .bb-btn { background: var(--bb-btn); color: #ffffff; }
html.dark .bb-outline { border: 1.5px solid var(--bb-btn); background: #1f242d; color: var(--bb-btn); }
html.dark .nav-ov { background: rgba(16,24,40,0.25); }
html.dark .bb-navpop { background: #1f242d; box-shadow: 0 18px 44px rgba(16,24,40,0.28); }
html.dark .bb-navhead { border-bottom: 1px solid #272d35; }
html.dark .bb-navhead h3 { color: var(--bb-ink); }
html.dark .bb-x { color: var(--bb-label); }
html.dark .bb-legend { color: var(--bb-label); }
html.dark .bb-legend .lg-un { border: 1.5px dashed #5a687c; }
html.dark .bb-cell { border: 1.5px dashed #5a687c; background: #1f242d; color: var(--bb-blue); }
html.dark .bb-cell.ans { border: 1.5px solid var(--bb-blue); background: var(--bb-blue); color: #ffffff; }
html.dark .bb-cell .pin { color: var(--bb-ink); }
html.dark .bb-check h1 { color: var(--bb-ink); }
html.dark .bb-check > p { color: var(--bb-label); }
html.dark .bb-card { background: #1f242d; box-shadow: 0 4px 24px rgba(16,24,40,0.12); }
html.dark .bb-cardhead { border-bottom: 1px solid #272d35; }
html.dark .pause-ov { background: #21262d; }
html.dark .pause-card { background: #1f242d; box-shadow: 0 10px 30px rgba(16,24,40,0.1); }
html.dark .pause-ico { background: #18483d; color: var(--bb-blue); }
html.dark .pause-card h2 { color: var(--bb-ink); }
html.dark .pause-card p { color: var(--bb-label); }
html.dark .pause-left { color: #808d9f; }
html.dark .pause-left b { color: var(--bb-ink); }
html.dark mark.hl { color: inherit; }
html.dark mark.hl-y { background: #ffe27a; }
html.dark mark.hl-b { background: #19334b; }
html.dark mark.hl-p { background: #46172a; }
html.dark mark.hl.has-note.end::after { color: var(--bb-blue); }
html.dark .hlbar, html.dark .vhlbar { background: #1f242d; border: 1px solid #272d35; box-shadow: 0 10px 28px rgba(16,24,40,0.22); }
html.dark .hlbar button, html.dark .vhlbar button { color: var(--bb-ink); }
html.dark .hlbar button:hover, html.dark .vhlbar button:hover { background: #21272e; }
html.dark .hlbar .swatch { border: 2px solid #1c2026; box-shadow: 0 0 0 1.5px #313944; }
html.dark .hlbar .swatch.on { box-shadow: 0 0 0 2.5px var(--bb-ink); }
html.dark .hlbar .s-y { background: #ffe27a; }
html.dark .hlbar .s-b { background: #9fd0ff; }
html.dark .hlbar .s-p { background: #4c192e; }
html.dark .note-quote { color: var(--bb-ink); }
html.dark .note-quote.hl-y { background: #493f18; }
html.dark .note-quote.hl-b { background: #152a3f; }
html.dark .note-quote.hl-p { background: #3f1526; }
html.dark .note-dialog textarea { border: 1.5px solid #313d54; }
html.dark .note-dialog textarea:focus { outline: none; border-color: var(--bb-blue); box-shadow: 0 0 0 3px rgba(35,72,196,0.18); }
html.dark .btn.bbblue { background: var(--bb-btn); color: #ffffff; }
@media (min-width: 900px) {
  html.dark .run.bb .split.two .passage-card { border-right: 7px solid var(--bb-divider); }
}
@media (max-width: 899px) {
  html.dark .run.bb .passage-card { border-bottom: 7px solid var(--bb-divider); }
}
html.dark .hero-fs { border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.12); color: #ffffff; }
html.dark .hero-fs:hover { background: rgba(255,255,255,0.2); }
html.dark .lock-card h3 { color: var(--ink); }
html.dark .lock-card p { color: var(--ink-2); }
html.dark .lock-card p.muted { color: var(--muted); }
html.dark .pr-page { background: #1f242d; color: #e8eaed; }
html.dark .pr-top { border-bottom: 1px solid #282f38; }
html.dark .pr-welcome { color: #e8eaed; }
html.dark .pr-fs { border: 1px solid #353c48; background: #1f242d; color: #a1aab8; }
html.dark .pr-title { color: #e8eaed; }
html.dark .pr-sub { color: #a1aab8; }
html.dark .pr-card { border: 1px solid #353c48; background: #1f242d; }
html.dark .pr-cal { color: #b3c7ff; }
html.dark .pr-head h3 { color: #e8eaed; }
html.dark .pr-form { color: #a1aab8; }
html.dark .pr-btn { background: #3b5bdb; color: #ffffff; }
html.dark .pr-btn:hover { background: #2f4ac0; }
html.dark .btn.amber { background: #3b5bdb; color: #ffffff; }
html.dark .pr-link { color: #b3c7ff; }
html.dark .pr-lock h3 { color: #e8eaed; }
html.dark .pr-lock p { color: #b5bdc7; }
html.dark .pr-lock .pr-muted { color: #808d9f; }
html.dark .pr-btn2 { border: 1.5px solid #1accbe; background: #1f242d; color: #b3c7ff; }
html.dark .hm-tabs { background: #232931; border: 1px solid #282e37; }
html.dark .hm-tab { color: #a1aab8; }
html.dark .hm-tab:hover { color: #e8eaed; }
html.dark .hm-tab.on { background: #1f242d; color: #b3c7ff; box-shadow: 0 1px 2px rgba(16,24,40,0.08), 0 2px 8px rgba(16,24,40,0.06); }
html.dark .vc-stat { border: 1px solid #262d35; background: #1f242d; }
html.dark .s-k .vc-sico { background: #262c35; color: #b3c7ff; }
html.dark .s-m .vc-sico { background: #423416; color: #f0aa75; }
html.dark .s-s .vc-sico { background: #3f2215; color: #f09f75; }
html.dark .vc-stxt b { color: #e8eaed; }
html.dark .vc-stxt em { color: #808d9f; }
html.dark .vc-cont { color: #ffffff; background: linear-gradient(125deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 14px 30px -18px var(--acdeep); }
html.dark .vc-cont::after { background: radial-gradient(circle, rgba(255,255,255,0.2), rgba(255,255,255,0) 70%); }
html.dark .vc-seg4 i { background: rgba(255,255,255,0.26); }
html.dark .vc-seg4 i.on { background: #1f242d; }
html.dark .vc-contgo { background: #1f242d; color: var(--acdeep); }
html.dark .vc-h2 { color: #e8eaed; }
html.dark .vc-h2 span { background: #22282f; color: #808d9f; }
html.dark .vc-cat { border: 1px solid #262d35; background: #1f242d; }
html.dark .vc-cat:hover { border-color: #2f3640; box-shadow: 0 12px 30px -16px rgba(16,24,40,0.24); }
html.dark .vc-ico { background: var(--acbg); color: var(--acfg); }
html.dark .vc-cath b { color: #e8eaed; }
html.dark .vc-tag { background: var(--acbg); color: var(--acfg); }
html.dark .vc-catp { color: #a1aab8; }
html.dark .vc-catm { color: var(--acfg); }
html.dark .vc-bar { background: #252a33; }
html.dark .vc-bar i { background: var(--ac); }
html.dark .vc-catf { color: #808d9f; }
html.dark .vc-chev { color: #535f6e; }
html.dark .vc-cat:hover .vc-chev { color: var(--acfg); }
html.dark .vc-err { border: 1px solid #262d35; background: #1f242d; }
html.dark .vc-err p { color: #a1aab8; }
html.dark .vc-err .vg-btn { background: #3b5bdb; }
html.dark .vc-page { background: #1f242d; color: #e8eaed; }
html.dark .vc-top { background: rgba(20,28,40,0.96); border-bottom: 1px solid #252a33; }
html.dark .vc-back { color: #b5bdc7; }
html.dark .vc-back:hover { background: #22282f; }
html.dark .vc-hero p { color: #a1aab8; }
html.dark .vc-over { background: var(--acbg); }
html.dark .vc-overn b { color: var(--actext); }
html.dark .vc-overn b small { color: var(--acfg); }
html.dark .vc-overn span { color: #a1aab8; }
html.dark .vc-overb .vc-bar { background: rgba(20,28,40,0.85); }
html.dark .vc-set { border: 1px solid #262d35; background: #1f242d; }
html.dark .vc-set:hover { border-color: #2f3640; box-shadow: 0 10px 24px -16px rgba(16,24,40,0.28); }
html.dark .vc-set.mastered { border-color: #25603b; background: linear-gradient(180deg, #21262e 0%, #1f242d 75%); }
html.dark .vc-chip.new { background: #22282f; color: #808d9f; }
html.dark .vc-chip.prog { background: var(--acbg); color: var(--acfg); }
html.dark .vc-chip.done { background: #164225; color: #7ce9a5; }
html.dark .vc-seg i { background: #252b34; }
html.dark .vc-seg i.on { background: var(--ac); }
html.dark .vc-set.mastered .vc-seg i.on { background: #16a34a; }
html.dark .vc-setf { color: #808d9f; }
html.dark .vc-eyebrow { color: var(--acfg); }
html.dark .vc-badge { background: #164225; color: #7ce9a5; }
html.dark .vc-wst { color: #a1aab8; }
html.dark .vc-wst b { color: #e8eaed; }
html.dark .vc-wst .dot { background: #343c48; }
html.dark .vc-wst .dot.k { background: #16a34a; }
html.dark .vc-wst .dot.l { background: #f59e0b; }
html.dark .vc-stack { background: #252b34; }
html.dark .vc-stack i.k { background: #16a34a; }
html.dark .vc-stack i.l { background: #f59e0b; }
html.dark .vc-step { border: 1px solid #262d35; background: #1f242d; }
html.dark .vc-step:hover { border-color: #2f3640; box-shadow: 0 8px 22px -16px rgba(16,24,40,0.32); }
html.dark .vc-stepi { background: var(--acbg); color: var(--acfg); }
html.dark .vc-stepb em { color: #545f6f; }
html.dark .vc-stepb b { color: #e8eaed; }
html.dark .vc-stepb > span { color: #a1aab8; }
html.dark .vc-stepb strong { color: #7ce9a5; }
html.dark .vc-stepa { background: #1f242d; color: var(--acfg); border: 1.5px solid var(--ac); }
html.dark .vc-step.cur { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac) inset, 0 12px 26px -20px var(--ac); }
html.dark .vc-step.cur .vc-stepa { background: var(--ac); color: #ffffff; }
html.dark .vc-step.done .vc-stepi { background: #164225; color: #7ce9a5; }
html.dark .vc-step.done .vc-stepa { border-color: #2c333d; color: #b5bdc7; }
html.dark .vc-step.lock { background: #1f242b; }
html.dark .vc-step.lock:hover { box-shadow: none; border-color: #262d35; }
html.dark .vc-step.lock .vc-stepi { background: #232931; color: #535f6e; }
html.dark .vc-step.lock .vc-stepb b, html.dark .vc-step.lock .vc-stepb > span { color: #545f6f; }
html.dark .vc-step.lock .vc-stepa { border: 0; background: transparent; color: #535f6e; }
html.dark .fc-rel em { background: #252a33; color: #808d9f; }
html.dark .vc-pos { color: #808d9f; }
html.dark .vc-navb { border: 1px solid #262d35; color: #b5bdc7; }
html.dark .vc-navb:hover { border-color: #2f3640; background: #1e232a; }
html.dark .vg { background: #21262d; }
html.dark .vg-top { background: #1f242d; border-bottom: 1px solid #232931; }
html.dark .vg-x { color: #b5bdc7; }
html.dark .vg-x:hover { background: #22282f; }
html.dark .vg-title span { color: #808d9f; }
html.dark .vg-count { color: #b5bdc7; }
html.dark .vg-bar { background: #252a33; }
html.dark .vg-bar i { background: var(--ac); }
html.dark .vg-btn { background: var(--ac); color: #ffffff; }
html.dark .vg-btn2 { border: 1.5px solid #2c333d; background: #1f242d; color: #9dafc8; }
html.dark .vg-btn2:hover { background: #1f242b; }
html.dark .fc-round { background: #423416; color: #f0aa75; }
html.dark .fc-card { outline: none; }
html.dark .fc-front { color: #ffffff; background: radial-gradient(120% 90% at 85% 0%, rgba(255,255,255,0.17) 0%, rgba(255,255,255,0) 55%), linear-gradient(150deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 22px 44px -24px var(--acdeep); }
html.dark .fc-back { border: 1px solid #262d35; background: #1f242d; box-shadow: 0 22px 44px -28px rgba(16,24,40,0.45); }
html.dark .fc-bword { color: var(--acfg); }
html.dark .fc-def { color: #e8eaed; }
html.dark .fc-ex { border-left: 3px solid var(--ac2); background: var(--acbg); color: #b5bdc7; }
html.dark .fc-ex b { color: var(--actext); }
html.dark .fc-rel { color: #9dafc8; }
html.dark .fc-tag { color: #ffffff; }
html.dark .fc-tag.k { background: #16a34a; }
html.dark .fc-tag.l { background: #f59e0b; }
html.dark .fc-btn.learn { border: 1.5px solid #634a21; background: #1f242d; color: #f0aa75; }
html.dark .fc-btn.learn:hover { background: #21262d; }
html.dark .fc-btn.know { background: #16a34a; color: #ffffff; }
html.dark .fc-tip { color: #545f6f; }
html.dark .mq-retry { background: #423416; color: #f0aa75; }
html.dark .mq-kind { background: var(--acbg); color: var(--acfg); }
html.dark .mq-ask { color: #808d9f; }
html.dark .mq-word { color: #e8eaed; }
html.dark .mq-stem { border: 1px solid #262d35; background: #1f242d; color: #94a8d1; }
html.dark .vc-blank { border-bottom: 2.5px solid var(--ac); }
html.dark .mq-opt, html.dark .qz-opt { border: 1.5px solid #293039; background: #1f242d; color: #94a8d1; }
html.dark .mq-opt:hover, html.dark .qz-opt:hover { border-color: var(--ac2); }
html.dark .mq-opt .l, html.dark .qz-opt .l { background: #232830; color: #a1aab8; }
html.dark .mq-opt.ok, html.dark .qz-opt.ok { border-color: #1bca5c; background: #22272f; }
html.dark .mq-opt.ok .l, html.dark .qz-opt.ok .l { background: #16a34a; color: #ffffff; }
html.dark .mq-opt.bad, html.dark .qz-opt.bad { border-color: #dc2626; background: #21262d; }
html.dark .mq-opt.bad .l, html.dark .qz-opt.bad .l { background: #dc2626; color: #ffffff; }
html.dark .mq-fb { border: 1px solid #262d35; background: #1f242d; box-shadow: 0 -12px 30px -22px rgba(16,24,40,0.4); }
html.dark .mq-fb.ok { border-top: 3px solid #1bca5c; }
html.dark .mq-fb.bad { border-top: 3px solid #dc2626; }
html.dark .mq-fb.ok .mq-fbh { color: #7ce9a5; }
html.dark .mq-fb.bad .mq-fbh { color: #eb7a7a; }
html.dark .mq-fbx { color: #b5bdc7; }
html.dark .mq-fbx b { color: #e8eaed; }
html.dark .mq-fbx em { color: #808d9f; }
html.dark .mq-fbx em b { color: var(--actext); }
html.dark .mt-r { color: #a1aab8; }
html.dark .mt-r b { color: #e8eaed; }
html.dark .mt-t { border: 1px solid #262d35; background: #1f242d; }
html.dark .mt-t svg { color: var(--acfg); }
html.dark .mt-m { color: #808d9f; }
html.dark .mt-m.on { color: #eb7a7a; }
html.dark .mt-help { color: #808d9f; }
html.dark .mt-tile { border: 1.5px solid #293039; background: #1f242d; color: #9dafc8; }
html.dark .mt-tile.w { color: #e8eaed; }
html.dark .mt-tile:hover { border-color: var(--ac2); }
html.dark .mt-tile.sel { border-color: var(--ac); background: var(--acbg); box-shadow: 0 0 0 1px var(--ac) inset; }
html.dark .mt-tile.ok { border-color: #1bca5c; background: #22272f; }
html.dark .mt-tile.bad { border-color: #dc2626; background: #21262d; }
html.dark .qz-ico { background: var(--acbg); color: var(--acfg); }
html.dark .qz-meta { color: var(--acfg); }
html.dark .qz-rules { border: 1px solid #262d35; background: #1f242d; }
html.dark .qz-rules li { color: #b5bdc7; }
html.dark .qz-rules svg { color: var(--acfg); }
html.dark .qz-best { color: #7ce9a5; }
html.dark .qz-cd span { color: var(--acfg); }
html.dark .qz-cd em { color: #808d9f; }
html.dark .qz-timer { border: 1px solid #262d35; background: #1f242d; color: #e8eaed; }
html.dark .qz-timer svg { color: var(--acfg); }
html.dark .qz-timer.low { border-color: #632121; background: #21262d; color: #ea7b7b; }
html.dark .qz-timer.low svg { color: #ea7b7b; }
html.dark .qz-score { color: #a1aab8; }
html.dark .qz-score svg { color: #78eda3; }
html.dark .qz-score b { color: #e8eaed; }
html.dark .qz-tbar { background: #282e37; }
html.dark .qz-tbar i { background: var(--ac); }
html.dark .qz-tbar.low i { background: #dc2626; }
html.dark .qz-def { color: #e8eaed; }
html.dark .qz-sent { border: 1px solid #262d35; background: #1f242d; color: #94a8d1; }
html.dark .vr-badge { background: #423416; color: #f0aa75; }
html.dark .vr-ring circle { fill: none; }
html.dark .vr-ring .trk { stroke: #252b34; }
html.dark .vr-ring .val { stroke: var(--acfg); }
html.dark .vr.good .vr-ring .val { stroke: #1bca5c; }
html.dark .vr-ring .num b { color: #e8eaed; }
html.dark .vr-ring .num b small { color: #545f6f; }
html.dark .vr-ring .num span { color: #808d9f; }
html.dark .vr-big { background: var(--acbg); color: var(--actext); }
html.dark .vr-big svg { color: var(--acfg); }
html.dark .vr > p { color: #a1aab8; }
html.dark .vr > p b { color: #e8eaed; }
html.dark .vr-stats div { border: 1px solid #262d35; background: #1f242d; }
html.dark .vr-stats span { color: #808d9f; }
html.dark .vr-list { border: 1px solid #262d35; background: #1f242d; }
html.dark .vr-list h4 { border-bottom: 1px solid #22272f; color: #808d9f; }
html.dark .vr-list div { border-bottom: 1px solid #22272f; }
html.dark .vr-list div:last-child { border-bottom: 0; }
html.dark .vr-list div span { color: #a1aab8; }
html.dark .th-btn { border: 1px solid #272d36; background: #1f242d; color: #b5bdc7; }
html.dark .th-btn:hover { background: #22282f; }
html.dark .fc-fill { background: currentColor; }
html.dark .fc-cd { background: rgba(255,255,255,0.28); }
html.dark .bb-timer .bb-pz svg { color: currentColor; }
html.dark .bb-timer.paused { color: #808d9f; }
html.dark .vc-play { background: var(--ac); color: #ffffff; }
html.dark .vc-hlhint { color: #808d9f; }
html.dark .vc-wcard { border: 1px solid #262d35; background: #1f242d; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
html.dark .vc-wcard::before { background: var(--ac); }
html.dark .vc-ww { color: #e8eaed; }
html.dark .vc-wpos { color: #545f6f; }
html.dark .vc-wstat { background: #22282f; color: #a1aab8; }
html.dark .vc-wstat i { border: 1.5px solid #455060; }
html.dark .vc-wstat.l { background: #483f18; color: #f0a475; }
html.dark .vc-wstat.l i { border: 0; background: #f59e0b; }
html.dark .vc-wstat.k { background: #164225; color: #81e4a7; }
html.dark .vc-wstat.k i { border: 0; background: #16a34a; }
html.dark .vc-wd { color: #9dafc8; }
html.dark .vc-wex { background: var(--acbg); color: #b5bdc7; }
html.dark .vc-wex::before { color: var(--ac2); }
html.dark .vc-wex b { color: var(--actext); }
html.dark .vc-wrel { border-top: 1px solid #22272f; }
html.dark .vc-wrel em { color: #545f6f; }
html.dark .vc-wrel span { border: 1px solid #262d35; background: #1f242b; color: #b5bdc7; }

/* ----- dark mode: hand-written overrides (after the generated rules) ----- */
html.dark {
  color-scheme: dark;
  --bg: #171b22; --card: #1f242d; --ink: #e6ebf2; --ink-2: #b7c1cf; --muted: #8b97a8; --line: #323a48; --line-2: #2e3e60;
  --sel: #3358e0; --sel-bg: rgba(122,160,255,.12); --ok: #10b981; --ok-bg: rgba(16,185,129,.14); --bad: #ef4444; --bad-bg: rgba(239,68,68,.14); --warn: #fbbf24;
  --bb-blue: #3358e0; --bb-btn: #3b5bdb; --bb-ink: #e6ebf2; --bb-label: #b7c1cf; --bb-foot: #16203a; --bb-divider: #2a3646; --bb-qbar: #1b2533; --bb-red: #f87171;
}
html.dark, html.dark body { background: #171b22; color: #e6ebf2; }

/* screens whose background sits below their cards */
html.dark .vg, html.dark .pause-ov { background: #171b22; }

/* brand teal used as text needs a lighter shade on dark */
html.dark .btn.ghost, html.dark .tcard .cal b, html.dark .icon-btn, html.dark .orig-link, html.dark .big-timer,
html.dark .chip.prog, html.dark .bb-sub, html.dark .bb-cell { color: #9db8ff; }
html.dark .bb-cell.ans { color: #fff; }

/* selected segment of a switch is lighter than its track */
html.dark .hm-tabs { background: #0d1528; border-color: #323a48; }
html.dark .hm-tab.on { background: #1d2a48; box-shadow: none; }
html.dark .hm-tab.on { color: #9db8ff; }

/* highlights keep the text readable */
html.dark mark.hl-y { background: rgba(234,179,8,.38); }
html.dark mark.hl-b { background: rgba(59,130,246,.42); }
html.dark mark.hl-p { background: rgba(236,72,153,.38); }

/* pictures and charts keep a white page behind them */
html.dark .passage img.fig, html.dark .stem img { background: #fff; padding: 6px; border-radius: 8px; }
html.dark .viewer .vbody img { background: #fff; }

/* vocabulary list colours */
html.dark .c-cp  { --ac: #4f46e5; --ac2: #6366f1; --acbg: rgba(139,92,246,.16); --acfg: #a5b4fc; --actext: #e0e7ff; --acdeep: #1e1b4b; }
html.dark .c-sat { --ac: #2f55d6; --ac2: #7aa0ff; --acbg: rgba(122,160,255,.12); --acfg: #8fadff; --actext: #cfdcff; --acdeep: #0c1638; }
html.dark .c-ivy { --ac: #2b3f99; --ac2: #5f7fe0; --acbg: rgba(96,165,250,.14); --acfg: #9fb2f0; --actext: #d5ddf8; --acdeep: #172554; }
html.dark .c-adv { --ac: #475569; --ac2: #94a3b8; --acbg: rgba(148,163,184,.14); --acfg: #cbd5e1; --actext: #e8edf3; --acdeep: #0b1220; }
html.dark .vc-contgo { background: #fff; }
html.dark .vc-set.mastered { border-color: #1f4a33; }
html.dark .fc-front { box-shadow: 0 22px 44px -24px rgba(0,0,0,.7); }
html.dark .vc-cont { box-shadow: 0 14px 30px -18px rgba(0,0,0,.8); }

/* highlighter swatches keep their real colours */
html.dark .hlbar .s-p { background: #ffb8d4; }
html.dark .hlbar .s-b { background: #9fd0ff; }
html.dark .hlbar .s-y { background: #ffe27a; }

/* word cards: clear word and definition text on dark, status pills and chips that sit on the dark card */
html.dark .vc-wcard { background: #1f242d; border-color: #323a48; box-shadow: none; }
html.dark .vc-ww { color: #f3f6fa; }
html.dark .vc-wpos { color: #7d8999; }
html.dark .vc-wd { color: #d5dce5; }
html.dark .vc-wex { background: var(--acbg); color: #c3ccd8; }
html.dark .vc-wex b { color: var(--actext); }
html.dark .vc-wstat { background: #1f2835; color: #b7c1cf; }
html.dark .vc-wstat i { border: 1.5px solid #7d8999; }
html.dark .vc-wstat.l { background: rgba(245,158,11,.14); color: #fbbf24; }
html.dark .vc-wstat.l i { border: 0; background: #f59e0b; }
html.dark .vc-wstat.k { background: rgba(34,197,94,.14); color: #4ade80; }
html.dark .vc-wstat.k i { border: 0; background: #22c55e; }
html.dark .vc-wrel { border-top: 1px solid #222b38; }
html.dark .vc-wrel em { color: #7d8999; }
html.dark .vc-wrel span { background: #16203a; border: 1px solid #2a3646; color: #c3ccd8; }

/* test More menu: zoom row and dark mode switch */
html.dark .bb-mlbl { color: var(--bb-ink); }
html.dark .bb-menu .bb-zb { border-color: #3a4556; }
html.dark .bb-menu .bb-zb:disabled { background: none; }
html.dark .bb-sw { background: #3a4556; }
html.dark .bb-mswitch[aria-checked="true"] .bb-sw { background: var(--bb-blue); }
html.dark .bb-msep { background: #272d35; }

/* =====================================================================
   v18: Reading & Writing label, skills breakdown, progress, live mock
   ===================================================================== */
/* test cards: the form and the Reading & Writing label */
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.pr-meta .pr-form { margin: 0; }
.pr-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: #eaf0ff; color: #0b4f49;
  font-size: 12.5px; font-weight: 650; white-space: nowrap; }
html.dark .pr-tag { background: #173a37; color: #9ff3ea; }

/* skills breakdown: a meter list grouped by domain */
.sk-panel h4 { margin: 0 0 4px; font-size: 16px; }
.sk-panel .sub { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.sk-next { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 12px; background: #fff6e3; color: #3d2a00;
  font-size: 14px; line-height: 1.45; margin: 0 0 8px; }
.sk-next svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: #b7791f; }
.sk-next.ok { background: var(--ok-bg); color: var(--ink); }
.sk-next.ok svg { color: var(--ok); }
.sk-dom { padding: 12px 0 4px; border-top: 1px solid #eef0f2; }
.sk-next + .sk-dom { border-top: 0; }
.sk-dh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: 14.5px; color: var(--ink); }
.sk-dh span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 32%) 42px; align-items: center; gap: 6px 12px; padding: 6px 0; font-size: 13.5px; }
.sk-name { min-width: 0; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; line-height: 1.35; }
.sk-meter { height: 8px; border-radius: 4px; background: #eaf0ff; overflow: hidden; }
.sk-meter i { display: block; height: 100%; border-radius: 4px; background: #3358e0; min-width: 0; }
.sk-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 650; }
.sk-flag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; background: #fff1d6; color: #6b4100;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sk-flag svg { width: 12px; height: 12px; }
@media (max-width: 479px) {
  .sk-row { grid-template-columns: minmax(0, 1fr) 42px; }
  .sk-meter { grid-column: 1 / -1; grid-row: 2; }
}
html.dark .sk-next { background: #33270f; color: #f5e3bd; }
html.dark .sk-next svg { color: #f6c977; }
html.dark .sk-dom { border-top-color: #323a48; }
html.dark .sk-meter { background: #173a37; }
html.dark .sk-meter i { background: #12ab9b; }
html.dark .sk-flag { background: #3a2a0c; color: #f6c977; }

/* progress tab */
.pg-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.pg-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; min-width: 0; }
.pg-tl { font-size: 13px; color: #6b7280; }
.pg-tv { font-size: 28px; font-weight: 700; line-height: 1.15; color: #0b0b0b; }
.pg-td { font-size: 12.5px; font-weight: 650; color: #6b7280; }
.pg-td.up { color: #138a46; }
.pg-td.down { color: #c62f2f; }
.pg-card { margin: 0 0 16px; }
.pg-card h3 { margin: 0; font-size: 19px; font-weight: 700; color: #0b0b0b; }
.pg-sub { margin: 4px 0 12px; font-size: 14px; color: #6b7280; line-height: 1.45; }
.pg-note { margin: 4px 0 0; font-size: 14.5px; color: #4b5563; }
.pg-empty { max-width: 560px; margin: 4px auto 0; align-items: center; text-align: center; }
.pg-empty > svg { width: 34px; height: 34px; color: #3b5bdb; }
.pg-empty h3 { margin: 10px 0 6px; font-size: 20px; }
.pg-empty p { margin: 0; color: #4b5563; line-height: 1.5; }
.pg-list { display: flex; flex-direction: column; }
.pg-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #eef0f2; }
.pg-item:first-child { border-top: 0; }
.pg-it { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-it b { font-size: 15px; font-weight: 650; color: #0b0b0b; line-height: 1.35; }
.pg-it span { font-size: 13px; color: #6b7280; }
.pg-is { font-size: 20px; font-weight: 700; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.pg-open { height: 34px; border-radius: 9px; border: 1.5px solid #3b5bdb; color: #3b5bdb; font-size: 13.5px; font-weight: 650; background: transparent; }
.pg-live { display: inline-flex; vertical-align: 1px; height: 19px; align-items: center; padding: 0 7px; border-radius: 10px; background: #fde8e8; color: #9b1c1c; font-size: 11px; font-weight: 700; }
@media (max-width: 639px) {
  .pg-kpis { gap: 8px; }
  .pg-tile { padding: 12px; }
  .pg-tv { font-size: 24px; }
  .pg-item { grid-template-columns: minmax(0, 1fr) auto; }
  .pg-open, .pg-open-x { grid-column: 1 / -1; }
  .pg-open-x { display: none; }
}
/* score history chart */
.ch-wrap { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ch { display: block; width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: #eceff1; stroke-width: 1; }
.ch-tick { fill: #6b7280; font-size: 12px; font-variant-numeric: tabular-nums; }
.ch-line { fill: none; stroke: #3358e0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: #3358e0; fill-opacity: .1; stroke: none; }
.ch-dot { fill: #3358e0; stroke: #fff; stroke-width: 2; }
.ch-dot.on { r: 6.5; }
.ch-cross { stroke: #c7cdd4; stroke-width: 1; }
.ch-end { fill: #0b0b0b; font-size: 14px; font-weight: 700; }
.ch-tip { position: absolute; transform: translateX(-50%); pointer-events: none; display: flex; flex-direction: column; gap: 1px; padding: 8px 11px;
  border-radius: 10px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 6px 20px rgba(16,24,40,.12); white-space: nowrap; z-index: 2; }
.ch-tip b { font-size: 17px; font-weight: 750; color: #0b0b0b; }
.ch-tip span { font-size: 12.5px; color: #374151; }
.ch-tip em { font-style: normal; font-size: 12px; color: #6b7280; }
html.dark .pg-tile { border-color: #353c48; background: #1f242d; }
html.dark .pg-tl, html.dark .pg-sub, html.dark .pg-it span, html.dark .pg-td { color: #a1aab8; }
html.dark .pg-td.up { color: #34d399; }
html.dark .pg-td.down { color: #f87171; }
html.dark .pg-tv, html.dark .pg-card h3, html.dark .pg-it b, html.dark .pg-is, html.dark .pg-empty h3 { color: #e8eaed; }
html.dark .pg-note, html.dark .pg-empty p { color: #b5bdc7; }
html.dark .pg-empty > svg { color: #b3c7ff; }
html.dark .pg-item { border-top-color: #232b37; }
html.dark .pg-open { border-color: #1accbe; color: #b3c7ff; }
html.dark .pg-live { background: #3b1717; color: #fca5a5; }
html.dark .ch-grid { stroke: #232b37; }
html.dark .ch-tick { fill: #8b97a8; }
html.dark .ch-line { stroke: #12ab9b; }
html.dark .ch-area { fill: #12ab9b; }
html.dark .ch-dot { fill: #12ab9b; stroke: #1f242d; }
html.dark .ch-cross { stroke: #3a4554; }
html.dark .ch-end { fill: #e8eaed; }
html.dark .ch-tip { background: #1b2533; border-color: #2d3a4b; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
html.dark .ch-tip b { color: #e8eaed; }
html.dark .ch-tip span { color: #c3cbd6; }
html.dark .ch-tip em { color: #8b97a8; }

/* three home tabs fit on small phones */
@media (max-width: 420px) {
  .hm-tab { gap: 5px; padding: 0 4px; font-size: 14px; }
  .hm-tab svg { width: 16px; height: 16px; }
}
@media (max-width: 349px) { .hm-tab svg { display: none; } }

/* live mock */
.chip.live { gap: 6px; background: #fde8e8; color: #9b1c1c; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; }
.chip.live i { width: 7px; height: 7px; border-radius: 50%; background: #dc2626; animation: lvpulse 1.6s ease-in-out infinite; }
@keyframes lvpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lv-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid #f3c6c6; background: #fff7f7; }
.lv-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.15); animation: lvpulse 1.6s ease-in-out infinite; }
.lv-ico { font-size: 20px; line-height: 1; }
.lv-bt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lv-bt b { font-size: 15.5px; color: #0b0b0b; }
.lv-bt span { font-size: 13px; color: #4b5563; line-height: 1.4; }
.lv-bb { flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 10px; background: #3b5bdb; color: #fff; font-size: 14.5px; font-weight: 650; }
.lv-panel p { margin: 10px 0 14px; color: var(--ink-2); line-height: 1.5; font-size: 14.5px; }
.lv-score { font-size: 56px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); }
html.dark .chip.live { background: #3b1717; color: #fca5a5; }
html.dark .lv-banner { border-color: #4a2323; background: #1f1518; }
html.dark .lv-bt b { color: #e8eaed; }
html.dark .lv-bt span { color: #b5bdc7; }
@media (prefers-reduced-motion: reduce) { .chip.live i, .lv-dot { animation: none; } }

/* ===================== v19: free sample, practice by topic, my mistakes, plan, explanations ===================== */
/* four home tabs */
.hm-tabs.hm-4 .hm-tab { padding: 0 14px; }
@media (max-width: 560px) {
  .hm-tabs.hm-4 { display: flex; }
  .hm-tabs.hm-4 .hm-tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; height: 54px; padding: 0 2px; font-size: 12px; }
  .hm-tabs.hm-4 .hm-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hm-tabs.hm-4 .hm-tab svg { width: 19px; height: 19px; }
}

/* plan card: days to the SAT + this week's goal */
.pl-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; margin: 0 0 18px; padding: 14px 16px; text-align: left;
  border: 1px solid #d5ece8; border-radius: 16px; background: linear-gradient(135deg, #eef3ff 0%, #ffffff 70%); color: #0b0b0b; }
.pl-card:active { transform: scale(.995); }
.pl-cd { display: flex; flex-direction: column; min-width: 0; }
.pl-cd b { display: inline-flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #3b5bdb; line-height: 1.15; }
.pl-cd span { font-size: 13.5px; color: #4b5563; margin-top: 2px; }
.pl-cd.pl-set b { font-size: 16.5px; font-weight: 700; }
.pl-cd.pl-set b svg { width: 18px; height: 18px; }
.pl-wk { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pl-wk > div { display: flex; flex-direction: column; }
.pl-wk b { font-size: 18px; font-weight: 800; color: #0b0b0b; line-height: 1.1; }
.pl-wk b small { font-size: 13px; font-weight: 700; color: #6b7280; }
.pl-wk span { font-size: 12px; color: #6b7280; }
.pl-ring { width: 40px; height: 40px; flex: 0 0 40px; }
.pl-rbg { fill: none; stroke: #e2ece9; stroke-width: 4.5; }
.pl-rfg { fill: none; stroke: #3b5bdb; stroke-width: 4.5; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.pl-wk.done .pl-rfg { stroke: #16a34a; }
.pl-wk.done span { color: #15803d; font-weight: 700; }
.pl-dialog .pl-lab { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: #4b5563; text-transform: uppercase; letter-spacing: .04em; }
.pl-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pl-opts.pl-goals { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pl-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; text-align: left; }
.pl-goals .pl-opt { align-items: center; padding: 10px 4px; }
.pl-opt b { font-size: 15px; font-weight: 700; color: #0b0b0b; }
.pl-opt span { font-size: 12.5px; color: #6b7280; }
.pl-opt.on { border-color: #3b5bdb; background: #eef3ff; }
.pl-opt.on b { color: #3b5bdb; }
.pl-reg { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #eef3ff; color: #0b0b0b !important; }
.pl-reg svg { width: 20px; height: 20px; flex: 0 0 20px; color: #3b5bdb; margin-top: 2px; }
.pl-reg small { color: #6b7280; }
.pl-note { margin: 14px 0 16px !important; font-size: 13px !important; color: #6b7280 !important; }
.pl-dialog .row { grid-template-columns: 1fr; }

/* free plan */
.up-card { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 14px 16px; border-radius: 16px; background: #fff7e6; border: 1px solid #fde3b0; color: #3d2a00; }
.up-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #ffe9bd; color: #a16207; }
.up-ico svg { width: 22px; height: 22px; }
.up-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.up-txt b { font-size: 15.5px; font-weight: 700; color: #2a1d00; }
.up-txt span { font-size: 13.5px; line-height: 1.45; color: #5b4a20; }
.up-btn { flex: 0 0 auto; height: 40px; padding: 0 16px; border-radius: 10px; background: #3b5bdb; color: #fff; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { .up-card { flex-wrap: wrap; } .up-btn { width: 100%; } }
.up-dialog { text-align: center; }
.up-dico { display: inline-flex; width: 48px; height: 48px; border-radius: 14px; align-items: center; justify-content: center; background: #eef3ff; color: #3b5bdb; margin-bottom: 6px; }
.up-dico svg { width: 24px; height: 24px; }
.up-dialog .up-dnote { font-size: 13.5px; color: #6b7280; }
.pr-free { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-left: auto; }
.vc-cath .pr-free { margin-left: 0; }
.pr-card.pr-locked { background: #fafafa; }
.pr-card.pr-locked h3, .pr-card.pr-locked .pr-form { color: #6b7280; }
.pr-btn.pr-btnlock { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: #3b5bdb; border: 1.5px solid #cfe7e3; }
.pr-btn.pr-btnlock:hover { background: #eef3ff; }
.pr-btn.pr-btnlock svg { width: 17px; height: 17px; }
.px-lock { display: inline-flex; color: #9ca3af; }
.px-lock svg { width: 16px; height: 16px; }
.vc-cat.vc-catlock { opacity: .78; }
.vc-set.vc-locked { opacity: .7; }
.vc-set.vc-locked .vc-chip svg { width: 12px; height: 12px; }

/* my mistakes card */
.ms-card { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 18px; padding: 14px 16px; text-align: left; border: 1px solid #f3d4d4; border-radius: 16px; background: #fff8f8; }
.ms-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fde8e8; color: #c62f2f; }
.ms-ico svg { width: 21px; height: 21px; }
.ms-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ms-txt b { font-size: 16px; font-weight: 700; color: #0b0b0b; }
.ms-txt span { font-size: 13.5px; color: #6b7280; }
.ms-n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: #c62f2f; color: #fff; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ms-all { margin: 4px 0 16px; }
.ms-groups { display: grid; gap: 10px; }
.ms-g { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.ms-g > div { display: flex; flex-direction: column; min-width: 0; }
.ms-g b { font-size: 15.5px; font-weight: 700; color: #0b0b0b; }
.ms-g span { font-size: 13px; color: #6b7280; }

/* practice home */
.px-seg { display: flex; gap: 6px; padding: 4px; margin: 4px 0 16px; border-radius: 14px; background: #f1f4f3; border: 1px solid #e3e8e6; }
.px-segb { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border-radius: 10px; font-size: 16px; font-weight: 700; color: #4b5563; }
.px-segb small { font-size: 12px; font-weight: 600; color: #8a93a1; }
.px-segb.on { background: #fff; color: #3b5bdb; box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.06); }
.px-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .px-topics { grid-template-columns: 1fr; } }
.px-topic { --ac: #3b5bdb; display: flex; flex-direction: column; gap: 2px; padding: 16px; text-align: left; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.px-topic:hover { border-color: #d0d5dd; box-shadow: 0 10px 24px -16px rgba(16,24,40,.24); }
.px-topic:active { transform: scale(.995); }
.px-th { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.px-th b { font-size: 16.5px; font-weight: 700; color: #0b0b0b; }
.px-tm { font-size: 13px; color: #6b7280; }
.px-topic .vc-bar { margin: 10px 0 6px; }
.px-tf { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #6b7280; }

/* a topic */
.px-hero { margin: 22px 0 16px; }
.px-kind { display: inline-flex; height: 22px; align-items: center; padding: 0 9px; border-radius: 11px; background: #eaf0ff; color: #0b4f49; font-size: 12px; font-weight: 700; }
.px-hero h1 { margin: 8px 0 4px; font-size: 28px; font-weight: 750; letter-spacing: -.02em; color: #0b0b0b; line-height: 1.2; }
.px-hero p { margin: 0; font-size: 15px; color: #4b5563; line-height: 1.5; }
.px-drill { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 14px 16px; text-align: left; border: 1px solid #cfe7e3; border-radius: 16px; background: #eef3ff; }
.px-drill > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.px-drill b { font-size: 16px; font-weight: 700; color: #0b0b0b; }
.px-drill span span { font-size: 13.5px; color: #4b5563; }
.px-dico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #3b5bdb; color: #fff; }
.px-dico svg { width: 21px; height: 21px; }
.px-tips { margin: 0 0 6px; padding: 12px 16px; border: 1px solid #fde3b0; border-radius: 16px; background: #fffbf2; }
.px-tips summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15.5px; font-weight: 700; color: #3d2a00; list-style: none; }
.px-tips summary::-webkit-details-marker { display: none; }
.px-tips summary svg { width: 19px; height: 19px; color: #b7791f; }
.px-tips summary::after { content: '▾'; margin-left: auto; color: #b7791f; transition: transform .15s; }
.px-tips[open] summary::after { transform: rotate(180deg); }
.px-tips ul { margin: 10px 0 0; padding-left: 20px; }
.px-tips li { margin: 6px 0; font-size: 14.5px; line-height: 1.5; color: #3d3220; }
.px-pace { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 2px; font-size: 13.5px; line-height: 1.45; color: #5b4a20; }
.px-pace svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; color: #b7791f; }
.px-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .px-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .px-parts { grid-template-columns: 1fr; } }
.px-part { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.px-part.done { border-color: #cdebd8; }
.px-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.px-ph b { font-size: 16.5px; font-weight: 700; color: #0b0b0b; }
.px-pm { font-size: 13px; color: #6b7280; }
.px-pbar { height: 6px; margin: 8px 0 10px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.px-pbar i { display: block; height: 100%; border-radius: 3px; background: #3b5bdb; }
.px-part.done .px-pbar i { background: #16a34a; }
.px-pbtns { display: flex; gap: 8px; }
.px-pb { flex: 1; height: 40px; padding: 0 14px; border-radius: 10px; background: #3b5bdb; color: #fff; font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.px-pb.ghost { background: #fff; color: #3b5bdb; border: 1.5px solid #cfe7e3; }
.px-pb[disabled] { opacity: .65; }
.ms-g .px-pb { flex: 0 0 auto; }

/* practice question */
.px-prog { height: 3px; background: #eef0f3; }
.px-prog i { display: block; height: 100%; background: #3b5bdb; transition: width .3s ease; }
.px-qno { font-size: 12px; font-weight: 600; color: #8a93a1; }
.px-run .choice .pick[disabled] { cursor: default; }
.px-run .review-note { display: flex; align-items: center; gap: 6px; }
.px-run .review-note svg { width: 17px; height: 17px; }
.bb-btn.px-check[disabled] { opacity: .45; }
.ex-box { margin: 16px 0 6px; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; border: 1px solid #e3e8ef; }
.ex-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #3b5bdb; }
.ex-h svg { width: 16px; height: 16px; }
.ex-b { font-size: calc(15.5px * var(--zoom, 1)); line-height: 1.6; color: #1f2937; }
.ex-b p { margin: 0 0 8px; }
.ex-b p:last-child { margin-bottom: 0; }
.px-score .px-time { color: #dbe5ff; margin-top: 10px; line-height: 1.5; }
.px-score .px-time svg { width: 15px; height: 15px; vertical-align: -2px; }

/* results: missed questions note, skills link to practice */
.rs-mist { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin: 0 0 12px; padding: 12px 14px; text-align: left; border-radius: 12px; background: #fff8f8; border: 1px solid #f3d4d4; color: #3b1a1a; font-size: 14px; line-height: 1.45; }
.rs-mist svg { width: 18px; height: 18px; flex: 0 0 18px; color: #c62f2f; margin-top: 1px; }
.sk-go { padding: 0; font: inherit; font-weight: 700; color: #3b5bdb; text-decoration: underline; text-underline-offset: 2px; }
button.sk-flag { border: 0; cursor: pointer; }

/* dark mode */
html.dark .pl-card { border: 1px solid #23423f; background: linear-gradient(135deg, #131d3a 0%, #1f242d 75%); color: #e8eaed; }
html.dark .pl-cd b { color: #9db8ff; }
html.dark .pl-cd span, html.dark .pl-wk span { color: #a1aab8; }
html.dark .pl-wk b { color: #e8eaed; }
html.dark .pl-wk b small { color: #a1aab8; }
html.dark .pl-rbg { stroke: #26323d; }
html.dark .pl-rfg { stroke: #7aa0ff; }
html.dark .pl-wk.done .pl-rfg { stroke: #4ade80; }
html.dark .pl-wk.done span { color: #4ade80; }
html.dark .pl-dialog .pl-lab { color: #a1aab8; }
html.dark .pl-opt { border-color: #353c48; background: #1f242d; }
html.dark .pl-opt b { color: #e8eaed; }
html.dark .pl-opt span { color: #a1aab8; }
html.dark .pl-opt.on { border-color: #7aa0ff; background: #131d3a; }
html.dark .pl-opt.on b { color: #9db8ff; }
html.dark .pl-reg { background: #131d3a; color: #e8eaed !important; }
html.dark .pl-reg svg { color: #9db8ff; }
html.dark .pl-note, html.dark .pl-reg small { color: #a1aab8 !important; }
html.dark .up-card { background: #2a2210; border-color: #4a3a14; color: #f3e2b8; }
html.dark .up-ico { background: #3d3013; color: #fbbf24; }
html.dark .up-txt b { color: #fbe7b5; }
html.dark .up-txt span { color: #d8c79a; }
html.dark .up-dico { background: #131d3a; color: #9db8ff; }
html.dark .up-dialog .up-dnote { color: #a1aab8; }
html.dark .pr-free { background: #12301f; color: #4ade80; }
html.dark .pr-card.pr-locked { background: #11171f; }
html.dark .pr-card.pr-locked h3, html.dark .pr-card.pr-locked .pr-form { color: #8b95a3; }
html.dark .pr-btn.pr-btnlock { background: #1f242d; color: #9db8ff; border-color: #23423f; }
html.dark .px-lock { color: #6b7686; }
html.dark .ms-card { background: #2a1517; border-color: #4a2326; }
html.dark .ms-ico { background: #3d1c1f; color: #f87171; }
html.dark .ms-txt b, html.dark .ms-g b { color: #e8eaed; }
html.dark .ms-txt span, html.dark .ms-g span { color: #a1aab8; }
html.dark .ms-g { background: #1f242d; border-color: #353c48; }
html.dark .px-seg { background: #232931; border-color: #282e37; }
html.dark .px-segb { color: #a1aab8; }
html.dark .px-segb small { color: #7d8794; }
html.dark .px-segb.on { background: #1f242d; color: #9db8ff; }
html.dark .px-topic, html.dark .px-part { background: #1f242d; border-color: #353c48; }
html.dark .px-topic:hover { border-color: #3a434f; }
html.dark .px-th b, html.dark .px-ph b, html.dark .px-hero h1, html.dark .px-drill b { color: #e8eaed; }
html.dark .px-tm, html.dark .px-tf, html.dark .px-pm, html.dark .px-hero p, html.dark .px-drill span span { color: #a1aab8; }
html.dark .px-kind { background: #131d3a; color: #9db8ff; }
html.dark .px-drill { background: #131d3a; border-color: #23423f; }
html.dark .px-dico { background: #3b5bdb; }
html.dark .px-tips { background: #241e10; border-color: #4a3a14; }
html.dark .px-tips summary { color: #fbe7b5; }
html.dark .px-tips summary svg, html.dark .px-tips summary::after, html.dark .px-pace svg { color: #fbbf24; }
html.dark .px-tips li { color: #e6dcc2; }
html.dark .px-pace { color: #d8c79a; }
html.dark .px-part.done { border-color: #1f4430; }
html.dark .px-pbar, html.dark .px-prog { background: #26323d; }
html.dark .px-pbar i, html.dark .px-prog i { background: #7aa0ff; }
html.dark .px-part.done .px-pbar i { background: #4ade80; }
html.dark .px-pb { background: #3b5bdb; color: #fff; }
html.dark .px-pb.ghost { background: #1f242d; color: #9db8ff; border-color: #23423f; }
html.dark .ex-box { background: #18212d; border-color: #2a3542; }
html.dark .ex-h { color: #9db8ff; }
html.dark .ex-b { color: #dfe3e8; }
html.dark .rs-mist { background: #2a1517; border-color: #4a2326; color: #f1d5d5; }
html.dark .rs-mist svg { color: #f87171; }
html.dark .sk-go { color: #9db8ff; }

/* ---------- v20: Practice subjects (English, Math coming soon) ---------- */
.c-math { --ac: #b7791f; --ac2: #f59e0b; --acbg: #fff6e0; --acfg: #b7791f; --actext: #5a3800; --acdeep: #5a3800; }
html.dark .c-math { --ac: #d97706; --ac2: #f59e0b; --acbg: rgba(245,158,11,.14); --acfg: #fbbf24; --actext: #fde7b0; --acdeep: #3b1d00; }
.px-cats { margin-top: 4px; }
.px-cats .vc-cat { align-items: center; }
.px-cats .vc-cath .pr-free { margin-left: 0; }
.vc-cat.px-soon .vc-catp { margin-bottom: 0; }
.up-dico.px-mico, html.dark .up-dico.px-mico { background: var(--acbg); color: var(--acfg); }
.dialog .row.one { grid-template-columns: 1fr; }

/* ---------- v21: explanation button, topic boxes with an arrow, emoji icons ---------- */
.ex-wrap { margin: 18px 0 6px; }
.ex-tog { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px; border: 1px solid #c9ebe4; background: #effaf7;
  color: #3b5bdb; font-size: 14.5px; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.ex-tog:hover { background: #e2f5f0; border-color: #b4e2d8; }
.ex-tog:focus-visible { outline: 2px solid #3b5bdb; outline-offset: 2px; }
.ex-ti svg, .ex-tc svg { display: block; }
.ex-ti svg { width: 18px; height: 18px; }
.ex-tc svg { width: 16px; height: 16px; transition: transform .2s ease; }
.ex-wrap.open .ex-tc svg { transform: rotate(180deg); }
.ex-wrap .ex-box { display: none; margin: 10px 0 0; }
.ex-wrap.open .ex-box { display: block; animation: exIn .18s ease; }
@keyframes exIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ex-b ul { margin: 4px 0 8px; padding-left: 20px; }
.ex-b li { margin: 0 0 6px; }
.ex-b li:last-child { margin-bottom: 0; }
html.dark .ex-tog { background: #131d3a; border-color: #1f4a47; color: #9db8ff; }
html.dark .ex-tog:hover { background: #13343a; border-color: #2a5c58; }
html.dark .ex-tog:focus-visible { outline-color: #9db8ff; }

.px-topic { flex-direction: row; align-items: center; gap: 14px; border-color: #dde3ea; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.px-tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.px-topic .px-th { justify-content: flex-start; }
.px-topic .px-th .pr-free { margin-left: 0; }
.px-go { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: #eaf0ff; color: #3b5bdb; transition: transform .15s, background .15s; }
.px-go svg { width: 18px; height: 18px; }
.px-topic:hover .px-go { transform: translateX(2px); background: #d4efe9; }
html.dark .px-topic { background: #1b2431; border-color: #2f3a48; box-shadow: none; }
html.dark .px-topic:hover { border-color: #3e4b5b; }
html.dark .px-go { background: rgba(122,160,255,.13); color: #9db8ff; }
html.dark .px-topic:hover .px-go { background: rgba(122,160,255,.2); }

.px-emo { font-size: 26px; line-height: 1; }
.vc-hero .px-emo { font-size: 30px; }
.up-dico.px-emo { font-size: 26px; }

/* ---------- Math practice: questions are text from the Math book, in the same font as the mock tests;
   only graphs and diagrams are pictures ---------- */
.px-seg.grid { display: grid; grid-template-columns: 1fr 1fr; }
.mq-img { display: block; width: calc(var(--w) * 1.4px * var(--zoom, 1)); max-width: 100%; height: auto; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; mix-blend-mode: multiply; }
.mq-html .mq-fig { margin: 6px auto 14px; }
.choice .mq-html .mq-fig { margin: 2px 0; }
.mq-stim { margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1.5px dashed var(--line-2); }
.mq-stim .mq-fig { margin: 10px auto 0; }
.mq-html p { margin: 0 0 12px; }
.mq-html p:last-child { margin-bottom: 0; }
.mq-html p.mc { text-align: center; margin: 14px 0; }
.choice .mq-html { display: block; }
.choice .mq-html p, .choice .mq-html p.mc { margin: 0; text-align: left; }
.choice .mq-html p + p { margin-top: 4px; }
.mq-html i { font-style: italic; }
.mq-html sup, .mq-html sub { font-size: .68em; line-height: 0; }
.mq-html sup { vertical-align: .62em; }
.mq-html sub { vertical-align: -.25em; }
/* fractions */
.mf { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .1em; line-height: 1.12; font-size: .9em; }
.mf > .mn { border-bottom: max(1px, .075em) solid currentColor; padding: 0 .14em .1em; }
.mf > .md { padding: .1em .14em 0; }
.mq-html sup .mf, .mq-html sub .mf { font-size: .95em; margin: 0 .04em; }
.mq-html sup .mf > .mn { padding-bottom: .04em; } .mq-html sup .mf > .md { padding-top: .04em; }
/* roots: the sign, then the radicand under a bar */
.mr { white-space: nowrap; display: inline-flex; align-items: stretch; vertical-align: baseline; }
.mrs { font-size: 1.08em; line-height: 1; padding-top: .06em; margin-right: -.04em; }
.mri { border-top: max(1px, .075em) solid currentColor; padding: .06em .06em 0 .06em; }
.mrx { font-size: .55em !important; vertical-align: 1.1em !important; margin-right: -.35em; }
.mo { border-top: max(1px, .075em) solid currentColor; padding-top: .04em; }
/* big parentheses around fractions */
.bp { display: inline-block; line-height: 1; vertical-align: middle; font-weight: 300; transform-origin: center; margin: 0 .02em; }
.bp.b12 { transform: scaleY(1.35); }
.bp.b14 { transform: scaleY(1.5); }
.bp.b18 { transform: scaleY(1.9); }
.bp.b24 { transform: scaleY(2.3); }
.bp.b30 { transform: scaleY(2.8); }
.mq-html .tblwrap { margin: 4px 0 14px; }
.mq-html table.tbl, .run.bb .mq-html table.tbl { font-size: calc(14px * var(--zoom, 1)); width: auto; min-width: 60%; }
.mq-html table.tbl th, .mq-html table.tbl td { text-align: center; vertical-align: middle; padding: 6px 8px; -webkit-hyphens: none; hyphens: none; overflow-wrap: normal; word-break: normal; }
.mq-html table.tbl td { white-space: nowrap; }
.choice .mq-html .tblwrap { margin: 2px 0; }
.choice .mq-html table.tbl { min-width: 0; }
.mq-html svg.mchart { display: block; width: 100%; max-width: 420px; height: auto; margin: 4px auto 14px; font-family: var(--sans); }
.mq-html svg.mchart text { fill: currentColor; }
.mq-choices .choice .txt { display: block; min-width: 0; }
.mq-choices .choice .pick { min-height: 56px; }
.spr.ok input { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); opacity: 1; -webkit-text-fill-color: var(--ok); }
.spr.bad input { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); opacity: 1; -webkit-text-fill-color: var(--bad); }
/* dark theme: the book's black-on-white pictures turn light-on-dark (white becomes the page colour) */
html.dark .mq-img, html.dark .stem.mq img.mq-img { background: none; padding: 0; border-radius: 0; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
canvas.confetti { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
/* ---------- practice topics: section tabs and topic cards (vocabulary-style accents) ---------- */
.px-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 16px; }
.px-tab { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 54px; padding: 12px 14px 12px 18px;
  text-align: left; border-radius: 14px; border: 1.5px solid #e1e6ec; background: #fff; color: #111827; transition: transform .1s, box-shadow .15s, border-color .15s; }
.px-tab::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ac); }
.px-tab b { font-size: 16px; font-weight: 700; line-height: 1.25; }
.px-tab:hover { border-color: #cfd6df; }
.px-tab:active { transform: scale(.985); }
.px-tab.on { color: #fff; border-color: transparent; background: linear-gradient(125deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 12px 26px -16px var(--acdeep); }
.px-tab.on::before { display: none; }
.px-tab.on::after { content: ''; position: absolute; right: -40px; top: -60px; width: 150px; height: 150px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 70%); }
.px-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .px-topics { grid-template-columns: 1fr; } }
.px-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 16px 16px 18px; text-align: left;
  border-radius: 16px; border: 1px solid #e1e6ec; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: transform .1s, box-shadow .15s, border-color .15s; }
.px-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ac2), var(--ac)); }
.px-card:hover { border-color: #cfd6df; box-shadow: 0 12px 28px -18px rgba(16,24,40,.3); }
.px-card:active { transform: scale(.99); }
.px-num { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 8px 16px -10px var(--acdeep); }
.px-cbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.px-ch { display: flex; align-items: center; gap: 8px; }
.px-ch b { font-size: 16.5px; font-weight: 700; line-height: 1.3; color: #0b0b0b; }
.px-ch .pr-free { margin-left: 0; }
.px-cmeta { font-size: 13px; color: #6b7280; }
.px-segs { display: flex; gap: 4px; margin: 10px 0 7px; }
.px-segs i { flex: 1; height: 6px; border-radius: 3px; background: #e7ebf0; }
.px-segs i.half { background: color-mix(in srgb, var(--ac) 40%, #e7ebf0); }
.px-segs i.on { background: var(--ac); }
.px-cstat { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #6b7280; }
.px-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px;
  font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--ac) 0%, var(--acdeep) 100%); }
.px-act svg { width: 16px; height: 16px; }
.px-card:hover .px-act svg { transform: translateX(2px); }
@media (max-width: 420px) {
  .px-card { gap: 12px; padding: 14px 12px 14px 16px; }
  .px-num { flex-basis: 38px; width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
  .px-act { height: 34px; padding: 0 10px; font-size: 13px; }
  .px-ch b { font-size: 15.5px; }
  .px-tab { padding: 10px 12px 10px 16px; min-height: 50px; }
  .px-tab b { font-size: 15px; }
}
html.dark .px-tab { background: #1b2431; border-color: #303b4a; color: #f1f3f5; }
html.dark .px-tab:hover { border-color: #3e4b5b; }
html.dark .px-tab.on { color: #fff; border-color: transparent; background: linear-gradient(125deg, var(--ac) 0%, var(--acdeep) 100%); box-shadow: 0 12px 26px -16px rgba(0,0,0,.8); }
html.dark .px-card { background: #1b2431; border-color: #303b4a; box-shadow: none; }
html.dark .px-card:hover { border-color: #3e4b5b; }
html.dark .px-ch b { color: #f3f5f7; }
html.dark .px-cmeta, html.dark .px-cstat { color: #a9b2bf; }
html.dark .px-segs i { background: rgba(255,255,255,.1); }
html.dark .px-segs i.half { background: color-mix(in srgb, var(--ac) 45%, rgba(255,255,255,.1)); }
html.dark .px-segs i.on { background: var(--ac2); }
html.dark .px-num { box-shadow: none; }
/* practice question list */
.px-navpop .bb-navhead h3 small { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--bb-label); }
.bb-cell.pok { border: 1.5px solid #16a34a; background: #16a34a; color: #fff; }
.bb-cell.pno { border: 1.5px solid #dc2626; background: #dc2626; color: #fff; }
html.dark .bb-cell.pok { border-color: #22c55e; background: #15803d; color: #fff; }
html.dark .bb-cell.pno { border-color: #ef4444; background: #b91c1c; color: #fff; }
.bb-legend .lg-ok, .bb-legend .lg-no { width: 14px; height: 14px; border-radius: 3px; background: #16a34a; }
.bb-legend .lg-no { background: #dc2626; }
.bb-btn.px-skip { background: transparent; color: var(--bb-btn); border: 1.5px solid var(--bb-btn); }
html.dark .bb-btn.px-skip { background: transparent; color: #e8eaed; border-color: #5a687c; }
@media (max-width: 420px) {
  .px-run .bb-fr { gap: 6px; }
  .px-run .bb-btn { padding: 0 12px; }
  .px-run .bb-qpill { padding: 0 10px; gap: 4px; }
}
/* ---------- website: login page, account button ---------- */
.pr-topr { display: flex; align-items: center; gap: 8px; }
.ac-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2aabee 0%, #1677c8 100%); box-shadow: 0 6px 14px -8px #1677c8; }
.ac-btn:active { transform: scale(.96); }
.ac-dialog { max-width: 400px; }
.ac-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ac-head b { display: block; font-size: 17px; }
.ac-head span:not(.ac-av) { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.ac-av { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2aabee 0%, #1677c8 100%); }
.ac-note { font-size: 14px; line-height: 1.5; color: var(--muted); }
.lg-page { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(42,171,238,.14), rgba(42,171,238,0) 60%), var(--bg); }
.lg-card { width: 100%; max-width: 440px; box-sizing: border-box; padding: 32px 26px 26px; border-radius: 22px; text-align: center;
  background: #fff; border: 1px solid #e3e8ee; box-shadow: 0 24px 60px -36px rgba(16,24,40,.45); }
.lg-logo { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 34px;
  background: linear-gradient(135deg, #eaf6fe, #d6ecfb); }
.lg-card h1 { margin: 0 0 8px; font-size: 25px; font-weight: 800; letter-spacing: -.01em; color: #0b0b0b; }
.lg-sub { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: #5b6573; }
.lg-note { margin: -8px 0 18px; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: #fff7e6; color: #8a5a00; }
.lg-tg { width: 100%; height: 52px; border: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font-size: 16.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2aabee 0%, #1a8ad5 100%); box-shadow: 0 12px 24px -14px #1a8ad5; }
.lg-tg svg { width: 22px; height: 22px; }
.lg-tg:hover { filter: brightness(1.05); }
.lg-tg:active { transform: scale(.99); }
.lg-small { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: #6b7280; }
.lg-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 2px; font-size: 15px; color: #374151; }
.lg-wait .spinner { margin: 0 0 6px; border-top-color: #2aabee; }
.lg-wait b { font-size: 17px; color: #0b0b0b; }
.lg-wait span { font-size: 14px; line-height: 1.5; color: #6b7280; }
.lg-link { margin-top: 6px; font-size: 14px; font-weight: 600; color: #1a8ad5; text-decoration: none; }
.lg-cancel { margin-top: 4px; border: 0; background: none; font-size: 14px; color: #6b7280; cursor: pointer; text-decoration: underline; }
.lg-done { margin: 0 0 16px; font-size: 15px; color: #374151; }
.lg-theme { position: absolute; top: 16px; right: 16px; }
html.dark .lg-page { background: radial-gradient(1200px 600px at 50% -10%, rgba(42,171,238,.12), rgba(42,171,238,0) 60%), var(--bg); }
html.dark .lg-card { background: #1f242d; border-color: #323844; box-shadow: none; }
html.dark .lg-card h1, html.dark .lg-wait b { color: #f1f3f5; }
html.dark .lg-sub, html.dark .lg-small, html.dark .lg-wait span, html.dark .lg-cancel { color: #a1aab8; }
html.dark .lg-wait, html.dark .lg-done { color: #d6dbe1; }
html.dark .lg-logo { background: linear-gradient(135deg, #1b2c3d, #16324a); }
html.dark .lg-note { background: #2b2412; color: #f3cf86; }
/* ================= Apex SAT ================= */
:root { --ap-navy: #0E1B3D; --ap-navy2: #16295c; --ap-gold: #F5A524; --ap-card: #fff; --ap-line: #e4e8f0; --ap-ink: #0f172a; --ap-mut: #5b6573; }
html.dark { --ap-card: #1f242d; --ap-line: #323844; --ap-ink: #eef1f6; --ap-mut: #a1aab8; }
.ap-sb { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: 248px; box-sizing: border-box; display: flex; flex-direction: column; padding: 18px 12px 14px;
  background: linear-gradient(180deg, #0E1B3D 0%, #171b22 100%); color: #c9d3e6; overflow-y: auto; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.sb-brand b { display: block; font-family: 'Space Grotesk', var(--sans); font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; line-height: 1; }
.sb-brand b span, .mb-brand b span, .au-logo b span, .au-side h2 span { color: var(--ap-gold); }
.sb-brand small { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8796b5; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-lab { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7384a6; }
.sb-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  color: #c9d3e6; font: 600 14.5px var(--sans); text-align: left; }
.sb-item svg, .sb-up svg, .sb-mini svg, .sb-theme svg, .mb-menu svg, .qa-c svg, .cd-btn svg, .sc-in h3 svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-item.on { background: #fff; color: var(--ap-navy); }
.sb-item em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--ap-gold); }
.sb-item.on em { color: #b7791f; }
.sb-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.sb-up { display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(135deg, rgba(245,165,36,.22), rgba(245,165,36,.08)); box-shadow: inset 0 0 0 1px rgba(245,165,36,.35); }
.sb-up svg { color: var(--ap-gold); }
.sb-up b { display: block; font-size: 13.5px; } .sb-up small { display: block; font-size: 12px; color: #c9d3e6; margin-top: 2px; }
.sb-mini { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: none; color: #dfe6f3; font: 600 13.5px var(--sans); cursor: pointer; }
.sb-me { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(255,255,255,.06); }
.sb-acc { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; padding: 0; }
.sb-av { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--ap-navy); background: var(--ap-gold); }
.sb-who { min-width: 0; } .sb-who b { display: block; font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-who small { display: block; font-size: 12px; color: #8796b5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-theme { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: #c9d3e6; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sb-theme:hover { background: rgba(255,255,255,.08); }
.sb-scrim { display: none; }
.ap-mbar { display: none; }
.pr-page:has(> .ap-sb) { padding-left: 248px; }
.ap-in { max-width: 1120px; padding-top: 28px; }
@media (max-width: 899px) {
  .pr-page:has(> .ap-sb) { padding-left: 0; }
  .ap-sb { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.sb-open .ap-sb { transform: none; }
  body.sb-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(8,12,24,.45); }
  .ap-mbar { display: flex; align-items: center; gap: 10px; position: relative; z-index: 30; height: 56px; padding: 0 12px; background: var(--ap-card); border-bottom: 1px solid var(--ap-line); }
  .mb-menu { width: 42px; height: 42px; border: 0; border-radius: 12px; background: none; color: var(--ap-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .mb-brand { display: flex; align-items: center; gap: 8px; }
  .mb-brand b { font-family: 'Space Grotesk', var(--sans); font-size: 19px; font-weight: 700; color: var(--ap-ink); letter-spacing: -.02em; }
  .ap-in { padding-top: 16px; }
}
/* home */
.hb { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 210px; padding: 28px 32px; border-radius: 22px; color: #fff;
  background: radial-gradient(600px 300px at 85% 120%, rgba(245,165,36,.18), transparent 60%), linear-gradient(120deg, #0E1B3D 0%, #1b3b8f 100%); }
.hb-txt { position: relative; z-index: 1; max-width: 520px; }
.hb-txt small { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: #aebbd8; }
.hb-txt h1 { margin: 8px 0 6px; font-family: 'Space Grotesk', var(--sans); font-size: 34px; letter-spacing: -.02em; line-height: 1.1; }
.hb-txt p { margin: 0; color: #c9d3e6; font-size: 15px; }
.hb-art { flex: 0 0 auto; width: 470px; max-width: 52%; height: auto; margin: -28px -32px -28px 0; align-self: flex-end; }
.hb-apple { animation: apfall 3.2s ease-in-out infinite; }
@keyframes apfall { 0%, 55% { transform: translateY(0); } 75% { transform: translateY(14px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .hb-apple { animation: none; } }
.dc { background: var(--ap-card); border: 1px solid var(--ap-line); border-radius: 20px; box-sizing: border-box; color: var(--ap-ink); }
.dg { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; margin-top: 16px; }
.cd { position: relative; padding: 22px 20px 18px; text-align: center; }
.cd-pick { position: relative; display: inline-block; }
.cd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ap-line); background: #f6f8fc; color: #4b5873; cursor: pointer;
  font: 700 12.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
html.dark .cd-btn { background: #1b2433; color: #c9d3e6; }
.cd-menu { position: absolute; z-index: 20; top: 44px; left: 50%; transform: translateX(-50%); min-width: 220px; padding: 6px; border-radius: 14px; background: var(--ap-card); border: 1px solid var(--ap-line); box-shadow: 0 18px 40px -16px rgba(16,24,40,.35); text-align: left; }
.cd-opt { display: flex; justify-content: space-between; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ap-ink); font: 500 14.5px var(--sans); cursor: pointer; }
.cd-opt:hover { background: rgba(14,27,61,.06); } .cd-opt.on { background: #e8eefc; font-weight: 700; } html.dark .cd-opt.on { background: #1f2d4a; }
.cd-row { display: flex; align-items: flex-start; justify-content: center; gap: 10px; margin-top: 18px; }
.cd-u { min-width: 74px; } .cd-u b { display: block; font-family: 'Space Grotesk', var(--sans); font-size: 56px; font-weight: 700; line-height: 1; color: var(--ap-ink); font-variant-numeric: tabular-nums; }
.cd-u span { display: block; margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ap-mut); }
.cd-sep { font-style: normal; font-size: 40px; line-height: 1.2; color: #c7cfdd; }
.cd-note { margin: 14px 0 0; font-size: 12.5px; color: var(--ap-mut); }
.wk { padding: 20px; }
.dc-h { display: flex; justify-content: space-between; align-items: center; }
.dc-h b { font-size: 15px; }
.dc-link { border: 0; background: none; color: #b7791f; font: 700 13.5px var(--sans); cursor: pointer; padding: 6px 0; }
.wk-body { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.wk-body svg { width: 86px; height: 86px; flex: 0 0 86px; }
.wk-n { display: block; font-family: 'Space Grotesk', var(--sans); font-size: 32px; } .wk-n small { font-size: 16px; color: var(--ap-mut); }
.wk-body span { display: block; font-size: 13.5px; color: var(--ap-mut); } .wk-s { margin-top: 6px; }
.ds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.st { padding: 18px 20px; } .st span { display: block; font-size: 13px; color: var(--ap-mut); font-weight: 600; }
.st b { display: block; margin: 6px 0 2px; font-family: 'Space Grotesk', var(--sans); font-size: 30px; } .st small { font-size: 12.5px; color: var(--ap-mut); }
.ds-h { margin: 26px 0 12px; font-size: 18px; color: var(--ap-ink); }
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.qa-c { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; cursor: pointer; text-align: left; font-family: var(--sans); transition: transform .15s, box-shadow .15s; }
.qa-c:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(14,27,61,.45); }
.qa-c svg { width: 22px; height: 22px; padding: 9px; border-radius: 12px; background: #e8eefc; color: #1b3b8f; flex: none; box-sizing: content-box; }
html.dark .qa-c svg { background: #1f2d4a; color: #a9c1ff; }
.qa-c b { font-size: 15px; } .qa-c span { font-size: 13px; color: var(--ap-mut); line-height: 1.4; }
@media (max-width: 1100px) { .qa { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .hb { padding: 22px; min-height: 0; } .hb-txt h1 { font-size: 26px; } .hb-art { width: 210px; max-width: 48%; margin: -22px -22px -22px 0; }
  .dg { grid-template-columns: 1fr; } .ds { grid-template-columns: 1fr 1fr; } .ds .st:last-child { grid-column: span 2; }
  .cd-u { min-width: 54px; } .cd-u b { font-size: 38px; } .cd-sep { font-size: 28px; } .cd-row { gap: 4px; }
}
@media (max-width: 480px) { .hb-art { display: none; } .qa { grid-template-columns: 1fr; } }
/* score calculator */
.ap-kick { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b7791f; }
.ap-h1 { margin: 6px 0 8px; font-family: 'Space Grotesk', var(--sans); font-size: 34px; letter-spacing: -.02em; color: var(--ap-ink); }
.ap-sub { margin: 0 0 22px; max-width: 640px; font-size: 15px; line-height: 1.55; color: var(--ap-mut); }
.sc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.sc-in { padding: 22px 24px; } .sc-in h3 { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; font-size: 17px; }
.sc-in h3 + .sc-s { margin-top: 0; } .sc-s + h3 { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ap-line); }
.sc-s { margin-bottom: 16px; } .sc-l { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sc-l span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-mut); } .sc-l b { font-family: 'Space Grotesk', var(--sans); font-size: 24px; }
.sc-s input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, #1b3b8f 0 var(--p, 50%), #e2e7f0 var(--p, 50%) 100%); }
html.dark .sc-s input[type=range] { background: linear-gradient(90deg, #6f95ff 0 var(--p, 50%), #2a3445 var(--p, 50%) 100%); }
.sc-s input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--ap-gold); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.sc-s input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ap-gold); }
.sc-f { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13.5px; color: var(--ap-mut); }
.sc-out { padding: 28px 24px; text-align: center; align-self: start; position: sticky; top: 20px; }
.sc-out > small, .sc-sec small { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b7791f; }
.sc-out > b { display: block; margin: 8px 0 4px; font-family: 'Space Grotesk', var(--sans); font-size: 88px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.sc-out > span { font-size: 14px; color: var(--ap-mut); }
.sc-sec { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 0; padding: 18px 0; border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.sc-sec div + div { border-left: 1px solid var(--ap-line); } .sc-sec small { color: var(--ap-mut); } .sc-sec b { display: block; margin-top: 4px; font-family: 'Space Grotesk', var(--sans); font-size: 36px; }
.sc-tip { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--ap-mut); text-align: left; }
@media (max-width: 860px) { .sc { grid-template-columns: 1fr; } .sc-out { position: static; } .sc-out > b { font-size: 68px; } }
/* sign in / create account */
.au-page { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.au-side { display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; color: #fff; background: radial-gradient(500px 300px at 20% 110%, rgba(245,165,36,.2), transparent 60%), linear-gradient(140deg, #0E1B3D, #1b3b8f); }
.au-side h2 { margin: 18px 0 10px; font-family: 'Space Grotesk', var(--sans); font-size: 44px; letter-spacing: -.03em; }
.au-side p { max-width: 420px; font-size: 16px; line-height: 1.6; color: #c9d3e6; }
.au-side ul { margin: 18px 0 0; padding: 0; list-style: none; } .au-side li { margin: 10px 0; padding-left: 26px; position: relative; color: #dfe6f3; }
.au-side li::before { content: ''; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ap-gold); }
.au-main { display: flex; align-items: center; justify-content: center; padding: 32px 18px; background: var(--bg); }
.au-card { width: 100%; max-width: 400px; }
.au-logo { display: none; align-items: center; gap: 10px; margin-bottom: 18px; } .au-logo b { font-family: 'Space Grotesk', var(--sans); font-size: 24px; color: var(--ap-ink); }
.au-card h1 { margin: 0 0 6px; font-family: 'Space Grotesk', var(--sans); font-size: 30px; letter-spacing: -.02em; color: var(--ap-ink); }
.au-sub { margin: 0 0 22px; color: var(--ap-mut); font-size: 15px; }
.au-note { margin: -8px 0 16px; padding: 10px 12px; border-radius: 12px; font-size: 14px; background: #fff7e6; color: #8a5a00; }
.au-card label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--ap-ink); }
.au-card input { display: block; width: 100%; box-sizing: border-box; height: 48px; margin-top: 6px; padding: 0 14px; border-radius: 12px; border: 1px solid #d3d9e4; background: var(--ap-card); color: var(--ap-ink); font: 400 16px var(--sans); }
.au-card input:focus { outline: none; border-color: #1b3b8f; box-shadow: 0 0 0 3px rgba(27,59,143,.15); }
html.dark .au-card input { border-color: #2d3748; }
.au-err { min-height: 18px; margin: 0 0 8px; font-size: 13.5px; color: #c0392b; }
.au-btn { width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; font: 700 16px var(--sans); color: #fff; background: var(--ap-navy); }
.au-btn:hover { background: #1b3b8f; } .au-btn:disabled { opacity: .7; cursor: default; } html.dark .au-btn { background: #2f4fa8; }
.au-link { display: block; margin: 14px auto 0; border: 0; background: none; color: #1b3b8f; font: 600 14px var(--sans); cursor: pointer; } html.dark .au-link { color: #a9c1ff; }
.au-switch { margin: 22px 0 0; text-align: center; font-size: 14.5px; color: var(--ap-mut); }
.au-switch button { border: 0; background: none; color: #b7791f; font: 700 14.5px var(--sans); cursor: pointer; padding: 0; }
@media (max-width: 820px) { .au-page { grid-template-columns: 1fr; } .au-side { display: none; } .au-logo { display: flex; } .au-main { min-height: 100vh; align-items: flex-start; padding-top: 48px; } }
.ac-tg { margin: 14px 0; padding: 14px; border-radius: 14px; background: #f3f6fd; } html.dark .ac-tg { background: #1b2433; }
.ac-tg b { display: block; font-size: 15px; } .ac-tg span { display: block; margin: 4px 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--ap-mut); }
.ac-ok { font-size: 14px; font-weight: 600; color: #15803d; }
/* banner headline + profile */
.hb-txt h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 40px; letter-spacing: -.01em; line-height: 1.12; }
.hb-txt h1 em { font-style: italic; color: var(--ap-gold); }
@media (max-width: 760px) { .hb-txt h1 { font-size: 30px; } }
.av-img { object-fit: cover; padding: 0; }
.sb-acc.on { outline: 2px solid rgba(255,255,255,.5); outline-offset: 4px; border-radius: 10px; }
.pf { max-width: 760px; }
.pf-card { padding: 22px 24px; margin-bottom: 16px; }
.pf-card h3 { margin: 0 0 14px; font-size: 17px; color: var(--ap-ink); }
.pf-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pf-av { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: var(--ap-navy); background: var(--ap-gold); }
.pf-who { flex: 1; min-width: 180px; } .pf-who b { display: block; font-size: 20px; color: var(--ap-ink); } .pf-who span { display: block; margin-top: 3px; font-size: 14px; color: var(--ap-mut); }
.pf-who .pf-plan { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eef1f6; color: #5b6573; }
.pf-who .pf-plan.on { background: rgba(245,165,36,.18); color: #9a5b00; }
.pf-phbtns { display: flex; align-items: center; gap: 10px; }
.pf-up { cursor: pointer; display: inline-flex; align-items: center; }
.pf-rm { border: 0; background: none; color: #c0392b; font: 600 14px var(--sans); cursor: pointer; }
.pf-form { display: grid; gap: 12px; max-width: 420px; }
.pf-form label { font-size: 13.5px; font-weight: 600; color: var(--ap-ink); }
.pf-form input { display: block; width: 100%; box-sizing: border-box; height: 46px; margin-top: 6px; padding: 0 14px; border-radius: 12px; border: 1px solid #d3d9e4; background: var(--ap-card); color: var(--ap-ink); font: 400 16px var(--sans); }
html.dark .pf-form input { border-color: #2d3748; }
.pf-form .btn { justify-self: start; }
.pf-note { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ap-mut); }
.pf-out { margin: 4px 0 30px; }
/* ================= Apex SAT finish ================= */
.hb { min-height: 270px; padding: 34px 40px; background:
  linear-gradient(90deg, rgba(8,13,30,.97) 0%, rgba(8,13,30,.88) 30%, rgba(8,13,30,.35) 58%, rgba(8,13,30,0) 78%),
  url(img/newton.webp) right center / cover no-repeat, #171b22; box-shadow: 0 30px 60px -40px rgba(8,13,30,.9); }
.hb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(245,165,36,.18); pointer-events: none; }
.hb-txt small { color: #f5c46b; }
.hb-txt h1 { font-size: 44px; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.hb-txt p { color: #d6deee; font-size: 16px; }
@media (max-width: 760px) {
  .hb { min-height: 230px; padding: 24px; align-items: flex-end; background:
    linear-gradient(180deg, rgba(8,13,30,.15) 0%, rgba(8,13,30,.55) 45%, rgba(8,13,30,.96) 100%), url(img/newton-sm.webp) 72% center / cover no-repeat, #171b22; }
  .hb-txt h1 { font-size: 30px; }
}
/* headings */
.pr-title, .ap-h1, .vc-title, .px-title, .pg-title { font-family: 'Space Grotesk', var(--sans); letter-spacing: -.02em; }
/* primary buttons: royal blue → navy, gold glow on focus */
.pr-btn, .btn:not(.ghost), .px-pb, .vg-btn, .px-act, .au-btn {
  background: linear-gradient(135deg, #3358e0 0%, #1b2f86 100%) !important; color: #fff !important; border: 0 !important;
  box-shadow: 0 12px 24px -16px rgba(35,72,196,.9); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.pr-btn:hover, .btn:not(.ghost):hover, .px-pb:hover, .vg-btn:hover, .px-act:hover, .au-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 28px -16px rgba(35,72,196,1); }
.pr-btn:focus-visible, .btn:focus-visible, .px-pb:focus-visible, .au-btn:focus-visible { outline: 3px solid rgba(245,165,36,.6); outline-offset: 2px; }
.btn.ghost, .pr-link { color: #3b5bdb; }
html.dark .btn.ghost, html.dark .pr-link { color: #9db8ff; }
/* cards: soft lift and a gold edge on hover */
.pr-card, .px-card, .dc { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pr-card:hover, .px-card:hover, .qa-c:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(14,27,61,.55); border-color: rgba(245,165,36,.55); }
html.dark .pr-card:hover, html.dark .px-card:hover, html.dark .qa-c:hover { box-shadow: 0 22px 40px -26px rgba(0,0,0,.9); }
.pr-card .pr-head svg { color: #3b5bdb; } html.dark .pr-card .pr-head svg { color: #f5a524; }
.pr-tag { background: rgba(245,165,36,.14) !important; color: #9a5b00 !important; }
html.dark .pr-tag { background: rgba(245,165,36,.16) !important; color: #f5c46b !important; }
.pr-free { background: #f5a524 !important; color: #2a1a00 !important; }
/* the plan bar: navy with gold numbers */
.pl-card { background: linear-gradient(120deg, #0e1b3d 0%, #1b3b8f 100%) !important; border: 0 !important; color: #fff; box-shadow: 0 18px 36px -26px rgba(14,27,61,.9); }
.pl-card .pl-cd b, .pl-card .pl-wk b { color: #f5c46b !important; }
.pl-card span, .pl-card small { color: #c9d3e6 !important; }
/* dark mode: deep navy instead of grey-green */
html.dark .pr-card, html.dark .px-card, html.dark .dc { background: #1f242d; border-color: #323a48; }
html.dark .ap-mbar { background: #0d1528; }
/* sidebar active item gets a gold marker */
.sb-item.on { position: relative; }
.sb-item.on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #f5a524; }

/* ---------- score progress + target ---------- */
.sp { margin-top: 16px; padding: 20px 22px 14px; }
.sp-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sp-l { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6b7280; }
.sp-n { display: block; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 44px; line-height: 1.05; font-weight: 700; color: #0E1B3D; margin-top: 4px; }
.sp-u { display: block; font-size: 12.5px; color: #6b7280; margin-top: 2px; }
.sp-tr { text-align: right; }
.sp-t { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0 0; cursor: pointer; }
.sp-t b { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 44px; line-height: 1.05; font-weight: 700; color: #0E1B3D; }
.sp-t b.sp-set { font-size: 22px; color: #3b5bdb; padding: 10px 0; }
.sp-t svg { width: 20px; height: 20px; fill: none; stroke: #9aa3b2; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-t:hover svg { stroke: #F5A524; }
.sp-wrap { position: relative; margin-top: 8px; }
.sp-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sp-grid { stroke: #e9edf3; stroke-width: 1; stroke-dasharray: 3 4; }
.sp-tick { font-size: 12px; fill: #8a93a3; font-family: inherit; }
.sp-line { fill: none; stroke: #2f6bff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sp-dot { fill: #2f6bff; stroke: #fff; stroke-width: 2; transition: r .12s; }
.sp-dot.on { r: 7; }
.sp-hit { fill: transparent; cursor: pointer; }
.sp-tline { stroke: #F5A524; stroke-width: 2; stroke-dasharray: 6 5; }
.sp-tlab { font-size: 12px; font-weight: 700; fill: #c98207; }
.sp-empty { font-size: 14px; fill: #9aa3b2; }
.sp-tip { position: absolute; transform: translate(-50%, -100%); background: #0E1B3D; color: #fff; padding: 8px 11px; border-radius: 10px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px rgba(14,27,61,.25); z-index: 3; }
.sp-tip b { display: block; font-size: 15px; color: #F5A524; }
.sp-tip span { display: block; font-weight: 600; }
.sp-tip em { display: block; font-style: normal; opacity: .75; }
.sp-msg { margin: 6px 0 0; font-size: 13.5px; color: #4b5563; }
.sp-msg b { color: #0E1B3D; }
.sp-msg .sp-ok { color: #16a34a; }
.sp-msg .dc-link { margin-left: 4px; }
.pl-opts.pl-tg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pl-tg .pl-opt { align-items: center; }
.tg-in { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1.5px solid #e5e7eb; border-radius: 12px; font-size: 16px; font-family: inherit; background: #fff; color: #0b0b0b; }
.tg-in:focus { outline: none; border-color: #3b5bdb; }
.tg-err { color: #dc2626; font-size: 13px; margin: 6px 0 0; }
.pr-in > .sp { margin: 0 0 16px; }
html.dark .sp-n, html.dark .sp-t b, html.dark .sp-msg b { color: #f1f4fa; }
html.dark .sp-t b.sp-set { color: #7da2ff; }
html.dark .sp-grid { stroke: #323a48; }
html.dark .sp-msg { color: #a9b3c6; }
html.dark .sp-dot { stroke: #1f242d; }
html.dark .sp-line, html.dark .sp-dot { stroke-width: 2.5; }
html.dark .sp-line { stroke: #5b8cff; } html.dark .sp-dot { fill: #5b8cff; }
html.dark .sp-tip { background: #f1f4fa; color: #0E1B3D; }
html.dark .sp-tip b { color: #b46f00; }
html.dark .tg-in { background: #1f242d; border-color: #353c48; color: #e8eaed; }
@media (max-width: 640px) { .sp { padding: 16px 14px 12px; } .sp-n, .sp-t b { font-size: 34px; } }
.tg-in + .tg-err + .row, .tg-in ~ .row { margin-top: 16px; }

/* ================= Nov 18 redesign: sidebar hide, hero, glass score card, pricing ================= */
.sb-brand { position: relative; }
.sb-col { margin-left: auto; width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 10px; background: none; color: #9fb0d0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sb-col:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-col svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ap-sb, .pr-page:has(> .ap-sb) { transition: width .2s ease, padding-left .2s ease; }
@media (max-width: 899px) { .sb-col { display: none; } }
@media (min-width: 900px) {
  body.sb-c .ap-sb { width: 76px; padding: 18px 10px 14px; overflow-x: hidden; }
  body.sb-c .pr-page:has(> .ap-sb) { padding-left: 76px; }
  body.sb-c .sb-brand { flex-direction: column; gap: 12px; padding: 4px 0 14px; }
  body.sb-c .sb-col { margin: 0; }
  body.sb-c .sb-bt, body.sb-c .sb-item span, body.sb-c .sb-item em, body.sb-c .sb-up span, body.sb-c .sb-who, body.sb-c .sb-mini { display: none; }
  body.sb-c .sb-lab { height: 1px; margin: 12px 8px; font-size: 0; background: rgba(255,255,255,.1); }
  body.sb-c .sb-item, body.sb-c .sb-up { justify-content: center; padding: 0; }
  body.sb-c .sb-up { height: 44px; }
  body.sb-c .sb-me { flex-direction: column; padding: 6px 0; }
  body.sb-c .sb-acc { justify-content: center; flex: none; }
}
/* hero */
.hx { position: relative; overflow: hidden; min-height: 420px; border-radius: 28px; padding: 34px 36px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(70% 90% at 50% 10%, #eaf3fc 0%, rgba(234,243,252,0) 70%), linear-gradient(180deg, #c9dcef 0%, #a9c3df 100%); color: #0E1B3D; box-shadow: 0 20px 50px -30px rgba(14,27,61,.45); }
.hx-word { position: absolute; left: 0; right: 0; top: 26px; text-align: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: clamp(64px, 12vw, 168px); line-height: 1; letter-spacing: .02em; color: rgba(255,255,255,.62); white-space: nowrap; pointer-events: none; }
.hx-img { position: absolute; left: 22%; right: 16%; top: 0; bottom: 0; background: url(img/newton.webp) 64% 35% / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 52% 62% at 58% 46%, #000 50%, transparent 100%); mask-image: radial-gradient(ellipse 52% 62% at 58% 46%, #000 50%, transparent 100%); }
.hx-txt { position: relative; z-index: 2; max-width: 380px; }
.hx-txt small { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: #3b5379; }
.hx-txt h1 { margin: 8px 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 34px; line-height: 1.08; font-weight: 700; color: #0E1B3D; }
.hx-txt h1 em { color: #c98207; }
.hx-txt p { margin: 0; font-size: 14.5px; color: #2c4266; }
.hx-btns { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hx-b1 { display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 6px 0 20px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: 700 14.5px var(--sans);
  background: linear-gradient(135deg, #2f6bff, #1d3fb3); box-shadow: 0 10px 24px -10px rgba(35,72,196,.8); }
.hx-b1 span { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.hx-b1 svg { width: 18px; height: 18px; fill: none; stroke: #1d3fb3; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hx-b2 { height: 46px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255,255,255,.85); color: #0E1B3D; font: 700 14.5px var(--sans); }
.hx-cards { position: absolute; z-index: 2; right: 28px; bottom: 28px; display: flex; gap: 12px; }
.hx-g { width: 150px; min-height: 132px; box-sizing: border-box; padding: 14px 16px; border-radius: 20px; text-align: left; display: flex; flex-direction: column; font: inherit; color: #0E1B3D;
  background: rgba(255,255,255,.34); border: 1px solid rgba(255,255,255,.65); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 12px 30px -18px rgba(14,27,61,.5); }
.hx-g small { font-size: 11.5px; font-weight: 700; color: #3b5379; }
.hx-g b { margin-top: auto; font-family: 'Space Grotesk', var(--sans); font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.hx-g b i { font-style: normal; font-size: 22px; }
.hx-g span { margin-top: 4px; font-size: 12px; color: #3b5379; }
.hx-gt { cursor: pointer; background: #fff; border-color: #fff; transform: translateY(-14px); }
.hx-gt b { color: #1d3fb3; }
html.dark .hx { background: radial-gradient(70% 90% at 50% 10%, #22407c 0%, rgba(34,64,124,0) 70%), linear-gradient(180deg, #13244f 0%, #171b22 100%); color: #fff; }
html.dark .hx-word { color: rgba(255,255,255,.08); }
html.dark .hx-txt small, html.dark .hx-txt p, html.dark .hx-g small, html.dark .hx-g span { color: #b3c2df; }
html.dark .hx-txt h1, html.dark .hx-g { color: #fff; }
html.dark .hx-txt h1 em { color: var(--ap-gold); }
html.dark .hx-g { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
html.dark .hx-gt { background: #f1f5fd; } html.dark .hx-gt small, html.dark .hx-gt span { color: #3b5379; }
html.dark .hx-b2 { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 899px) {
  .hx { min-height: 0; padding: 0 0 18px; border-radius: 22px; }
  .hx-word { top: 14px; font-size: 64px; }
  .hx-img { position: relative; left: 0; right: 0; height: 240px; background-position: 66% 30%;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); }
  .hx-txt { padding: 0 20px; max-width: none; margin-top: -30px; }
  .hx-txt h1 { font-size: 28px; }
  .hx-cards { position: relative; right: auto; bottom: auto; padding: 16px 20px 0; gap: 8px; }
  .hx-g { flex: 1; width: auto; min-height: 104px; padding: 12px; border-radius: 16px; }
  .hx-g b { font-size: 28px; } .hx-g b i { font-size: 16px; }
  .hx-gt { transform: none; }
}
/* square boxes */
.dq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.dq-c { display: flex; flex-direction: column; min-height: 210px; padding: 18px !important; box-sizing: border-box; position: relative; }
.dq-h { display: flex; align-items: center; gap: 10px; }
.dq-h b { font-size: 14px; color: var(--ap-ink); }
.dq-h .dc-link { margin-left: auto; }
.dq-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #eef3ff; color: #3b5bdb; }
.dq-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.dark .dq-ic { background: rgba(91,140,255,.14); color: #8fb0ff; }
.dq-n { margin-top: auto; font-family: 'Space Grotesk', var(--sans); font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--ap-ink); }
.dq-s { margin-top: 6px; font-size: 12.5px; color: var(--ap-mut); }
.dq-a { margin-top: 8px; align-self: flex-start; border: 0; background: none; padding: 0; color: #3b5bdb; font: 700 13px var(--sans); cursor: pointer; }
html.dark .dq-a { color: #8fb0ff; }
.dq-ring { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.dq-ring svg { width: 70px; height: 70px; }
.dq-ring b { font-family: 'Space Grotesk', var(--sans); font-size: 34px; color: var(--ap-ink); } .dq-ring small { display: block; font-size: 12.5px; color: var(--ap-mut); }
.dq .cd .cd-pick { margin: 12px 0 0; justify-content: flex-start; }
.dq .cd .cd-btn { height: 32px; padding: 0 10px; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.dq .cd-row { margin-top: auto; display: block; }
.cd-big b { font-family: 'Space Grotesk', var(--sans); font-size: 52px; line-height: 1; font-weight: 700; color: var(--ap-ink); }
.cd-big span { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--ap-mut); }
.cd-small { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.cd-small div { display: flex; align-items: baseline; gap: 3px; } .cd-small b { font-family: 'Space Grotesk', var(--sans); font-size: 18px; color: var(--ap-ink); }
.cd-small span { font-size: 11px; color: var(--ap-mut); } .cd-small i { font-style: normal; color: #b8c0cc; }
.dq .cd-note { margin: 6px 0 0; text-align: left; font-size: 12px; }
@media (max-width: 1099px) { .dq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .dq { gap: 10px; } .dq-c { min-height: 170px; padding: 14px !important; } .dq-n, .cd-big b { font-size: 40px; } .dq-ring svg { width: 56px; height: 56px; } }
/* glass score card (same look in light and dark) */
.gl { position: relative; margin-top: 16px; padding: 26px 26px 22px; border-radius: 26px; color: #fff; overflow: hidden;
  background: radial-gradient(70% 70% at 85% 0%, rgba(84,170,255,.30) 0%, transparent 60%), radial-gradient(60% 60% at 0% 100%, rgba(245,165,36,.10) 0%, transparent 60%), linear-gradient(160deg, #1a3266 0%, #0d1a3a 65%, #0a1430 100%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 24px 50px -30px rgba(10,20,48,.8); }
.gl-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.gl-l { display: block; font-size: 14px; font-weight: 600; color: #c7d4ee; }
.gl-n { display: block; margin-top: 4px; font-family: 'Space Grotesk', var(--sans); font-size: 52px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
.gl-d { display: inline-block; margin-top: 6px; font-size: 15px; font-weight: 700; color: #cfd8ea; } .gl-d.up { color: #5ee6a8; } .gl-d.dn { color: #ff8a8a; }
.gl-u { display: block; font-size: 13px; color: #9fb0d0; margin-top: 2px; }
.gl-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.gl-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.07);
  color: #e8eefb; font: 600 13.5px var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gl-pill:hover { background: rgba(255,255,255,.13); }
.gl-pill b { color: var(--ap-gold); font-size: 15px; }
.gl-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl-sel select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: inherit; padding-right: 4px; cursor: pointer; outline: none; }
.gl-sel select option { color: #0E1B3D; }
.gl-sel svg { pointer-events: none; }
.gl-svg { display: block; width: 100%; height: auto; overflow: visible; margin-top: 10px; }
.gl-vg { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.gl-line { fill: none; stroke: #e9f6ff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gl-dot { fill: #e9f6ff; } .gl-dot.last { fill: #fff; stroke: rgba(159,212,255,.5); stroke-width: 6; } .gl-dot.on { r: 7; }
.gl-drop { stroke: rgba(255,255,255,.35); stroke-width: 1.2; }
.gl-tl { stroke: var(--ap-gold); stroke-width: 1.6; stroke-dasharray: 6 6; opacity: .9; }
.gl-tlab { font-size: 12px; font-weight: 700; fill: var(--ap-gold); }
.gl-tick { font-size: 12.5px; fill: #93a3c4; }
.gl-empty { font-size: 15px; fill: #9fb0d0; }
.gl .sp-tip { background: #fff; color: #0E1B3D; } .gl .sp-tip b { color: #1d3fb3; }
.gl-ts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.gl-t { padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gl-t svg { display: block; width: 30px; height: 30px; fill: none; stroke: #8fd0ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gl-t small { display: block; margin-top: 12px; font-size: 13px; color: #b9c6e0; }
.gl-t b { display: block; margin-top: 2px; font-family: 'Space Grotesk', var(--sans); font-size: 24px; font-weight: 700; }
.gl-note { margin: 12px 2px 0; font-size: 12.5px; color: #9fb0d0; }
.pr-in > .gl { margin: 0 0 16px; }
@media (max-width: 640px) { .gl { padding: 20px 16px 16px; border-radius: 22px; } .gl-n { font-size: 42px; } .gl-ts { gap: 8px; } .gl-t { padding: 12px; border-radius: 14px; } .gl-t svg { width: 24px; height: 24px; } .gl-t b { font-size: 18px; } .gl-t small { font-size: 12px; margin-top: 8px; } .gl-pill { height: 38px; padding: 0 12px; } }
/* pricing */
.pz { position: relative; overflow: hidden; margin-top: 8px; padding: 30px 28px 34px; border-radius: 28px; background: radial-gradient(60% 50% at 50% 0%, #1a1f2e 0%, #05070d 70%); color: #fff; }
.pz-word { position: absolute; left: 0; right: 0; top: 18px; text-align: center; font-family: 'Space Grotesk', var(--sans); font-weight: 700; font-size: clamp(72px, 13vw, 170px); line-height: 1; letter-spacing: -.04em; color: #fff; pointer-events: none; }
.pz-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; margin: clamp(70px, 10vw, 128px) auto 0; }
.pc { display: flex; flex-direction: column; padding: 24px; border-radius: 22px; background: rgba(18,20,28,.38); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 60px -30px #000; }
.pc-k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #b6bdcc; }
.pc-k em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0E1B3D; background: var(--ap-gold); padding: 3px 8px; border-radius: 999px; }
.pc-p { margin-top: 10px; font-family: 'Space Grotesk', var(--sans); font-size: 42px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.pc-p small { font-size: 18px; color: #b6bdcc; }
.pc-s { margin-top: 6px; font-size: 13px; color: #8c94a6; }
.pc hr { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.09); margin: 20px 0 16px; }
.pc ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.pc li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #d4d9e3; }
.pc-ck { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: #262a35; display: inline-flex; align-items: center; justify-content: center; }
.pc-ck svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pc-hot .pc-ck { background: rgba(245,165,36,.22); } .pc-hot .pc-ck svg { stroke: var(--ap-gold); }
.pc-b { margin-top: auto; height: 46px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: #000; color: #fff; font: 700 14px var(--sans); cursor: pointer; }
.pc-b:disabled { cursor: default; color: #9aa1b0; }
.pc-w { background: #fff; color: #05070d; border-color: #fff; box-shadow: 0 10px 30px -10px rgba(255,255,255,.45); }
.pc-w:not(:disabled):hover { background: #f4f6fb; }
.pc-w:disabled { color: #05070d; opacity: .85; }
.pc-n { margin-top: 10px; font-size: 12px; color: #8c94a6; text-align: center; }
@media (max-width: 720px) { .pz { padding: 22px 14px 18px; border-radius: 22px; } .pz-grid { grid-template-columns: 1fr; } }

/* hero: misty blue that suits the Newton painting, in both themes */
.hx, html.dark .hx { color: #fff;
  background: radial-gradient(60% 80% at 55% 0%, rgba(190,215,245,.55) 0%, rgba(190,215,245,0) 70%), linear-gradient(180deg, #5d7fae 0%, #2c4a80 55%, #13244f 100%); }
html.dark .hx { background: radial-gradient(60% 80% at 55% 0%, rgba(120,160,220,.35) 0%, rgba(120,160,220,0) 70%), linear-gradient(180deg, #2a4675 0%, #16295c 55%, #171b22 100%); }
.hx-word, html.dark .hx-word { color: rgba(255,255,255,.22); }
.hx-img { left: 26%; right: 14%; background-position: 62% 30%;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side at 50% 50%, #000 55%, transparent 100%); }
.hx-txt small, .hx-txt p { color: #d6e2f5; }
.hx-txt h1 { color: #fff; } .hx-txt h1 em { color: var(--ap-gold); }
.hx-txt { text-shadow: 0 2px 18px rgba(10,20,48,.45); }
.hx-g, html.dark .hx-g { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); }
.hx-g small, .hx-g span { color: #dbe5f5; }
.hx-gt, html.dark .hx-gt { background: #fff; border-color: #fff; color: #0E1B3D; }
.hx-gt small, .hx-gt span, html.dark .hx-gt small, html.dark .hx-gt span { color: #4a5f82; }
.hx-b2, html.dark .hx-b2 { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
@media (max-width: 899px) { .hx-img { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); } }
.dq .cd .cd-pick { display: flex; justify-content: flex-start; text-align: left; }
.dq .cd-row { text-align: left; }
.dq + .gl { margin-top: 18px; }
@media (max-width: 899px) { .hx-img { background-position: 80% 28%; } }
/* ===== Nov 18 (2): cleaner hero, pricing header, dark-mode buttons ===== */
.hx, html.dark .hx { min-height: 330px; padding: 36px 40px; justify-content: space-between; gap: 26px;
  background: linear-gradient(105deg, #0e1b3d 0%, #132a5e 46%, #1b3b7a 100%); }
.hx-word { display: none; }
.hx-img { left: auto; right: 0; top: 0; bottom: 0; width: 56%; background-position: 70% 32%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
.hx-txt { text-shadow: none; max-width: 460px; }
.hx-txt h1 { font-size: 40px; }
.hx-cards { position: relative; right: auto; bottom: auto; gap: 12px; }
.hx-g { width: 156px; min-height: 118px; }
.hx-gt { transform: none; }
@media (max-width: 899px) {
  .hx, html.dark .hx { padding: 0 0 18px; gap: 0; }
  .hx-img { position: relative; width: auto; height: 220px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
  .hx-txt { margin-top: -26px; } .hx-txt h1 { font-size: 30px; }
  .hx-cards { padding: 16px 20px 0; }
  .hx-g { width: auto; }
}
/* pricing header */
.pz-word { display: none; }
.pz-head { position: relative; text-align: center; max-width: 620px; margin: 10px auto 0; }
.pz-eye { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c9cfdb; }
.pz-title { margin: 18px 0 10px; font-family: 'Space Grotesk', var(--sans); font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; color: #fff; }
.pz-title em { display: block; font-style: normal; background: linear-gradient(90deg, #ffd27a, #F5A524); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pz-lead { margin: 0 auto; max-width: 480px; font-size: 15px; line-height: 1.5; color: #9aa2b3; }
.pz-grid { margin-top: 38px; }
.pz::before { content: ''; position: absolute; left: 50%; top: -120px; width: 620px; height: 320px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(245,165,36,.16), transparent); pointer-events: none; }
html.dark .pc-b { background: #000; color: #fff; border: 1px solid rgba(255,255,255,.14); }
html.dark .pc-b:disabled { color: #9aa1b0; }
html.dark .pc-w { background: #fff; color: #05070d; border-color: #fff; }
html.dark .pc-w:disabled { color: #05070d; }
html.dark .pz-eye { border: 1px solid rgba(255,255,255,.14); }
/* ===== compact score card + strikethrough price ===== */
.gl { padding: 18px 22px 16px; border-radius: 22px; }
.gl-n { font-size: 38px; margin-top: 2px; }
.gl-h > div:first-child { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 12px; }
.gl-h > div:first-child .gl-l { grid-column: 1 / -1; }
.gl-d { margin: 0 0 6px; } .gl-u { margin: 0 0 7px; }
.gl-h > div:first-child .gl-u { grid-column: 2; }
.gl-h > div:first-child .gl-d + .gl-u { grid-column: 1 / -1; margin-top: -4px; }
.gl-pill { height: 36px; padding: 0 13px; font-size: 13px; }
.gl-svg { margin-top: 4px; }
.gl-ts { gap: 10px; margin-top: 10px; }
.gl-t { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; }
.gl-t svg { width: 22px; height: 22px; flex: 0 0 22px; }
.gl-t small { margin: 0; font-size: 12px; } .gl-t b { margin: 0 0 0 auto; font-size: 18px; }
.gl-note { margin-top: 8px; font-size: 12px; }
@media (max-width: 640px) { .gl-n { font-size: 34px; } .gl-t { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; } .gl-t b { margin: 0; font-size: 16px; } }
.pc-old { margin-top: 10px; font-size: 15px; font-weight: 600; color: #7d8496; text-decoration: line-through; text-decoration-color: #ff6b6b; text-decoration-thickness: 2px; }
.pc-old + .pc-p { margin-top: 2px; }
.old-p { color: #8a93a3; font-weight: 600; text-decoration-color: #e5484d; text-decoration-thickness: 2px; }
.new-p { color: inherit; font-weight: 800; }
/* ===== softer, easier-on-the-eyes colours + compact test cards ===== */
.pr-btn, .btn:not(.ghost), .px-pb, .vg-btn, .px-act, .au-btn {
  background: #4263eb !important; box-shadow: 0 6px 14px -10px rgba(66,99,235,.7) !important; }
.pr-btn:hover, .btn:not(.ghost):hover, .px-pb:hover, .vg-btn:hover, .px-act:hover, .au-btn:hover { background: #3b5bdb !important; filter: none; box-shadow: 0 8px 16px -10px rgba(66,99,235,.8) !important; }
html.dark .pr-btn, html.dark .btn:not(.ghost), html.dark .px-pb, html.dark .vg-btn, html.dark .px-act, html.dark .au-btn { background: #4c63c9 !important; box-shadow: none !important; }
html.dark .pr-btn:hover, html.dark .btn:not(.ghost):hover, html.dark .px-pb:hover, html.dark .vg-btn:hover, html.dark .au-btn:hover { background: #5670d6 !important; }
html.dark body, html.dark .pr-page { background: #171b22; }
html.dark .pr-card, html.dark .dc { background: #1f242d; border-color: #2e3440; }
html.dark .pr-link { color: #8ea2f0; }
.ap-sb { background: linear-gradient(180deg, #1c2538 0%, #18202f 100%); }
html.dark .ap-sb { background: #1b1f27; border-right: 1px solid #2a303b; }
.pl-card { background: linear-gradient(120deg, #2a3a63 0%, #34508f 100%) !important; }
html.dark .pl-card { background: #232a38 !important; border: 1px solid #313948; }
.gl { background: radial-gradient(70% 70% at 85% 0%, rgba(120,170,240,.18) 0%, transparent 60%), linear-gradient(160deg, #26365c 0%, #1f2b48 100%); }
html.dark .gl { background: linear-gradient(160deg, #252c3a 0%, #1e232d 100%); border-color: #313846; }
.hx, html.dark .hx { background: linear-gradient(105deg, #1e2a46 0%, #26365c 50%, #2e4374 100%); }
html.dark .hx { background: linear-gradient(105deg, #1d222c 0%, #232b3a 55%, #2a3550 100%); }
/* compact mock test cards */
.pr-grid { gap: 12px; }
@media (min-width: 1280px) { .pr-page:has(> .ap-sb) .pr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pr-card { padding: 14px 16px; border-radius: 14px; }
.pr-head { gap: 8px; }
.pr-head svg { width: 18px; height: 18px; }
.pr-head h3 { font-size: 16px; }
.pr-meta { margin-top: 6px; gap: 6px; font-size: 13px; }
.pr-tag, .pr-free { font-size: 11px; padding: 2px 8px; }
.pr-btn { margin-top: 12px; height: 36px; border-radius: 9px; font-size: 14.5px; }
.pr-link { margin-top: 4px; padding: 2px 6px; font-size: 13px; }
.pr-btnlock svg { width: 15px; height: 15px; }
.pl-card { padding: 12px 18px !important; border-radius: 14px !important; }
html.dark .gl-pill { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #e8eefb; }
html.dark .cd-btn { border: 1px solid #353c48; background: #262c37; color: #dfe4ee; }
html.dark .hx-gt { color: #1e2a46; }
.pr-meta { margin-bottom: 12px; }
.pr-card > .pr-btn { margin-top: auto; }
/* ===== Nov 18: polished category cards, 3D icons, bigger section tabs ===== */
.emo { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.vc-cats { gap: 14px; }
.vc-cat { overflow: hidden; align-items: center; gap: 18px; padding: 20px 20px 18px; border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ac2) 14%, transparent) 0%, transparent 55%), #fff;
  border-color: color-mix(in srgb, var(--ac) 14%, #e5e7eb); }
.vc-cat:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -22px color-mix(in srgb, var(--acdeep) 70%, transparent); border-color: color-mix(in srgb, var(--ac) 35%, #e5e7eb); }
.vc-cat:active { transform: translateY(0) scale(.995); }
.vc-ico, .vc-ico.px-emo { flex: 0 0 64px; width: 64px; height: 64px; padding: 9px; box-sizing: border-box; border-radius: 18px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--ac2) 22%, #fff) 0%, color-mix(in srgb, var(--ac) 12%, #fff) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 18px -12px color-mix(in srgb, var(--acdeep) 80%, transparent); align-self: flex-start; }
.vc-cath b { font-size: 18.5px; letter-spacing: -.01em; }
.vc-catp { margin: 3px 0 10px; font-size: 14px; color: #5b6573; }
.vc-catm { display: flex; flex-wrap: wrap; gap: 6px; }
.vc-catm i { font-style: normal; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ac) 10%, transparent); color: var(--acfg); font-size: 12.5px; font-weight: 700; }
.vc-bar { height: 6px; margin: 14px 0 8px; border-radius: 3px; }
.vc-bar i { background: linear-gradient(90deg, var(--ac2), var(--ac)); }
.vc-catf { font-size: 12.5px; }
.vc-chev { align-self: flex-start; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ac) 8%, transparent); color: var(--acfg); }
.vc-chev svg { width: 17px; height: 17px; }
.vc-cat:hover .vc-chev { background: var(--ac); color: #fff; transform: none; }
html.dark .vc-cat { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ac2) 13%, transparent) 0%, transparent 55%), #1f242d;
  border-color: color-mix(in srgb, var(--ac2) 18%, #2e3440); }
html.dark .vc-ico, html.dark .vc-ico.px-emo { background: linear-gradient(145deg, color-mix(in srgb, var(--ac2) 26%, #262c37) 0%, color-mix(in srgb, var(--ac) 18%, #1f242d) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
html.dark .vc-catp { color: #a3acba; }
html.dark .vc-catm i { background: color-mix(in srgb, var(--ac2) 16%, transparent); }
html.dark .vc-chev { background: rgba(255,255,255,.06); }
@media (max-width: 799px) { .vc-ico, .vc-ico.px-emo { flex-basis: 54px; width: 54px; height: 54px; padding: 8px; border-radius: 15px; } .vc-chev { display: none; } }
/* stat tiles with 3D icons */
.vc-sico { padding: 7px; box-sizing: border-box; flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; }
html.dark .s-k .vc-sico, html.dark .s-m .vc-sico, html.dark .s-s .vc-sico { background: rgba(255,255,255,.06); }
.ms-ico { padding: 7px; box-sizing: border-box; flex-basis: 44px; width: 44px; height: 44px; }
/* section tabs (Reading / Writing, Math areas): a little larger, with icon and topic count */
.px-tab { min-height: 66px; gap: 12px; padding: 12px 16px 12px 18px; border-radius: 16px; }
.px-temo { flex: 0 0 38px; width: 38px; height: 38px; }
.px-tt { display: flex; flex-direction: column; min-width: 0; }
.px-tt b { font-size: 16.5px; }
.px-tt small { font-size: 12.5px; font-weight: 600; opacity: .7; margin-top: 1px; }
.px-tab.on .px-tt small { opacity: .85; }
@media (max-width: 639px) { .px-tab { min-height: 58px; padding: 10px 12px 10px 14px; gap: 10px; } .px-temo { flex-basis: 30px; width: 30px; height: 30px; } .px-tt b { font-size: 15px; } }
.lg-logo .emo { width: 56px; height: 56px; margin: auto; }
/* ===== admin panel ===== */
.ad-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.ad-k { padding: 16px 18px !important; display: flex; flex-direction: column; gap: 2px; min-height: 96px; box-sizing: border-box; }
.ad-k span { font-size: 12.5px; font-weight: 700; color: var(--ap-mut); text-transform: uppercase; letter-spacing: .06em; }
.ad-k b { font-family: 'Space Grotesk', var(--sans); font-size: 32px; line-height: 1.1; color: var(--ap-ink); }
.ad-k small { font-size: 12.5px; color: var(--ap-mut); }
.ad-sk { background: linear-gradient(90deg, transparent, rgba(127,127,127,.08), transparent) !important; }
.ad-chart { margin-top: 12px; padding: 16px 18px !important; }
.ad-ch { display: flex; align-items: baseline; gap: 8px; } .ad-ch b { font-size: 15px; color: var(--ap-ink); } .ad-ch span { font-size: 12.5px; color: var(--ap-mut); }
.ad-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; margin-top: 12px; }
.ad-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.ad-bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #5c7cfa, #4263eb); }
.ad-bar em { position: absolute; top: -2px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ap-mut); }
.ad-bar small { margin-top: 4px; font-size: 11px; color: var(--ap-mut); }
.ad-list { margin-top: 12px; padding: 14px 0 10px !important; }
.ad-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 16px 12px; }
.ad-tools input { flex: 1 1 260px; min-width: 0; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); font: inherit; font-size: 14px; }
.ad-tools select { height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ap-line); background: var(--ap-card); color: var(--ap-ink); font: inherit; font-size: 13.5px; }
.ad-chips { display: flex; gap: 6px; }
.ad-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ap-line) !important; background: transparent; color: var(--ap-ink); font: 600 13px var(--sans); cursor: pointer; }
.ad-chip.on { background: #4263eb !important; border-color: #4263eb !important; color: #fff !important; }
.ad-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr 1fr 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--ap-line); background: none; color: var(--ap-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
button.ad-row:hover { background: rgba(66,99,235,.06); }
.ad-head { cursor: default; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-mut); border-top: 0; padding-top: 4px; }
.ad-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-who > i, .ad-dh > i { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; color: #0E1B3D; background: var(--ap-gold); }
.ad-who > span { min-width: 0; display: flex; flex-direction: column; }
.ad-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ad-who small { color: var(--ap-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-plan { display: inline-block; padding: 3px 10px; border-radius: 999px; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(127,127,127,.12); color: var(--ap-mut); }
.ad-plan.on { background: rgba(245,165,36,.18); color: #b7791f; }
.ad-tag { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #4263eb; color: #fff; margin-left: 4px; vertical-align: 1px; }
.ad-empty, .ad-count { padding: 18px 16px; margin: 0; text-align: center; color: var(--ap-mut); font-size: 13.5px; }
#admore { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 6px; } #admore .ad-count { padding: 10px 0 0; }
.ad-dlg { max-width: 560px; width: calc(100% - 32px); text-align: left; }
.ad-dh { display: flex; align-items: center; gap: 12px; } .ad-dh > i { flex-basis: 46px; width: 46px; height: 46px; font-size: 18px; }
.ad-dh h3 { margin: 0 0 4px; } .ad-dh > div { flex: 1; min-width: 0; }
.ad-x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(127,127,127,.12); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.ad-fs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 16px 0; }
.ad-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ad-f span { font-size: 12px; color: var(--ap-mut); } .ad-f b { font-size: 14px; word-break: break-word; }
.ad-acts { display: flex; flex-wrap: wrap; gap: 8px; } .ad-acts .btn { flex: 1 1 auto; height: 40px; font-size: 13.5px; padding: 0 14px; }
.ad-del { color: #e03131 !important; border-color: rgba(224,49,49,.4) !important; }
.ad-danger { background: #e03131 !important; }
.ad-cf { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(224,49,49,.06); border: 1px solid rgba(224,49,49,.25); font-size: 13.5px; }
.ad-cf p { margin: 0 0 10px; }
.ad-ck { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ad-ty { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; } .ad-ty input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ap-line); background: transparent; color: inherit; font: inherit; }
.ad-msg { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--ap-mut); }
html.dark .ad-plan.on { color: var(--ap-gold); }
@media (max-width: 899px) {
  .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-row { grid-template-columns: minmax(0, 1fr) auto; } .ad-row > span:nth-child(3), .ad-row > span:nth-child(4) { display: none; }
  .ad-fs { grid-template-columns: 1fr; }
  .ad-bars { gap: 3px; height: 96px; }
}
.ad-bar em { position: static; margin-bottom: 3px; min-height: 13px; }
.btn.ad-danger, html.dark .btn.ad-danger { background: #e03131 !important; box-shadow: none !important; }

/* ===================== Question Bank ===================== */
.qb-head .pr-sub { max-width: 720px; }
.qb-subjs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.qb-subj { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 360px; padding: 26px; text-align: left; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ac) 16%, #e5e7eb); border-radius: 24px;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--ac2) 16%, transparent) 0%, transparent 58%), #fff;
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.qb-subj:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ac) 38%, #e5e7eb); box-shadow: 0 22px 44px -26px color-mix(in srgb, var(--acdeep) 75%, transparent); }
.qb-subj:active { transform: translateY(0) scale(.996); }
.qb-sico { display: block; width: 68px; height: 68px; padding: 10px; box-sizing: border-box; border-radius: 20px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--ac2) 22%, #fff) 0%, color-mix(in srgb, var(--ac) 12%, #fff) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 22px -14px color-mix(in srgb, var(--acdeep) 80%, transparent); }
.qb-sico.sm { flex: 0 0 56px; width: 56px; height: 56px; padding: 8px; border-radius: 16px; }
.qb-skind { margin: 22px 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--acfg); }
.qb-sname { font-size: 27px; font-weight: 750; letter-spacing: -.02em; color: #0b0b0b; line-height: 1.15; }
.qb-snum { margin-top: 6px; font-size: 14.5px; color: #5b6573; }
.qb-snum b { color: #111827; font-weight: 750; }
.qb-sdoms { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.qb-sdoms i { font-style: normal; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ac) 9%, transparent); color: var(--acfg); font-size: 12.5px; font-weight: 700; }
.qb-sdiff { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: #5b6573; }
.qb-sdiff span { display: inline-flex; align-items: center; gap: 6px; }
.qb-sdiff em, .qb-diff .qb-dbars i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.qb-sdiff em.d1 { background: #22a06b; } .qb-sdiff em.d2 { background: #f59e0b; } .qb-sdiff em.d3 { background: #e5484d; }
.qb-sfoot { display: block; width: 100%; margin-top: auto; padding-top: 22px; }
.qb-sbar { display: block; height: 6px; border-radius: 3px; overflow: hidden; background: #eef0f3; }
.qb-sbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--ac2), var(--ac)); }
.qb-sst { display: block; margin-top: 8px; font-size: 13px; color: #6b7280; }
.qb-sgo { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; height: 42px; padding: 0 16px; border-radius: 12px; background: var(--ac); color: #fff; font-size: 14.5px; font-weight: 700; }
.qb-sgo svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .qb-subjs { grid-template-columns: 1fr; gap: 14px; } .qb-subj { min-height: 0; padding: 20px; } .qb-sname { font-size: 23px; } .qb-skind { margin-top: 16px; } }
html.dark .qb-subj { background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--ac2) 14%, transparent) 0%, transparent 58%), #1f242d; border-color: color-mix(in srgb, var(--ac2) 18%, #2e3440); }
html.dark .qb-sico { background: linear-gradient(145deg, color-mix(in srgb, var(--ac2) 26%, #262c37) 0%, color-mix(in srgb, var(--ac) 18%, #1f242d) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
html.dark .qb-sname, html.dark .qb-snum b { color: #eef1f6; }
html.dark .qb-snum, html.dark .qb-sdiff, html.dark .qb-sst { color: #a3acba; }
html.dark .qb-sbar { background: #2a303b; }
html.dark .qb-sdoms i { background: color-mix(in srgb, var(--ac2) 16%, transparent); }

/* one subject: choose skills and difficulty */
.qb-shead { display: flex; align-items: center; gap: 16px; margin: 22px 0 22px; }
.qb-shead h1 { margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -.02em; color: #0b0b0b; }
.qb-shead p { margin: 4px 0 0; font-size: 15px; color: #5b6573; }
.qb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.qb-lh { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.qb-lh b { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.qb-lnk { font-size: 13.5px; font-weight: 700; color: var(--acfg); padding: 4px 6px; border-radius: 8px; }
.qb-lnk:hover { background: color-mix(in srgb, var(--ac) 9%, transparent); }
.qb-dom { margin-bottom: 10px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; overflow: hidden; }
.qb-drow { display: flex; align-items: center; padding-left: 16px; }
.qb-dname { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 15px 14px 15px 12px; text-align: left; }
.qb-dname b { grid-column: 1; font-size: 16px; font-weight: 700; color: #111827; }
.qb-dname small { grid-column: 1; grid-row: 2; font-size: 12.5px; color: #6b7280; margin-top: 2px; }
.qb-dn { grid-column: 2; grid-row: 1 / 3; font-size: 13px; font-weight: 700; color: #6b7280; }
.qb-chev { grid-column: 3; grid-row: 1 / 3; display: inline-flex; color: #9aa3b2; transition: transform .2s; }
.qb-chev svg { width: 18px; height: 18px; }
.qb-dom.open .qb-chev { transform: rotate(180deg); }
.qb-skills { display: none; border-top: 1px solid #eef0f3; padding: 6px 8px 8px; }
.qb-dom.open .qb-skills { display: block; }
.qb-skill { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px 11px 8px; border-radius: 12px; text-align: left; }
.qb-skill:hover { background: #f6f7fa; }
.qb-skill.on { background: color-mix(in srgb, var(--ac) 7%, transparent); }
.qb-kname { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: #1f2937; }
.qb-kname small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: #8a93a3; }
.qb-kbar { flex: 0 0 64px; height: 5px; border-radius: 3px; overflow: hidden; background: #eef0f3; }
.qb-kbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ac2), var(--ac)); }
.qb-kn { flex: 0 0 40px; text-align: right; font-size: 13px; font-weight: 700; color: #6b7280; }
.qb-ck { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9cfda; background: #fff; position: relative; transition: background .12s, border-color .12s; }
.qb-ck.on, .qb-ck.part { border-color: var(--ac); background: var(--ac); }
.qb-ck.on::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.qb-ck.part::after { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; height: 2.4px; border-radius: 2px; background: #fff; }
.qb-side { position: sticky; top: 18px; }
.qb-card { padding: 20px; border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px -26px rgba(16,24,40,.35); }
.qb-lab { margin: 18px 0 9px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.qb-lab:first-child { margin-top: 0; }
.qb-diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qb-diff { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px 10px; border: 1.5px solid #e2e6ed; border-radius: 14px; background: #fff; }
.qb-diff b { font-size: 14px; font-weight: 700; color: #1f2937; }
.qb-diff small { font-size: 12px; color: #8a93a3; }
.qb-dbars { display: inline-flex; gap: 3px; }
.qb-diff .qb-dbars i { width: 12px; height: 5px; border-radius: 3px; background: #e2e6ed; }
.qb-diff.d1 .qb-dbars i:nth-child(1), .qb-diff.d2 .qb-dbars i:nth-child(-n+2), .qb-diff.d3 .qb-dbars i { background: #b8c0cc; }
.qb-diff.on { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 7%, #fff); }
.qb-diff.on.d1 .qb-dbars i:nth-child(1) { background: #22a06b; }
.qb-diff.on.d2 .qb-dbars i:nth-child(-n+2) { background: #f59e0b; }
.qb-diff.on.d3 .qb-dbars i { background: #e5484d; }
.qb-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1f3f7; }
.qb-seg button { flex: 1; min-height: 36px; padding: 0 6px; border-radius: 9px; font-size: 13px; font-weight: 650; color: #4b5563; line-height: 1.2; }
.qb-seg button.on { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.qb-sum { margin: 18px 0 10px; font-size: 14px; color: #5b6573; text-align: center; }
.qb-sum b { color: #111827; }
.qb-start { height: 50px; font-size: 16px; }
.qb-start[disabled] { opacity: .5; }
.c-math .btn.amber.qb-start, .c-sat .btn.amber.qb-start { background: var(--ac); border-color: var(--ac); color: #fff; }
@media (max-width: 900px) {
  .qb-grid { grid-template-columns: 1fr; gap: 16px; }
  .qb-side { position: static; order: -1; }
  .qb-card { padding: 16px; }
  .qb-card .qb-sum, .qb-card .qb-start { display: none; }
  .qb-shead h1 { font-size: 25px; }
  .qb-shead { margin: 16px 0; }
  .qb-page .foot { padding-bottom: 90px; }
}
.qb-mbar { display: none; }
@media (max-width: 900px) {
  .qb-mbar { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + var(--safe-b, 0px));
    background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid #e5e7eb; }
  .qb-mbar span { flex: 1; font-size: 14px; color: #5b6573; }
  .qb-mbar span b { color: #111827; }
  .qb-mbar .qb-start { width: auto; min-width: 150px; height: 46px; padding: 0 20px; }
  html.dark .qb-mbar { background: rgba(23,27,34,.94); border-top-color: #2a303b; }
  html.dark .qb-mbar span { color: #a3acba; } html.dark .qb-mbar span b { color: #eef1f6; }
}

html.dark .qb-shead h1, html.dark .qb-dname b, html.dark .qb-sum b, html.dark .qb-diff b { color: #eef1f6; }
html.dark .qb-shead p, html.dark .qb-sum { color: #a3acba; }
html.dark .qb-dom, html.dark .qb-card { background: #1f242d; border-color: #2e3440; }
html.dark .qb-skills { border-top-color: #2a303b; }
html.dark .qb-skill:hover { background: #252b35; }
html.dark .qb-skill.on { background: color-mix(in srgb, var(--ac2) 10%, transparent); }
html.dark .qb-kname { color: #dfe3e8; }
html.dark .qb-kbar { background: #2a303b; }
html.dark .qb-ck { background: transparent; border-color: #4a5260; }
html.dark .qb-ck.on, html.dark .qb-ck.part { background: var(--ac); border-color: var(--ac); }
html.dark .qb-diff { background: #1a1f27; border-color: #323844; }
html.dark .qb-diff.on { background: color-mix(in srgb, var(--ac2) 12%, #1a1f27); border-color: var(--ac2); }
html.dark .qb-diff .qb-dbars i { background: #343b47; }
html.dark .qb-seg { background: #171b22; }
html.dark .qb-seg button { color: #a3acba; }
html.dark .qb-seg button.on { background: #2a303b; color: #eef1f6; }
html.dark .c-math .btn.amber.qb-start { color: #1a1206; background: #f59e0b; border-color: #f59e0b; }

/* bank questions: inline math drawn with shared glyph shapes; figures are pictures */
svg.mx { display: inline-block; fill: currentColor; overflow: visible; }
.fg { margin: 10px 0 14px; text-align: center; }
.fg img { display: inline-block; max-width: 100%; height: auto; }
.mq-html p.mc, .passage-card p.mc, .stem p.mc, .ex-b p.mc { text-align: center; }
.choice .txt p { margin: 0; }
.choice .txt p + p { margin-top: 6px; }
.choice .txt .fg { margin: 4px 0; text-align: left; }
.choice .txt .fg img { max-width: min(100%, 360px); }
.ex-b .fg img { max-width: min(100%, 480px); }
html.dark .fg img { background: #fff; border-radius: 10px; padding: 6px; box-sizing: border-box; }
.qb-qtag { display: inline-flex; align-items: center; height: 26px; margin-left: 10px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: #f1f3f7; color: #4b5563; }
.qb-qtag.d1 { background: #e6f6ee; color: #137a4b; } .qb-qtag.d2 { background: #fff4dc; color: #8a5a00; } .qb-qtag.d3 { background: #fde8e8; color: #b42318; }
html.dark .qb-qtag { background: #2a303b; color: #c4cad4; }
html.dark .qb-qtag.d1 { background: rgba(34,160,107,.16); color: #5dd6a0; } html.dark .qb-qtag.d2 { background: rgba(245,158,11,.16); color: #fbbf24; } html.dark .qb-qtag.d3 { background: rgba(229,72,77,.16); color: #ff8b8f; }
@media (max-width: 600px) { .qb-qtag { font-size: 11.5px; height: 24px; padding: 0 8px; max-width: 58vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; line-height: 24px; } }
img.mi { display: inline-block; width: auto; mix-blend-mode: multiply; }
html.dark img.mi { filter: invert(1); mix-blend-mode: screen; }

/* ===================== Question Bank v2: glass ===================== */
.qx-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 26px 0 26px; }
.qx-kick { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #64708a; }
.qx-kick i { width: 7px; height: 7px; border-radius: 50%; background: #F5A524; box-shadow: 0 0 0 4px rgba(245,165,36,.18); }
.qx-hero h1 { margin: 12px 0 10px; font-size: 44px; line-height: 1.05; letter-spacing: -.035em; font-weight: 750; color: #0b1220; }
.qx-hero h1 em { font-style: normal; background: linear-gradient(90deg, #3b5bdb 0%, #7c5cff 45%, #d9822b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qx-hero p { margin: 0; max-width: 560px; font-size: 16px; line-height: 1.55; color: #5b6573; }
.qx-stats { display: flex; flex: 0 0 auto; padding: 6px; border-radius: 20px; background: rgba(255,255,255,.6); border: 1px solid rgba(15,23,42,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -28px rgba(15,23,42,.35); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.qx-stats div { min-width: 104px; padding: 12px 18px; border-radius: 15px; }
.qx-stats div + div { border-left: 1px solid rgba(15,23,42,.07); border-radius: 0 15px 15px 0; }
.qx-stats b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.02em; color: #0b1220; font-variant-numeric: tabular-nums; }
.qx-stats span { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #7a8497; }

.qx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.qx { --g1: #4c6fff; --g2: #8b5cf6; --g3: #22d3ee; --hl: #a9bbff;
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: stretch; min-height: 520px; padding: 26px; text-align: left; overflow: hidden;
  border-radius: 28px; color: #fff; background: #0b1024; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px -30px rgba(8,12,40,.65), 0 1px 0 rgba(255,255,255,.08) inset; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.qx-ma { --g1: #f59e0b; --g2: #ef6c3a; --g3: #fde68a; --hl: #ffd58a; background: #160f08; }
.qx:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -32px rgba(8,12,40,.75), 0 1px 0 rgba(255,255,255,.1) inset; }
.qx:active { transform: translateY(-1px) scale(.997); }
.qx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.qx-bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.qx-bg i:nth-child(1) { width: 380px; height: 380px; right: -120px; top: -140px; background: var(--g1); }
.qx-bg i:nth-child(2) { width: 300px; height: 300px; left: -120px; bottom: -110px; background: var(--g2); opacity: .55; }
.qx-bg i:nth-child(3) { width: 180px; height: 180px; right: 18%; bottom: 22%; background: var(--g3); opacity: .22; }
.qx-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 70%); }
.qx:hover .qx-bg i:nth-child(1) { transform: translate(-24px, 18px) scale(1.06); }
.qx:hover .qx-bg i:nth-child(2) { transform: translate(18px, -14px); }

.qx-top { display: flex; align-items: center; gap: 14px; }
.qx-mono { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 17px;
  font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 600; letter-spacing: -.02em; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 -10px 20px -12px rgba(0,0,0,.35) inset, 0 12px 26px -14px rgba(0,0,0,.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.qx-mono i { font-style: italic; } .qx-mono sup { font-size: .5em; margin-left: 1px; transform: translateY(-.15em); }
.qx-sec { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hl); }
.qx-sec small { margin-top: 3px; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.6); }
.qx-ring { --p: 0; position: relative; margin-left: auto; width: 58px; height: 58px; border-radius: 50%;
  background: conic-gradient(var(--hl) calc(var(--p) * 1%), rgba(255,255,255,.14) 0); display: grid; place-items: center; }
.qx-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: rgba(10,14,32,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.qx-ma .qx-ring::before { background: rgba(26,16,6,.72); }
.qx-ring b { position: relative; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.qx-ring small { font-size: 10px; opacity: .7; }

.qx-name { margin-top: 30px; font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.qx-big { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.qx-big b { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qx-big span { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.62); }

.qx-glass { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; padding: 8px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 20px 40px -26px rgba(0,0,0,.7); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.qx-dom { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 7px; padding: 10px 12px; border-radius: 13px; }
.qx-dom + .qx-dom { border-top: 1px solid rgba(255,255,255,.08); }
.qx-dn { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qx-dc { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; }
.qx-db { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.qx-db i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--hl), #fff); opacity: .85; }

.qx-diff { margin-top: 18px; }
.qx-dbar { display: flex; gap: 3px; height: 6px; }
.qx-dbar i { border-radius: 3px; }
.qx-dbar .e, .qx-dl em.e { background: #34d399; } .qx-dbar .m, .qx-dl em.m { background: #fbbf24; } .qx-dbar .h, .qx-dl em.h { background: #fb7185; }
.qx-dl { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.68); font-variant-numeric: tabular-nums; }
.qx-dl span { display: inline-flex; align-items: center; gap: 7px; }
.qx-dl em { width: 7px; height: 7px; border-radius: 50%; }

.qx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 24px; }
.qx-st { font-size: 13.5px; color: rgba(255,255,255,.62); } .qx-st b { color: #fff; }
.qx-cta { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #0b1220;
  background: linear-gradient(180deg, #fff, #e9edf6); box-shadow: 0 1px 0 #fff inset, 0 12px 24px -12px rgba(0,0,0,.6); transition: gap .2s; }
.qx-cta svg { width: 16px; height: 16px; transition: transform .2s; }
.qx:hover .qx-cta svg { transform: translateX(3px); }

@media (max-width: 980px) { .qx-hero { flex-direction: column; align-items: flex-start; } .qx-hero h1 { font-size: 36px; } }
@media (max-width: 760px) {
  .qx-grid { grid-template-columns: 1fr; gap: 16px; }
  .qx { min-height: 0; padding: 20px; border-radius: 24px; }
  .qx-name { margin-top: 22px; font-size: 25px; } .qx-big b { font-size: 52px; }
  .qx-hero { margin: 18px 0 20px; } .qx-hero h1 { font-size: 30px; }
  .qx-stats { width: 100%; box-sizing: border-box; } .qx-stats div { flex: 1; min-width: 0; padding: 10px 12px; } .qx-stats b { font-size: 20px; }
  .qx-cta { height: 42px; padding: 0 16px; font-size: 14px; }
}
html.dark .qx-hero h1, html.dark .qx-stats b { color: #eef1f6; }
html.dark .qx-hero p { color: #a3acba; } html.dark .qx-kick { color: #8f9ab0; }
html.dark .qx-hero h1 em { background: linear-gradient(90deg, #8fadff 0%, #b49cff 45%, #f5b45a 100%); -webkit-background-clip: text; background-clip: text; }
html.dark .qx-stats { background: rgba(31,36,45,.6); border-color: rgba(255,255,255,.07); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset; }
html.dark .qx-stats div + div { border-left-color: rgba(255,255,255,.07); }
html.dark .qx { border-color: rgba(255,255,255,.1); }

/* subject page header monogram */
.qx-mono.sm { width: 52px; height: 52px; border-radius: 16px; font-size: 23px; background: linear-gradient(150deg, #4c6fff, #8b5cf6); border-color: rgba(255,255,255,.3); }
.qx-mono.sm.qx-ma { background: linear-gradient(150deg, #f59e0b, #ef6c3a); }
/* Question Bank v3: calmer */
.qx-hero h1 { font-size: 36px; margin: 10px 0 8px; }
.qx { min-height: 0; padding: 26px 26px 24px; }
.qx-bg::after { display: none; }
.qx-bg i:nth-child(1) { width: 320px; height: 320px; right: -140px; top: -150px; opacity: .5; }
.qx-bg i:nth-child(2) { width: 260px; height: 260px; left: -130px; bottom: -140px; opacity: .3; }
.qx:hover .qx-bg i:nth-child(1), .qx:hover .qx-bg i:nth-child(2) { transform: none; }
.qx-name { margin-top: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: rgba(255,255,255,.92); }
.qx-big { margin-top: 4px; }
.qx-big b { font-size: 52px; }
.qx-glass { margin-top: 20px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset; }
.qx-db i { opacity: .65; }
.qx-foot { justify-content: flex-end; padding-top: 22px; }
@media (max-width: 760px) { .qx-name { font-size: 20px; } .qx-big b { font-size: 44px; } .qx-hero h1 { font-size: 28px; } }
/* Desmos calculator panel */
.dz { position: fixed; z-index: 60; top: 96px; right: 24px; width: 460px; height: 560px; display: none; flex-direction: column; overflow: hidden;
  border-radius: 18px; background: #fff; border: 1px solid rgba(15,23,42,.1); box-shadow: 0 30px 70px -20px rgba(15,23,42,.45), 0 2px 6px rgba(15,23,42,.08); }
.dz.on { display: flex; }
.dz-h { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 14px; cursor: grab; user-select: none; touch-action: none;
  background: #0E1B3D; color: #fff; }
.dz-h:active { cursor: grabbing; }
.dz-h b { flex: 1; font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.dz-grip { width: 14px; height: 10px; opacity: .55; background-image: radial-gradient(circle, #fff 1.2px, transparent 1.3px); background-size: 5px 5px; }
.dz-x { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; }
.dz-x:hover { background: rgba(255,255,255,.12); }
.dz-x svg { width: 18px; height: 18px; }
.dz-b { position: relative; flex: 1; min-height: 0; }
.dz-b .loading { padding-top: 120px; }
.dz-rs { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, rgba(15,23,42,.25) 50%, rgba(15,23,42,.25) 58%, transparent 58%, transparent 70%, rgba(15,23,42,.25) 70%, rgba(15,23,42,.25) 78%, transparent 78%); }
.dz-err { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 90px 24px; text-align: center; color: #5b6573; }
.dz-err b { color: #111827; font-size: 16px; }
.bb-tool.dz-btn.on { color: #3b5bdb; }
html.dark .dz { background: #1f242d; border-color: #323844; }
html.dark .dz-err b { color: #eef1f6; }
html.dark .bb-tool.dz-btn.on { color: #8fadff; }
@media (max-width: 759px) {
  .dz { top: auto !important; left: 0 !important; right: 0 !important; bottom: 0; width: auto !important; height: 72vh !important; border-radius: 20px 20px 0 0; }
  .dz-h { cursor: default; } .dz-rs { display: none; }
}
/* practice-set panel (Question Bank) */
.qs { --ac: #6d8bff; --ac2: #8b5cf6; position: relative; isolation: isolate; overflow: hidden; padding: 22px; border-radius: 24px; color: #fff;
  background: #0b1024; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 60px -32px rgba(8,12,40,.7), 0 1px 0 rgba(255,255,255,.08) inset; }
.qs-ma { --ac: #f5a524; --ac2: #ef6c3a; background: #160f08; }
.qs-glow { position: absolute; z-index: -1; width: 300px; height: 300px; right: -150px; top: -170px; border-radius: 50%; background: var(--ac); filter: blur(70px); opacity: .45; pointer-events: none; }
.qs-k { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.qs-n { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.qs-n b { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.qs-n span { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.6); }
.qs-sub { display: block; margin-top: 8px; font-size: 13px; color: rgba(255,255,255,.55); }
.qs-sec { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.qs-lab { display: block; margin-bottom: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.qs-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 6px; border-radius: 13px; color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); transition: background .15s, border-color .15s, color .15s; }
.qs-row:last-child { margin-bottom: 0; }
.qs-row:hover { background: rgba(255,255,255,.06); }
.qs-row.on { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }
.qs-row { --dc: #34d399; } .qs-row.d2 { --dc: #fbbf24; } .qs-row.d3 { --dc: #fb7185; }
.qs-ck { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.3); position: relative; }
.qs-row.on .qs-ck { background: var(--dc); border-color: var(--dc); }
.qs-row.on .qs-ck::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px; border: solid #0b1024; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.qs-rl { flex: 0 0 64px; text-align: left; font-size: 14.5px; font-weight: 650; }
.qs-rb { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.qs-rb i { display: block; height: 100%; border-radius: 2px; background: var(--dc); opacity: .4; }
.qs-row.on .qs-rb i { opacity: 1; }
.qs-rc { flex: 0 0 34px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qs-seg { display: flex; gap: 3px; padding: 3px; border-radius: 13px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.qs-seg button { flex: 1; min-height: 36px; padding: 0 6px; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: rgba(255,255,255,.6); white-space: nowrap; transition: background .15s, color .15s; }
.qs-seg button:hover { color: #fff; }
.qs-seg button.on { color: #0b1220; background: #fff; box-shadow: 0 6px 14px -8px rgba(0,0,0,.6); }
.qs-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin-top: 22px; border-radius: 15px; font-size: 15.5px; font-weight: 750;
  color: #fff; background: linear-gradient(135deg, var(--ac), var(--ac2)); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 16px 30px -14px var(--ac); transition: transform .15s, filter .15s; }
.qs-ma .qs-go { color: #1a1206; }
.qs-go svg { width: 17px; height: 17px; transition: transform .2s; }
.qs-go:hover:not([disabled]) { filter: brightness(1.06); } .qs-go:hover:not([disabled]) svg { transform: translateX(3px); }
.qs-go[disabled] { opacity: .35; box-shadow: none; cursor: default; }
html.dark .qs { border-color: rgba(255,255,255,.1); }
@media (max-width: 900px) { .qs .qs-go { display: none; } .qs { padding: 18px; } .qs-n b { font-size: 38px; } }
html.dark .qs .qs-go { color: #fff; background: linear-gradient(135deg, var(--ac), var(--ac2)); }
html.dark .qs-ma .qs-go { color: #1a1206; }
html.dark .qs .qs-row { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.55); }
html.dark .qs .qs-row.on { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
html.dark .qs .qs-seg button { color: rgba(255,255,255,.6); }
html.dark .qs .qs-seg button.on { color: #0b1220; background: #fff; }
/* ===== Question Bank subject page v3: domains (left) + simple practice-set card (right) ===== */
.qd { margin-bottom: 12px; border-radius: 18px; background: #fff; border: 1px solid #e4e7ee; box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.qd:hover { box-shadow: 0 10px 26px -18px rgba(16,24,40,.3); }
.qd.sel { border-color: color-mix(in srgb, var(--ac) 45%, #e4e7ee); }
.qd-h { display: flex; align-items: center; gap: 4px; padding-left: 18px; }
.qd-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 16px 16px 14px 12px; text-align: left; }
.qd-no { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 13px; font-weight: 800; letter-spacing: .02em;
  color: var(--acfg); background: color-mix(in srgb, var(--ac) 10%, transparent); font-variant-numeric: tabular-nums; }
.qd-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qd-tx b { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; color: #101828; }
.qd-tx small { margin-top: 3px; font-size: 13px; color: #6b7280; }
.qd-pill { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--acfg); background: color-mix(in srgb, var(--ac) 10%, transparent); }
.qd-chev { flex: 0 0 auto; display: inline-flex; color: #98a2b3; transition: transform .2s; }
.qd-chev svg { width: 18px; height: 18px; }
.qd.open .qd-chev { transform: rotate(180deg); }
.qd-bar { height: 3px; margin: 0 18px; border-radius: 2px; background: #eef0f4; overflow: hidden; }
.qd-bar i { display: block; height: 100%; background: var(--ac); }
.qd-list { display: none; padding: 8px 10px 10px; }
.qd.open .qd-list { display: block; }
.qd-ck { flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border-radius: 7px; border: 2px solid #c5ccd8 !important; background: #fff !important; position: relative; transition: background .12s, border-color .12s; }
.qd-ck.sm { flex-basis: 20px; width: 20px; height: 20px; border-radius: 6px; }
.qd-ck.on, .qd-ck.part { border-color: var(--ac) !important; background: var(--ac) !important; }
.qd-ck.on::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.qd-ck.sm.on::after { left: 5.5px; top: 1.5px; width: 4.5px; height: 9px; }
.qd-ck.part::after { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; height: 2.4px; border-radius: 2px; background: #fff; }
.qk { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 12px 12px 8px; border-radius: 12px; text-align: left; transition: background .12s; }
.qk + .qk { margin-top: 2px; }
.qk:hover { background: #f5f7fa; }
.qk.on { background: color-mix(in srgb, var(--ac) 6%, transparent); }
.qk-n { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: #1f2937; }
.qk-n small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: #8a93a3; }
.qk-c { flex: 0 0 auto; min-width: 44px; padding: 4px 10px; border-radius: 999px; text-align: center; font-size: 12.5px; font-weight: 700; color: #475467; background: #f2f4f7; font-variant-numeric: tabular-nums; }
.qk.on .qk-c { color: var(--acfg); background: color-mix(in srgb, var(--ac) 12%, transparent); }
html.dark .qd { background: #1f242d; border-color: #2e3440; box-shadow: none; }
html.dark .qd.sel { border-color: color-mix(in srgb, var(--ac2) 45%, #2e3440); }
html.dark .qd-tx b { color: #eef1f6; } html.dark .qd-tx small, html.dark .qk-n small { color: #8f9ab0; }
html.dark .qd-bar { background: #2a303b; }
html.dark .qd-ck { border-color: #566070 !important; background: transparent !important; }
html.dark .qd-ck.on, html.dark .qd-ck.part { border-color: var(--ac) !important; background: var(--ac) !important; }
html.dark .qk:hover { background: #252b35; } html.dark .qk.on { background: color-mix(in srgb, var(--ac2) 5%, transparent); }
html.dark .qk-n { color: #dfe3e8; }
html.dark .qk-c { color: #c4cad4; background: #2a303b; } html.dark .qk.on .qk-c { color: var(--acfg); background: color-mix(in srgb, var(--ac2) 16%, transparent); }

.qs2 { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid #e4e7ee; box-shadow: 0 16px 36px -28px rgba(16,24,40,.35); }
.qs2-k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.qs2-n { margin-top: 6px; font-size: 15px; font-weight: 600; color: #6b7280; }
.qs2-n b { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: #101828; margin-right: 4px; font-variant-numeric: tabular-nums; }
.qs2-sub { display: block; margin-top: 4px; font-size: 13px; color: #8a93a3; }
.qs2 .qs-sec { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f4; }
.qs2 .qs-lab { color: #6b7280; letter-spacing: .12em; }
.qs2-diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qs2-d { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #e4e7ee !important; background: #fff !important; text-align: left; transition: border-color .12s, background .12s; }
.qs2-d span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; color: #98a2b3; }
.qs2-d span i { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; }
.qs2-d small { font-size: 12px; color: #98a2b3; font-variant-numeric: tabular-nums; }
.qs2-d.on { border-color: var(--ac) !important; background: color-mix(in srgb, var(--ac) 6%, #fff) !important; }
.qs2-d.on span { color: #101828; } .qs2-d.on small { color: #6b7280; }
.qs2-d.d1.on span i { background: #22a06b; } .qs2-d.d2.on span i { background: #f59e0b; } .qs2-d.d3.on span i { background: #e5484d; }
.qs2 .qs-seg { background: #f2f4f7; border: 0; }
.qs2 .qs-seg button { color: #475467; }
.qs2 .qs-seg button:hover { color: #101828; }
.qs2 .qs-seg button.on { color: #101828; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.qs2 .qs-go { margin-top: 20px; height: 50px; border-radius: 13px; color: #fff; background: var(--ac); box-shadow: 0 12px 24px -14px var(--ac); }
.c-math .qs2 .qs-go { color: #fff; }
html.dark .qs2 { background: #1f242d; border-color: #2e3440; box-shadow: none; }
html.dark .qs2-n b { color: #eef1f6; } html.dark .qs2-n, html.dark .qs2-k, html.dark .qs2 .qs-lab { color: #8f9ab0; }
html.dark .qs2 .qs-sec { border-top-color: #2a303b; }
html.dark .qs2-d { background: #1a1f27 !important; border-color: #323844 !important; }
html.dark .qs2-d.on { background: color-mix(in srgb, var(--ac2) 10%, #1a1f27) !important; border-color: var(--ac2) !important; }
html.dark .qs2-d.on span { color: #eef1f6; }
html.dark .qs2 .qs-seg { background: #171b22; }
html.dark .qs2 .qs-seg button { color: #a3acba; }
html.dark .qs2 .qs-seg button.on { color: #eef1f6; background: #2e3440; box-shadow: none; }
html.dark .qs2 .qs-go { color: #fff; background: var(--ac); }
html.dark .c-math .qs2 .qs-go { color: #1a1206; background: #f59e0b; }
@media (max-width: 900px) { .qs2 .qs-go { display: none; } .qs2 { padding: 18px; } .qd-t { padding: 14px 12px 12px 10px; gap: 12px; } .qd-no { flex-basis: 34px; height: 34px; } }
/* Practice Tests home: cards in the Question Bank family */
.pt-grid { margin-top: 4px; }
.qx-pt .qx-bg i:nth-child(1) { left: -140px; right: auto; top: -160px; }
.qx-pt .qx-bg i:nth-child(2) { right: -130px; left: auto; bottom: -150px; }
.pt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-free { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.pt-nums { display: flex; gap: 26px; margin-top: 10px; }
.pt-nums span { display: flex; align-items: baseline; gap: 7px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.6); }
.pt-nums b { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; }
.pt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; }
.pt-st { font-size: 13.5px; color: rgba(255,255,255,.6); } .pt-st b { color: #fff; }
@media (max-width: 760px) { .pt-nums b { font-size: 32px; } .pt-nums { gap: 18px; } }
.qx-pt { padding: 22px 24px; }
.qx-pt .pt-nums { margin-top: 8px; }
.qx-pt .pt-nums b { font-size: 34px; }
@media (max-width: 760px) { .qx-pt .pt-foot { position: static; margin-top: 16px; justify-content: flex-start; } }
.qx-pt { padding: 22px 24px; }
.qx-pt .pt-nums { justify-content: space-between; margin-top: 14px; }
.qx-pt .pt-foot { justify-content: flex-end; padding-top: 18px; }
.qx-pt > span { flex-shrink: 0; } .qx-pt .pt-foot { margin-top: 0; }
/* wide screens: content fills the whole width beside the sidebar, like a dashboard */
@media (min-width: 1200px) {
  .pr-in, .ap-in { max-width: none; padding-left: 28px; padding-right: 28px; }
  .qb-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; }
}
@media (min-width: 1500px) { .vc-sets { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* inner pages (topics, question bank skills, word lists) keep the sidebar on computers */
.vc-page > .ap-mbar { display: none !important; }
@media (min-width: 900px) {
  .vc-page:has(> .ap-sb) { padding-left: 248px; }
  body.sb-c .vc-page:has(> .ap-sb) { padding-left: 76px; }
}
/* free plan note in the Question Bank practice-set card */
.qs2-free { display: flex; flex-direction: column; gap: 3px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(245,165,36,.10); border: 1px solid rgba(245,165,36,.28); }
.qs2-free b { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b26b00; }
.qs2-free span { font-size: 13.5px; line-height: 1.4; color: #5b4a2a; }
html.dark .qs2-free { background: rgba(245,165,36,.12); border-color: rgba(245,165,36,.3); }
html.dark .qs2-free b { color: #f5b544; }
html.dark .qs2-free span { color: #e8d9bb; }
/* practice and Question Bank questions: the sidebar stays on computers */
.px-run > .ap-mbar { display: none !important; }
@media (min-width: 900px) {
  .run.px-run:has(> .ap-sb) { padding-left: 248px; }
  body.sb-c .run.px-run:has(> .ap-sb) { padding-left: 76px; }
}
@media (max-width: 899px) { .px-run > .ap-sb, .px-run > .sb-scrim { display: none; } }
/* mock tests: three cards per row, short facts under each test */
.pr-tests .pr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 999px) { .pr-tests .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .pr-tests .pr-grid { grid-template-columns: 1fr !important; } }
.pr-facts { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 9px; }
.pr-facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #5b6573; line-height: 1.3; }
.pr-facts svg { width: 18px; height: 18px; flex: 0 0 18px; color: #8a93a3; }
html.dark .pr-facts li { color: #a3acba; }
html.dark .pr-facts svg { color: #7d8696; }
/* buy Premium: payment window */
.pay-ov { align-items: center; justify-content: center; }
.pay { position: relative; width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; border-radius: 24px; background: #10131b; color: #e8ebf2;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 80px -20px rgba(0,0,0,.7); padding: 26px 26px 22px; text-align: left; animation: payIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes payIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.pay-x { position: absolute; right: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.06) !important; border: 0; display: grid; place-items: center; cursor: pointer; }
.pay-x svg { width: 14px; height: 14px; fill: none; stroke: #9aa3b2; stroke-width: 2.4; stroke-linecap: round; }
.pay-top { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #aab2c0; font-weight: 500; }
.pay-top em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: #f5a524; color: #1a1200; }
.pay-old { margin-top: 14px; font-size: 15px; color: #e5484d; text-decoration: line-through; font-weight: 600; opacity: .85; }
.pay-pr { display: flex; align-items: baseline; gap: 8px; } .pay-pr b { font-size: 46px; font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1.1; } .pay-pr span { font-size: 16px; font-weight: 700; color: #aab2c0; }
.pay-sub { font-size: 13.5px; color: #8a93a3; margin-top: 2px; }
.pay-hr { height: 1px; background: rgba(255,255,255,.08); margin: 18px 0; }
.pay-st { display: flex; gap: 12px; margin-bottom: 14px; } .pay-st > div { flex: 1; min-width: 0; }
.pay-st > i { flex: 0 0 24px; height: 24px; border-radius: 50%; background: rgba(245,165,36,.16); color: #f5c46b; font-size: 13px; font-weight: 800; font-style: normal; display: grid; place-items: center; margin-top: 1px; }
.pay-st h4 { font-size: 15px; font-weight: 700; color: #fff; margin: 0; } .pay-st p { font-size: 13.5px; color: #9aa3b2; margin: 3px 0 0; line-height: 1.45; }
.pay-card { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 16px; padding: 18px 16px 18px 20px; background: linear-gradient(135deg,#1c2a63,#13193a); border: 1px solid rgba(255,255,255,.12); }
.pay-card b { font-size: 22px; font-weight: 700; letter-spacing: .06em; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-cp { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.1) !important; border: 0; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; flex: 0 0 auto; }
.pay-cp svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pay-cp.pay-done { background: rgba(52,211,153,.18) !important; color: #34d399; }
.pay-amt { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; border-radius: 12px; padding: 10px 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); font-size: 14px; color: #aab2c0; } .pay-amt b { color: #fff; font-size: 16px; }
.pay-link { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-radius: 12px; padding: 8px 8px 8px 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); font-size: 14px; }
.pay-link a { color: #7cc8f0; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.pay-go { margin-top: 8px; width: 100%; height: 52px; border-radius: 999px; background: #229ED9 !important; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 12px 30px -10px rgba(34,158,217,.6); }
.pay-go svg { width: 20px; height: 20px; fill: #fff; } .pay-go:hover { background: #1c8dc4 !important; }
@media (max-width: 560px) {
  .pay-ov { align-items: flex-end; }
  .pay { width: 100vw; border-radius: 24px 24px 0 0; padding: 22px 18px 20px; animation-name: paySheet; }
  .pay-card b { font-size: 19px; }
}
@keyframes paySheet { from { transform: translateY(100%); } to { transform: none; } }
/* payment window: Apple-style smooth entrance (grows out of the button that opened it; driven from app.js) */
.pay-ov { background: rgba(4,7,16,0) !important; animation: none !important; transition: background .5s cubic-bezier(.32,.72,0,1), backdrop-filter .5s cubic-bezier(.32,.72,0,1); }
.pay-ov.pay-in { background: rgba(4,7,16,.55) !important; backdrop-filter: blur(12px) saturate(1.1); }
.pay { animation: none !important; will-change: transform, opacity; }
.pay > * { transition: opacity .35s ease .12s; }
.pay.pay-hide > * { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) { .pay-ov, .pay > * { transition: none !important; } }
.ac-tg b small { margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-mut); }
@media (max-width: 560px) { .pay-card { padding: 14px 10px 14px 14px; gap: 8px; } .pay-card b { font-size: 17px !important; letter-spacing: .03em; } .pay-card .pay-cp { padding: 0 10px; } }
@media (max-width: 360px) { .pay-card b { font-size: 15px !important; } }

/* ===================== Classroom ===================== */
:root { --cr-blue: #3b5bdb; --cr-soft: #f5f7fb; --cr-gold: #F5A524; }
html.dark { --cr-soft: #252b35; }
.cr [hidden], .cr-dlg [hidden] { display: none !important; }
.cr-in { padding-bottom: 60px; }
.cr-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.cr-hrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cr-hrow .ap-h1 { margin-bottom: 4px; }
.cr-h2 { margin: 0 0 4px; font-family: 'Space Grotesk', var(--sans); font-size: 22px; letter-spacing: -.01em; color: var(--ap-ink); }
.cr-mut { color: var(--ap-mut); margin: 0; font-size: 14px; }
.cr-note { color: var(--ap-mut); font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
.cr-empty { color: var(--ap-mut); font-size: 14px; padding: 14px 4px; margin: 0; }
.cr-empty.sm { padding: 4px 2px 8px; font-size: 13px; }
.cr-count { color: var(--ap-mut); font-size: 13px; margin: 14px 2px 4px; }
.cr button { font-family: var(--sans); }
.cr-bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 0 !important; background: var(--cr-blue) !important; color: #fff !important; font: 600 14.5px var(--sans); cursor: pointer; white-space: nowrap; box-shadow: 0 8px 20px -12px rgba(59,91,219,.9); transition: transform .15s, filter .15s; }
.cr-bt:hover { filter: brightness(1.06); } .cr-bt:active { transform: scale(.97); } .cr-bt:disabled { opacity: .55; cursor: default; }
.cr-bt.sm { height: 34px; padding: 0 13px; font-size: 13px; } .cr-bt.sm .cr-ic { width: 15px; height: 15px; }
.cr-bt.gh { background: var(--ap-card) !important; color: var(--ap-ink) !important; border: 1px solid var(--ap-line) !important; box-shadow: none; }
.cr-bt.gh.danger { color: #c53030 !important; }
.cr-bt.gold { background: var(--cr-gold) !important; color: #1a1200 !important; box-shadow: none; }
.cr-ib { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--ap-mut); display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.cr-ib:hover { background: var(--cr-soft); color: var(--ap-ink); }
.cr-backl { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ap-mut); font: 600 14px var(--sans); cursor: pointer; padding: 4px 0; margin: 0 0 12px; }
.cr-backl:hover { color: var(--ap-ink); } .cr-backl .cr-ic { width: 17px; height: 17px; }
.cr-chips { margin: -6px 0 18px; }

/* inputs */
.cr-lab { display: block; font-size: 13px; font-weight: 700; color: var(--ap-ink); margin: 14px 0 6px; }
.cr-lab small { font-weight: 500; color: var(--ap-mut); }
label.cr-lab .cr-in1 { margin-top: 6px; }
.cr-in1 { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--ap-line); border-radius: 12px; background: var(--ap-card); color: var(--ap-ink); padding: 11px 13px; font: 500 15px var(--sans); outline: none; transition: border-color .15s, box-shadow .15s; }
.cr-in1:focus { border-color: var(--cr-blue); box-shadow: 0 0 0 3px rgba(59,91,219,.14); }
textarea.cr-in1 { resize: vertical; min-height: 70px; line-height: 1.5; }
.cr-in1.sm { width: auto; padding: 6px 10px; font-size: 13.5px; }
.cr-codein { text-align: center; font: 700 26px 'Space Grotesk', var(--sans); letter-spacing: .25em; text-transform: uppercase; }
.cr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cr-two2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cr-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--cr-soft); padding: 4px; border-radius: 12px; }
.cr-seg button { border: 0 !important; background: none; padding: 8px 14px; border-radius: 9px; font: 600 13.5px var(--sans); color: var(--ap-mut); cursor: pointer; }
.cr-seg button.on { background: var(--ap-card); color: var(--ap-ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.cr-dp { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-dp button { width: 54px; height: 40px; border-radius: 12px; border: 1.5px solid var(--ap-line) !important; background: var(--ap-card); font: 700 13.5px var(--sans); color: var(--ap-mut); cursor: pointer; transition: all .15s; }
.cr-dp button.on { background: var(--cr-blue); border-color: var(--cr-blue) !important; color: #fff; box-shadow: 0 6px 14px -8px rgba(59,91,219,.9); }
.cr-chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-chipset.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cr-chipset button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ap-line) !important; background: var(--ap-card); color: var(--ap-ink); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.cr-chipset button.on { background: var(--cr-blue); border-color: var(--cr-blue) !important; color: #fff; }
.cr-tgl { width: 44px; height: 26px; border-radius: 999px; border: 0 !important; background: var(--cr-blue); position: relative; flex: 0 0 44px; cursor: pointer; transition: background .2s; padding: 0; }
.cr-tgl::after { content: ''; position: absolute; top: 3px; left: 21px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cr-tgl.off { background: #cbd3df; } .cr-tgl.off::after { left: 3px; }
html.dark .cr-tgl.off { background: #3a4352; }
.cr-sw { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; cursor: pointer; }
.cr-sw b { display: block; font-size: 14px; color: var(--ap-ink); } .cr-sw small { color: var(--ap-mut); font-size: 12.5px; line-height: 1.45; }

/* dialogs */
.dialog.cr-dlg { max-width: 460px; text-align: left; }
.dialog.cr-dlg.cr-wide { max-width: 560px; }
.dialog.cr-dlg h3 { margin: 0 0 4px; }
.dialog.cr-dlg .row { margin-top: 18px; }
.cr-setrow { display: flex; align-items: center; gap: 14px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--ap-line); }
.cr-setrow b { display: block; font-size: 14px; } .cr-setrow small { color: var(--ap-mut); font-size: 12.5px; line-height: 1.4; } .cr-setrow > :last-child { margin-left: auto; }
.cr-setrow.danger b { color: #c53030; }
.cr-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 13.5px; line-height: 1.45; margin: 10px 0 4px; }
html.dark .cr-warn { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.cr-mvl { max-height: 230px; overflow: auto; display: grid; gap: 6px; margin-top: 8px; }
.cr-srch { margin-bottom: 8px; }

/* class cards */
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.cr-card { display: block; text-align: left; padding: 0; border-radius: 20px; background: var(--ap-card); border: 1px solid var(--ap-line) !important; overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s; color: var(--ap-ink); }
.cr-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(14,27,61,.55); }
.cr-cb { position: relative; height: 118px; padding: 18px 20px; box-sizing: border-box; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.cr-cb b { position: relative; z-index: 1; font: 700 20px 'Space Grotesk', var(--sans); letter-spacing: -.01em; line-height: 1.2; }
.cr-cb small { position: relative; z-index: 1; opacity: .8; font-size: 13.5px; margin-top: 3px; }
.cr-cb em { position: absolute; top: 16px; left: 20px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.s-en.cr-cb, .s-en.cr-ban { background: radial-gradient(120% 140% at 100% 0%, rgba(245,165,36,.22), transparent 55%), linear-gradient(135deg, #0E1B3D 0%, #1a3274 60%, #2448a8 100%); }
.s-m.cr-cb, .s-m.cr-ban { background: radial-gradient(120% 140% at 100% 0%, rgba(245,165,36,.2), transparent 55%), linear-gradient(135deg, #2e1065 0%, #5b21b6 60%, #7c3aed 100%); }
.cr-art { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); height: 112%; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .16; pointer-events: none; }
.cr-cf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 20px 15px; font-size: 13px; color: var(--ap-mut); }
.cr-cf span { display: inline-flex; align-items: center; gap: 6px; } .cr-cf .cr-ic { width: 15px; height: 15px; }
.cr-code b { color: var(--ap-ink); letter-spacing: .08em; font-family: 'Space Grotesk', var(--sans); }
.cr-blank { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 38px 20px; }
.cr-blank > .cr-ic { width: 40px; height: 40px; color: var(--cr-blue); background: rgba(59,91,219,.1); border-radius: 14px; padding: 9px; box-sizing: border-box; margin-bottom: 6px; }
.cr-blank b { font-size: 16px; } .cr-blank span { color: var(--ap-mut); font-size: 14px; max-width: 380px; line-height: 1.5; } .cr-blank .cr-bt { margin-top: 10px; }
.cr-blank.sm { padding: 26px 18px; }
.cr-arch { margin-top: 22px; } .cr-arch summary { cursor: pointer; color: var(--ap-mut); font-weight: 700; font-size: 14px; margin-bottom: 12px; }

/* the class page */
.cr-ban { position: relative; border-radius: 22px; padding: 26px 28px; color: #fff; overflow: hidden; min-height: 156px; box-sizing: border-box; display: flex; align-items: flex-end; gap: 16px; }
.cr-ban .cr-art { right: 250px; height: 140%; opacity: .1; }
.cr-bt1 { position: relative; z-index: 1; min-width: 0; flex: 1; }
.cr-bt1 em { font-style: normal; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.cr-bt1 h1 { margin: 4px 0 4px; font: 700 32px 'Space Grotesk', var(--sans); letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.cr-bt1 p { margin: 0; opacity: .82; font-size: 14.5px; }
.cr-bact { position: relative; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cr-codeb, .cr-gear { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.24) !important; background: rgba(255,255,255,.12); color: #fff; font: 600 13.5px var(--sans); cursor: pointer; backdrop-filter: blur(8px); }
.cr-codeb b { font-family: 'Space Grotesk', var(--sans); letter-spacing: .1em; font-size: 15px; }
.cr-codeb:hover, .cr-gear:hover { background: rgba(255,255,255,.2); }
.cr-stk { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-size: 13px; backdrop-filter: blur(8px); white-space: nowrap; }
.cr-stk .cr-ic { color: var(--cr-gold); } .cr-stk b { font-size: 15px; }
.cr-dots { display: inline-flex; gap: 3px; margin-left: 4px; } .cr-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); } .cr-dots i.on { background: var(--cr-gold); }
.cr-tabs { display: flex; gap: 2px; margin: 16px 0 22px; border-bottom: 1px solid var(--ap-line); overflow-x: auto; scrollbar-width: none; }
.cr-tabs::-webkit-scrollbar { display: none; }
.cr-tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0 !important; background: none; font: 600 14.5px var(--sans); color: var(--ap-mut); padding: 11px 14px 13px; cursor: pointer; border-bottom: 3px solid transparent !important; margin-bottom: -1px; white-space: nowrap; }
.cr-tabs button .cr-ic { width: 17px; height: 17px; }
.cr-tabs button.on { color: var(--cr-blue); border-bottom-color: var(--cr-blue) !important; }
.cr-tabs.sm { margin-top: 0; }
.cr-wtop { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cr-wh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cr-wh b { font-size: 15.5px; } .cr-wh small { color: var(--ap-mut); font-size: 12.5px; }
.cr-wh .cr-bt, .cr-wh input { margin-left: auto; }
.cr-box { padding: 18px 20px; margin-bottom: 16px; }
.cr-osec { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-mut); margin: 18px 2px 8px; }
.cr-osec span { background: var(--cr-soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; letter-spacing: 0; }

/* News */
.cr-news { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.cr-compose { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; }
.cr-compose textarea { flex: 1; border: 1px solid var(--ap-line); border-radius: 12px; background: var(--cr-soft); color: var(--ap-ink); padding: 10px 12px; font: 500 14.5px var(--sans); resize: vertical; min-height: 44px; outline: none; }
.cr-compose textarea:focus { border-color: var(--cr-blue); background: var(--ap-card); }
.cr-av { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 700 13px var(--sans); font-style: normal; flex: 0 0 auto; }
.cr-av.lg { width: 60px; height: 60px; font-size: 22px; }
.cr-ann { padding: 16px 18px; margin-bottom: 12px; }
.cr-ann.pinned { border-color: #f1d79a; background: #fffcf3; } html.dark .cr-ann.pinned { background: #2a2617; border-color: #5b4a1d; }
.cr-ann.sched, .cr-row.sched, .cr-feedrow.sched { border-style: dashed; }
.cr-pinl { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: #92400e; margin-bottom: 8px; } .cr-pinl .cr-ic { width: 14px; height: 14px; }
html.dark .cr-pinl { color: #f0c575; }
.cr-who { display: flex; align-items: center; gap: 10px; } .cr-who b { display: block; font-size: 14.5px; } .cr-who small { color: var(--ap-mut); font-size: 12.5px; }
.cr-acts { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cr-ann p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.cr-ann a, .cr-instr a { color: var(--cr-blue); }
.cr-feedrow, .cr-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 13px 16px; margin-bottom: 10px; cursor: pointer; color: var(--ap-ink); }
.cr-feedrow:hover, .cr-row:hover { border-color: #b8c6e6 !important; }
.cr-feedrow span b, .cr-row .cr-rt b { display: block; font-size: 14.5px; }
.cr-feedrow small, .cr-rt small { color: var(--ap-mut); font-size: 12.5px; }
.cr-rt { flex: 1; min-width: 0; } .cr-rt b, .cr-rt small { overflow-wrap: anywhere; } .cr-rt > small { display: block; }
.cr-fi { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 40px; font-style: normal; }
.cr-fi.lg { width: 52px; height: 52px; flex-basis: 52px; } .cr-fi.lg .cr-ic { width: 24px; height: 24px; }
.k-hw { background: #e8eefc; color: #1d4ed8; } .k-exam { background: #f3e8ff; color: #7c3aed; } .k-mat, .k-news { background: #fde8e8; color: #c53030; }
html.dark .k-hw { background: rgba(59,91,219,.2); color: #9db2ff; } html.dark .k-exam { background: rgba(124,58,237,.22); color: #c4a6ff; } html.dark .k-mat { background: rgba(197,48,48,.2); color: #ff9e9e; }
.cr-chev { color: var(--ap-mut); margin-left: auto; }
.cr-week { padding: 16px; position: sticky; top: 16px; }
.cr-wd { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--ap-line); background: var(--cr-soft); margin-bottom: 6px; font-size: 13.5px; }
.cr-wd > b { width: 42px; color: var(--ap-mut); font-size: 13px; display: flex; flex-direction: column; line-height: 1.15; } .cr-wd > b small { font-size: 11px; font-weight: 600; opacity: .8; }
.cr-wd em { font-style: normal; font-weight: 700; font-size: 12.5px; border-radius: 7px; padding: 3px 8px; }
.cr-wd em.lesson { background: #e8eefc; color: #1d4ed8; } .cr-wd em.mock { background: #f3e8ff; color: #7c3aed; }
html.dark .cr-wd em.lesson { background: rgba(59,91,219,.22); color: #9db2ff; } html.dark .cr-wd em.mock { background: rgba(124,58,237,.25); color: #c4a6ff; }
.cr-wd.empty { background: transparent; } .cr-wd.empty .cr-mut, .cr-mut.cr-mut { font-size: 12.5px; }
.cr-wd .cr-mut { color: var(--ap-mut); }
.cr-wd.today { border-color: var(--cr-blue); box-shadow: 0 0 0 2px rgba(59,91,219,.14); }
.cr-wd.ed { cursor: pointer; } .cr-wd.ed:hover { border-color: #b8c6e6; }

/* Classwork */
.cr-mwrap { position: relative; }
.cr-menu { position: absolute; right: 0; top: 48px; z-index: 30; width: 300px; padding: 6px; border-radius: 16px; background: var(--ap-card); border: 1px solid var(--ap-line); box-shadow: 0 24px 50px -20px rgba(16,24,40,.45); }
.cr-menu button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 12px; border-radius: 12px; border: 0; background: none; cursor: pointer; color: var(--ap-ink); }
.cr-menu button:hover { background: var(--cr-soft); } .cr-menu b { display: block; font-size: 14.5px; } .cr-menu small { color: var(--ap-mut); font-size: 12.5px; }
.cr-menu .cr-ic { margin-top: 2px; color: var(--cr-blue); }
.cr-cnt { text-align: right; font-size: 13px; color: var(--ap-mut); white-space: nowrap; } .cr-cnt b { font-size: 17px; color: var(--ap-ink); } .cr-cnt small { display: block; font-size: 11.5px; }
.cr-st { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--cr-soft); color: var(--ap-mut); }
.st-ok { background: #e3f6ee; color: #0f7a5a; } .st-late { background: #fdf1d8; color: #a16207; } .st-miss { background: #fde8e8; color: #c53030; }
.st-prog, .st-open { background: #e8eefc; color: #1d4ed8; } .st-soon { background: #f3e8ff; color: #7c3aed; }
html.dark .st-ok { background: rgba(16,185,129,.16); color: #34d399; } html.dark .st-late { background: rgba(245,165,36,.16); color: #fbbf24; } html.dark .st-miss { background: rgba(239,68,68,.16); color: #f87171; }
html.dark .st-prog, html.dark .st-open { background: rgba(59,91,219,.2); color: #9db2ff; } html.dark .st-soon { background: rgba(124,58,237,.22); color: #c4a6ff; }
.cr-hwd { padding: 22px; margin-bottom: 18px; }
.cr-hwh { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cr-hwh > div { flex: 1; min-width: 200px; } .cr-hwh h2 { margin: 2px 0 4px; font: 700 22px 'Space Grotesk', var(--sans); letter-spacing: -.01em; }
.cr-kind { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-mut); }
.cr-instr { background: var(--cr-soft); border-radius: 14px; padding: 13px 15px; margin: 16px 0 0; font-size: 14.5px; line-height: 1.55; }
.cr-tasks { display: grid; gap: 10px; margin-top: 16px; }
.cr-task { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--ap-line); border-radius: 16px; background: var(--ap-card); }
.cr-task b { display: block; font-size: 14.5px; }
.cr-ti { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 42px; font-style: normal; }
.cr-ti svg, .cr-opt i svg, .cr-pk nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cr-v { background: #e3f6ee; color: #0f9f74; } .cr-p { background: #fdf1d8; color: #b7791f; } .cr-b { background: #e8eefc; color: #1d4ed8; } .cr-m { background: #f3e8ff; color: #7c3aed; }
html.dark .cr-v { background: rgba(16,185,129,.16); color: #34d399; } html.dark .cr-p { background: rgba(245,165,36,.16); color: #fbbf24; } html.dark .cr-b { background: rgba(59,91,219,.2); color: #9db2ff; } html.dark .cr-m { background: rgba(124,58,237,.22); color: #c4a6ff; }
.cr-res { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: #0f7a5a; font-size: 15px; white-space: nowrap; } html.dark .cr-res { color: #34d399; }
.cr-pbar { display: block; height: 6px; border-radius: 999px; background: var(--cr-soft); margin-top: 7px; overflow: hidden; max-width: 260px; } .cr-pbar span { display: block; height: 100%; background: var(--cr-blue); border-radius: 999px; }
.cr-file { margin-top: 14px; }
.cr-donote { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: #0f7a5a; font-weight: 600; font-size: 14px; } html.dark .cr-donote { color: #34d399; }
.cr-kp { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cr-kp > div { background: var(--ap-card); border: 1px solid var(--ap-line); border-radius: 16px; padding: 15px 16px; }
.cr-kp b { display: block; font: 700 28px 'Space Grotesk', var(--sans); letter-spacing: -.02em; } .cr-kp b small { font-size: 15px; color: var(--ap-mut); } .cr-kp span { color: var(--ap-mut); font-size: 13px; }
.cr-tbl { overflow-x: auto; margin-bottom: 16px; }
.cr-tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cr-tbl th, .cr-tbl td { padding: 11px 14px; border-bottom: 1px solid var(--ap-line); text-align: left; white-space: nowrap; }
.cr-tbl th { font-size: 12px; color: var(--ap-mut); font-weight: 700; background: var(--cr-soft); }
.cr-tbl tr:last-child td { border-bottom: 0; }
.cr-tbl .c { text-align: center; } .cr-tbl.in { margin: 0; } .cr-tbl tr.arch td { opacity: .55; }
.cr-nm { display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; padding: 0; cursor: pointer; font: 600 14px var(--sans); color: var(--ap-ink); text-align: left; }
.cr-nm:hover { color: var(--cr-blue); } .cr-nm .cr-av { width: 30px; height: 30px; font-size: 11.5px; }
.cr-prior { display: block; font-size: 11.5px; color: #b7791f; margin: 3px 0 0 39px; }
.cr-qa { padding: 18px 20px; margin-bottom: 16px; }
.cr-qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.cr-qc { border-radius: 12px; border: 1px solid var(--ap-line); padding: 8px 10px; background: var(--cr-soft); }
.cr-qc b { display: block; font-size: 12.5px; } .cr-qc span { font-size: 12px; color: var(--ap-mut); }
.cr-qc.mid { background: #fff8e8; border-color: #f6dfa3; } .cr-qc.hot { background: #fef2f2; border-color: #fca5a5; } .cr-qc.hot b { color: #c53030; }
html.dark .cr-qc.mid { background: rgba(245,165,36,.12); border-color: rgba(245,165,36,.3); } html.dark .cr-qc.hot { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); }
.cr-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cr-mat { display: flex; align-items: center; gap: 14px; background: var(--ap-card); border: 1px solid var(--ap-line); border-radius: 16px; padding: 13px 13px 13px 15px; }
.cr-mat > i { position: relative; width: 42px; height: 50px; border-radius: 10px; background: #fde8e8; color: #c53030; display: grid; place-items: center; font-style: normal; flex: 0 0 42px; }
html.dark .cr-mat > i { background: rgba(197,48,48,.2); color: #ff9e9e; }
.cr-mat > i em { position: absolute; bottom: 4px; font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; }
.cr-mat > i .cr-ic { margin-top: -8px; }
.cr-mat > div { flex: 1; min-width: 0; } .cr-mat b { display: block; font-size: 14.5px; overflow-wrap: anywhere; } .cr-mat small { color: var(--ap-mut); font-size: 12.5px; }
.cr-mat.sm { padding: 8px 10px; } .cr-mat.sm > i { width: 34px; height: 38px; flex-basis: 34px; } .cr-mat.sm > i .cr-ic { margin: 0; }
.cr-dl { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--ap-line) !important; background: var(--ap-card); color: var(--ap-ink); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.cr-dl:hover { border-color: var(--cr-blue) !important; color: var(--cr-blue); } .cr-dl.busy { opacity: .5; animation: crpulse 1s infinite; }
@keyframes crpulse { 50% { opacity: .25; } }
.cr-ed { padding: 22px 24px; max-width: 760px; }
.cr-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 14px; border-radius: 14px; border: 1.5px dashed #b8c6e6 !important; background: rgba(59,91,219,.04); color: var(--cr-blue); font: 700 14.5px var(--sans); cursor: pointer; }
.cr-add:hover { background: rgba(59,91,219,.08); }
.cr-up { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 14px; border: 1.5px dashed var(--ap-line); color: var(--ap-mut); font-weight: 600; font-size: 14px; cursor: pointer; margin-top: 4px; }
.cr-up:hover { border-color: var(--cr-blue); color: var(--cr-blue); }
.cr-edf { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.cr-edf .btn { min-height: 44px; }
.cr-upf { padding: 16px 18px 18px; margin-bottom: 16px; }

/* picker */
.dialog.cr-dlg.cr-pkd { max-width: 820px; width: calc(100vw - 32px); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: min(680px, calc(100vh - 40px)); }
.cr-pkh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cr-pkd .cr-pkh { padding: 18px 20px 12px; border-bottom: 1px solid var(--ap-line); }
.cr-pkd .cr-pkh h3 { margin: 0; }
.cr-pk { display: grid; grid-template-columns: 200px 1fr; min-height: 0; flex: 1; }
.cr-pk.one { grid-template-columns: 1fr; }
.cr-pk nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-right: 1px solid var(--ap-line); }
.cr-pk nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font: 600 14px var(--sans); color: var(--ap-mut); cursor: pointer; text-align: left; }
.cr-pk nav button.on { background: rgba(59,91,219,.1); color: var(--cr-blue); }
.cr-pkb { display: flex; flex-direction: column; min-height: 0; padding: 12px 16px 0; }
.cr-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--ap-mut); margin-bottom: 10px; min-height: 22px; }
.cr-crumb button { border: 0; background: none; padding: 0; font: 600 13.5px var(--sans); color: var(--cr-blue); cursor: pointer; } .cr-crumb button:last-child { color: var(--ap-ink); cursor: default; }
.cr-opts { display: grid; gap: 8px; align-content: start; overflow: auto; padding-bottom: 14px; min-height: 280px; max-height: 440px; }
.cr-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 13px; border: 1px solid var(--ap-line) !important; border-radius: 14px; cursor: pointer; background: var(--ap-card); color: var(--ap-ink); }
.cr-opt:hover { border-color: #b8c6e6 !important; } .cr-opt.sel { border-color: var(--cr-blue) !important; background: rgba(59,91,219,.06); box-shadow: 0 0 0 3px rgba(59,91,219,.1); }
.cr-opt i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-style: normal; flex: 0 0 36px; }
.cr-opt span:not(.cr-ck) { flex: 1; min-width: 0; } .cr-opt b { display: block; font-size: 14px; } .cr-opt small { color: var(--ap-mut); font-size: 12.5px; }
.cr-opt + .cr-opt { margin-top: 0; }
.cr-dlg > .cr-opt { margin-top: 8px; }
.cr-opt.danger b { color: #c53030; }
.cr-ck { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd3df; display: grid; place-items: center; color: transparent; flex: 0 0 22px; }
.cr-ck .cr-ic { width: 13px; height: 13px; stroke-width: 3; }
.cr-opt.sel .cr-ck { background: var(--cr-blue); border-color: var(--cr-blue); color: #fff; }
.cr-qbset { padding: 6px 2px; } .cr-qbset > b { font-size: 16px; } .cr-qbset .cr-bt { margin-top: 12px; }
.cr-pkf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--ap-line); background: var(--cr-soft); }
.cr-pkf span { color: var(--ap-mut); font-size: 13.5px; font-weight: 600; } .cr-pkf .btn { min-height: 42px; }

/* People, profile */
.cr-ppl { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
.cr-pp { padding: 18px 20px; }
.cr-pr { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--ap-line); flex-wrap: wrap; }
.cr-pr:last-of-type { border-bottom: 0; } .cr-pr b { font-size: 14.5px; } .cr-pr .cr-rt { min-width: 120px; }
.cr-pr.me { background: rgba(245,165,36,.1); border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.cr-pr .cr-bt.sm span { display: inline; }
.cr-coadd { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; } .cr-coadd .cr-in1 { flex: 1; min-width: 200px; }
.cr-pfh { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; } .cr-pfh > div { flex: 1; min-width: 180px; }
.cr-pfh h2 { margin: 0 0 2px; font: 700 26px 'Space Grotesk', var(--sans); }
.cr-trend { width: 100%; height: auto; display: block; }
.cr-trend line { stroke: var(--ap-line); stroke-width: 1; } .cr-trend text { font: 600 11px var(--sans); fill: var(--ap-mut); }
.cr-trend .ln { fill: none; stroke: var(--cr-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.cr-trend circle { fill: var(--ap-card); stroke: var(--cr-blue); stroke-width: 2.5; } .cr-trend text.v { text-anchor: middle; fill: var(--ap-ink); font-weight: 700; font-size: 12px; }
.cr-bars { display: grid; gap: 10px; }
.cr-skb { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 46px; gap: 12px; align-items: center; font-size: 13.5px; }
.cr-skb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-skt { height: 10px; border-radius: 999px; background: var(--cr-soft); overflow: hidden; } .cr-skt span { display: block; height: 100%; border-radius: 999px; }
.cr-skb b { text-align: right; }
.cr-scb { font: 700 17px 'Space Grotesk', var(--sans); min-width: 44px; text-align: right; }
.cr-sug { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #0E1B3D, #1f3c8f); color: #fff; margin-top: 18px; flex-wrap: wrap; }
.cr-sug span { flex: 1; min-width: 180px; } .cr-sug small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .7; } .cr-sug b { display: block; font-size: 15.5px; } .cr-sug em { font-style: normal; font-size: 13px; opacity: .85; }
.cr-dl2 { width: 46px; text-align: right; font-weight: 700; font-size: 13px; } .cr-dl2.up { color: #0f9f74; } .cr-dl2.dn { color: #c53030; }

/* Attendance */
.cr-atbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cr-atbar .cr-in1 { width: auto; }
.cr-attot { display: inline-flex; align-items: center; gap: 6px; color: var(--ap-mut); font-size: 13px; margin-left: 8px; flex-wrap: wrap; }
.cr-attot i { width: 9px; height: 9px; border-radius: 50%; margin-left: 6px; } .cr-attot i.p { background: #12a150; } .cr-attot i.l { background: #f5a524; } .cr-attot i.a { background: #e5484d; }
.cr-atbar #atall { margin-left: auto; }
.cr-atr { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--ap-line); flex-wrap: wrap; }
.cr-atr:last-child { border-bottom: 0; } .cr-atr b { flex: 1; min-width: 120px; font-size: 14.5px; }
.cr-seg.att button.on.p { background: #e3f6ee; color: #0f7a5a; } .cr-seg.att button.on.l { background: #fdf1d8; color: #a16207; } .cr-seg.att button.on.a { background: #fde8e8; color: #c53030; }
.cr-ad { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--ap-mut); }
.cr-ad.p { background: #e3f6ee; color: #0f7a5a; } .cr-ad.l { background: #fdf1d8; color: #a16207; } .cr-ad.a { background: #fde8e8; color: #c53030; }
.cr-gc { display: inline-block; min-width: 40px; text-align: center; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.cr-gc.ok { background: #e3f6ee; color: #0f7a5a; } .cr-gc.late { background: #fdf1d8; color: #a16207; } .cr-gc.miss { background: #fde8e8; color: #c53030; } .cr-gc.prog { background: #e8eefc; color: #1d4ed8; }
.cr-grades th { white-space: normal; min-width: 110px; vertical-align: bottom; } .cr-grades th small { display: block; font-weight: 600; }

/* Leaderboard */
.cr-lbw { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.cr-myrank { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, #0E1B3D, #1f3c8f); color: #fff; margin-bottom: 10px; }
.cr-myrank span { opacity: .75; font-size: 13px; } .cr-myrank b { font: 700 24px 'Space Grotesk', var(--sans); } .cr-myrank em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--cr-gold); }
.cr-lr { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--ap-line); font-size: 14.5px; }
.cr-lr:last-child { border-bottom: 0; } .cr-lr > b { flex: 1; min-width: 0; } .cr-lr.me { background: rgba(245,165,36,.12); border-radius: 12px; border-bottom-color: transparent; }
.cr-pos { width: 28px; text-align: center; font-weight: 800; color: var(--ap-mut); }
.cr-medal { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.cr-medal .cr-ic { width: 15px; height: 15px; fill: currentColor; } .cr-medal.m1 { background: linear-gradient(135deg, #f7c948, #d99a00); } .cr-medal.m2 { background: linear-gradient(135deg, #cfd6e0, #8e99a8); } .cr-medal.m3 { background: linear-gradient(135deg, #e3a06a, #b0622a); }
.cr-xp { font-weight: 800; white-space: nowrap; }
.cr-xr { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed var(--ap-line); } .cr-xr span { color: var(--ap-mut); } .cr-xr b { color: #0f7a5a; } html.dark .cr-xr b { color: #34d399; }
.cr-xall { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; } .cr-xall .cr-ic { color: var(--cr-gold); fill: var(--cr-gold); }

/* Student Access */
.cr-satools { padding: 14px 16px; margin-bottom: 8px; display: grid; gap: 12px; }
.cr-sq { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ap-line); border-radius: 12px; padding: 0 12px; background: var(--ap-card); }
.cr-sq input { flex: 1; border: 0; outline: none; background: transparent; color: var(--ap-ink); font: 500 15px var(--sans); padding: 11px 0; }
.cr-sq .cr-ic { color: var(--ap-mut); }
.cr-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; } .cr-tags em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--cr-soft); color: var(--ap-mut); white-space: nowrap; }
#salist .cr-row { padding: 10px 14px; margin-bottom: 8px; }
.cr-lk { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--ap-line); border-radius: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.cr-lk > i { width: 36px; height: 36px; border-radius: 10px; background: var(--cr-soft); color: var(--ap-mut); display: grid; place-items: center; flex: 0 0 36px; }
.cr-lk > i.ok { background: #e3f6ee; color: #0f9f74; } .cr-lk > i.lk { background: #fdf1d8; color: #b7791f; }
.cr-lk b { display: block; font-size: 14px; }
.dialog.cr-sad { max-height: calc(100vh - 40px); overflow: auto; }
.cr-locks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 8px; }
.cr-lkr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.cr-lkr > i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--cr-soft); color: var(--ap-mut); font-style: normal; }
.cr-lkr.on { border-color: #f1d79a !important; } .cr-lkr.on > i { background: #fdf1d8; color: #b7791f; }
.cr-lkr b { display: block; font-size: 14.5px; }
.cr-sj { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.cr-sj.s-en { background: #e8eefc; color: #1d4ed8; } .cr-sj.s-m { background: #f3e8ff; color: #7c3aed; }
.ad-cr { display: grid; grid-template-columns: 1fr; gap: 0; margin: 16px 0; }
.ad-cr .cr-coadd .cr-seg { flex: 0 0 auto; }

/* the homework bar on top of a section */
.cr-hwbar { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px; border-radius: 14px; background: #fff8e8; border: 1px solid #f6dfa3; font-size: 14px; margin: 0 0 16px; color: #78350f; flex-wrap: wrap; }
.cr-hwbar > span { flex: 1; min-width: 180px; } .cr-hwbar .cr-bt { box-shadow: none; }
html.dark .cr-hwbar { background: #2a2617; border-color: #5b4a1d; color: #f0c575; }
.cr-x { width: 32px; height: 32px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; color: inherit; cursor: pointer; opacity: .7; }
.cr-x:hover { opacity: 1; background: rgba(0,0,0,.05); }

/* phones and small screens */
@media (max-width: 1080px) {
  .cr-news, .cr-lbw { grid-template-columns: 1fr; }
  .cr-week { position: static; }
  .cr-ban .cr-art { right: 40px; }
}
@media (max-width: 860px) {
  .cr-ppl, .cr-two2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cr-ban { flex-direction: column; align-items: flex-start; padding: 20px; min-height: 0; }
  .cr-bt1 h1 { font-size: 25px; }
  .cr-bact { justify-content: flex-start; }
  .cr-ban .cr-art { right: -10px; top: 30%; height: 110%; }
  .cr-grid { grid-template-columns: 1fr; }
  .cr-tabs button { padding: 10px 11px 12px; font-size: 14px; }
  .cr-tabs button .cr-ic { display: none; }
  .cr-two { grid-template-columns: 1fr; gap: 0; }
  .cr-pk { grid-template-columns: 1fr; }
  .cr-pk nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ap-line); padding: 8px; }
  .cr-pk nav button { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
  .cr-pk nav button span { display: inline; }
  .cr-opts { min-height: 220px; max-height: none; }
  .dialog.cr-dlg.cr-pkd { width: 100vw; max-width: 100vw; max-height: 92vh; }
  .cr-feedrow, .cr-row, .cr-task { padding: 12px; gap: 11px; }
  .cr-task { flex-wrap: wrap; } .cr-task .cr-rt { min-width: calc(100% - 60px); } .cr-task > .cr-bt, .cr-task > .cr-res { margin-left: 53px; }
  .cr-fi { width: 36px; height: 36px; flex-basis: 36px; }
  .cr-skb { grid-template-columns: 1fr 70px 40px; gap: 8px; font-size: 12.5px; }
  .cr-hwd, .cr-ed { padding: 16px; }
  .cr-pr .cr-bt.sm span { display: none; }
  .cr-mats, .cr-locks { grid-template-columns: 1fr; }
  .cr-kp { grid-template-columns: 1fr 1fr; }
  .cr-kp b { font-size: 23px; }
  .cr-tags { display: none; }
  .cr-dp button { width: calc((100% - 36px) / 7); min-width: 38px; }
  .cr-atbar #atall { margin-left: 0; }
}
