/* ===================================================================
   Lifestyle Medicine QBank — Board Exam Question Bank
   Shared design system (marketing site + question bank app)
   =================================================================== */

:root {
  /* Brand palette — forest green (the colour of the original
     lifestylemedicineqbank.com) + brass.
     The variable names are semantic slots (brand / accent), not literal colours;
     they keep MenopauseQBank's names so the two stylesheets stay comparable. */
  --plum:        #2e6a4e;
  --plum-dark:   #1d4a35;
  --plum-deep:   #133526;
  --gold:        #b3873c;
  --gold-soft:   #e3cda3;
  --ink:         #15191b;
  --ink-soft:    #3f484c;
  --muted:       #6d777b;
  --line:        #e0e9e3;
  --cream:       #f5f9f6;
  --cream-2:     #e7f0ea;
  --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(19, 53, 38, 0.08);
  --shadow-md: 0 6px 24px rgba(19, 53, 38, 0.10);
  --shadow-lg: 0 18px 50px rgba(19, 53, 38, 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, #3d8a65, 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(19,53,38,.22);
}
.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(179,135,60,0.16), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 104px 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 76px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.15rem); line-height: 1.1; letter-spacing: -0.022em;
            margin: 0; max-width: 15ch; }
/* 52ch keeps the lead at a comfortable reading measure — the single biggest
   legibility gain in the 2026-08 design pass. */
.hero .lead { font-size: 1.115rem; line-height: 1.72; color: var(--ink-soft); max-width: 52ch; margin: 30px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 42px 0 0; }
/* The guarantee gets its own space below a hairline rather than crowding the CTAs. */
.hero-assure { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-soft); font-size: 0.925rem;
               margin: 34px 0 0; padding-top: 26px; border-top: 1px solid var(--line); max-width: 46ch; }
.hero-assure svg { flex: none; margin-top: 2px; }

.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: 112px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 62px; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.15rem); line-height: 1.22;
                   letter-spacing: -0.018em; margin: 0; }
.section-head p { color: var(--muted); font-size: 1.03rem; line-height: 1.68; margin: 16px 0 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: 32px 30px; 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; }
/* Default link colour is unreadable on the dark band — keep mailto/links legible. */
.md-band a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.md-band a:hover { color: #fff; }

/* 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 a.bname:hover { color: var(--plum); text-decoration: underline; }
.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); }
/* Footer contact: one prominent address instead of a column of links. */
.foot-contact a {
  font-family: var(--serif); font-size: 1.05rem; color: var(--gold-soft);
  line-height: 1.35; white-space: nowrap; margin: 0;
}
/* hello@lifestylemedicineqbank.com is long: the three-column footer's contact
   column is narrowest on small laptop windows, so the address shrinks there to
   stay on one line. */
@media (min-width: 901px) and (max-width: 1180px) {
  .foot-contact a { font-size: 0.92rem; }
}
.foot-contact a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.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; }

/* ---------- exam prep guide pages ---------- */
.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; }
.guide-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.7rem 0 .7rem; }
.guide-hero-note { color: var(--muted); font-size: .88rem; margin: 0 0 1.5rem; }
.guide-value-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.guide-value-strip > div { padding: 20px 14px; text-align: center; background: #fff; }
.guide-value-strip > div + div { border-left: 1px solid var(--line); }
.guide-value-strip strong { display: block; font: 700 1.65rem/1 var(--serif); color: var(--plum-deep); }
.guide-value-strip span { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.microcopy { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.microcopy.centered { text-align: center; }

/* ---------- Free readiness assessment ---------- */
.readiness-body { background: var(--cream); }
.readiness-main { min-height: calc(100vh - 140px); }
.readiness-intro { text-align: center; padding: 92px 0 96px; background: radial-gradient(700px 300px at 50% 0, rgba(179,135,60,.15), transparent 70%), linear-gradient(180deg, #fff, var(--cream)); }
.readiness-intro h1 { max-width: 760px; margin: .55rem auto .8rem; font-size: clamp(2.35rem, 6vw, 4rem); }
.readiness-intro .lead { max-width: 680px; margin: 0 auto 1.4rem; color: var(--ink-soft); font-size: 1.18rem; }
.readiness-points { display: flex; justify-content: center; gap: 10px 26px; flex-wrap: wrap; color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.8rem; }
.readiness-points span::first-letter { color: var(--success); }
.readiness-intro .microcopy { margin: 1rem auto 0; max-width: 580px; }
.readiness-quiz, .readiness-results { padding: 58px 0 78px; }
.readiness-wrap { max-width: 820px; }
.readiness-progress-head { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .82rem; font-weight: 600; margin-bottom: 8px; }
.readiness-progress { height: 7px; border-radius: 999px; background: #e4dbe8; overflow: hidden; margin-bottom: 20px; }
.readiness-progress span { display: block; height: 100%; width: 5%; border-radius: inherit; background: linear-gradient(90deg, var(--plum), var(--gold)); transition: width .25s ease; }
.readiness-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 42px); box-shadow: var(--shadow-md); }
.readiness-card h2 { margin: 0 0 1.5rem; color: var(--ink); font-family: var(--sans); font-size: clamp(1.18rem, 3vw, 1.45rem); line-height: 1.5; }
.readiness-options { display: grid; gap: 11px; }
.readiness-option { width: 100%; display: flex; align-items: flex-start; gap: 13px; text-align: left; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 11px; padding: 14px 16px; font: 500 .96rem/1.48 var(--sans); cursor: pointer; transition: .14s ease; }
.readiness-option:hover { border-color: var(--plum); background: var(--cream); }
.readiness-option.selected { border-color: var(--plum); background: var(--cream-2); box-shadow: 0 0 0 1px var(--plum); }
.option-letter { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 50%; background: var(--cream-2); color: var(--plum); font-weight: 700; font-size: .78rem; }
.readiness-option.selected .option-letter { background: var(--plum); color: #fff; }
.readiness-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.readiness-nav .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.readiness-error { color: var(--danger); text-align: center; min-height: 1.5em; font-size: .88rem; }
.results-score { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md); margin-bottom: 20px; }
.results-score h1 { margin: .3rem 0 .45rem; }
.results-score .lead { color: var(--ink-soft); margin: 0; font-size: 1rem; }
.readiness-score-ring { width: 132px; height: 132px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at center, #fff 57%, transparent 58%), conic-gradient(var(--gold), var(--plum)); box-shadow: inset 0 0 0 1px var(--line); }
.readiness-score-ring strong { display: block; font: 700 2rem/1 var(--serif); color: var(--plum-deep); }
.readiness-score-ring span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.domain-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.domain-result { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); }
.domain-result:last-child { grid-column: 1 / -1; }
.domain-result-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.domain-result-head strong { color: var(--ink); font-size: .9rem; }
.domain-result-head span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.domain-result-bar { height: 7px; background: var(--cream-2); border-radius: 999px; overflow: hidden; margin: 11px 0 8px; }
.domain-result-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); border-radius: inherit; }
.domain-result p { margin: 0; color: var(--muted); font-size: .78rem; }
.results-cta { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; margin: 24px 0 16px; padding: 30px; border-radius: var(--radius); background: var(--plum-deep); color: #fff; box-shadow: var(--shadow-lg); }
.results-cta h2 { color: #fff; margin: .35rem 0 .55rem; }
.results-cta p { margin: 0; color: rgba(255,255,255,.78); }
.results-cta-actions { display: grid; gap: 10px; min-width: 245px; }
.results-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.results-cta .btn-ghost:hover { background: rgba(255,255,255,.1); }

@media (max-width: 700px) {
  .guide-grid { grid-template-columns: 1fr; }
  .guide-hero { padding: 48px 0 38px; }
  .guide-value-strip { grid-template-columns: repeat(2, 1fr); }
  .guide-value-strip > div + div { border-left: 0; }
  .guide-value-strip > div:nth-child(even) { border-left: 1px solid var(--line); }
  .guide-value-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .readiness-intro { padding: 62px 0 68px; }
  .results-score { grid-template-columns: 1fr; text-align: center; }
  .readiness-score-ring { margin: 0 auto; }
  .domain-results { grid-template-columns: 1fr; }
  .domain-result:last-child { grid-column: auto; }
  .results-cta { grid-template-columns: 1fr; }
  .results-cta-actions { min-width: 0; }
}
@media (max-width: 410px) {
  .readiness-body .wrap { padding-left: 20px; padding-right: 20px; }
  .readiness-body .brand { font-size: 0; gap: 0; }
  .readiness-body .brand .mark { font-size: .68rem; }
}
.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: 620px) {
  /* The brand name wrapped to two lines on phones, doubling the header
     height and crowding the CTAs. Keep it on one line at a smaller size. */
  .brand { font-size: 1.06rem; white-space: nowrap; gap: 0.45em; }
  .brand .mark { width: 34px; height: 28px; font-size: .6rem; }
  /* Brand + Sign in + Get the Bank + hamburger could not fit a 375px viewport —
     the wordmark collided with the buttons. On phones the header carries only
     the brand and the menu toggle; both actions move into the dropdown. */
  .nav-cta .btn { display: none; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-links.open .nav-only { display: block; }
  .nav-links.open .nav-only strong { color: var(--plum); }
}
/* Shown only inside the mobile dropdown, never in the desktop nav row. */
.nav-links .nav-only { display: none; }
@media (max-width: 900px) {
  /* "Lifestyle Medicine QBank" is a longer name than MenopauseQBank's: between
     phone and desktop widths it wrapped onto two lines and squeezed Sign in /
     Get the Bank. Keep it on one line and, where the header has a menu toggle,
     move both actions into the menu as on phones. */
  .nav:not(:has(#who)) .brand { white-space: nowrap; }   /* the signed-in app header is unchanged */
  .nav-cta:has(.nav-toggle) .btn { display: none; }
  .nav-links.open .nav-only { display: block; }
  .nav-links.open .nav-only strong { color: var(--plum); }
  /* Pages without a menu (guides, free questions) keep one action, on one line. */
  .nav-cta:not(:has(.nav-toggle)):has(.btn-primary) .btn-ghost { display: none; }
  .nav-cta .btn { white-space: nowrap; }
}
@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; }

/* ---------- High-Yield bonus section (dashboard) ---------- */
.hy-section { margin-top: 6px; }
.hy-banner {
  background: linear-gradient(135deg, var(--plum-deep) 0%, var(--plum) 70%);
  color: #fff; border-radius: var(--radius) var(--radius) 0 0; padding: 22px 26px 20px;
}
.hy-badge {
  display: inline-block; background: var(--gold); color: var(--plum-deep);
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.hy-banner h2 { color: #fff; font-size: 1.55rem; margin: 10px 0 4px; }
.hy-banner p { margin: 0; color: rgba(255,255,255,.84); max-width: 44em; }
.hy-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--white); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.hy-card {
  display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px;
}
.hy-card h3 { font-size: 1.22rem; margin: 10px 0 6px; }
.hy-card p { color: var(--ink-soft); margin: 0 0 16px; font-size: .96rem; flex: 1; }
.hy-card p.hy-note { flex: 0 0 auto; margin-top: -6px; font-size: .9rem; font-weight: 600; color: var(--plum); }
.hy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hy-actions .btn { padding: .7em 1.3em; font-size: .95rem; }
@media (max-width: 720px) {
  .hy-grid { grid-template-columns: 1fr; padding: 14px; }
  .hy-banner { padding: 18px 18px 16px; }
  .hy-banner h2 { font-size: 1.3rem; }
}
/* 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); }

/* ---------- Feedback strip (end of the dashboard) ---------- */
.fb-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s ease, opacity .3s ease; }
.fb-wrap.gone { grid-template-rows: 0fr; opacity: 0; }
.fb-clip { overflow: hidden; min-height: 0; }
.fb { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 12px 14px 12px 20px; }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.fb-q { font-size: .95rem; color: var(--ink-soft); font-weight: 600; }
.fb-stars { display: flex; align-items: center; gap: 2px; }
.fb-star { background: none; border: 0; padding: 5px; cursor: pointer; line-height: 0; border-radius: 8px; }
.fb-star svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.6;
  transition: fill .12s, transform .12s; }
.fb-star.lit svg { fill: var(--gold); }
.fb-star:hover svg { transform: scale(1.12); }
.fb-star:focus-visible { outline: 2px solid var(--plum); outline-offset: 1px; }
.fb-label { font-size: .82rem; color: var(--muted); min-width: 6.5em; }
.fb-dismiss { margin-left: auto; background: none; border: 0; color: var(--muted); font: .82rem var(--sans);
  cursor: pointer; padding: 6px 4px; display: inline-flex; align-items: center; gap: 6px; }
.fb-dismiss:hover { color: var(--ink); }
.fb-dismiss .x { font-size: 1.15rem; line-height: 1; }
.fb-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.fb-more.open { grid-template-rows: 1fr; }
.fb-more > div { overflow: hidden; min-height: 0; }
.fb-more-inner { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; }
.fb-prompt { margin: 0 0 8px; font-size: .95rem; color: var(--ink); }
.fb-saved { font-size: .8rem; color: var(--success); font-weight: 600; margin-left: 8px; }
.fb-saved.pending { visibility: hidden; }
.fb textarea { width: 100%; font-family: var(--sans); font-size: .95rem; padding: 10px 12px; min-height: 76px;
  border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; display: block; }
.fb textarea:focus { outline: none; border-color: var(--plum); }
.fb .form-error { margin: 10px 0 0; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 4px; }
.fb-actions .btn { padding: .6em 1.2em; font-size: .9rem; }
.fb-thanks { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink-soft); padding: 4px 0; }
.fb-thanks .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--success-bg); color: var(--success);
  display: grid; place-items: center; font-weight: 800; flex: none; }
@media (max-width: 600px) {
  .fb { padding: 12px 14px; }
  .fb-q { flex-basis: 100%; }
  .fb-label { display: none; }
  .fb-star svg { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-wrap, .fb-more, .fb-star svg { transition: none; }
}

.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-note { font-size: .85rem; color: var(--muted); }
.app-hero .exam-note { margin-top: 10px; }
.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; }
/* Physician (150) / health professional (120) format switch above the exam cards. */
.format-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 580px; margin: 0 auto 10px; }
.format-opt { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; background: #fff;
  cursor: pointer; font-family: var(--sans); transition: border-color .15s, box-shadow .15s; }
.format-opt:hover { border-color: var(--plum); }
.format-opt:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.format-opt[aria-pressed="true"] { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); background: var(--cream-2); }
.format-opt strong { display: block; color: var(--ink); font-size: .98rem; }
.format-opt span { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.format-hint { font-size: .85rem; color: var(--muted); text-align: center; max-width: 580px; margin: 0 auto 22px; }

.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(19,53,38,.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(179,135,60,.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; }
}


/* ---------- free 20-question sampler ---------- */
.free-sampler-card .qtag { display: block; font-size: 1.05rem; line-height: 1.2; letter-spacing: .06em; }
.free-sampler-card .opt { width: 100%; text-align: left; font-family: var(--sans); color: var(--ink); }
.free-sampler-card .opt:disabled { cursor: default; }
.free-sampler-card .reveal p { margin: .45rem 0; }
.landing-continue { display: flex; width: 100%; justify-content: center; margin-top: 1rem; }
.sampler-error { min-height: 1.3em; margin: .7rem 0 0; color: var(--danger); font-size: .82rem; }
.readiness-explanation { display: none; margin: 20px 0 0; }
.readiness-explanation.show { display: block; }
.readiness-option.correct { border-color: var(--success); background: var(--success-bg); box-shadow: none; }
.readiness-option.correct .option-letter { background: var(--success); color: #fff; }
.readiness-option.chosen-wrong { border-color: var(--danger); background: var(--danger-bg); box-shadow: none; }
.readiness-option.chosen-wrong .option-letter { background: var(--danger); color: #fff; }

/* Dashboard: keep the legal footer at the bottom even when the view is short. */
.app-with-footer { display: flex; flex-direction: column; min-height: 100vh; }
.app-with-footer .app-main { width: 100%; flex: 1 0 auto; }
/* Without the disclaimer block above it, the copyright line keeps the same rule the marketing footer has. */
.site-footer .foot-bottom.foot-rule { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; }

/* Signup: the line under the button that makes creating an account an agreement to the terms. */
.consent-note { margin: 12px 0 0; text-align: center; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.consent-note a { color: var(--plum); text-decoration: underline; text-underline-offset: 2px; }

/* Dashboard: the account exists but has not paid yet */
.unlock-panel { max-width: 560px; margin: 24px auto; padding: 36px 30px; text-align: center; }
.unlock-panel h2 { font-size: 1.5rem; }
.unlock-panel .hint { margin-bottom: 22px; }
.unlock-panel .form-error { margin-top: 14px; text-align: left; }
.unlock-note { margin: 12px 0 0; color: var(--muted); font-size: .82rem; }
.unlock-alt { margin: 22px 0 0; color: var(--muted); font-size: .85rem; }
.unlock-alt .link-btn { margin-left: 0; color: var(--plum); font-size: .85rem; }

/* ===================================================================
   High-Yield Study Guide reader (study-guide.html)
   =================================================================== */
.guide-body { background: var(--cream); }
.guide-main { flex: 1 0 auto; width: 100%; }
.guide-gate { max-width: 620px; margin: 60px auto; }

.guide-body .guide-hero {
  background: linear-gradient(150deg, var(--plum-deep) 0%, var(--plum) 60%, #14615a 100%);
  color: #fff; padding: 30px 24px 26px;
}
.guide-hero-inner { max-width: 1180px; margin: 0 auto; }
.back-link.light { color: rgba(255,255,255,.8); padding: 0; margin-bottom: 14px; display: inline-block; }
.guide-body .guide-hero .hy-badge { display: table; margin-bottom: 10px; }
.guide-body .guide-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 8px; }
.guide-body .guide-hero p { color: rgba(255,255,255,.86); margin: 0 0 18px; max-width: 46em; }
.guide-edition { display: inline-block; margin-left: 6px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-soft); }
.guide-body .guide-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.guide-body .guide-hero-actions .btn svg { flex: none; }
.guide-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.guide-chip {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff;
  font-size: .86rem; line-height: 1.3; transition: background .15s ease;
}
.guide-chip:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.guide-chip b {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: var(--plum-deep); font-size: .8rem;
}

.guide-layout {
  max-width: 1180px; margin: 0 auto; padding: 28px 24px 70px;
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 34px; align-items: start;
}
.guide-toc { position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow: auto; padding-right: 4px; }
.guide-toc-toggle { display: none; }
.guide-toc-list, .guide-toc-list ol { list-style: none; margin: 0; padding: 0; }
.toc-domain { margin-bottom: 14px; }
.toc-domain-link { display: block; font-family: var(--serif); font-weight: 700; color: var(--plum-deep); line-height: 1.3; font-size: .95rem; }
.toc-domain-link span { display: block; font-family: var(--sans); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.toc-domain ol { margin: 6px 0 0; border-left: 2px solid var(--line); }
.toc-domain ol a { display: block; padding: 3px 0 3px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-soft); font-size: .84rem; line-height: 1.35; }
.toc-domain ol a:hover { color: var(--plum); text-decoration: none; }
.toc-domain ol a.active { color: var(--plum); font-weight: 650; border-left-color: var(--gold); }

.guide-content {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 34px 40px 40px; min-width: 0; font-size: 1rem; line-height: 1.65;
}
.guide-content h3, .guide-content h4, .guide-domain { scroll-margin-top: 90px; }
.guide-intro h3 { font-size: 1.4rem; margin: 0 0 10px; }
.guide-intro { padding-bottom: 8px; }
.guide-domain { margin-top: 34px; }
.domain-head { background: var(--plum); color: #fff; border-radius: 12px; padding: 16px 22px; margin-bottom: 8px; }
.domain-head .domain-num { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.domain-head h2 { color: #fff; margin: 4px 0 0; font-size: 1.5rem; }
.guide-content section.topic { padding-top: 6px; }
.guide-content h3 { font-size: 1.28rem; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--cream-2); }
.guide-content h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 18px 0 6px; }
.guide-content p { margin: 0 0 12px; }
.guide-content ul { margin: 0 0 12px; padding-left: 1.2em; }
.guide-content ul ul { margin: 4px 0 4px; }
.guide-content li { margin: 0 0 5px; }
.guide-content li::marker { color: var(--gold); }
.guide-content strong { color: var(--plum-deep); }
.guide-content .tbl { margin: 14px 0 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.guide-content table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.45; }
.guide-content .tbl.wide table { min-width: 760px; font-size: .86rem; }
.guide-content th { background: var(--plum); color: #fff; text-align: left; padding: 9px 11px; font-weight: 650; vertical-align: bottom; }
.guide-content th strong { color: #fff; }
.guide-content td { padding: 8px 11px; border-top: 1px solid var(--line); vertical-align: top; }
.guide-content tbody tr:nth-child(even) td { background: var(--cream); }
.guide-content td.rowhead { font-weight: 650; color: var(--plum-deep); }
.guide-license { margin: 22px 0 0; padding: 12px 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; color: var(--ink-soft); }
.guide-license-note { align-self: center; font-size: .82rem; color: rgba(255,255,255,.75); }
.guide-closing { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.guide-closing p { margin: 0 0 8px; }

@media (max-width: 960px) {
  .guide-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 18px; }
  .guide-toc { position: sticky; top: 70px; z-index: 20; max-height: none; overflow: visible; padding: 0; }
  .guide-toc-toggle {
    display: flex; width: 100%; justify-content: space-between; align-items: center;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
    font: 600 .95rem var(--sans); color: var(--plum-deep); box-shadow: var(--shadow-sm); cursor: pointer;
  }
  .guide-toc-toggle::after { content: "▾"; color: var(--gold); }
  .guide-toc-list {
    display: none; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 14px 16px; max-height: 60vh; overflow: auto; box-shadow: var(--shadow-md);
  }
  .guide-toc.open .guide-toc-list { display: block; }
  .guide-content { padding: 22px 18px 28px; }
}
@media (max-width: 520px) {
  .guide-body .guide-hero { padding: 22px 16px 20px; }
  .guide-chips { grid-template-columns: 1fr; }
  .guide-layout { padding-left: 16px; padding-right: 16px; }
  .domain-head h2 { font-size: 1.25rem; }
}


/* ---------- High-Yield Study Guide promo (marketing page) ---------- */
.guide-promo { background: linear-gradient(160deg, var(--plum-deep) 0%, var(--plum) 62%, #14615a 100%); color: #fff; overflow: hidden; }
.guide-promo-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.guide-promo-badge {
  display: inline-block; background: var(--gold); color: var(--plum-deep); font-size: .74rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.guide-promo h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin: 16px 0 12px; }
.guide-promo-lead { color: rgba(255,255,255,.86); font-size: 1.08rem; line-height: 1.65; margin: 0 0 24px; max-width: 34em; }
.guide-promo .feature-list li { color: rgba(255,255,255,.9); }
.guide-promo .feature-list svg { color: var(--gold-soft); }
.guide-promo .feature-list strong { color: #fff; }
.guide-promo .btn-primary { background: var(--gold); color: var(--plum-deep); }
.guide-promo .btn-primary:hover { background: #c79a4b; }
.guide-promo-visual { position: relative; height: 470px; }
.gp-page { position: absolute; width: 300px; height: auto; border-radius: 8px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.gp-back { right: 0; top: 36px; transform: rotate(5deg); }
.gp-front { left: 8px; top: 0; transform: rotate(-4deg); border: 1px solid rgba(255,255,255,.18); }
@media (max-width: 900px) {
  .guide-promo-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .guide-promo-visual { height: 360px; max-width: min(420px, 100%); width: 100%; margin: 0 auto; }
  .gp-page { width: 230px; }
}
@media (max-width: 480px) {
  .guide-promo-visual { height: 300px; }
  .gp-page { width: 190px; }
}

/* ---------- Customer reviews (marketing page) ---------- */
.reviews { overflow: hidden; }
.rv-head { margin-bottom: 36px; }
.rv-hstars { display: flex; justify-content: center; gap: 4px; margin: 12px 0 8px; }
.rv-hstars svg { width: 22px; height: 22px; fill: var(--gold); }
.rv-head h2 { font-size: clamp(1.3rem, 2.2vw, 1.55rem); }
.rv-pct { display: block; font-size: clamp(2.4rem, 4.5vw, 3rem); line-height: 1; color: var(--plum);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }

.rv-carousel { position: relative; }
.rv-track {
  position: relative; display: grid; grid-auto-flow: column; gap: 24px;
  grid-auto-columns: calc((100% - 48px) / 3);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px;
  padding: 6px 4px 22px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rv-track::-webkit-scrollbar { display: none; }
.rv-track:focus-visible { outline: 2px solid var(--plum); outline-offset: 4px; border-radius: var(--radius); }
.rv-card {
  position: relative; scroll-snap-align: start; margin: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 28px 24px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.rv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rv-card::before {
  content: "\201C"; position: absolute; top: 4px; right: 20px; font: 700 5.5rem/1 var(--serif);
  color: var(--cream-2); pointer-events: none;
}
.rv-stars { display: flex; gap: 3px; margin-bottom: 14px; }
.rv-stars svg { width: 18px; height: 18px; fill: var(--gold); }
.rv-card blockquote { position: relative; margin: 0 0 22px; flex: 1; font-family: var(--serif);
  font-size: 1.08rem; line-height: 1.55; color: var(--ink); }
.rv-card figcaption { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--ink); line-height: 1.35; }
.rv-card figcaption > span:last-child { font-weight: 600; color: var(--plum-deep); }
.rv-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--plum); color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: .02em; }

.rv-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 10px; }
.rv-controls[hidden] { display: none; }
.rv-btn { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  color: var(--plum); display: grid; place-items: center; cursor: pointer; transition: border-color .15s, background .15s; }
.rv-btn:hover { border-color: var(--plum); background: var(--cream); }
.rv-btn:focus-visible, .rv-dot:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.rv-dots { display: flex; gap: 8px; }
.rv-dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--line);
  cursor: pointer; transition: width .3s, background .3s; }
.rv-dot[aria-current="true"] { width: 26px; background: var(--plum); }

/* Entrance: stars pop in, cards rise — only once the section scrolls into view (js/testimonials.js). */
@keyframes rv-pop { from { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } to { transform: scale(1); } }
@keyframes rv-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.reviews.rv-in .rv-hstars svg { animation: rv-pop .5s cubic-bezier(.3,.7,.4,1) backwards; animation-delay: calc(var(--i, 0) * 110ms); }
.reviews.rv-in .rv-card { animation: rv-rise .6s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(300ms + var(--i, 0) * 90ms); }

@media (max-width: 900px) {
  .rv-track { grid-auto-columns: calc((100% - 24px) / 2); }
}
@media (max-width: 620px) {
  .rv-track { grid-auto-columns: 86%; gap: 16px; }
  .rv-card { padding: 24px 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .reviews.rv-in .rv-hstars svg, .reviews.rv-in .rv-card { animation: none; }
  .rv-card, .rv-dot { transition: none; }
}

/* Study guide: discourage copying and printing of the online version */
.guide-content { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print {
  .guide-body .site-header, .guide-body .guide-main, .guide-body .site-footer { display: none !important; }
  .guide-body::before {
    content: "Printing is turned off for the online study guide. Please use the Download PDF button.";
    display: block; padding: 40px; font: 16px/1.5 Georgia, serif;
  }
}

/* ---------- Public content pages: tables, key facts, sample questions ---------- */
.guide-table-wrap { overflow-x: auto; margin: 1.3rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.guide-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.guide-table th, .guide-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.guide-table th { background: var(--cream-2); color: var(--plum-deep); font-weight: 700; }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--plum); }
.guide-table tr.hl td { background: #fffaf0; }
.page-toc { list-style: none; padding: 18px 22px; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; columns: 2; column-gap: 28px; }
.guide-page .page-toc li { margin: 0 0 .35rem; break-inside: avoid; line-height: 1.5; }
.page-toc-title { font-weight: 700; color: var(--plum-deep); margin: 1.6rem 0 0; }
.guide-byline { color: var(--muted); font-size: .9rem; margin: 0 0 1.2rem; }
.pq { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 1.3rem 0; background: #fff; box-shadow: var(--shadow-sm); }
.pq-meta { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 .5rem; }
.pq-stem { font-weight: 600; color: var(--ink); margin: 0 0 .8rem; }
.pq-options { list-style: none; padding: 0; margin: 0 0 1rem; }
.guide-page .pq-options li { margin: 0 0 .45rem; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); line-height: 1.5; }
.pq-options b { color: var(--plum); margin-right: 6px; }
.pq details { border-top: 1px dashed var(--line); padding-top: .7rem; }
.pq summary { cursor: pointer; font-weight: 700; color: var(--plum); }
.pq-answer { margin: .8rem 0 .4rem; color: var(--success); font-weight: 700; }
.pq-ref { font-size: .85rem; color: var(--muted); margin: .5rem 0 0; }
@media (max-width: 700px) {
  .page-toc { columns: 1; }
  .pq { padding: 18px 16px; }
  .guide-table th, .guide-table td { padding: 9px 10px; }
}
.pq-weight { font: 400 .95rem var(--sans); color: var(--muted); }
.guide-page [id] { scroll-margin-top: 90px; }
