/* Chem-Bio Core — unified solved-papers widget stylesheet.
   All rules scoped under .cbs-root so the host theme can't leak in and the
   widget can't leak out. Colours match the locked PDF engine:
   PINK #E0298A, INK #1E2BE0, GREEN #2E9E3F,
   difficulty H #D92929 / M #2173E6 / E #29A847, amber #CC8C05, red #BF3829. */

.cbs-root {
  --cbs-pink: #E0298A;
  --cbs-ink:  #1E2BE0;
  --cbs-green:#2E9E3F;
  --cbs-amber:#CC8C05;
  --cbs-red:  #BF3829;
  --cbs-slate:#333B4D;
  --cbs-h: #D92929;
  --cbs-m: #2173E6;
  --cbs-e: #29A847;
  color: var(--cbs-slate);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}
.cbs-root *, .cbs-root *::before, .cbs-root *::after { box-sizing: border-box; }

.cbs-root .cbs-loading, .cbs-root .cbs-err, .cbs-gate {
  padding: 24px; text-align: center; color: #333B4D;
}
.cbs-root .cbs-err { color: var(--cbs-red); }

/* ---- header ---- */
.cbs-root .cbs-title { font-weight: 800; font-size: 1.25rem; color: var(--cbs-pink); margin: 0 0 2px; }
.cbs-root .cbs-sub { font-size: 0.85rem; color: #6b7280; margin: 0 0 14px; }

/* ---- mode switch ---- */
.cbs-root .cbs-modes { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.cbs-root .cbs-mode {
  font: inherit; font-weight: 700; font-size: 0.9rem; padding: 8px 16px; cursor: pointer;
  border: 1px solid #d9b9cd; border-radius: 999px; background: #fff; color: var(--cbs-slate);
  min-height: 40px;
}
.cbs-root .cbs-mode.on { background: var(--cbs-pink); color: #fff; border-color: var(--cbs-pink); }

/* ---- controls ---- */
.cbs-root .cbs-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 12px; background: #fbf3f8; border: 1px solid #f2d6e7;
  border-radius: 10px; margin-bottom: 16px;
}
.cbs-root .cbs-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 130px; }
.cbs-root .cbs-field label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--cbs-pink);
}
.cbs-root select {
  font: inherit; padding: 8px 10px; border: 1px solid #d9b9cd; border-radius: 8px;
  background: #fff; color: var(--cbs-slate); width: 100%; cursor: pointer;
  min-height: 42px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23E0298A' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.cbs-root select:disabled { opacity: 0.5; cursor: default; }

.cbs-root .cbs-toggle {
  display: flex; align-items: center; gap: 6px; font-size: 0.82rem;
  flex: 0 0 auto; cursor: pointer; user-select: none; white-space: nowrap;
  min-height: 42px;
}
.cbs-root .cbs-toggle input { cursor: pointer; width: 16px; height: 16px; }

/* ---- difficulty key ---- */
.cbs-root .cbs-key { display: flex; gap: 14px; font-size: 0.78rem; margin: 0 0 10px; color: #6b7280; }
.cbs-root .cbs-key span { display: inline-flex; align-items: center; gap: 5px; }
.cbs-root .cbs-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cbs-root .cbs-dot.H { background: var(--cbs-h); }
.cbs-root .cbs-dot.M { background: var(--cbs-m); }
.cbs-root .cbs-dot.E { background: var(--cbs-e); }

/* ---- idle prompt ---- */
.cbs-root .cbs-idle {
  padding: 28px 20px; text-align: center; color: #6b7280;
  background: #fafafb; border: 1px dashed #d9b9cd; border-radius: 10px;
  font-size: 0.95rem;
}
.cbs-root .cbs-idle strong { color: var(--cbs-pink); }

/* ---- question head ---- */
.cbs-root .cbs-qhead { border-top: 2px solid var(--cbs-pink); padding-top: 10px; margin-top: 6px; }
.cbs-root .cbs-qtitle { font-weight: 800; color: var(--cbs-pink); font-size: 1.05rem; }
.cbs-root .cbs-qt { font-weight: 600; color: #6b7280; }
.cbs-root .cbs-qmeta { font-size: 0.82rem; color: #6b7280; margin-top: 2px; }

/* ---- part ---- */
.cbs-root .cbs-part { padding: 14px 0; border-bottom: 1px solid #f0e2ea; }
.cbs-root .cbs-partbar { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cbs-root .cbs-plabel { font-weight: 800; color: var(--cbs-slate); }
.cbs-root .cbs-pdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; align-self: center; }
.cbs-root .cbs-pdot.H { background: var(--cbs-h); }
.cbs-root .cbs-pdot.M { background: var(--cbs-m); }
.cbs-root .cbs-pdot.E { background: var(--cbs-e); }
.cbs-root .cbs-pright { margin-left: auto; font-size: 0.82rem; color: #6b7280; text-align: right; }
.cbs-root .cbs-cmd { color: var(--cbs-pink); font-weight: 700; }

/* ---- question prompt (toggle) ---- */
.cbs-root .cbs-prompt {
  font-size: 0.92rem; color: #4b5563; background: #f7f7fb; border-left: 3px solid #c9cdd6;
  padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 6px 0 10px;
}

/* ---- answer (handwriting ink) ---- */
.cbs-root .cbs-answer { margin: 4px 0 12px; }
.cbs-root .cbs-aline {
  display: flex; gap: 8px; align-items: flex-start; margin: 3px 0;
  font-family: "CBSHand", "Comic Sans MS", cursive;
  font-size: 1.28rem; line-height: 1.35; color: var(--cbs-ink);
}
.cbs-root .cbs-tick { color: var(--cbs-green); font-weight: 700; flex: 0 0 auto; }
.cbs-root .cbs-notick { flex: 0 0 auto; width: 1em; }
.cbs-root .cbs-key-term { color: var(--cbs-pink); font-weight: 700; }

/* ---- mark scheme ---- */
.cbs-root .cbs-ms {
  background: #fafafa; border: 1px solid #ececec; border-radius: 8px;
  padding: 10px 12px; margin: 8px 0; font-size: 0.9rem;
}
.cbs-root .cbs-ms-h { font-weight: 700; color: var(--cbs-slate); margin-bottom: 6px; }
.cbs-root .cbs-ms-sub { font-weight: 700; color: var(--cbs-pink); font-size: 0.8rem; margin: 6px 0 2px; text-transform: uppercase; letter-spacing: 0.03em; }
.cbs-root .cbs-ms-pt { display: flex; gap: 8px; margin: 3px 0; }
.cbs-root .cbs-ms-mk { flex: 0 0 auto; font-weight: 700; color: var(--cbs-green); min-width: 24px; }
.cbs-root .cbs-guide { margin-top: 6px; display: flex; gap: 6px; align-items: baseline; font-size: 0.86rem; }
.cbs-root .cbs-guide .lab { font-weight: 700; flex: 0 0 auto; }
.cbs-root .cbs-guide.A .lab { color: var(--cbs-green); }
.cbs-root .cbs-guide.I .lab { color: var(--cbs-amber); }
.cbs-root .cbs-guide.D .lab { color: var(--cbs-red); }

/* ---- callouts ---- */
.cbs-root .cbs-callout { border-left: 4px solid; border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 8px 0; font-size: 0.9rem; }
.cbs-root .cbs-callout .ch { font-weight: 800; display: block; margin-bottom: 2px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.cbs-root .cbs-callout.exam { border-color: var(--cbs-ink); background: #eef0fe; }
.cbs-root .cbs-callout.exam .ch { color: var(--cbs-ink); }
.cbs-root .cbs-callout.score { border-color: var(--cbs-amber); background: #fdf6e7; }
.cbs-root .cbs-callout.score .ch { color: var(--cbs-amber); }
.cbs-root .cbs-callout.lost { border-color: #c0392b; background: #fdf0ee; }
.cbs-root .cbs-callout.lost .ch { color: #c0392b; }

/* ---- revise from notes ---- */
.cbs-root .cbs-revise { border-left: 4px solid var(--cbs-pink); background: #fdeef6; padding: 8px 12px; border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 0.88rem; }
.cbs-root .cbs-revise .ch { font-weight: 800; color: var(--cbs-pink); display: block; margin-bottom: 3px; }
.cbs-root .cbs-revise li { margin: 2px 0; }
.cbs-root .cbs-revise ul { margin: 0; padding-left: 18px; }

/* ---- footer ---- */
.cbs-root .cbs-footer { text-align: center; font-size: 0.78rem; color: #9aa1ad; margin-top: 18px; padding-top: 10px; border-top: 1px solid #f0e2ea; }

.cbs-root sup, .cbs-root sub { font-size: 0.72em; }

/* ---- topic filters, results list ---- */
.cbs-root .cbs-filters { margin: 2px 0 6px; }
.cbs-root .cbs-frow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cbs-root .cbs-flab { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cbs-pink); width: 74px; flex: 0 0 auto; }
.cbs-root .cbs-chip {
  font: inherit; font-size: 0.8rem; padding: 6px 12px; cursor: pointer; border: 1px solid #d9b9cd;
  border-radius: 999px; background: #fff; color: var(--cbs-slate); display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px;
}
.cbs-root .cbs-chip.on { background: #fbeaf3; border-color: var(--cbs-pink); color: var(--cbs-pink); }
.cbs-root .cbs-chipn { font-size: 0.7rem; color: #9aa1ad; }
.cbs-root .cbs-chip.on .cbs-chipn { color: var(--cbs-pink); }
.cbs-root .cbs-search { font: inherit; font-size: 0.85rem; padding: 8px 10px; border: 1px solid #d9b9cd; border-radius: 8px; flex: 1 1 140px; min-width: 120px; min-height: 36px; }
.cbs-root .cbs-count { font-size: 0.8rem; color: #6b7280; margin: 6px 0 4px; font-weight: 700; }

.cbs-root .cbs-list { display: flex; flex-direction: column; }
.cbs-root .cbs-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 8px; cursor: pointer;
  border-bottom: 1px solid #f0e2ea; font-size: 0.9rem;
}
.cbs-root .cbs-row:hover { background: #fdf5fa; }
.cbs-root .cbs-row.open { background: #fbeaf3; }
.cbs-root .cbs-rdot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.cbs-root .cbs-rdot.H { background: var(--cbs-h); }
.cbs-root .cbs-rdot.M { background: var(--cbs-m); }
.cbs-root .cbs-rdot.E { background: var(--cbs-e); }
.cbs-root .cbs-rsrc { flex: 0 0 62px; color: #6b7280; font-size: 0.8rem; }
.cbs-root .cbs-rlab { flex: 0 0 58px; font-weight: 800; color: var(--cbs-slate); }
.cbs-root .cbs-rcmd { flex: 0 0 92px; color: var(--cbs-pink); font-weight: 700; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbs-root .cbs-rmk { flex: 0 0 34px; color: #9aa1ad; font-size: 0.78rem; }
.cbs-root .cbs-rprompt { flex: 1 1 auto; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbs-root .cbs-rchev { flex: 0 0 auto; color: #c98fb4; transition: transform .15s; }
.cbs-root .cbs-row.open .cbs-rchev { transform: rotate(180deg); }
.cbs-root .cbs-rbody { padding: 6px 8px 16px; border-bottom: 1px solid #f0e2ea; }

/* ---- figures ---- */
.cbs-root .cbs-fig { margin: 8px 0; text-align: center; }
.cbs-root .cbs-fig img { max-width: 100%; height: auto; border: 1px solid #eee; border-radius: 6px; }
.cbs-root .cbs-figcap { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* ---- chemistry blocks (working, MCQ, tables) ---- */
.cbs-root .cbs-work { background: #f7f8ff; border: 1px solid #e3e6f8; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.cbs-root .cbs-wt { font-weight: 700; color: var(--cbs-ink); font-size: 13px; margin-bottom: 6px; }
.cbs-root .cbs-wwhy { margin: 0 0 6px 30px; font-size: 12.5px; color: #6b7280; font-style: italic; }
.cbs-root .cbs-wfinal { display: inline-block; border: 2px solid var(--cbs-ink); border-radius: 8px; padding: 6px 12px; margin-top: 8px; color: var(--cbs-ink); font-weight: 700; }
.cbs-root .cbs-mcq { margin: 10px 0; }
.cbs-root .cbs-opt { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; margin: 4px 0; }
.cbs-root .cbs-opt.on { border-color: #16a34a; background: #f0fdf4; }
.cbs-root .cbs-optL { font-weight: 800; color: #6b7280; min-width: 16px; }
.cbs-root .cbs-opt.on .cbs-optL { color: #16a34a; }
.cbs-root .cbs-mcqh { font-weight: 800; color: var(--cbs-ink); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
.cbs-root .cbs-mcqh.red { color: #c0392b; }
.cbs-root .cbs-dis { display: flex; gap: 10px; align-items: baseline; padding: 3px 10px; font-size: 13.5px; color: #4b5563; }
.cbs-root .cbs-disL { font-weight: 800; color: #c0392b; min-width: 16px; }
.cbs-root .cbs-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; max-width: 100%; }
.cbs-root .cbs-tbl { border-collapse: collapse; font-size: 13.5px; }
.cbs-root .cbs-tbl th, .cbs-root .cbs-tbl td { border: 1px solid #d1d5db; padding: 6px 10px; text-align: left; }
.cbs-root .cbs-tbl th { background: #f3f4f6; }
.cbs-root .cbs-tbl td.ink { color: var(--cbs-ink); font-weight: 600; }

/* ================= v1.2.0 additions ================= */

/* ---- loading skeleton ---- */
.cbs-root .cbs-skel { margin-bottom: 8px; }
.cbs-root .cbs-skb, .cbs-root .cbs-skpill, .cbs-root .cbs-skpanel {
  background: linear-gradient(90deg, #f3e4ee 25%, #faf1f7 50%, #f3e4ee 75%);
  background-size: 200% 100%;
  animation: cbs-shimmer 1.3s linear infinite;
  border-radius: 8px;
}
.cbs-root .cbs-skb { height: 22px; margin: 6px 0; }
.cbs-root .cbs-skb.thin { height: 13px; }
.cbs-root .cbs-skrow { display: flex; gap: 8px; margin: 12px 0; }
.cbs-root .cbs-skpill { width: 130px; height: 40px; border-radius: 999px; display: inline-block; }
.cbs-root .cbs-skpanel { height: 120px; }
@keyframes cbs-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.cbs-root .cbs-skel + .cbs-loading { padding-top: 8px; }

/* ---- admin-only hint above access-filtered tabs ---- */
.cbs-adminnote {
  max-width: 860px; margin: 0 auto 8px; padding: 7px 12px;
  background: #fdf6e7; border: 1px dashed #e2c76a; border-radius: 8px;
  color: #7a5c05; font-size: 12.5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media print { .cbs-adminnote { display: none; } }

/* ---- tabs (several papers on one page) ---- */
.cbs-tabs { max-width: 860px; margin: 0 auto; }
.cbs-tabs .cbs-tabbar {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px; margin-bottom: 12px; border-bottom: 2px solid #f2d6e7;
  scrollbar-width: thin;
}
.cbs-tabs .cbs-tabbar::-webkit-scrollbar { height: 4px; }
.cbs-tabs .cbs-tabbar::-webkit-scrollbar-thumb { background: #e7cadd; border-radius: 4px; }
.cbs-tabs .cbs-tab {
  font: inherit; font-weight: 700; font-size: 0.9rem; white-space: nowrap;
  padding: 9px 16px; min-height: 42px; cursor: pointer;
  border: 1px solid #d9b9cd; border-radius: 999px; background: #fff; color: #333B4D;
  flex: 0 0 auto;
}
.cbs-tabs .cbs-tab.on { background: #E0298A; border-color: #E0298A; color: #fff; }
.cbs-tabs .cbs-tab:focus-visible { outline: 2px solid #1E2BE0; outline-offset: 2px; }

/* ---- practice mode ("Try first") ---- */
.cbs-root .cbs-practice { margin-left: auto; font-weight: 700; color: var(--cbs-pink); }
.cbs-root .cbs-solwrap { margin: 6px 0; }
.cbs-root .cbs-reveal {
  font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  color: #fff; background: var(--cbs-ink); border: none; border-radius: 8px;
  padding: 10px 18px; min-height: 42px;
}
.cbs-root .cbs-reveal:focus-visible { outline: 2px solid var(--cbs-pink); outline-offset: 2px; }

/* ---- question navigation + copy link ---- */
.cbs-root .cbs-qnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.cbs-root .cbs-qnav button {
  font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer;
  border: 1px solid #d9b9cd; border-radius: 8px; background: #fff; color: var(--cbs-slate);
  padding: 10px 14px; min-height: 44px;
}
.cbs-root .cbs-qnav button:not(:disabled):hover { border-color: var(--cbs-pink); color: var(--cbs-pink); }
.cbs-root .cbs-qnav button:disabled { opacity: 0.4; cursor: default; }
.cbs-root .cbs-linkbtn {
  font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  border: 1px solid #d9b9cd; border-radius: 999px; background: #fff; color: var(--cbs-pink);
  padding: 2px 10px;
}
.cbs-root .cbs-linkbtn:hover { border-color: var(--cbs-pink); }

/* ---- collapsible filter bar ---- */
.cbs-root .cbs-ftoggle {
  font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  border: 1px solid #d9b9cd; border-radius: 8px; background: #fbf3f8; color: var(--cbs-pink);
  padding: 8px 14px; min-height: 42px; margin: 2px 0 6px;
  display: inline-flex; align-items: center; gap: 8px;
}
.cbs-root .cbs-fcount { color: #6b7280; font-weight: 600; font-size: 0.78rem; }

/* ---- chunked list: show more ---- */
.cbs-root .cbs-more {
  font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  border: 1px dashed #d9b9cd; border-radius: 10px; background: #fbf3f8; color: var(--cbs-pink);
  padding: 12px; min-height: 46px; margin: 10px 0; width: 100%;
}

/* ---- rows are real buttons now (keyboard + screen reader) ---- */
.cbs-root .cbs-row { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #f0e2ea; font: inherit; color: var(--cbs-slate); }
.cbs-root .cbs-row:hover { background: #fdf5fa; }
.cbs-root .cbs-row.open { background: #fbeaf3; }
.cbs-root .cbs-row:focus-visible { outline: 2px solid var(--cbs-ink); outline-offset: -2px; }
.cbs-root .cbs-mode:focus-visible, .cbs-root .cbs-chip:focus-visible { outline: 2px solid var(--cbs-ink); outline-offset: 2px; }

/* ---- back to top ---- */
.cbs-root .cbs-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 9998;
  font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer;
  background: var(--cbs-pink); color: #fff; border: none; border-radius: 999px;
  padding: 12px 16px; min-height: 44px; box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

/* ---- figure lightbox (attached to <body>, own cbs- scope) ---- */
.cbs-root .cbs-fig img { cursor: zoom-in; }
.cbs-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(20, 16, 24, 0.92);
}
.cbs-lightbox.on { display: block; }
.cbs-lightbox .cbs-lb-scroll {
  position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch;
  display: flex; align-items: center; justify-content: center; padding: 30px 10px 44px;
}
.cbs-lightbox img {
  max-width: 96%; max-height: 88vh; border-radius: 8px; background: #fff;
  cursor: zoom-in; margin: auto;
}
.cbs-lightbox.zoom .cbs-lb-scroll { display: block; }
.cbs-lightbox.zoom img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; }
.cbs-lightbox .cbs-lb-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 18px; font-weight: 700; cursor: pointer;
  background: #fff; color: #333B4D; border: none; border-radius: 50%;
  width: 42px; height: 42px;
}
.cbs-lightbox .cbs-lb-hint {
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  color: #d5c9d4; font-size: 12.5px; pointer-events: none;
}
html.cbs-noscroll, html.cbs-noscroll body { overflow: hidden; }

/* ---- print: a clean handout of what is on screen ---- */
@media print {
  .cbs-root .cbs-modes, .cbs-root .cbs-controls, .cbs-root .cbs-fwrap,
  .cbs-root .cbs-key, .cbs-root .cbs-count, .cbs-root .cbs-qnav,
  .cbs-root .cbs-top, .cbs-root .cbs-linkbtn, .cbs-root .cbs-more,
  .cbs-root .cbs-rchev, .cbs-root .cbs-reveal, .cbs-root .cbs-idle,
  .cbs-tabs .cbs-tabbar { display: none !important; }
  .cbs-root .cbs-sol[hidden] { display: block !important; }
  .cbs-root .cbs-part, .cbs-root .cbs-rbody { break-inside: avoid; }
  .cbs-root .cbs-row { border-bottom: none; padding-bottom: 0; }
  .cbs-root { max-width: none; }
  .cbs-root .cbs-fig img { max-height: 90mm; width: auto; }
}

/* ---- mobile ---- */
@media (max-width: 560px) {
  .cbs-root { font-size: 15px; }
  .cbs-root .cbs-title { font-size: 1.12rem; }
  .cbs-root .cbs-aline { font-size: 1.16rem; }
  .cbs-root .cbs-field { flex-basis: 100%; min-width: 0; }
  .cbs-root .cbs-controls { gap: 8px; padding: 10px; }
  .cbs-root select { min-height: 44px; }
  .cbs-root .cbs-mode { flex: 1 1 auto; min-height: 44px; }
  .cbs-root .cbs-chip { min-height: 38px; }
  .cbs-root .cbs-flab { width: 100%; }
  /* results list: drop the least useful columns, let the prompt wrap to 2 lines */
  .cbs-root .cbs-rcmd, .cbs-root .cbs-rmk { display: none; }
  .cbs-root .cbs-rsrc { flex-basis: 56px; }
  .cbs-root .cbs-rlab { flex-basis: 44px; }
  .cbs-root .cbs-rprompt {
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .cbs-root .cbs-part { padding: 12px 0; }
  .cbs-root .cbs-prompt { font-size: 0.9rem; }
  .cbs-root .cbs-pright { flex-basis: 100%; text-align: left; margin-left: 18px; }
  .cbs-root .cbs-qnav button { flex: 1 1 auto; }
  .cbs-root .cbs-practice { flex-basis: 100%; margin-left: 0; justify-content: flex-start; }
  .cbs-tabs .cbs-tab { min-height: 44px; }
}
@media (max-width: 380px) {
  .cbs-root .cbs-rsrc { display: none; }
}
