/* ===================================================================
   Menopause QBank — MSCP Exam Question Bank
   Shared design system (marketing site + question bank app)
   =================================================================== */

:root {
  /* Brand palette */
  --plum:        #5b2b63;
  --plum-dark:   #43204a;
  --plum-deep:   #2e1633;
  --gold:        #c29a4b;
  --gold-soft:   #e8d6a8;
  --ink:         #211a26;
  --ink-soft:    #4a4250;
  --muted:       #7a7183;
  --line:        #e7dded;
  --cream:       #faf7fb;
  --cream-2:     #f3ecf5;
  --white:       #ffffff;
  --success:     #1f7a4d;
  --success-bg:  #e7f4ec;
  --danger:      #b23b3b;
  --danger-bg:   #f8ebeb;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 3px rgba(46, 22, 51, 0.08);
  --shadow-md: 0 6px 24px rgba(46, 22, 51, 0.10);
  --shadow-lg: 0 18px 50px rgba(46, 22, 51, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.18; color: var(--plum-deep); letter-spacing: -0.01em; }

a { color: var(--plum); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--sans);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--plum); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--plum-dark); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: #33240a; }
.btn-gold:hover { background: #b48a3b; }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--plum); background: var(--cream); }
.btn-lg { font-size: 1.08rem; padding: 1em 2em; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 0.6em; font-family: var(--serif); font-weight: 700; font-size: 1.28rem; color: var(--plum-deep); }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 42px; height: 34px; border-radius: 11px 11px 11px 4px;
  background: linear-gradient(145deg, #9b527e, var(--plum-deep));
  color: #fff; display: grid; place-items: center; font-size: .68rem;
  letter-spacing: .08em; border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 3px 10px rgba(69,29,61,.2);
}
.brand .mark span { transform: translate(1px,1px); }
.nav-links { display: flex; align-items: center; gap: 1.7rem; font-size: 0.95rem; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover { color: var(--plum); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 0.8rem; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 78% -10%, rgba(194,154,75,0.16), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); margin: 0.5rem 0 0.7rem; }
.hero .lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 1.2rem; }
.hero-assure { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-soft); font-size: 0.95rem; }
.hero-assure svg { flex: none; }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45em;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4em 0.9em; font-size: 0.82rem; color: var(--ink-soft); font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* Hero sample card */
.qcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 26px; position: relative;
}
.qcard .qtag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 700; }
.qcard h4 { font-family: var(--sans); font-size: 1.06rem; color: var(--ink); margin: 0.5rem 0 1rem; line-height: 1.45; }
.qcard .opt {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 0.75em 0.9em; margin-bottom: 0.55rem;
  font-size: 0.95rem; cursor: pointer; display: flex; gap: 0.7em; align-items: flex-start; transition: all .15s;
  background: #fff;
}
.qcard .opt:hover { border-color: var(--plum); background: var(--cream); }
.qcard .opt .k { font-weight: 700; color: var(--plum); flex: none; }
.qcard .opt.correct { border-color: var(--success); background: var(--success-bg); }
.qcard .opt.wrong { border-color: var(--danger); background: var(--danger-bg); }
.qcard .reveal { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 0.9rem; display: none; }
.qcard .reveal.show { display: block; }
.qcard .reveal .ref { color: var(--muted); font-style: italic; margin-top: 0.4rem; display: block; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0.5rem 0 0.6rem; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

.alt { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cream-2); color: var(--plum); margin-bottom: 16px;
}
.feature h3 { font-size: 1.18rem; margin: 0 0 0.5rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* Physician-reviewed band */
.md-band { background: linear-gradient(145deg, var(--plum-deep), var(--plum)); color: #fff; }
.md-band h2 { color: #fff; }
.md-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.md-seal {
  border: 2px solid var(--gold-soft); border-radius: var(--radius); padding: 34px; text-align: center;
  background: rgba(255,255,255,0.05);
}
.md-seal .ring {
  width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--gold);
  display: grid; place-items: center; margin: 0 auto 18px; color: var(--gold-soft);
}
.md-seal h3 { color: #fff; font-size: 1.35rem; margin: 0 0 0.3rem; }
.md-seal p { color: var(--gold-soft); margin: 0; font-size: 0.95rem; }
.md-band p.body { color: rgba(255,255,255,0.86); font-size: 1.08rem; }
.md-band .quote { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: #fff; font-style: italic; }

/* Domain / blueprint table */
.blueprint { display: grid; gap: 14px; }
.brow {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.brow .num { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--gold); }
.brow .bname { font-weight: 600; color: var(--ink); }
.brow .bsub { font-size: 0.9rem; color: var(--muted); }
.brow .bpct { display: flex; align-items: center; gap: 12px; min-width: 180px; justify-content: flex-end; }
.bar { width: 120px; height: 8px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); }
.bpct b { font-variant-numeric: tabular-nums; color: var(--plum); min-width: 42px; text-align: right; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .n {
  width: 42px; height: 42px; border-radius: 50%; background: var(--plum); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-family: var(--serif); margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: 1.3fr 0.85fr; gap: 32px; align-items: stretch; max-width: 940px; margin: 0 auto; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.price-card.feature-card { border: 2px solid var(--plum); box-shadow: var(--shadow-lg); }
.price-flag {
  position: absolute; top: 18px; right: -34px; transform: rotate(45deg);
  background: var(--gold); color: #33240a; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 5px 44px; text-transform: uppercase;
}
.price-card h3 { font-size: 1.4rem; margin: 0 0 0.3rem; }
.promo-kicker { color: var(--plum); font-size: 0.86rem; font-weight: 700; letter-spacing: 0.035em; text-transform: uppercase; margin-top: 0.9rem; }
.price-amt { font-family: var(--serif); font-size: 3.2rem; color: var(--plum-deep); font-weight: 700; line-height: 1; margin: 0.4rem 0; }
.price-amt .price-was { color: var(--muted); font-size: 1.45rem; font-weight: 500; margin-right: 0.25rem; text-decoration: line-through; text-decoration-thickness: 2px; }
.price-amt small { font-size: 1rem; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.price-sub { color: var(--ink-soft); margin: 0 0 1.4rem; }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: 0.7rem; }
.feature-list li { display: flex; gap: 0.7em; align-items: flex-start; font-size: 0.98rem; color: var(--ink-soft); }
.feature-list svg { flex: none; color: var(--success); margin-top: 3px; }

.guarantee {
  background: linear-gradient(160deg, #fff, var(--cream)); border: 2px dashed var(--gold);
  border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 12px;
}
.guarantee .seal { width: 60px; height: 60px; border-radius: 50%; background: var(--gold); color: #33240a; display: grid; place-items: center; }
.guarantee h3 { margin: 0; font-size: 1.3rem; }
.guarantee p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.guarantee .fine { font-size: 0.82rem; color: var(--muted); }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 22px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); font-size: 0.97rem; }

/* CTA band */
.cta-band { background: linear-gradient(145deg, var(--plum), var(--plum-deep)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 34em; margin: 0.6rem auto 1.8rem; }

/* Footer */
.site-footer { background: var(--plum-deep); color: rgba(255,255,255,0.8); padding: 56px 0 32px; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 14px; }
.site-footer a { color: rgba(255,255,255,0.8); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--gold-soft); }
.legal-page { max-width: 820px; padding-top: 72px; padding-bottom: 88px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page h2 { margin-top: 36px; font-size: 1.35rem; }
.legal-page p, .legal-page li { line-height: 1.75; }
.legal-page li + li { margin-top: 8px; }
.legal-updated { color: var(--muted); margin-bottom: 36px; }
.legal-footer { background: var(--plum-deep); color: rgba(255,255,255,.8); padding: 24px 0; }
.legal-footer .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.legal-footer a { color: #fff; }
.legal-footer span { margin-left: auto; }

/* ---------- MSCP prep guide ---------- */
.guide-hero { padding: 68px 0 52px; background: linear-gradient(180deg, var(--cream), #fff); border-bottom: 1px solid var(--line); }
.guide-hero h1 { max-width: 14em; font-size: clamp(2.15rem, 4.5vw, 3.35rem); margin: .45rem 0 .8rem; }
.guide-hero .lead { max-width: 44em; color: var(--ink-soft); font-size: 1.14rem; }
.guide-page { max-width: 880px; padding-top: 56px; padding-bottom: 72px; }
.guide-page h2 { font-size: 1.7rem; margin: 2.6rem 0 .7rem; }
.guide-page h3 { font-size: 1.15rem; margin: 1.55rem 0 .35rem; }
.guide-page p, .guide-page li { line-height: 1.75; }
.guide-page li + li { margin-top: .55rem; }
.guide-callout { margin: 1.7rem 0; padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); background: var(--cream); }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 1.4rem 0; }
.guide-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 21px; background: #fff; box-shadow: var(--shadow-sm); }
.guide-card h3 { margin-top: 0; }
.guide-card p { margin-bottom: 0; color: var(--ink-soft); }
.guide-page .cta-box { text-align: center; background: var(--cream-2); border-radius: var(--radius); padding: 32px 24px; margin-top: 3rem; }
.guide-page .cta-box h2 { margin-top: 0; }

@media (max-width: 700px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-hero { padding: 48px 0 38px; }
}
.purchase-flow {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 0 0 22px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--cream);
}
.purchase-flow span { font-size: .76rem; line-height: 1.3; color: var(--ink-soft); text-align: center; }
.purchase-flow b {
  display: grid; place-items: center; width: 22px; height: 22px;
  margin: 0 auto 5px; border-radius: 50%; background: var(--plum); color: #fff;
}
@media (max-width: 480px) {
  .purchase-flow { grid-template-columns: 1fr; }
  .purchase-flow span { display: flex; align-items: center; gap: 8px; text-align: left; }
  .purchase-flow b { margin: 0; flex: 0 0 auto; }
}
.foot-disclaimer { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; font-size: 0.82rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.foot-bottom { margin-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: rgba(255,255,255,0.55); font-size: 0.82rem; }

/* ===================================================================
   APP (question bank) specific
   =================================================================== */
.app-body { background: var(--cream); min-height: 100vh; }
.app-main { max-width: 860px; margin: 0 auto; padding: 34px 24px 80px; }

.app-hero { text-align: center; margin-bottom: 30px; }
.app-hero h1 { font-size: 2rem; margin: 0 0 0.4rem; }
.app-hero p { color: var(--ink-soft); margin: 0; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; margin-bottom: 22px; }
.panel h2 { font-size: 1.25rem; margin: 0 0 4px; }
.panel .hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 18px; }

.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mode-card { text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 20px; background: #fff; cursor: pointer; transition: all .15s; font-family: var(--sans); }
.mode-card:hover { border-color: var(--plum); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.mode-card h3 { font-family: var(--sans); font-size: 1.05rem; margin: 0 0 4px; color: var(--ink); }
.mode-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.domain-list { display: grid; gap: 10px; }
.domain-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: all .12s; }
.domain-opt:hover { border-color: var(--plum); background: var(--cream); }
.domain-opt.selected { border-color: var(--plum); background: var(--cream-2); }
.domain-opt .dleft { display: flex; align-items: center; gap: 12px; }
.domain-opt .dcount { font-size: 0.82rem; color: var(--muted); background: var(--cream-2); padding: 2px 10px; border-radius: 999px; }
.domain-opt input { width: 18px; height: 18px; accent-color: var(--plum); }

/* Quiz runner */
.progressbar { height: 8px; background: var(--cream-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progressbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); transition: width .3s; }
.q-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.86rem; color: var(--muted); margin-bottom: 18px; }
.q-meta .tag { background: var(--cream-2); color: var(--plum); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.q-stem { font-size: 1.18rem; line-height: 1.5; color: var(--ink); margin: 0 0 22px; font-weight: 500; }
.q-options { display: grid; gap: 12px; margin-bottom: 20px; }
.q-opt {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); transition: all .13s; width: 100%;
}
.q-opt:hover:not(:disabled) { border-color: var(--plum); background: var(--cream); }
.q-opt .key { font-weight: 700; color: var(--plum); flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--cream-2); display: grid; place-items: center; font-size: 0.85rem; }
.q-opt:disabled { cursor: default; }
.q-opt.correct { border-color: var(--success); background: var(--success-bg); }
.q-opt.correct .key { background: var(--success); color: #fff; }
.q-opt.chosen-wrong { border-color: var(--danger); background: var(--danger-bg); }
.q-opt.chosen-wrong .key { background: var(--danger); color: #fff; }

.explain { border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; display: none; }
.explain.show { display: block; }
.explain.ok { background: var(--success-bg); border: 1px solid #bfe0cd; }
.explain.no { background: var(--danger-bg); border: 1px solid #eccccc; }
.explain .verdict { font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.explain.ok .verdict { color: var(--success); }
.explain.no .verdict { color: var(--danger); }
.explain p { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.97rem; }
.explain .ref { font-size: 0.85rem; color: var(--muted); font-style: italic; }

.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Results */
.result-score { text-align: center; padding: 20px 0 8px; }
.score-ring { width: 160px; height: 160px; margin: 0 auto 14px; position: relative; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--plum-deep); }
.verdict-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 600; }
.verdict-pill.pass { background: var(--success-bg); color: var(--success); }
.verdict-pill.fail { background: var(--danger-bg); color: var(--danger); }
.result-breakdown { margin-top: 26px; display: grid; gap: 12px; }
.rb-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.rb-row .rb-bar { grid-column: 1 / -1; height: 7px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.rb-row .rb-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); }

.notice { background: #fff6e0; border: 1px solid var(--gold-soft); border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; color: #6b5320; margin-bottom: 20px; }

.hidden { display: none !important; }

/* Progress summary */
.progress-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 20px; }
.pstat { background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-align: center; }
.pstat .n { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--plum-deep); line-height: 1; }
.pstat .l { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.pstat.flag .n { color: var(--gold); }
.pstat.ok .n { color: var(--success); }

.domain-progress { display: grid; gap: 8px; }
.dp-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.dp-row .dp-name { font-size: 0.88rem; color: var(--ink-soft); font-weight: 500; }
.dp-row .dp-val { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dp-row .dp-bar { grid-column: 1 / -1; height: 6px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.dp-row .dp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--success), #4fae7e); transition: width .3s; }

/* Flag button */
.flag-btn {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; transition: all .13s;
}
.flag-btn:hover { border-color: var(--gold); color: var(--gold); }
.flag-btn.on { border-color: var(--gold); background: #fff6e0; color: #a97c1a; }
.flag-btn.on svg { fill: var(--gold); stroke: var(--gold); }

/* small flag marker used in review */
.flag-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; color: #a97c1a; background: #fff6e0; border: 1px solid var(--gold-soft); border-radius: 999px; padding: 2px 9px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .md-grid, .pricing-grid { grid-template-columns: 1fr; gap: 36px; }
  .features, .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 1rem; box-shadow: var(--shadow-md); }
  .nav-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
}
@media (max-width: 560px) {
  .mode-grid { grid-template-columns: 1fr; }
  .progress-stats { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 32px 1fr; }
  .brow .bpct { grid-column: 2; justify-content: flex-start; margin-top: 6px; }
  section { padding: 54px 0; }
  .hero { padding: 48px 0 44px; }
}

/* ===================================================================
   v2 — accounts, dashboard, exam runner, practice runner, review
   =================================================================== */

.who { font-size: .85rem; color: var(--muted); }
.loading-block { text-align: center; padding: 80px 0; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- auth ---------- */
.auth-main { max-width: 460px; margin: 0 auto; padding: 60px 24px; }
.auth-card { padding: 30px; }
.auth-tabs { display: flex; gap: 6px; background: var(--cream-2); padding: 4px; border-radius: 999px; margin-bottom: 24px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: .6em 1em; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.auth-tab.active { background: #fff; color: var(--plum); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 1.5rem; margin: 0 0 4px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input { width: 100%; font-family: var(--sans); font-size: 1rem; padding: .7em .9em;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--plum); }
.field-note { display: block; margin-top: 5px; font-size: .78rem; color: var(--muted); }
.form-error { background: var(--danger-bg); border: 1px solid #eccccc; color: var(--danger);
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin: 0 0 14px; }

/* ---------- dashboard ---------- */
/* The dashboard uses a wider measure than reading views so 3 cards fit a row. */
.app-main.wide { max-width: 1100px; }
/* Reset the marketing page's global `section { padding: 72px 0 }` here. */
.home-section { padding: 0; margin-bottom: 34px; }
.home-section:last-child { margin-bottom: 0; }
.section-title {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em; color: var(--gold);
  margin: 0 0 14px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

/* Exam Mode has a single card, so lay its body out in two columns when wide. */
.exam-feature-body { display: grid; gap: 14px; }
.exam-feature-body p { margin: 0 0 12px; }
.exam-feature .hc-note { margin-top: 0; }
.exam-feature .mini-exams { margin-top: 0; align-content: start; }
@media (min-width: 760px) {
  .exam-feature-body { grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: start; }
}
.home-card { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; cursor: pointer; font-family: var(--sans); transition: transform .14s, box-shadow .2s, border-color .14s;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--plum); }
.home-card.accent { border-left: 5px solid var(--gold); }
.home-card h2, .home-card h3 { font-size: 1.25rem; margin: 0 0 8px; font-family: var(--serif); color: var(--plum-deep); }
.home-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .94rem; }
.hc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.hc-icon { font-size: 1.5rem; }
.hc-count { font-size: .78rem; font-weight: 700; color: var(--plum); background: var(--cream-2);
  padding: 4px 10px; border-radius: 999px; text-align: right; }
.hc-note { margin-top: auto; font-size: .82rem; color: var(--muted); background: var(--cream);
  border-radius: 8px; padding: 8px 10px; }
.mini-exams { display: grid; gap: 6px; margin-top: 12px; }
.mini-exam { display: flex; justify-content: space-between; align-items: center; font-size: .82rem;
  color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 6px; }

.pill { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.done { background: var(--success-bg); color: var(--success); }
.pill.ready { background: var(--cream-2); color: var(--plum); }
.pill.draft { background: #fff6e0; color: #a97c1a; }
.pill.soon { background: var(--cream-2); color: var(--muted); }
.pill.live { background: var(--danger-bg); color: var(--danger); }

.back-link { background: none; border: 0; color: var(--plum); font-family: var(--sans); font-size: .9rem;
  font-weight: 600; cursor: pointer; padding: 0 0 14px; }
.back-link:hover { text-decoration: underline; }

/* ---------- topics ---------- */
.topic-list { display: grid; gap: 12px; }
.topic-row { display: flex; gap: 20px; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; box-shadow: var(--shadow-sm); }
.tr-main { flex: 1; min-width: 0; }
.tr-main h3 { font-size: 1.08rem; margin: 0 0 4px; }
.tr-stats { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.tr-bar { height: 6px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.tr-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); }
.tr-actions { display: flex; gap: 8px; flex: none; }
.btn.small { padding: .5em 1em; font-size: .85rem; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #94302f; }

/* ---------- runner / questions ---------- */
.runner-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.q-meta-right { display: flex; align-items: center; gap: 8px; }
.q-opt.selected { border-color: var(--plum); background: var(--cream-2); }
.q-opt .opt-tag { margin-left: auto; font-size: .72rem; font-weight: 700; align-self: center; white-space: nowrap; }
.q-opt .opt-tag.ok { color: var(--success); }
.q-opt .opt-tag.bad { color: var(--danger); }
.q-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px dashed var(--line); }
.tag.subtle { background: var(--cream); color: var(--muted); font-weight: 500; }
.link-btn { background: none; border: 0; color: var(--muted); font-family: var(--sans); font-size: .82rem;
  text-decoration: underline; cursor: pointer; margin-left: auto; padding: 0; }
.link-btn:hover { color: var(--danger); }
.q-review { margin-bottom: 16px; }
.center-panel { text-align: center; padding: 44px 26px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions.center { justify-content: center; margin-top: 20px; }

/* ---------- search ---------- */
.search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-row input { flex: 1; font-family: var(--sans); font-size: 1rem; padding: .7em .9em;
  border: 1.5px solid var(--line); border-radius: 10px; }
.search-row input:focus { outline: none; border-color: var(--plum); }
.search-result { background: var(--cream); border-radius: 12px; padding: 18px; }
.search-result p { margin: 0 0 10px; }
.sample-list { margin: 0 0 14px; padding-left: 18px; color: var(--ink-soft); font-size: .9rem; }
.sample-list li { margin-bottom: 6px; }

/* ---------- flagged ---------- */
.flag-row { display: flex; gap: 16px; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding: 14px 0; }
.flag-row:last-child { border-bottom: 0; }
.flag-row p { margin: 6px 0 0; font-size: .92rem; color: var(--ink-soft); }

/* ---------- chips / pager ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip-btn { border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px;
  padding: .45em 1em; font-family: var(--sans); font-size: .85rem; font-weight: 600; cursor: pointer; }
.chip-btn.active { border-color: var(--plum); background: var(--plum); color: #fff; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px;
  font-size: .9rem; color: var(--muted); }

/* ---------- mock exams ---------- */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.exam-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); }
.ec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ec-head h2 { font-size: 1.2rem; margin: 0; }
.exam-card p { color: var(--ink-soft); font-size: .93rem; margin: 0 0 16px; }

.exam-bar { position: sticky; top: 70px; z-index: 40; background: var(--plum-deep); color: #fff; }
.exam-bar-inner { display: flex; align-items: center; gap: 16px; height: 54px; flex-wrap: wrap; }
.exam-bar-label { font-weight: 600; font-size: .9rem; }
.exam-bar-progress { font-size: .85rem; color: var(--gold-soft); }
.exam-timer { margin-left: auto; font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.exam-timer.warn { color: var(--gold-soft); }
.exam-timer.danger { color: #ff9b9b; }
.exam-progress-note { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.pagechips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.pagechip { border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 8px;
  padding: .35em .7em; font-family: var(--sans); font-size: .78rem; font-weight: 600; cursor: pointer; }
.pagechip.active { border-color: var(--plum); background: var(--plum); color: #fff; }
.exam-q { margin-bottom: 16px; }
.warn-text { color: var(--danger); font-weight: 600; }

.rb-name { font-weight: 600; color: var(--ink); font-size: .93rem; }
.rb-val { color: var(--muted); font-size: .88rem; }

/* ---------- modals / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(46,22,51,.5); display: grid; place-items: center;
  z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); padding: 26px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 6px; font-size: 1.25rem; }
.modal textarea { width: 100%; font-family: var(--sans); font-size: .95rem; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; margin: 10px 0 4px; }
.modal textarea:focus { outline: none; border-color: var(--plum); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--plum-deep); color: #fff; padding: .8em 1.4em; border-radius: 999px; font-size: .9rem;
  box-shadow: var(--shadow-lg); z-index: 200; transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translateX(-50%) translateY(10px); }

@media (max-width: 700px) {
  .topic-row { flex-direction: column; align-items: stretch; }
  .tr-actions { justify-content: stretch; }
  .tr-actions .btn { flex: 1; }
  .exam-bar-inner { height: auto; padding: 10px 0; }
  .exam-timer { margin-left: 0; }
}

/* ===================================================================
   v3 — Meazure-style exam interface, prominent flagging, report link
   =================================================================== */

/* ---------- prominent "Flag Question" (item 3) ---------- */
.flag-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: .85rem; font-weight: 700;
  border: 2px solid var(--gold); background: #fff; color: #a97c1a;
  border-radius: 999px; padding: .5em 1.1em; cursor: pointer;
  transition: all .13s; white-space: nowrap;
}
.flag-btn:hover { background: #fff6e0; box-shadow: 0 2px 8px rgba(194,154,75,.28); }
.flag-btn.on { background: var(--gold); border-color: var(--gold); color: #33240a; }
.flag-btn.on:hover { background: #b48a3b; }
.flag-help {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 18px; height: 18px; margin-left: 6px; border-radius: 50%;
  background: #f2e8ce; color: #8a6619; font: 700 .72rem/1 var(--sans);
  cursor: help; outline: none;
}
.flag-help::after {
  content: "Flagging saves this question for later. Review it under ‘Flagged Questions’ from the homepage.";
  position: absolute; z-index: 80; right: 0; bottom: calc(100% + 9px);
  width: 245px; padding: 10px 12px; border-radius: 9px;
  background: var(--plum-deep); color: #fff; font: 500 .78rem/1.45 var(--sans);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transform: translateY(4px); transition: .14s ease; white-space: normal;
}
.flag-help:hover::after, .flag-help:focus::after {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* ---------- "Report an issue" moved to its own bottom-left row (item 4) ---------- */
.q-report { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
.q-report .link-btn { margin-left: 0; font-size: .8rem; color: var(--muted); }
.q-report .link-btn:hover { color: var(--danger); }
.q-nav { margin-top: 18px; }

/* ---------- exam layout: navigator left, one question right (item 6) ---------- */
.exam-layout { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) {
  .exam-layout { grid-template-columns: 260px 1fr; }
}
.exam-nav {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm); position: sticky; top: 140px;
}
.exam-nav-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.exam-nav-head strong { font-size: .9rem; color: var(--ink); }
.exam-nav-count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-filter { width: 100%; justify-content: center; margin-bottom: 12px; font-size: .8rem; }
.nav-filter.active { border-color: var(--gold); background: #fff6e0; color: #a97c1a; }
.nav-filter:disabled { opacity: .5; cursor: default; }

/* Generous gap + inner padding so the "current" ring never crowds its
   neighbours or get clipped by the scroll container. */
.qnav-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; padding: 6px;
  max-height: 46vh; overflow-y: auto;
}
.qnav-grid.inline {
  grid-template-columns: repeat(auto-fill, minmax(40px, 40px));
  max-height: none; margin-top: 10px;
}
.qnav {
  position: relative;
  aspect-ratio: 1; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 8px; font-family: var(--sans); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: background .1s, border-color .1s, box-shadow .1s; padding: 0;
}
.qnav:hover { border-color: var(--plum); }
.qnav.answered { background: var(--plum); border-color: var(--plum); color: #fff; }
/* Flagged wins visually — matches the real platform's orange flag marker. */
.qnav.flagged { background: var(--gold); border-color: var(--gold); color: #33240a; }
.qnav.flagged::after {
  content: "⚑"; position: absolute; top: 1px; right: 3px;
  font-size: .58rem; line-height: 1; color: #fff;
}
/* A soft plum ring (not a hard near-black outline) marks the current question. */
.qnav.current {
  border-color: var(--plum);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--plum);
}

.qnav-legend { display: grid; gap: 5px; margin: 12px 0; font-size: .72rem; color: var(--muted); }
.qnav-legend span { display: flex; align-items: center; gap: 6px; }
.qnav-legend .sw { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--line); background: #fff; flex: none; }
.qnav-legend .sw.answered { background: var(--plum); border-color: var(--plum); }
.qnav-legend .sw.flagged { background: var(--gold); border-color: var(--gold); }
.exam-nav-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.exam-nav-foot .hint { margin: 0 0 10px; font-size: .8rem; }

.exam-main .exam-q { margin-bottom: 0; }
.exam-q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- review & submit screen ---------- */
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.rs { background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.rs b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--plum-deep); line-height: 1; }
.rs span { font-size: .78rem; color: var(--muted); }
.rs.warn { background: #fff6e0; border-color: var(--gold-soft); }
.rs.warn b { color: #a97c1a; }

@media (max-width: 859px) {
  .exam-nav { position: static; }
  /* Wrap to as many as fit rather than forcing 10 tiny columns. */
  .qnav-grid {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    max-height: none; gap: 9px;
  }
}

/* ---------- auth: forgot-password affordances ---------- */
.auth-alt { text-align: center; margin: 14px 0 0; font-size: .88rem; }
.auth-alt .link-btn { margin-left: 0; color: var(--plum); font-size: .88rem; }
.auth-alt .link-btn:hover { color: var(--plum-dark); }
.form-note {
  background: var(--success-bg); border: 1px solid #bfe0cd; color: var(--success);
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin: 0 0 14px;
}

/* ---------- reference graphics inside explanations ---------- */
.ref-graphic {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 14px 16px; margin: 14px 0 4px;
}
.rg-title {
  font-family: var(--sans); font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 8px;
}
.rg-lede { margin: 0 0 10px; font-size: .88rem; color: var(--ink-soft); }
.rg-note { margin: 9px 0 0; font-size: .8rem; color: var(--muted); font-style: italic; }
.rg-table { width: 100%; border-collapse: collapse; font-size: .8rem; display: block; overflow-x: auto; }
.rg-table th, .rg-table td {
  border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top;
}
.rg-table th { background: var(--cream-2); color: var(--plum-deep); font-weight: 700; white-space: nowrap; }
.rg-table td { color: var(--ink-soft); }
.rg-table tr.rg-hl td { background: #fffaf0; }
/* On narrow viewports let header cells wrap: nowrap pushes the table a few px
   past its scroll container, which reads as a clipped word rather than as
   something scrollable. */
@media (max-width: 700px) {
  .rg-table th { white-space: normal; }
}
