/* ---------- Base ---------- */
:root {
  --ink: #1b2a6b;          /* ball-point pen blue */
  --ink-soft: #3949ab;
  --bg: #f4f5f9;
  --card: #ffffff;
  --text: #1d2230;
  --muted: #5f6677;
  --line: #e3e6ee;
  --omr: #fdeef0;          /* pink OMR paper */
  --omr-line: #e8a5b0;
  --omr-ink: #c2185b;      /* printed OMR red */
  --ok: #1e8e3e;
  --bad: #d93025;
  --warn: #e37400;
  --radius: 12px;
  --te-font: "Noto Sans Telugu", "Nirmala UI", "Gautami", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, var(--te-font);
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 .25rem; line-height: 1.25; }
small { color: var(--muted); }
.te, .te-line, .te-inline, .brand-te { font-family: var(--te-font); }
.te-line { color: var(--muted); margin: 0 0 .5rem; }
.te-inline { font-size: .8em; color: var(--muted); font-weight: 400; margin-left: .4rem; }

.wrap { max-width: 860px; margin: 0 auto; padding: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
}
.brand { font-weight: 700; }
.brand small { color: #c5cae9; font-weight: 400; }
.brand-te { font-weight: 600; opacity: .85; margin-left: .3rem; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px;
  padding: .7rem 1.1rem; background: #e8eaf6; color: var(--ink);
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:disabled { background: #9fa8da; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: inherit; }
.topbar .btn.ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: .4rem .75rem; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.actions.center { justify-content: center; }

/* ---------- Home ---------- */
.hero { padding: 1rem 0 .5rem; }
.hero h1 { font-size: 1.6rem; }
.hero .sub { color: var(--muted); }
.mock-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.badge { font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.badge.draft { background: #fff3e0; color: var(--warn); border: 1px solid #ffcc80; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; padding: 0; list-style: none; margin: .8rem 0; }
.facts li { background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; font-size: .9rem; }
.facts b { display: block; font-size: 1.05rem; color: var(--ink); }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: .6rem 0; padding: .5rem .8rem .7rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.choice { display: flex; gap: .55rem; align-items: flex-start; padding: .35rem 0; cursor: pointer; }
.choice.inline { display: inline-flex; margin-right: 1rem; }
.choice input { margin-top: .3rem; accent-color: var(--ink); }
.note { font-size: .85rem; color: var(--muted); }

.badge.official { background: #e6f4ea; color: var(--ok); border: 1px solid #a8dab5; }
.pick-head { margin: .6rem 0 .5rem; font-size: 1rem; }
.mock-list { margin-bottom: 1rem; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: .6rem; }
.tabs { display: flex; gap: .4rem; margin-bottom: .6rem; }
.tab { flex: 1; font: inherit; font-weight: 700; cursor: pointer; padding: .6rem .5rem; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: center; }
.tab .te { font-family: var(--te-font); font-weight: 400; font-size: .8rem; color: var(--muted); }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab.active .te { color: #c5cae9; }
.mock-pick {
  font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: .15rem;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem;
}
.mock-pick.active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27,42,107,.12); }
.mp-title { font-weight: 700; }
.mp-te { font-family: var(--te-font); color: var(--muted); font-size: .9rem; }
.mp-meta { font-size: .82rem; color: var(--muted); display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; margin-top: .2rem; }

/* ---------- Instructions ---------- */
.instr li { margin-bottom: .8rem; }
.instr .te { color: var(--muted); font-size: .92rem; }
.agree { display: flex; gap: .5rem; align-items: flex-start; font-weight: 600; margin-top: .5rem; }
.agree input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--ink); }

/* ---------- Exam bar ---------- */
.exam-bar { justify-content: space-between; }
.series-tag { font-size: .85rem; }
.series-tag b { display: inline-block; background: #fff; color: var(--ink); border-radius: 6px; padding: 0 .45rem; margin-left: .2rem; font-size: 1rem; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.2rem; letter-spacing: .5px; }
.timer.low { color: #ffcdd2; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.bar-actions { display: flex; gap: .4rem; }

/* ---------- Exam layout ---------- */
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0; align-items: start; }
.booklet { padding: 1rem 1.2rem 6rem; max-width: 820px; min-width: 0; }
.sec-head { margin: 1.4rem 0 .6rem; padding: .5rem .8rem; background: #e8eaf6; border-left: 4px solid var(--ink); border-radius: 6px; font-weight: 700; }
.sec-head .te-inline { color: var(--ink-soft); }
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .75rem; scroll-margin-top: 70px; }
.q.current { border-color: var(--ink-soft); box-shadow: 0 0 0 2px rgba(57,73,171,.12); }
.q-num { font-weight: 700; color: var(--ink); margin-right: .3rem; }
.q-text { margin: 0 0 .35rem; }
.q-text.te { font-family: var(--te-font); }
.q-text.en + .q-text.te { color: #37474f; }
.q-body { margin-bottom: .35rem; }
.q-body .q-num { float: left; }
.q-body.te { font-family: var(--te-font); color: #37474f; border-top: 1px dashed var(--line); padding-top: .35rem; }
.q-body.te:first-child { border-top: 0; padding-top: 0; color: inherit; }
.q-list { list-style: none; padding-left: 1.4rem; margin: .3rem 0 .45rem; display: grid; gap: .25rem; }
.q-table { border-collapse: collapse; margin: .35rem 0 .5rem 1.4rem; font-size: .93rem; }
.q-table th, .q-table td { border: 1px solid var(--line); padding: .3rem .55rem; text-align: left; vertical-align: top; }
.q-table th { background: #f3f4f9; font-weight: 600; }
.passage { background: #f3f4fb; border: 1px solid #d5d9ee; border-left: 4px solid var(--ink-soft); border-radius: var(--radius); padding: .8rem 1rem; margin: .4rem 0 .9rem; }
.passage p { margin: .25rem 0; }
.passage .te { font-family: var(--te-font); color: #37474f; border-top: 1px dashed #c5cae9; margin-top: .5rem; padding-top: .4rem; }
.rv-passage { margin: .3rem 0 .5rem; font-size: .9rem; }
.rv-passage summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.q-figs { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .4rem 0 .6rem 1.4rem; }
.q-figs figure { margin: 0; text-align: center; }
.q-figs img { display: block; max-width: min(100%, 300px); max-height: 220px; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.q-figs figure:not(:only-child) img { max-height: 90px; }
.q-figs figcaption { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.tag.deleted { background: #fff3e0; color: var(--warn); }
.q-opts { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; }
.q-opts li { display: flex; gap: .5rem; overflow-wrap: anywhere; }
.q-text, .q-list li, .q-table td { overflow-wrap: anywhere; }
.q-opts .ol { font-weight: 700; color: var(--ink); min-width: 1.7rem; }
.q-opts .te { color: #37474f; }
.q-opts .sep { color: #b0b6c3; margin: 0 .3rem; }

/* ---------- OMR sheet ---------- */
.omr {
  position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto;
  background: var(--omr); border-left: 2px solid var(--omr-line);
  padding: .8rem .9rem 2rem; color: var(--omr-ink);
}
.omr-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-bottom: 2px solid var(--omr-line); padding: .3rem 0 .5rem; position: sticky; top: -.8rem; background: var(--omr); z-index: 2; }
.omr-timer { display: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.omr-title { font-weight: 800; letter-spacing: 1px; }
.omr-sub { font-size: .75rem; }
.omr-close { display: none; }
.omr-series { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 0; border-bottom: 1px dashed var(--omr-line); }
.omr-label { font-size: .8rem; font-weight: 700; }
.omr-counts { font-size: .78rem; padding: .5rem 0; display: flex; gap: .8rem; flex-wrap: wrap; }
.omr-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
.omr-row { display: flex; align-items: center; gap: .55rem; padding: 3px 6px; border-radius: 6px; }
.omr-row.g5 { border-bottom: 1px solid var(--omr-line); padding-bottom: 6px; margin-bottom: 4px; }
.omr-row.current { background: rgba(194,24,91,.10); }
.omr-row .rn { width: 2.2rem; text-align: right; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.omr-sec-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: .6rem 0 .2rem 2.8rem; opacity: .8; }

.bubbles { display: flex; gap: .45rem; }
.bubble {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--omr-ink); background: #fff; color: var(--omr-ink);
  font: 700 .78rem/1 "Inter", sans-serif; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .06s;
}
.bubble:active { transform: scale(.9); }
.bubble.filled { background: var(--ink); border-color: var(--ink); color: transparent; }
.row-double .bubble.filled { background: #4a148c; border-color: #4a148c; }
.row-double .rn::after { content: " ⚠"; color: var(--bad); }

/* ---------- Phone quick bar ---------- */
.quickbar { display: none; }

@media (max-width: 900px) {
  .exam-layout { grid-template-columns: minmax(0, 1fr); }
  .booklet { padding: .8rem .8rem 7rem; }
  .omr {
    position: fixed; inset: 0; top: 0; height: 100%; z-index: 40; border-left: 0;
    transform: translateY(100%); transition: transform .22s ease;
  }
  .omr.open { transform: translateY(0); }
  .omr-close { display: inline-block; color: var(--omr-ink); border-color: var(--omr-line); }
  .omr-timer { display: inline-block; }
  .omr-head { top: -.8rem; padding-top: .8rem; }
  .bubble { width: 36px; height: 36px; font-size: .85rem; }
  .quickbar {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--omr); border-top: 2px solid var(--omr-line); color: var(--omr-ink);
    padding: .55rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  }
  .quickbar .bubble { width: 42px; height: 42px; font-size: .95rem; }
  .qb-label { font-weight: 700; min-width: 3rem; }
  .quickbar .btn.ghost { color: var(--omr-ink); border-color: var(--omr-line); }
  .series-tag { font-size: .75rem; }
  .timer { font-size: 1.05rem; }
}
@media (min-width: 901px) { .omr-btn { display: none; } }

/* ---------- Result ---------- */
.banner { border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.banner.bad { background: #fdecea; color: #a50e0e; border: 1px solid #f5c2bd; }
.banner.info { background: #e8f0fe; color: #174ea6; border: 1px solid #c6dafc; }
.score-card { text-align: center; }
.score-big { font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.score-big small { font-size: 1.3rem; }
.score-sub { color: var(--muted); margin-bottom: .8rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.stat { background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: .55rem; }
.stat b { display: block; font-size: 1.3rem; }
.stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); }
.table-wrap { overflow-x: auto; }
.sec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sec-table th, .sec-table td { padding: .5rem .45rem; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.sec-table th:first-child, .sec-table td:first-child { text-align: left; }
.sec-table tfoot td { font-weight: 700; }
#insights li { margin-bottom: .45rem; }

.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .8rem; }
.chip { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .8rem; cursor: pointer; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.rv { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .7rem; }
.rv-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; margin-bottom: .35rem; }
.tag { font-weight: 700; border-radius: 999px; padding: .1rem .6rem; font-size: .78rem; }
.tag.correct { background: #e6f4ea; color: var(--ok); }
.tag.wrong { background: #fdecea; color: var(--bad); }
.tag.double { background: #f3e5f5; color: #6a1b9a; }
.tag.blank { background: #f1f3f4; color: var(--muted); }
.rv .q-opts li { padding: .2rem .4rem; border-radius: 6px; }
.rv .q-opts li.is-answer { background: #e6f4ea; }
.rv .q-opts li.is-wrong-pick { background: #fdecea; }
.rv .q-opts .mark { margin-left: auto; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.explain { background: #fffde7; border: 1px solid #fff59d; border-radius: 8px; padding: .55rem .75rem; margin-top: .55rem; font-size: .92rem; }
.explain .te { font-family: var(--te-font); color: #4e4a2a; margin-top: .3rem; }
.report-btn { font: inherit; font-size: .78rem; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- Modal & toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(10,15,40,.5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 1.2rem; max-width: 440px; width: 100%; }
.modal-box textarea { width: 100%; min-height: 90px; font: inherit; padding: .5rem; border-radius: 8px; border: 1px solid var(--line); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 70;
  background: #202124; color: #fff; padding: .7rem 1rem; border-radius: 10px;
  max-width: min(92vw, 460px); font-size: .92rem; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.warn { background: #b3261e; }

/* ---------- Updates feed ---------- */
.upd-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .7rem; }
.upd-list li { border-left: 3px solid var(--ink-soft); padding-left: .7rem; font-size: .93rem; }
.upd-list .te { font-family: var(--te-font); color: var(--muted); font-size: .88rem; }
.upd-date { font-size: .78rem; color: var(--muted); margin-right: .4rem; }
.upd-tag { font-size: .72rem; font-weight: 700; background: #fff3e0; color: var(--warn); border-radius: 999px; padding: .05rem .5rem; }
.upd-list a { font-size: .8rem; color: var(--ink-soft); }

/* ---------- Streak, guess, analysis ---------- */
.streak-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .8rem; }
.streak-bar > span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; }
.streak-bar .te { font-family: var(--te-font); color: var(--muted); font-size: .8rem; margin-left: .3rem; }
.guess-btn { font: inherit; font-size: .8rem; margin-top: .5rem; border: 1px dashed #b0b6c3; background: #fff; color: var(--muted); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; }
.guess-btn.on { background: #fff3e0; border: 1px solid #ffb74d; color: var(--warn); font-weight: 700; }
#analysis h4 { margin: 1rem 0 .4rem; }
.topic-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tchip { font-size: .82rem; border-radius: 8px; padding: .25rem .55rem; border: 1px solid var(--line); }
.tchip.good { background: #e6f4ea; border-color: #a8dab5; }
.tchip.mid { background: #fff8e1; border-color: #ffe082; }
.tchip.weak { background: #fdecea; border-color: #f5c2bd; }
.ok-t { color: var(--ok); font-weight: 700; } .bad-t { color: var(--bad); font-weight: 700; } .warn-t { color: var(--warn); font-weight: 700; }

/* very small phones (< 360px) */
@media (max-width: 360px) {
  .exam-bar { flex-wrap: wrap; gap: .3rem; padding: .4rem .5rem; }
  .bar-actions .btn.small { padding: .35rem .5rem; font-size: .8rem; }
  .quickbar { gap: .3rem; padding-left: .4rem; padding-right: .4rem; }
  .quickbar .bubbles { gap: .3rem; }
  .quickbar .bubble { width: 36px; height: 36px; }
  .quickbar .btn.ghost { padding: .3rem .45rem; font-size: .78rem; }
}
.rv-head { align-items: flex-start; }
.rv-head .tag { white-space: nowrap; flex-shrink: 0; align-self: flex-start; }

/* ---------- Qualifying chance ---------- */
.qual-top { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: .4rem 0 .6rem; }
.qual-top select { font: inherit; padding: .3rem .5rem; border-radius: 8px; border: 1px solid var(--line); }
.qual-score b { font-size: 1.2rem; color: var(--ink); }
.qual-signal { font-weight: 800; font-size: 1.15rem; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem; }
.qual-signal .te { font-family: var(--te-font); font-weight: 600; font-size: .9rem; margin-left: .4rem; }
.qual-signal.safe { background: #e6f4ea; color: var(--ok); }
.qual-signal.border { background: #fff8e1; color: #b26a00; }
.qual-signal.below { background: #fdecea; color: var(--bad); }
.qual-table td { white-space: normal; vertical-align: top; }
.qnote { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.muted { color: var(--muted); }

/* ---------- Account, lock, pass, rating ---------- */
.acc-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.acc-actions { display: flex; gap: .4rem; }
.mock-pick.locked { opacity: .85; }
.lock { font-size: .75rem; font-weight: 700; color: #6a1b9a; background: #f3e5f5; border-radius: 999px; padding: .05rem .5rem; }
.free { font-size: .72rem; font-weight: 800; color: var(--ok); background: #e6f4ea; border-radius: 999px; padding: .05rem .5rem; }
.inp { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; margin: .3rem 0; }
label.f { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: .5rem; }
.btn.google { width: 100%; background: #fff; border: 1px solid var(--line); color: #1d2230; }
.or { text-align: center; color: var(--muted); font-size: .85rem; margin: .7rem 0 .3rem; }
.pass-list { list-style: none; padding: 0; display: grid; gap: .35rem; }
.stars { display: flex; gap: .3rem; }
.star { font-size: 2rem; line-height: 1; background: none; border: 0; color: #d0d4de; cursor: pointer; padding: 0 .1rem; }
.star.on { color: #f5a623; }

/* Begin button: looks inactive until the box is ticked, but always explains itself */
#btn-begin.waiting { background: #9fa8da; }
.agree { border-radius: 10px; padding: .6rem .7rem; border: 2px solid transparent; }
.agree.nudge { border-color: var(--warn); background: #fff3e0; animation: nudge .5s ease 2; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.agree input { transform: scale(1.3); }

/* disclaimer box for previous papers with team-prepared parts */
.banner.warnbox { background: #fff8e1; color: #5d4500; border: 1px solid #ffe082; font-weight: 400; font-size: .92rem; margin-top: .6rem; }
.banner.warnbox .te { font-family: var(--te-font); margin-top: .35rem; color: #6d5a1f; }

/* "Report an error" clearly visible (we promise fixes within 24 h) */
.report-btn { font-size: .82rem; text-decoration: none; color: var(--ink-soft); border: 1px solid #c5cae9; border-radius: 999px; padding: .25rem .7rem; background: #f3f4fb; }
.report-btn:hover { background: #e8eaf6; }

/* Learn-the-other-options notes in the answer review */
.opt-notes { margin-top:.5rem; background:#eef5fc; border:1px solid #cfe2f5; border-radius:10px; padding:.45rem .7rem; font-size:.92rem; }
.opt-notes summary { cursor:pointer; font-weight:600; color:#1a4d7a; }
.opt-notes ul { list-style:none; margin:.4rem 0 0; padding:0; }
.opt-notes li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.45rem; padding:.3rem 0; border-top:1px dashed #cfe2f5; overflow-wrap:anywhere; }
.opt-notes li:first-child { border-top:0; }
.opt-notes .ol { font-weight:700; color:#1a4d7a; }
.opt-notes .te { color:#444; margin-top:.1rem; }

/* ===== Grand Mock card ===== */
.card.grand { background:linear-gradient(135deg,#fff8e1,#ffecb3); border:1px solid #ffd54f; }
.grand-row { display:flex; gap:.8rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.grand-row > div { min-width:0; flex:1 1 240px; }
.grand-title { font-weight:700; font-size:1.1rem; color:#7a4b00; }
.grand-count { margin-top:.35rem; font-weight:600; color:#7a4b00; }
.grand-count.live { color:#c62828; }
.badge.grand-b { background:#ffecb3; color:#7a4b00; border:1px solid #ffd54f; }
/* ===== saved (star) + review actions ===== */
.rv-actions { display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-top:.45rem; flex-wrap:wrap; }
.star-btn { background:#fff; border:1px solid #d0d5e2; border-radius:999px; padding:.25rem .7rem; font:inherit; font-size:.85rem; cursor:pointer; color:#555; }
.star-btn.on { background:#fff8e1; border-color:#ffd54f; color:#7a4b00; font-weight:600; }
.star-btn .te { font-size:.8rem; }
/* ===== topic practice ===== */
.topic-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr)); gap:.5rem; margin-top:.6rem; }
.topic-btn { text-align:left; background:#fff; border:1px solid #d0d5e2; border-radius:10px; padding:.55rem .7rem; font:inherit; cursor:pointer; display:flex; flex-direction:column; gap:.15rem; min-width:0; overflow-wrap:anywhere; }
.topic-btn span { font-size:.82rem; color:#666; }
.topic-btn.all { background:#eef2ff; border-color:#b9c4f0; }
.topic-btn:hover { border-color:#1b2a6b; }
.pr-top { display:flex; justify-content:space-between; gap:.5rem; flex-wrap:wrap; margin:.6rem 0; font-size:.92rem; }
.q-opts.pickable li { cursor:pointer; }
.q-opts.pickable li:hover { background:#eef2ff; }
.card.center { text-align:center; }

/* ---------- Exam picker, footer, help (Launch & hosting, 28 Nov 2026) ---------- */
.exam-chip { margin-left: auto; white-space: nowrap; }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.exam-card { text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; font: inherit; color: inherit; cursor: pointer; }
.exam-card.live { border-color: var(--ink); }
.exam-card.live:hover { background: #eef0fb; }
.exam-card.soon { opacity: .7; cursor: default; }
.exam-card h3 { font-size: 1.05rem; }
.exam-card .tag { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .1rem .6rem; margin-top: .5rem; }
.exam-card.live .tag { background: #e6f4ea; color: var(--ok); }
.exam-card.soon .tag { background: #eceff1; color: var(--muted); }
.site-foot { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1rem; text-align: center; }
.site-foot nav a { color: var(--ink); font-size: .9rem; }
.help-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; border: 0; border-radius: 999px; padding: .6rem 1rem; background: var(--ink); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; }
.help-panel { position: fixed; inset: 0; z-index: 70; background: rgba(10,15,40,.45); display: flex; align-items: flex-end; justify-content: flex-end; padding: 1rem; }
.help-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 420px; max-height: 80vh; overflow: auto; padding: 1rem; }
.help-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.help-q { display: block; width: 100%; text-align: left; font: inherit; background: #f3f4fb; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; margin-bottom: .45rem; cursor: pointer; }
.help-q:hover { background: #e8eaf6; }
.help-a { background: #fffde7; border: 1px solid #fff59d; border-radius: 10px; padding: .7rem .8rem; margin-bottom: .6rem; }
.help-a .te { color: var(--muted); margin-top: .35rem; }

/* ---------- Legal pages ---------- */
.legal h1 { font-size: 1.5rem; margin-bottom: .2rem; }
.legal h2 { font-size: 1.1rem; margin: 1.3rem 0 .3rem; }
.legal p, .legal li { line-height: 1.6; }
.legal .updated { color: var(--muted); font-size: .85rem; }
.legal .te-sum { background: #f3f4fb; border-radius: 10px; padding: .7rem .9rem; font-family: var(--te-font); }
.legal mark.todo { background: #ffe0b2; color: #8a4b00; padding: 0 .3rem; border-radius: 4px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.legal dt { font-weight: 700; color: var(--muted); }
.legal dd { margin: 0; }
.topbar a.btn { text-decoration: none; }
