/* ========================================
   FRCEM SBA question bank landing page (ported from MRCEM Ready)
   Prefix: .qbl-  ·  StudyFRCEM palette (blue #115fc5) and Inter
   ======================================== */
.qbl {
    --qbl-blue: #115fc5;
    --qbl-blue-dk: #0e4da0;
    --qbl-blue-lt: #edf3fc;
    --qbl-ink: #1a1a1a;
    --qbl-muted: #52647a;
    --qbl-line: #dce6f2;
    --qbl-bg: #f7faff;
    --qbl-green: #1f9d6b;
    --qbl-green-lt: #e8f6ef;
    --qbl-red: #d0443e;
    --qbl-red-lt: #fdeeed;
    color: var(--qbl-ink);
    font-family: 'Inter', system-ui, sans-serif;
}
.qbl *, .qbl *::before, .qbl *::after { box-sizing: border-box; }
.qbl-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(18px, 3vw, 40px); }
.qbl h1, .qbl h2, .qbl h3 { margin: 0; color: var(--qbl-ink); }
.qbl h2 { font: 700 clamp(27px, 3vw, 38px)/1.25 'Inter', system-ui, sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.qbl h3 { font: 650 17px/1.4 'Inter', system-ui, sans-serif; }
.qbl p { margin: 0; }
.qbl a:focus-visible, .qbl button:focus-visible { outline: 3px solid var(--qbl-blue); outline-offset: 3px; border-radius: 6px; }

.qbl-section { padding: clamp(64px, 8vw, 104px) 0; scroll-margin-top: 90px; }
.qbl-head { max-width: 720px; margin: 0 auto clamp(36px, 4vw, 52px); text-align: center; }
.qbl-head > p:last-child:not(.qbl-label) { margin-top: 16px; color: var(--qbl-muted); font-size: 17px; line-height: 1.75; }
.qbl-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px !important; color: var(--qbl-blue); font: 600 12.5px/1.4 'Inter', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.qbl-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Buttons */
.qbl-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.qbl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 11px 20px; border: 1px solid transparent; border-radius: 7px; font: 600 16px/1.4 'Inter', system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.qbl-btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .18s; }
.qbl-btn:hover svg { transform: translateX(3px); }
.qbl-btn--primary { background: var(--qbl-blue); color: #fff; }
.qbl-btn--primary:hover { background: var(--qbl-blue-dk); color: #fff; }
.qbl-btn--ghost { border-color: #bdcfe7; background: #f8fafd; color: var(--qbl-ink); }
.qbl-btn--ghost:hover { border-color: var(--qbl-blue); background: var(--qbl-blue-lt); color: var(--qbl-ink); }
.qbl-btn--light { background: #fff; color: var(--qbl-blue); }
.qbl-btn--light:hover { background: var(--qbl-blue-lt); color: var(--qbl-blue-dk); }
.qbl-btn--outline { border-color: rgba(255,255,255,.45); color: #fff; }
.qbl-btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

/* ───── Hero (centred, text only) ───── */
.qbl-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 6vw, 80px) 0 clamp(52px, 6vw, 80px); background: #f0f5fc; border-bottom: 1px solid #e2eaf4; text-align: center; }
.qbl-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(240,245,252,.86), rgba(240,245,252,.96) 34%, rgba(240,245,252,.96) 66%, rgba(240,245,252,.86)), url('../images/frcem-hero-study.jpg') center / cover no-repeat; }
.qbl-hero__inner { display: flex; flex-direction: column; align-items: center; max-width: 860px; }
.qbl-crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; color: #6b7c90; font-size: 13.5px; }
.qbl-crumbs a { color: #6b7c90; text-decoration: none; }
.qbl-crumbs a:hover { color: var(--qbl-blue); text-decoration: underline; }
.qbl-crumbs [aria-current] { color: var(--qbl-ink); font-weight: 500; }
.qbl-hero h1 { font: 700 clamp(28px, calc(2.8vw + 2px), 40px)/1.2 'Inter', system-ui, sans-serif; letter-spacing: -.025em; color: #1a1a1a; text-wrap: balance; }
.qbl-hero__intro { max-width: 700px; margin-top: 22px !important; color: #52647a; font-size: 18px; line-height: 1.7; text-wrap: pretty; }
.qbl-hero .qbl-actions { justify-content: center; gap: 14px; margin-top: 32px; }

/* ───── Syllabus coverage (explorer) ───── */
.qbl-syllabus { background: var(--qbl-bg); border-block: 1px solid #e2eaf4; }
/* Let the syllabus heading sit on one line on wider screens; keep the intro text at a readable width. */
.qbl-syllabus .qbl-head { max-width: 980px; }
.qbl-syllabus .qbl-head > p:last-child { max-width: 720px; margin-inline: auto; }
.qbl-sx { overflow: hidden; border: 1px solid var(--qbl-line); border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(11, 30, 61, .08), 0 2px 8px rgba(11, 30, 61, .04); }

/* Distribution bar */
.qbl-sx__dist { padding: 22px clamp(20px, 3vw, 32px) 24px; border-bottom: 1px solid #e8eef6; background: linear-gradient(180deg, #fbfdff, #fff); }
.qbl-sx__dist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.qbl-sx__dist-head span { color: #6b7c90; font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.qbl-sx__dist-head strong { color: var(--qbl-ink); font: 700 15px/1.3 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.qbl-sx__bar { display: flex; gap: 3px; height: 14px; }
.qbl-sx__bar span { min-width: 6px; border-radius: 4px; background: var(--c); transition: opacity .25s, transform .25s; }
.qbl-sx.is-enhanced .qbl-sx__bar span { cursor: pointer; }
.qbl-sx__bar span.is-dim { opacity: .22; }
.qbl-sx__bar span:not(.is-dim) { transform: scaleY(1.25); }

.qbl-sx__body { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }

/* Subject list */
.qbl-sx__tabs { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-right: 1px solid #e8eef6; background: #fafcfe; }
.qbl-sx__tab { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--qbl-ink); font: inherit; text-align: left; cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s; }
.qbl-sx__tab:hover { background: #fff; border-color: #e3eaf4; }
.qbl-sx__tab.is-active { background: #fff; border-color: color-mix(in srgb, var(--c) 35%, #fff); box-shadow: 0 6px 18px rgba(11, 30, 61, .07); }
.qbl-sx__tab.is-active::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.qbl-sx__tab-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--t); color: var(--c); }
.qbl-sx__tab-icon svg { width: 20px; height: 20px; }
.qbl-sx__tab-text { display: grid; flex: 1; min-width: 0; }
.qbl-sx__tab-name { font: 650 15px/1.35 'Inter', system-ui, sans-serif; }
.qbl-sx__tab-count { color: #6b7c90; font-size: 13px; font-variant-numeric: tabular-nums; }
.qbl-sx__tab-share { flex-shrink: 0; padding: 3px 8px; border-radius: 999px; background: #f0f4f9; color: #4d6075; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.qbl-sx__tab.is-active .qbl-sx__tab-share { background: var(--t); color: var(--c); }
/* Subject panel */
.qbl-sx__panel { padding: clamp(22px, 3vw, 36px); }
.qbl-sx__panel + .qbl-sx__panel { border-top: 1px solid #e8eef6; } /* no-JS: panels stack */
.qbl-sx.is-enhanced .qbl-sx__panel + .qbl-sx__panel { border-top: 0; }
.qbl-sx__panel:focus-visible { outline: 3px solid var(--c); outline-offset: -3px; }
.qbl-sx.is-enhanced .qbl-sx__panel:not([hidden]) { animation: qbl-sx-in .3s ease; }
@keyframes qbl-sx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qbl-sx__panel-head { display: flex; gap: 16px; align-items: flex-start; }
.qbl-sx__panel-icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 14px; background: var(--t); color: var(--c); }
.qbl-sx__panel-icon svg { width: 26px; height: 26px; }
.qbl-sx__panel h3 { font: 700 clamp(21px, 2vw, 25px)/1.25 'Inter', system-ui, sans-serif; letter-spacing: -.02em; }
.qbl-sx__panel-head p { max-width: 560px; margin-top: 6px; color: var(--qbl-muted); font-size: 15.5px; line-height: 1.6; }
.qbl-sx__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0 28px; }
.qbl-sx__facts > div { padding: 14px 16px; border: 1px solid #e8eef6; border-radius: 12px; background: #fbfcfe; }
.qbl-sx__facts dt { color: #6b7c90; font-size: 12.5px; font-weight: 500; }
.qbl-sx__facts dd { margin: 2px 0 0; color: var(--c); font: 700 24px/1.2 'Inter', system-ui, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qbl-sx__list-label { margin-bottom: 10px !important; color: var(--qbl-ink); font: 650 14px/1.4 'Inter', system-ui, sans-serif; }
.qbl-sx__list-label span { color: #8a99ab; font-weight: 500; }
.qbl-sx__topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.qbl-sx__topics li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 38px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #e3eaf4; }
.qbl-sx__topic-name { overflow: hidden; color: #26394d; font-size: 14.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.qbl-sx__topic-bar { height: 6px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.qbl-sx__topic-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.qbl-sx__topic-count { color: var(--qbl-ink); font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ───── Steps ───── */
.qbl-steps { background: #fff; }
.qbl-steps__list { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.qbl-steps__list::before { content: ''; position: absolute; top: 24px; left: 16%; right: 16%; height: 2px; background: repeating-linear-gradient(90deg, #b9cde8 0 8px, transparent 8px 14px); }
.qbl-steps__list li { position: relative; text-align: center; }
.qbl-steps__num { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 18px; border: 4px solid #fff; border-radius: 50%; background: var(--qbl-blue); color: #fff; font: 700 18px/1 'Inter', system-ui, sans-serif; box-shadow: 0 6px 16px rgba(17, 95, 197, .3); }
.qbl-steps__list p { max-width: 300px; margin: 8px auto 0; color: var(--qbl-muted); font-size: 15px; line-height: 1.65; }

/* ───── Reviews (reuses reviews.css cards) ───── */

/* ───── Final CTA ───── */
.qbl-final { padding: clamp(56px, 7vw, 96px) 0; background: var(--qbl-bg); border-top: 1px solid #e2eaf4; }
.qbl-final__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; width: calc(100% - 2 * clamp(18px, 3vw, 40px)); max-width: 690px; padding: 38px 26px; border: 1px solid #dce6f2; border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgba(23, 45, 64, .04); text-align: center; }
.qbl-final h2 { color: #1a1a1a; font: 650 22px/1.4 'Inter', system-ui, sans-serif; letter-spacing: -.01em; }
.qbl-final p { margin-top: 10px; color: #5b6c80; font-size: 15px; line-height: 1.75; }
.qbl-final .qbl-actions { justify-content: center; gap: 12px; }

/* ───── Mobile sticky CTA ───── */
.qbl-sticky { display: none; }

/* ───── Responsive ───── */
@media (max-width: 1080px) {
    .qbl-sx__topics { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .qbl-sx__body { grid-template-columns: minmax(0, 1fr); }
    .qbl-sx__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px; border-right: 0; border-bottom: 1px solid #e8eef6; }
    .qbl-sx__tab.is-active::before { left: 12px; right: 12px; top: auto; bottom: -1px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
}
@media (max-width: 680px) {
    .qbl-sx { border-radius: 16px; }
    .qbl-sx__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
    .qbl-sx__tab { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-color: #e3eaf4; background: #fff; }
    .qbl-sx__tab-icon { flex-basis: auto; width: 32px; height: 32px; }
    .qbl-sx__tab-icon svg { width: 18px; height: 18px; }
    .qbl-sx__tab-name { font-size: 14px; }
    .qbl-sx__tab-count { font-size: 12.5px; }
    .qbl-sx__tab-share { position: absolute; top: 12px; right: 10px; }
    .qbl-sx__panel-head { flex-direction: column; gap: 12px; }
    .qbl-sx__panel-icon { flex-basis: auto; width: 46px; height: 46px; }
    .qbl-sx__facts { gap: 8px; margin: 20px 0 22px; }
    .qbl-sx__facts > div { padding: 12px; }
    .qbl-sx__facts dd { font-size: 20px; }
    .qbl-sx__topics li { grid-template-columns: minmax(0, 1fr) 64px 34px; gap: 10px; }
    .qbl-sx__topic-name { white-space: normal; overflow-wrap: anywhere; }
    .qbl-sx__dist-head { flex-direction: column; gap: 2px; }
}
@media (max-width: 680px) {
    .qbl-steps__list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .qbl-steps__list::before { display: none; }
    .qbl-hero h1 { font-size: clamp(25px, calc(6vw + 2px), 30px); }
    .qbl-hero__intro { font-size: 16.5px; }
    .qbl-hero .qbl-actions, .qbl-final .qbl-actions { flex-direction: column; width: 100%; max-width: 380px; }
        .qbl-hero .qbl-btn, .qbl-final .qbl-btn { width: 100%; }

    .qbl-sticky { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--qbl-line); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); box-shadow: 0 -8px 24px rgba(11, 30, 61, .08); transform: translateY(110%); transition: transform .25s ease; }
    .qbl-sticky.is-on { transform: none; }
    .qbl-sticky[hidden] { display: none; }
    .qbl-sticky .qbl-btn { min-height: 46px; padding: 10px 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .qbl *, .qbl-sticky { transition: none !important; }
}

/* ───── StudyFRCEM additions ───── */
/* Section rhythm: Hero (tint) → Coverage (tint, bordered) → Steps (white) → Pricing (tint)
   → What's included (white) → FAQ + final CTA (tint). */
.qbl #pricing { background: var(--qbl-bg); }
.qbl #pricing > .absolute { display: none; }
.qbl #pricing .qbl-head { margin-bottom: clamp(36px, 4vw, 52px); }

/* What's included */
.qbl-included { background: #fff; }
.qbl-included__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.qbl-included__grid li { padding: 24px; border: 1px solid var(--qbl-line); border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(23, 45, 64, .025); }
.qbl-included__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border: 1px solid #dce8f8; border-radius: 11px; background: var(--qbl-blue-lt); color: var(--qbl-blue); }
.qbl-included__icon svg { width: 22px; height: 22px; }
.qbl-included__grid p { margin-top: 6px; color: var(--qbl-muted); font-size: 15px; line-height: 1.65; }

@media (max-width: 900px) {
    .qbl-included__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .qbl-included__grid { grid-template-columns: 1fr; gap: 12px; }
    .qbl-included__grid li { padding: 20px; }
}
