/* Mercian Health Check - frontend styles. */

.mhc {
  --mhc-brand: #223a7a;
  --mhc-accent: #047987;
  --mhc-ink: #1A1A1A;
  --mhc-muted: #5A5A5A;
  --mhc-rule: #e6ebf2;
  --mhc-surface: #f7f9fc;
  --mhc-soft: #eaf2fb;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--mhc-ink);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
}
.mhc * { box-sizing: border-box; }

.mhc-loading { padding: 40px 24px; color: var(--mhc-muted); text-align: center; }

.mhc-card {
  background: #fff;
  border: 1px solid var(--mhc-rule);
  border-top: 3px solid var(--mhc-accent);
  border-radius: 4px;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 48px -32px rgba(31,78,92,0.25);
}

.mhc-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  color: var(--mhc-accent);
  margin: 0 0 8px;
}
.mhc h2 {
  font-family: 'Inter', sans-serif;
  color: var(--mhc-brand);
  font-size: 26px;
  line-height: 1.22;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.mhc h3 {
  color: var(--mhc-brand);
  font-size: 19px;
  margin: 18px 0 8px;
  font-weight: 600;
}
.mhc p { margin: 0 0 14px; }
.mhc .mhc-muted { color: var(--mhc-muted); font-size: 14.5px; }

.mhc-progress {
  height: 6px; background: var(--mhc-rule); border-radius: 3px;
  margin: 0 0 24px; overflow: hidden;
}
.mhc-progress-bar {
  height: 100%; background: var(--mhc-accent);
  width: 0%; transition: width 0.3s ease;
}
.mhc-progress-label {
  font-size: 12.5px; color: var(--mhc-muted);
  letter-spacing: 0.04em; margin: 0 0 6px;
}

.mhc-options { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 4px; }
.mhc-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #fff; border: 1.5px solid var(--mhc-rule);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  font-size: 15.5px; line-height: 1.45;
}
.mhc-option:hover { border-color: var(--mhc-accent); background: var(--mhc-soft); }
.mhc-option.selected { border-color: var(--mhc-brand); background: var(--mhc-soft); }
.mhc-option input { margin-top: 4px; accent-color: var(--mhc-brand); }
.mhc-option-label { flex: 1; }

.mhc-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; flex-wrap: wrap; }
.mhc-btn {
  border: none; cursor: pointer; padding: 12px 22px;
  font-weight: 600; font-size: 14.5px; border-radius: 2px;
  text-decoration: none; display: inline-block;
  transition: all 0.15s ease;
  font-family: inherit;
}
.mhc-btn-primary { background: var(--mhc-brand); color: #fff; }
.mhc-btn-primary:hover { filter: brightness(0.92); color: #fff; }
.mhc-btn-primary:disabled { background: var(--mhc-rule); color: var(--mhc-muted); cursor: not-allowed; }
.mhc-btn-secondary { background: transparent; color: var(--mhc-brand); border: 1.5px solid var(--mhc-brand); }
.mhc-btn-secondary:hover { background: var(--mhc-brand); color: #fff; }
.mhc-btn-ghost { background: transparent; color: var(--mhc-muted); padding: 12px 6px; }

.mhc-field { margin-bottom: 14px; }
.mhc-field label { display: block; font-size: 13.5px; color: var(--mhc-muted); font-weight: 600; margin-bottom: 4px; letter-spacing: 0.02em; }
.mhc-field input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--mhc-rule); border-radius: 3px; font-size: 15px; font-family: inherit; }
.mhc-field input:focus { outline: none; border-color: var(--mhc-brand); }
.mhc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mhc-honey { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.mhc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--mhc-muted); margin: 12px 0 6px; line-height: 1.5; }
.mhc-consent input { margin-top: 3px; accent-color: var(--mhc-brand); }
.mhc-error { background: #FBE9E7; color: #B71C1C; padding: 10px 12px; border-radius: 3px; font-size: 13.5px; margin: 0 0 12px; }

.mhc-result { padding: 8px 0 0; }
.mhc-score-row { display: flex; align-items: center; gap: 22px; margin: 8px 0 18px; flex-wrap: wrap; }
.mhc-score-circle {
  --p: 0;
  width: 110px; height: 110px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 30px; color: var(--mhc-brand);
  background: conic-gradient(var(--mhc-accent) calc(var(--p) * 1%), var(--mhc-rule) 0);
  position: relative;
  flex: 0 0 auto;
}
.mhc-score-circle::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.mhc-score-circle span { position: relative; z-index: 1; }
.mhc-score-circle small { font-size: 12px; color: var(--mhc-muted); display: block; margin-top: 2px; font-family: inherit; font-weight: 500; }
.mhc-band-text { flex: 1; min-width: 220px; }
.mhc-tip { padding: 14px 16px; background: var(--mhc-soft); border-left: 3px solid var(--mhc-accent); margin: 8px 0; font-size: 15px; line-height: 1.55; border-radius: 0 3px 3px 0; }
.mhc-services-list { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mhc-services-list a { display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--mhc-rule); border-radius: 3px; color: var(--mhc-brand); font-weight: 600; text-decoration: none; transition: border-color 0.15s; }
.mhc-services-list a:hover { border-color: var(--mhc-accent); }
.mhc-services-list a::after { content: ' \2192'; color: var(--mhc-accent); }

.mhc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 4px; }

.mhc-contact {
  margin: 22px 0 0;
  padding: 14px 16px;
  background: var(--mhc-soft);
  border-left: 3px solid var(--mhc-brand);
  border-radius: 0 3px 3px 0;
  font-size: 14.5px;
  color: var(--mhc-ink);
}
.mhc-contact strong { color: var(--mhc-brand); margin-right: 4px; }
.mhc-contact a { color: var(--mhc-brand); font-weight: 600; text-decoration: none; }
.mhc-contact a:hover { text-decoration: underline; }

.mhc-disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--mhc-rule);
  font-size: 12.5px;
  color: var(--mhc-muted);
  font-style: italic;
  line-height: 1.55;
}
.mhc-disclaimer strong { color: var(--mhc-brand); font-style: normal; }

@media (max-width: 600px) {
  .mhc-card { padding: 24px 20px; }
  .mhc h2 { font-size: 22px; }
  .mhc-field-row { grid-template-columns: 1fr; }
  .mhc-score-circle { width: 92px; height: 92px; font-size: 26px; }
}

.mhc-pdf-surface {
  position: fixed; left: -10000px; top: 0; width: 794px;
  background: #fff; padding: 48px 56px;
  font-family: 'Helvetica', Arial, sans-serif;
  color: #1A1A1A;
}
.mhc-pdf-surface .pdf-eyebrow { color: var(--mhc-accent); text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; font-weight: 700; }
.mhc-pdf-surface h1 { font-size: 30px; color: var(--mhc-brand); margin: 8px 0 18px; }
.mhc-pdf-surface .pdf-score { display: flex; gap: 24px; align-items: center; margin: 0 0 22px; padding: 18px 22px; background: var(--mhc-soft); border-left: 4px solid var(--mhc-accent); }
.mhc-pdf-surface .pdf-score-num { font-size: 46px; font-weight: 700; color: var(--mhc-brand); line-height: 1; }
.mhc-pdf-surface h2 { font-size: 16px; color: var(--mhc-brand); margin: 22px 0 6px; }
.mhc-pdf-surface ul { margin: 0 0 14px 18px; padding: 0; }
.mhc-pdf-surface li { margin-bottom: 8px; line-height: 1.5; font-size: 13.5px; }
.mhc-pdf-surface .pdf-cta { background: var(--mhc-brand); color: #fff; padding: 12px 22px; display: inline-block; font-weight: 600; font-size: 14px; margin-top: 14px; }
.mhc-pdf-surface .pdf-footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--mhc-rule); font-size: 11px; color: var(--mhc-muted); }


/* Inbox panel shown after submit — replaces on-screen tips */
.mhc-inbox {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  background: var(--mhc-soft);
  border-left: 3px solid var(--mhc-accent);
  border-radius: 0 4px 4px 0;
  margin: 18px 0 0;
}
.mhc-inbox-icon {
  font-size: 28px; line-height: 1;
  color: var(--mhc-brand);
  flex: 0 0 auto;
}
.mhc-inbox-text { flex: 1; }
.mhc-inbox-text strong { color: var(--mhc-brand); display: block; font-size: 16.5px; margin-bottom: 6px; }
.mhc-inbox-text p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--mhc-ink); }
.mhc-inbox-text .mhc-inbox-note { color: var(--mhc-muted); font-size: 13px; margin: 6px 0 0; }
