/* ==========================================================
 * Free questions page (fq-) - PracticeTestMaster
 * ========================================================== */
:root {
  --fq-ink: #16181d; --fq-muted: #5f6470; --fq-line: #e8e8ec; --fq-soft: #fafaf7;
  --fq-brand: #0b5d5d; --fq-brand-soft: #e6f2f2; --fq-yellow: #ffd84d; --fq-cream: #fffae5;
  --fq-ok: #198754; --fq-ok-soft: #e8f5ee; --fq-bad: #c0392b; --fq-bad-soft: #fdecea; --fq-flag: #e08a00;
}

/* JS-only controls are hidden until the script runs (page still fully readable without JS) */
html:not(.fq-js) .fq-js-only {display: none !important;}

/* ---------- Icons (inline SVG) ---------- */
.fq-i {width: 1.1em; height: 1.1em; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;}
.fq-gate-ico {display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--fq-brand-soft); color: var(--fq-brand); align-items: center; justify-content: center; font-size: 30px; margin-bottom: 12px;}

/* ---------- Header ---------- */
.fq-top {background: linear-gradient(180deg, var(--fq-cream), #fffdf6); padding: 24px 0 30px; border-bottom: 1px solid #f3ecd0;}
.fq-crumbs ol {list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--fq-muted);}
.fq-crumbs li + li::before {content: "/"; margin-right: 6px; color: #bbb;}
.fq-crumbs a {color: #444; text-decoration: none;} .fq-crumbs a:hover {text-decoration: underline;}
.fq-top-row {display: flex; gap: 30px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;}
.fq-top h1 {font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; margin: 0 0 10px; max-width: 760px;}
.fq-lead {font-size: 17px; color: #444; margin: 0; max-width: 700px; line-height: 1.6;}
.fq-top-facts {display: flex; gap: 10px; list-style: none; padding: 0; margin: 0;}
.fq-top-facts li {background: #fff; border: 1px solid var(--fq-line); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 92px;}
.fq-top-facts b {display: block; font-size: 22px; line-height: 1.1; color: var(--fq-ink);}
.fq-top-facts span {font-size: 12px; color: var(--fq-muted);}

.fq-main {padding: 34px 0 60px;}

/* ---------- Captcha gate ---------- */
.fq-gate {background: #fff; border: 1px solid var(--fq-line); border-radius: 16px; padding: 40px 28px; text-align: center;}
.fq-gate h2 {font-size: 24px;}
.fq-gate .g-recaptcha {display: inline-block;}

/* ---------- Quiz shell ---------- */
.fq-shell {background: #fff; border: 1px solid var(--fq-line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.05);}
.fq-bar {display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #1f2328; color: #fff; padding: 12px 18px;}
.fq-bar-left {display: flex; align-items: center; gap: 12px; font-size: 14px;}
.fq-bar-code {background: var(--fq-yellow); color: #222; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 6px; letter-spacing: .03em;}
.fq-bar-pos b {font-size: 15px;}
.fq-progress {height: 6px; background: #eeeae0; overflow: hidden;}
.fq-progress i {display: block; height: 100%; background: var(--fq-brand); transition: width .3s;}
.fq-shell > .fq-progress {border-radius: 0;}


/* ---------- Question ---------- */
.fq-q {padding: 26px 26px 22px; border-bottom: 1px solid var(--fq-line);}
/* Question card */
.fq-q-num {display: inline-flex !important; align-items: center; gap: 6px; position: static !important; float: none !important; clear: both;
  font-size: 13px !important; line-height: 1.3 !important; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--fq-brand); background: var(--fq-brand-soft); padding: 5px 12px; border-radius: 50rem; margin: 0 0 12px !important;}
.fq-q.answered .fq-q-num {background: #eef0f4; color: var(--fq-muted);}
.fq-stem {position: relative; clear: both; background: linear-gradient(180deg, #fbfcfe, #f6f8fb); border: 1px solid #e3e8ef; border-left: 4px solid var(--fq-brand);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 18px; font-size: 17.5px; line-height: 1.65; color: var(--fq-ink); overflow: hidden;}
/* neutralise any background/box styling that comes with the stored question HTML */
.fq-stem-in, .fq-stem-in > div, .fq-stem-in > pre, .fq-stem-in > p, .fq-stem-in > span, .fq-stem-in > section {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important;
  border-radius: 0 !important; position: static !important; float: none !important; width: auto !important; min-height: 0 !important; color: inherit;}
.fq-stem-in > p + p, .fq-stem-in > div + div {margin-top: .7em !important;}
.fq-stem-in p:last-child, .fq-stem-in > *:last-child, .fq-stem-in > * > *:last-child {margin-bottom: 0 !important;}
.fq-stem-in pre {white-space: pre-wrap; font-family: inherit; font-size: inherit;}
.fq-stem-in table {background: #fff; border-collapse: collapse; margin: 10px 0;}
.fq-stem-in td, .fq-stem-in th {border: 1px solid #dde2ea; padding: 6px 10px;}
/* Options: compact */
.fq-opts {list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; max-width: 720px;}
.fq-opt {position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--fq-line); border-radius: 10px; cursor: pointer; background: #fff; overflow: hidden; transition: border-color .15s, background .15s, box-shadow .15s; margin: 0;}
.fq-letter {flex: 0 0 28px; height: 28px; border-radius: 7px; border: 1.5px solid #cfd2da; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #444; background: #fff; position: relative; z-index: 1;}
.fq-opt-text {flex: 1; font-size: 15.5px; line-height: 1.5; position: relative; z-index: 1;}
.fq-stem img, .fq-opt-text img, .fq-expl img {max-width: 100%; height: auto;}
.fq-select-n {font-size: 14px; font-weight: 700; color: var(--fq-brand); margin: -6px 0 12px;}

.fq-opt:hover {border-color: #c9ccd4; box-shadow: 0 2px 8px rgba(0,0,0,.04);}
.fq-opt input {position: absolute; opacity: 0; pointer-events: none;}
.fq-opt-text p {margin: 0;}
.fq-opt:has(input:focus-visible) {outline: 3px solid rgba(11,93,93,.35); outline-offset: 2px;}
.fq-opt.selected {border-color: var(--fq-brand); background: var(--fq-brand-soft);}
.fq-opt.selected .fq-letter {background: var(--fq-brand); border-color: var(--fq-brand); color: #fff;}
.fq-q.answered .fq-opt {cursor: default;}
.fq-opt.is-correct {border-color: var(--fq-ok); background: var(--fq-ok-soft);}
.fq-opt.is-correct .fq-letter {background: var(--fq-ok); border-color: var(--fq-ok); color: #fff;}
.fq-opt.is-wrong {border-color: var(--fq-bad); background: var(--fq-bad-soft);}
.fq-opt.is-wrong .fq-letter {background: var(--fq-bad); border-color: var(--fq-bad); color: #fff;}

.fq-feedback:empty {display: none;}
.fq-feedback {border-radius: 12px; padding: 12px 16px; font-weight: 700; margin-bottom: 14px; display: flex; gap: 10px; align-items: center;}
.fq-feedback .fq-i {width: 1.3em; height: 1.3em;}
.fq-feedback.ok {background: var(--fq-ok-soft); color: #0f5c37;}
.fq-feedback.bad {background: var(--fq-bad-soft); color: #8e2418;}
.fq-feedback.neutral {background: var(--fq-soft); color: #333;}

.fq-actions {margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;}
.fq-actions .btn {display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; border-radius: 10px; padding: 10px 18px;}

html.fq-js .fq-q:not(.answered) .fq-reveal {display: none;}
.fq-reveal {margin-top: 18px; border-top: 1px dashed var(--fq-line); padding-top: 16px;}
.fq-answer {font-size: 16px; margin-bottom: 12px;}
.fq-answer-label {color: var(--fq-muted); margin-right: 6px;}
.fq-expl {background: var(--fq-cream); border-radius: 12px; padding: 16px 18px; font-size: 15.5px; line-height: 1.7; color: #333;}
.fq-expl h3 {font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8a6d00; margin: 0 0 6px;}
.fq-expl p:last-child {margin-bottom: 0;}

/* Inline upsell */
.fq-inline-cta {display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--fq-cream); border-top: 1px solid #f3e6b0; border-bottom: 1px solid #f3e6b0; padding: 14px 26px; font-size: 15px;}


/* ---------- Study layout: all questions on the page ---------- */
.fq-bar-right {display: flex; align-items: center;}
.fq-bar-score {font-size: 14px; background: rgba(255,255,255,.1); padding: 5px 12px; border-radius: 6px; font-variant-numeric: tabular-nums;}
.fq-bar-score span {font-weight: 800; color: var(--fq-yellow);}
.fq-howto {display: flex; align-items: center; gap: 8px; font-size: 14px; color: #335; background: var(--fq-brand-soft); margin: 0; padding: 10px 26px; border-bottom: 1px solid var(--fq-line);}
.fq-howto .fq-i {color: var(--fq-brand); width: 1.3em; height: 1.3em;}
.fq-opt:focus-visible {outline: 3px solid rgba(11,93,93,.35); outline-offset: 2px;}
.fq-actions {justify-content: flex-end;}
.fq-inline-cta {margin: 0;}
.fq-res-next {text-align: center; margin: 4px 0 22px;}
.fq-next-page {display: inline-flex; align-items: center; gap: 10px; font-weight: 800; padding: 14px 30px; border-radius: 12px;}
.fq-shell.page-done .fq-next-page {box-shadow: 0 0 0 6px rgba(13,110,253,.15);}
.fq-results {border-top: 2px solid var(--fq-line);}

/* Results */
.fq-results {padding: 28px 26px; border-top: 1px solid var(--fq-line); background: linear-gradient(180deg, #fff, var(--fq-soft));}
.fq-res-top {display: flex; gap: 22px; align-items: center; margin-bottom: 20px;}
.fq-ring {--p: 0; flex: 0 0 108px; width: 108px; height: 108px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--fq-brand) calc(var(--p) * 1%), #e6e6e6 0);}
.fq-ring span {font-size: 26px; font-weight: 800;}
.fq-results h2 {font-size: 24px; margin: 0 0 4px;}
.fq-res-meta {font-size: 14px; color: var(--fq-muted); margin: 0;}
.fq-res-meta span + span::before {content: "\00b7"; margin: 0 6px;}
.fq-res-meta span:empty::before {content: none;}
.fq-res-cta {background: var(--fq-brand); color: #fff; border-radius: 14px; padding: 22px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;}
.fq-res-cta h3 {color: #fff; font-size: 20px; margin: 0 0 6px;}
.fq-res-cta p {color: #d7ecec; margin: 0; font-size: 15px; max-width: 420px;}
.fq-res-btns {display: flex; flex-direction: column; gap: 8px; align-items: stretch;}
.fq-res-btns .btn-primary {background: var(--fq-yellow); border-color: var(--fq-yellow); color: #222; font-weight: 800;}
.fq-res-btns .btn-outline-primary {border-color: #fff; color: #fff;}
.fq-res-btns .btn-outline-primary:hover {background: #fff; color: var(--fq-brand);}
.fq-res-btns .btn-link {color: #d7ecec;}

/* Page links */
.fq-pages {display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px;}
.fq-pages ol {display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0;}
.fq-pages ol a, .fq-pages ol span {display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--fq-line); background: #fff; color: #333; font-weight: 700; text-decoration: none; padding: 0 8px;}
.fq-pages ol a:hover {border-color: var(--fq-brand); color: var(--fq-brand);}
.fq-pages ol span[aria-current] {background: var(--fq-ink); border-color: var(--fq-ink); color: #fff;}
.fq-pg-step {display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--fq-line); background: #fff; color: #333;}
.fq-pages-note {text-align: center; font-size: 13px; color: var(--fq-muted); margin: 10px 0 0;}

.fq-article {margin-top: 34px; font-size: 16px; line-height: 1.8; color: #333;}
.fq-article h2 {font-size: 24px; margin: 24px 0 10px;} .fq-article h3 {font-size: 19px; margin: 20px 0 8px;}
.fq-disclaimer {font-size: 13px; color: #777; border-top: 1px solid #eee; margin-top: 30px; padding-top: 14px;}

/* ---------- Sidebar ---------- */
.fq-side {position: sticky; top: 90px; display: grid; gap: 16px;}
.fq-card {background: #fff; border: 1px solid var(--fq-line); border-radius: 16px; padding: 20px;}
.fq-card h2 {font-size: 18px; margin: 0 0 12px;}
.fq-mine-row {display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--fq-muted);}
.fq-mine-row b {color: var(--fq-ink); font-size: 16px;}
.fq-mine .fq-progress {border-radius: 6px; margin-top: 8px;}
.fq-mine-note {font-size: 12px; color: var(--fq-muted); margin: 8px 0 0;}
.fq-unlock {border: 2px solid var(--fq-brand); box-shadow: 0 14px 34px rgba(11,93,93,.12);}
.fq-unlock-tag {display: inline-block; background: var(--fq-brand); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 50rem; margin-bottom: 10px;}
.fq-unlock-sub {font-size: 14px; color: var(--fq-muted); margin-bottom: 8px;}
.fq-ticks {list-style: none; padding: 0; margin: 0 0 14px;}
.fq-ticks li {position: relative; padding: 4px 0 4px 24px; font-size: 14px;}
.fq-ticks li::before {content: "\2713"; position: absolute; left: 0; color: var(--fq-ok); font-weight: 800;}
.fq-plans {display: grid; gap: 8px; margin-bottom: 12px;}
.fq-plan {display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--fq-line); border-radius: 10px; padding: 10px 12px;}
.fq-plan.featured {border-color: var(--fq-brand); background: var(--fq-brand-soft);}
.fq-plan b {font-size: 14px;}
.fq-pop {font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--fq-brand); margin-left: 4px;}
.fq-plan-price {display: block; font-size: 17px; font-weight: 800;}
.fq-plan-price s {font-size: 13px; color: #999; font-weight: 400;}
.fq-plan .btn {font-weight: 700; min-width: 64px;}
.fq-unlock-link {font-size: 14px; font-weight: 700; text-decoration: none;}
.fq-facts {margin: 0;}
.fq-facts div {display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f2f2f2; font-size: 14px;}
.fq-facts div:last-child {border-bottom: 0;}
.fq-facts dt {font-weight: 400; color: var(--fq-muted);} .fq-facts dd {margin: 0; font-weight: 700; text-align: right;}

/* Sticky mobile bar */
.fq-sticky {position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,.12); padding: 10px 14px; display: none; align-items: center; gap: 12px;}
.fq-sticky div {flex: 1; font-size: 13px; color: var(--fq-muted); line-height: 1.3;}
.fq-sticky b {display: block; font-size: 15px; color: var(--fq-ink);}
.fq-sticky .btn {font-weight: 700; border-radius: 10px;}

@media (max-width: 991px) {
  .fq-side {position: static;}
  .fq-sticky {display: flex;}
  body {padding-bottom: 70px;}
}
@media (max-width: 575px) {
  .fq-q {padding: 20px 16px;}
  .fq-stem {font-size: 16.5px; padding: 14px 16px;}
  .fq-opt {padding: 9px 12px;}
  .fq-top-facts li {min-width: 0; padding: 8px 12px;}
  .fq-res-top {flex-direction: column; text-align: center;}
  .fq-actions .btn {flex: 1;}
  .fq-bar {padding: 10px 14px;}
}
