/* Shared by the public landing templates. Keep status colors distinct from actions. */
:root {
  --paper: #faf9f5; --surface: #fffefa; --wash: #eaf2ef;
  --ink: #253332; --secondary-ink: #4c605f; --rule: #ccd9d5;
  --forest: #246469; --on-forest: #fffefa; --clay: #80543e;
  --good: #216448; --warn: #825318; --bad: #9d343a;
}
html[data-theme="dark"] {
  --paper: #1d2627; --surface: #253031; --wash: #303f40;
  --ink: #f4f0e7; --secondary-ink: #c0d2ce; --rule: #4c6362;
  --forest: #a1d5d3; --on-forest: #163438; --clay: #efb491;
  --good: #9bd7ae; --warn: #e9c780; --bad: #ffb1aa;
}
html:root {
  --dark: var(--paper); --dark-soft: var(--surface); --dark-elev: var(--surface); --dark-elev-2: var(--wash);
  --soft: var(--surface); --elev: var(--surface); --elev2: var(--wash);
  --cream: var(--ink); --muted: var(--secondary-ink); --muted-2: var(--secondary-ink);
  --gold: var(--forest); --gold-light: var(--forest); --gold-deep: var(--clay); --gold2: var(--forest);
  --border: var(--rule); --border-soft: var(--rule); --bd: var(--rule); --bds: var(--rule);
  --sky: var(--clay); --grad: linear-gradient(115deg,var(--forest),var(--forest));
  --pv-tint: var(--wash); --pv-tint2: var(--wash); --pv-tint-bd: var(--rule);
  --hm-grad: var(--grad); --hm-on: var(--on-forest); --hm-acc-t: var(--forest);
}
body { color: var(--ink); background-color: var(--paper); accent-color: var(--forest); }
html:root :is(.nav,.sticky-bar) { background: var(--surface) !important; border-color: var(--rule) !important; }
html:root .section-soft, html:root .footer { background: var(--wash) !important; }
html:root :is(.hero,.hm-hero) {
  color: var(--ink); background: linear-gradient(110deg,var(--wash),var(--paper) 62%);
  border-block-end: 1px solid var(--rule);
}
html:root .hero::before, html:root .hero::after, html:root .hm-hero::after { background: none !important; }
html:root :is(.hero,.hm-hero) h1 { line-height: 1.4; color: var(--ink); }
html:root .accent, html:root .hm-hero h1 em {
  color: var(--forest) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
}
html:root :is(.eyebrow,.section-label,.hm-eye) { background: var(--wash) !important; border-color: var(--rule) !important; color: var(--forest); }
.eyebrow-dot, .hm-eye i { background: var(--clay); box-shadow: none; }
html:root :is(.btn-primary,.cta,.pv-theme-toggle,.hm-search button,.pvx-btn:not(.ghost)) {
  background: var(--forest) !important; color: var(--on-forest) !important;
  border-color: transparent; box-shadow: 0 3px 9px rgba(46,58,38,.12) !important;
}
html:root .btn-primary svg { color: inherit !important; }
html:root :is(.btn-ghost,.hm-quick a,.hm-quick button) { color: var(--forest); background: var(--surface); border-color: var(--rule); }
html:root :is(.hm-lead,.hm-quick) { color: var(--secondary-ink); }
html:root .hm-search { background: var(--surface); border: 1px solid var(--rule); }
html:root .hm-search input { color: var(--ink); }
html:root .hm-search input::placeholder { color: var(--secondary-ink); }
html:root :is(.inline-cta,.calc-result) { background: var(--wash) !important; }
html:root .pv-academy-next {
  background: var(--wash); color: var(--ink); border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--forest); border-radius: 10px; padding: .75rem 1rem;
}
.pv-academy-next a { color: var(--forest); text-underline-offset: .2em; }
html:root #pv-answer, html:root #pvExam {
  color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 16px; box-shadow: 0 6px 24px rgba(51,57,39,.06);
}
html:root #pv-answer { border-block-start: 3px solid var(--forest); }
html:root #pv-answer :is(h2,h3,label,strong) { color: var(--ink); }
html:root #pv-answer p { color: var(--secondary-ink); }
html:root #pv-answer :is(a,button,blockquote) { background: var(--wash); color: var(--forest); border-color: var(--rule); }
html:root #pv-answer output { color: var(--clay); }
html:root #pv-answer :is(input,select,textarea),
html:root .qc :is(select,textarea) { background: var(--surface); color: var(--ink); border-color: var(--secondary-ink); }
html:root .qc :is(button,#qc-route a) { color: var(--on-forest); background: var(--forest); border-color: var(--forest); }
html:root .pvx::before, .pvk-fill { background: var(--forest); }
html:root :is(.pvx-opt,.pvx-dot,.pvx-stat,.pvx-rev,.pvx-ropt,.pvk-bar) { background: var(--surface); color: var(--ink); border-color: var(--rule); }
html:root :is(.pvx p,.pvx-exp,.pvx-prog,.pvx-stat span) { color: var(--secondary-ink); }
html:root :is(.pvx-stat b,.pvx-exp b,.pvk-val) { color: var(--forest); }
html:root :is(.pvx-opt.sel,.pvx-dot.done,.pvx-timer,.pvx-btn.ghost,.pvx-ai) { background: var(--wash); color: var(--forest); border-color: var(--forest); }
html:root .pvx-dot.cur { outline-color: var(--forest); }
html:root :is(.pvx-band.g,.pvx-ropt.ok) { color: var(--good); }
html:root .pvx-band.y { color: var(--warn); }
html:root :is(.pvx-band.r,.pvx-ropt.my,.pvx-timer.low) { color: var(--bad); }
html:root [data-pvc] > div { box-shadow: none !important; }
html:root [data-pvc] > div[style*="linear-gradient(160deg" i] {
  color: var(--ink) !important; background: var(--surface) !important; border-color: var(--rule) !important;
}
html:root [data-pvc] > div[style*="linear-gradient(160deg" i] :is(label,small,p,[style*="#8B95A8" i]) { color: var(--secondary-ink) !important; }
html:root [data-pvc] > div[style*="linear-gradient(160deg" i] :is(input,select,textarea) { background: var(--paper) !important; color: var(--ink) !important; border-color: var(--rule) !important; }
html:root [data-pvc] > div[style*="linear-gradient(160deg" i] :is(a,[style*="color:#efc976" i]) { color: var(--forest) !important; }
html:root [data-pvc] > div[style*="linear-gradient(160deg" i] button[style*="linear-gradient"] { background: var(--forest) !important; color: var(--on-forest) !important; }
html:root :is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--clay) !important; outline-offset: 3px; }
.hm-hero .hm-stats b { color: var(--ink); }
.hm-hero :is(.hm-stats span,.hm-srcline,.hm-cap) { color: var(--secondary-ink); }
.hm-hero .hm-stats li { border-color: var(--rule); }
.qc [hidden] { display: none !important; }

/* The FAQ, demo and quiz use a separate widget stylesheet and inline controls. */
html:root .pvw, html:root .chatbox {
  color:var(--ink); background:var(--surface); border:1px solid var(--rule);
  box-shadow:0 5px 20px rgba(26,73,74,.08) !important;
}
html:root .pvw::before { background:var(--forest); }
html:root :is(.pvw-ic,.pvw-btn,.pvw-cta,.pvw-smslead-btn,.chat-head .av,.chat-form button) {
  background:var(--forest) !important; color:var(--on-forest) !important;
}
html:root :is(.pvw-ic,.chat-head .av,.chat-form button) svg { color:var(--on-forest) !important; }
html:root .pvw :is(.pvw-chip,.pvw-more,.pvw-opt,.pvw-q,.pvw-ans,.pvw-smslead),
html:root :is(.bubble.ba,.bubble.bq,.chat-form) {
  background:var(--wash) !important; border-color:var(--rule) !important; color:var(--ink) !important;
}
html:root .pvw :is(.pvw-chip,.pvw-more) { color:var(--forest) !important; }
html:root .pvw :is(.pvw-quota b,.pvw-exp b,.pvw-score),html:root .bubble .who { color:var(--forest); }
html:root .pvw :is(.pvw-sub,.pvw-exp,.pvw-quota,.pvw-limit p,.pvw-loading,.pvw-lead-msg,.pvw-smslead-msg) { color:var(--secondary-ink) !important; }
html:root .pvw :is(input,textarea),html:root .chat-form textarea {
  color:var(--ink) !important; background:var(--paper) !important; border-color:var(--rule) !important;
}
html:root :is(.pvw,.chat-form) ::placeholder { color:var(--secondary-ink); opacity:1; }
html:root .pvw :is(input,textarea):focus { border-color:var(--forest) !important; }
html:root .pvw .pvw-opt.ok { color:var(--good) !important; border-color:var(--good) !important; }
html:root .pvw .pvw-opt.no { color:var(--bad) !important; border-color:var(--bad) !important; }
html:root :is(.pvw-warn,.bubble .disclaimer) { background:var(--paper); border-color:var(--rule); color:var(--warn); }
html:root .pvw-warn a { color:inherit; }
html:root .brand,html:root .logo { color:var(--ink); }
html[data-theme="dark"] :is(.brand,.logo) img { filter:none !important; background:#faf9f5; border-radius:7px; padding:3px; }

/* Inline colors from the legacy widget rescue rules must follow the active palette. */
html:root[data-theme] body .pvw :is(.pvw-chip,.pvw-more)[style] { color:var(--forest) !important; }
html:root[data-theme] body .pvw :is(.pvw-btn,.pvw-smslead-btn)[style] { color:var(--on-forest) !important; }
html:root[data-theme] body [data-pvc] .pvc-out [style*="#F0E8D8" i] { color:var(--ink) !important; }
html:root[data-theme] body [data-pvc] .pvc-out [style*="#EFC976" i] { color:var(--forest) !important; }
