/* Basic layout & typography */
.fhm-audit-wrapper {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
}

.fhm-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Hero band */
.fhm-hero-band {
  background: radial-gradient(circle at top left, #fee2e2, #ffe4e6 45%, #fef2f2 90%);
}

.fhm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 800px) {
  .fhm-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.fhm-hero-title {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  font-weight: 800;
  margin-bottom: .5rem;
}

.fhm-hero-kicker {
  font-size: 1.1rem;
  font-weight: 600;
  color: #b91c1c;
  margin-bottom: .4rem;
}

.fhm-hero-sub {
  font-size: .98rem;
  color: #4b5563;
  margin-bottom: 1.3rem;
}

.fhm-hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.fhm-hero-benefits .benefit {
  font-size: .8rem;
  background: #ffffff;
  border-radius: 999px;
  padding: .25rem .65rem;
  box-shadow: 0 1px 2px rgba(127,29,29,.15);
}

/* Form card */
.fhm-hero-form {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 18px 40px rgba(127,29,29,.18);
}

.fhm-hero-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.fhm-form-sub {
  font-size: .86rem;
  color: #6b7280;
  margin-bottom: 1.2rem;
}

.fhm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin-bottom: 1.2rem;
}

.fhm-field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.fhm-field--half {
  flex: 1 1 9rem;
}

.fhm-field--full {
  flex: 1 1 100%;
}

.fhm-field label {
  font-size: .78rem;
  font-weight: 600;
  color: #374151;
}

.fhm-field input {
  border-radius: .6rem;
  border: 1px solid #fecaca;
  padding: .55rem .7rem;
  font-size: .86rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  background: #fef2f2;
}

.fhm-field input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239,68,68,.35);
  background: #ffffff;
}

.fhm-hint {
  font-size: .72rem;
  color: #9ca3af;
}

/* Buttons */
.fhm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .6rem 1.4rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform .1s ease, box-shadow .15s ease, background-color .15s ease;
}

.fhm-btn--primary {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(185,28,28,.45);
}

.fhm-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(185,28,28,.55);
}

.fhm-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(185,28,28,.4);
}

/* Progress bar */
.fhm-progress {
  margin-top: 1.75rem;
  margin-bottom: 1.25rem;
  background: #fef2f2;
  border-radius: .9rem;
  padding: .9rem 1rem 1rem;
  box-shadow: 0 1px 3px rgba(127,29,29,.18);
}

.fhm-progress__labels {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: #9ca3af;
  margin-bottom: .5rem;
}

.fhm-progress__bar {
  position: relative;
  width: 100%;
  height: .46rem;
  border-radius: 999px;
  background: #fee2e2;
  overflow: hidden;
}

.fhm-progress__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fecaca, #f97316, #dc2626, #7f1d1d);
  transition: width .4s ease;
}

.fhm-progress__status {
  margin-top: .5rem;
  font-size: .8rem;
  color: #4b5563;
}

/* Results & issues */
.fhm-results {
  margin-bottom: 3rem;
}

.fhm-results__header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.fhm-results__header p {
  font-size: .86rem;
  color: #6b7280;
}

.fhm-issues {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
}

.fhm-issue {
  border-radius: .9rem;
  border: 1px solid #fee2e2;
  padding: .9rem 1rem;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(127,29,29,.08);
}

.fhm-issue__tag {
  display: inline-flex;
  font-size: .7rem;
  font-weight: 600;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  margin-bottom: .4rem;
}

.fhm-issue__title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.fhm-issue__detail {
  font-size: .84rem;
  color: #4b5563;
  margin-bottom: .4rem;
}

.fhm-issue__evidence {
  border-top: 1px dashed #fee2e2;
  padding-top: .45rem;
}

.fhm-issue__evidence-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: .1rem;
}

.fhm-issue__evidence-text {
  font-size: .8rem;
  color: #6b7280;
  margin: 0 0 .1rem;
}

.fhm-issue__evidence-link a {
  font-size: .8rem;
  font-weight: 600;
  color: #b91c1c;
  text-decoration: none;
}

.fhm-issue__evidence-link a:hover {
  text-decoration: underline;
}

/* Empty state & errors */
.fhm-results__empty {
  margin-top: 1.2rem;
  padding: 1.1rem 1rem;
  border-radius: .9rem;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  font-size: .86rem;
}

.fhm-results__empty h3 {
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.fhm-results__empty p {
  color: #166534;
}

.fhm-error {
  margin-top: 1.2rem;
  padding: .9rem 1rem;
  border-radius: .9rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: .84rem;
  color: #991b1b;
}

/* Results: clearer layout */
.fhm-results__header {
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.fhm-results__header-left h3 {
  margin: 0 0 .25rem;
}

.fhm-results__header-right {
  display: flex;
  gap: .6rem;
  align-items: center;
}

.fhm-btn--cta {
  white-space: nowrap;
}

.fhm-summary {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

@media (max-width: 700px){
  .fhm-summary {
    grid-template-columns: minmax(0, 1fr);
  }
}

.fhm-summary__item {
  border-radius: .9rem;
  border: 1px solid #fee2e2;
  background: #ffffff;
  padding: .85rem 1rem;
  box-shadow: 0 4px 12px rgba(127,29,29,.07);
}

.fhm-summary__n {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.fhm-summary__t {
  margin-top: .25rem;
  font-size: .78rem;
  color: #6b7280;
  font-weight: 600;
}

.fhm-controls {
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}

.fhm-toggle {
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  font-size: .82rem;
  color: #374151;
  font-weight: 600;
}

.fhm-toggle input {
  width: 1rem;
  height: 1rem;
}

.fhm-filter {
  flex: 1 1 18rem;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #ffffff;
  padding: .55rem .85rem;
  font-size: .85rem;
  outline: none;
}

.fhm-filter:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239,68,68,.35);
}

.fhm-sections {
  margin-top: 1rem;
  display: grid;
  gap: .85rem;
}

.fhm-section {
  border-radius: 1rem;
  border: 1px solid #fee2e2;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(127,29,29,.07);
  overflow: hidden;
}

.fhm-section__summary {
  cursor: pointer;
  list-style: none;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff7f7;
}

.fhm-section__summary::-webkit-details-marker { display:none; }

.fhm-section__title {
  font-weight: 800;
  font-size: .95rem;
}

.fhm-section__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.fhm-mini {
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .18rem .55rem;
  border: 1px solid transparent;
}

.fhm-mini.is-pass { background: #ecfdf3; border-color:#bbf7d0; color:#166534; }
.fhm-mini.is-warning { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.fhm-mini.is-fail { background:#fef2f2; border-color:#fecaca; color:#991b1b; }

.fhm-section__body {
  padding: .8rem;
  display: grid;
  gap: .6rem;
}

.fhm-check {
  border-radius: .85rem;
  border: 1px solid #fee2e2;
  background: #ffffff;
  overflow: hidden;
}

.fhm-check.is-pass { border-color: #bbf7d0; }
.fhm-check.is-warning { border-color: #fed7aa; }
.fhm-check.is-fail { border-color: #fecaca; }

.fhm-check__summary {
  cursor: pointer;
  list-style: none;
  padding: .7rem .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.fhm-check__summary::-webkit-details-marker { display:none; }

.fhm-check__left {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.fhm-status-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  background: #9ca3af;
  flex: 0 0 auto;
}

.fhm-status-dot.is-pass { background: #16a34a; }
.fhm-status-dot.is-warning { background: #f97316; }
.fhm-status-dot.is-fail { background: #ef4444; }

.fhm-check__title {
  font-weight: 800;
  font-size: .86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fhm-check__right {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}

.fhm-pill {
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: .2rem .55rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.fhm-pill.is-pass { background: #ecfdf3; border-color:#bbf7d0; color:#166534; }
.fhm-pill.is-warning { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.fhm-pill.is-fail { background:#fef2f2; border-color:#fecaca; color:#991b1b; }

.fhm-check__chev {
  color: #9ca3af;
  font-size: .95rem;
}

.fhm-check[open] .fhm-check__chev {
  transform: rotate(180deg);
  display: inline-block;
}

.fhm-check__body {
  border-top: 1px dashed #fee2e2;
  padding: .75rem .85rem;
  display: grid;
  gap: .65rem;
}

.fhm-check.is-pass .fhm-check__body { border-top-color: #bbf7d0; }
.fhm-check.is-warning .fhm-check__body { border-top-color: #fed7aa; }
.fhm-check.is-fail .fhm-check__body { border-top-color: #fecaca; }

.fhm-check__block {
  display: grid;
  gap: .2rem;
}

.fhm-check__k {
  font-size: .72rem;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fhm-check__v {
  font-size: .85rem;
  color: #374151;
  line-height: 1.45;
}

.fhm-code {
  font-size: .78rem;
  padding: .1rem .35rem;
  border-radius: .4rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
