/* ============================================================
   MRC-018 — MoldRemovalCheck shared stylesheet
   ============================================================
   Calm-clarifier visual: muted palette (no red / alarm / fear).
   Generous whitespace, clear hierarchy, evidence-cited tone.
   Mirrors the steffani assessment.steffanilefevour.com pattern
   (single-file inline CSS) but extracted so the four landing /
   assessment / results / legal pages share one stylesheet.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette — slate / sage / off-white. Deliberately no red.
     The four band colors (used only in results) are sourced from
     drafts/MRC-017/assessment-config.json score_bands[].color so the
     palette here is the chrome, not the band reveal. */
  --brand:        #2F5D62;   /* slate-teal — primary action color */
  --brand-light:  #6B9CA0;
  --brand-dark:   #1F3F42;
  --bg:           #F7F5F0;   /* warm off-white */
  --surface:      #FFFFFF;
  --text:         #2A2A2A;
  --text-muted:   #6B6B6B;
  --text-subtle:  #9A9A9A;
  --border:       #E2DDD3;
  --border-soft:  #F0EBE0;
  --accent-sage:  #4A7C59;   /* CDC/EPA citation tint, info band */
  --accent-warm:  #CB6E38;   /* sparingly — never alarm */
  --error:        #B86060;
  --shadow:       0 1px 3px rgba(31, 63, 66, 0.04),
                  0 4px 12px rgba(31, 63, 66, 0.06);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

/* ============================================================
   Layout shells
   ============================================================ */

.shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.shell-narrow {
  max-width: 640px;
}

.shell-prose {
  max-width: 720px;
  padding: 32px 24px 80px;
}

.shell-prose p,
.shell-prose ul,
.shell-prose ol { margin-bottom: 1em; }

.shell-prose h1 { font-size: 30px; line-height: 1.25; color: var(--brand-dark); margin-bottom: 16px; font-weight: 600; }
.shell-prose h2 { font-size: 22px; line-height: 1.3; color: var(--brand-dark); margin: 32px 0 12px; font-weight: 600; }
.shell-prose h3 { font-size: 17px; line-height: 1.35; color: var(--text); margin: 20px 0 8px; font-weight: 600; }

/* ============================================================
   Header / footer
   ============================================================ */

.site-header {
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.site-header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brandmark {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-footer {
  width: 100%;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  padding: 28px 24px;
  margin-top: 48px;
}

.site-footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }

/* ============================================================
   Hero (landing)
   ============================================================ */

.hero {
  padding: 16px 0 40px;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.hero .subhead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 28px;
}

.hero .micro-trust {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ============================================================
   Section primitives
   ============================================================ */

.section {
  padding: 32px 0;
  border-top: 1px solid var(--border-soft);
}

.section h2 {
  font-size: 22px;
  line-height: 1.3;
  color: var(--brand-dark);
  margin-bottom: 18px;
  font-weight: 600;
}

.lede {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 18px;
}

/* Trust strip — flat row of cite-style badges. No badge graphics; the
   citation source is the load-bearing trust signal. */
.trust-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 24px;
}

@media (min-width: 640px) {
  .trust-strip { grid-template-columns: 1fr 1fr 1fr; }
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trust-item .eyebrow {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-sage);
  font-weight: 600;
}

@media (min-width: 640px) {
  .trust-item .eyebrow { min-height: 2.8em; }
}

.trust-item .body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* Three-step explainer. */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
}

.step .step-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.step h3 {
  font-size: 17px;
  line-height: 1.3;
  color: var(--brand-dark);
  margin-bottom: 6px;
  font-weight: 600;
}

@media (min-width: 640px) {
  .step h3 { min-height: 2.6em; }
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-block;
  background: var(--brand);
  color: #FFF;
  border: none;
  border-radius: 10px;
  padding: 16px 28px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.01em;
  min-height: 52px;
  line-height: 1.2;
}

.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }

.btn-block { display: block; width: 100%; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--brand-light); }

.btn[disabled],
.btn:disabled {
  background: var(--border);
  color: var(--text-subtle);
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   Assessment flow
   ============================================================ */

.progress-shell { margin-bottom: 28px; }
.progress-text {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.q-text {
  font-size: 22px;
  line-height: 1.35;
  color: var(--brand-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.q-helper {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.q-options { display: flex; flex-direction: column; gap: 10px; }

.q-option {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  min-height: 56px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.q-option:hover { border-color: var(--brand-light); background: #FBFAF6; }
.q-option:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.q-option.selected {
  border-color: var(--brand);
  background: rgba(47, 93, 98, 0.06);
}

/* ZIP qualifier input. */
.q-input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease;
}
.q-input:focus { border-color: var(--brand); }
.q-input::placeholder { color: var(--text-subtle); }

.q-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.q-nav .spacer { flex: 1; }

.q-back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.q-back:hover { color: var(--brand); }
.q-back[disabled] { color: var(--text-subtle); cursor: not-allowed; text-decoration: none; }

.q-microcopy {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.5;
  font-style: italic;
}

/* ============================================================
   Lead-capture form + TCPA consent block
   ============================================================ */

.lead-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-form .field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-form label.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease;
}

.lead-form input:focus {
  border-color: var(--brand);
}

.consent-block {
  margin-top: 18px;
  padding: 18px;
  background: #FBFAF6;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.consent-checkbox-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.consent-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
  cursor: pointer;
}

.consent-text {
  flex: 1;
}

.consent-text strong {
  color: var(--brand-dark);
}

.consent-text ul {
  margin: 8px 0 8px 20px;
  padding: 0;
}

.consent-text li {
  margin-bottom: 4px;
}

.consent-text a {
  color: var(--brand);
}

/* ============================================================
   Resolution Path stub (results page)
   ============================================================ */

.resolution-path-stub {
  margin-top: 24px;
  padding: 22px;
  background: #FBFAF6;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.band-intro {
  margin-bottom: 20px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.band-intro p {
  margin-bottom: 10px;
}

.band-intro p:last-child {
  margin-bottom: 0;
}

.band-intro .band-cite {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   Legal prose styling
   ============================================================ */

.shell-prose .effective-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.shell-prose hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 28px 0;
}

.shell-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.shell-prose th,
.shell-prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.shell-prose th {
  background: var(--bg);
  color: var(--brand-dark);
  font-weight: 600;
}

.shell-prose .footnotes {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-muted);
}

.shell-prose .footnotes ol {
  margin-left: 22px;
}

.shell-prose .footnotes li {
  margin-bottom: 8px;
  word-break: break-word;
}

.shell-prose .footnotes a {
  color: var(--brand);
  word-break: break-all;
}

.shell-prose strong { font-weight: 600; color: var(--brand-dark); }
.shell-prose ul, .shell-prose ol { margin-left: 22px; margin-bottom: 1em; }
.shell-prose li { margin-bottom: 4px; }
.shell-prose blockquote {
  border-left: 3px solid var(--brand-light);
  padding: 4px 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   Results page
   ============================================================ */

.result-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.result-band {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #FFF;
}

.result-band.band-premium  { background: #8B3A3A; }
.result-band.band-standard { background: #CB6E38; }
.result-band.band-lower    { background: #CFA84A; color: #2A2A2A; }
.result-band.band-info     { background: #4A7C59; }

.result-headline {
  font-size: 26px;
  line-height: 1.3;
  color: var(--brand-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.result-summary {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 24px;
}

.path-skeleton {
  margin-top: 20px;
  padding: 20px;
  background: #F7F5F0;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 540px) {
  .shell { padding: 24px 18px 64px; }
  .hero h1 { font-size: 28px; }
  .hero .subhead { font-size: 17px; }
  .q-card { padding: 22px 18px; }
  .q-text { font-size: 20px; }
  .result-headline { font-size: 22px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 25px; }
  .q-text { font-size: 18px; }
  .q-option { padding: 14px 14px; font-size: 14px; }
  .btn { padding: 14px 22px; font-size: 15px; }
}

/* Reduced motion support. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   Click-to-call modal (MRC-043)
   ============================================================
   Premium-tier results-page primary CTA surface. Hidden by default
   via the hidden attribute; shown by the inline script. Mirrors the
   existing .consent-block and .field-row patterns so the embedded
   click-wrap consent lands without restyling.
   ============================================================ */

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-shell[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 63, 66, 0.55);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(31, 63, 66, 0.18),
              0 2px 8px rgba(31, 63, 66, 0.08);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--brand-dark);
}

.modal-close:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
}

.modal-heading {
  font-size: 22px;
  line-height: 1.3;
  color: var(--brand-dark);
  margin-bottom: 12px;
  font-weight: 600;
  padding-right: 36px;
}

.modal-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 22px;
}

.modal-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.modal-field-row .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.modal-field-row input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px; /* >=16px prevents iOS auto-zoom on focus */
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease;
}

.modal-field-row input:focus {
  border-color: var(--brand);
}

.modal-field-row input.is-invalid {
  border-color: var(--error);
}

.modal-helper {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-error {
  font-size: 13px;
  color: var(--error);
  font-weight: 500;
}

.modal-result {
  margin-top: 18px;
  padding: 18px;
  background: #FBFAF6;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.modal-result-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.modal-result-number {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.modal-result-number:hover {
  color: var(--brand);
  text-decoration: underline;
}

.modal-result-microcopy {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.modal-result-fail {
  background: #FBF6F4;
  border-color: rgba(184, 96, 96, 0.18);
}

@media (max-width: 540px) {
  .modal-card { padding: 22px 18px; }
  .modal-heading { font-size: 20px; }
  .modal-result-number { font-size: 24px; }
}

@media (max-width: 380px) {
  .modal-card { padding: 18px 16px; }
  .modal-heading { font-size: 19px; }
  .modal-result-number { font-size: 22px; }
}
