/* FHM Instant Site Audit — White/Red/Black (v1.5.0) */
:root{
  --bg:#ffffff; --card:#ffffff; --border:#e6e7eb; --text:#0f172a;
  --muted:#6b7280; --primary:#ef4444; --primary-dark:#dc2626; --ink:#111217;
  --shadow:0 10px 30px rgba(15,23,42,.08);
}

.fhm-audit-wrapper{font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:#fff}
.fhm-container{max-width:1240px;margin:0 auto;padding:0 20px}

/* HERO BAND */
.fhm-hero-band{width:100%;background:linear-gradient(135deg, rgba(239,68,68,.18), rgba(239,68,68,.08) 70%, rgba(37,99,235,.05));border-bottom:1px solid #eee;box-shadow: inset 0 -1px 0 #eee}
.fhm-hero-content{padding:54px 0 36px}
.fhm-hero-grid{display:grid;grid-template-columns:1.2fr .9fr;gap:24px;align-items:start}
.fhm-hero-title{font-size: clamp(34px, 5vw, 64px); line-height:1.05; margin:0 0 12px; font-weight:800; letter-spacing:-.02em; color:#0b0f19}
.fhm-hero-sub{font-size: clamp(16px, 2vw, 20px); color:#374151; max-width:900px; margin:0 0 18px}
.fhm-hero-ctas{display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin: 8px 0 18px}
.fhm-hero-time{ color:#6b7280; font-size:13px }

/* Stats */
.fhm-hero-stats{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:8px }
.fhm-hero-stat{background:#fff;border:1px solid #e5e7eb;color:#111217;border-radius:20px;padding:16px 14px;text-align:center;box-shadow:0 6px 18px rgba(15,23,42,.06)}
.fhm-hero-stat span{ display:block; font-size:26px; font-weight:800; color:#ef4444; margin-bottom:4px }
.fhm-hero-stat em{ font-style:normal; opacity:.9; font-size:13px }

/* Hero form */
.fhm-hero-form{ background:#fff; border:1px solid var(--border); border-radius:18px; padding:18px; box-shadow:0 10px 24px rgba(15,23,42,.08) }
.fhm-hero-form h3{ margin:0 0 8px }
.fhm-hero-form .fhm-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px }
.fhm-hero-form .fhm-field--full{ grid-column: span 2 }
.fhm-hero-form .fhm-field--half{ grid-column: span 1 }
.fhm-field{display:flex;flex-direction:column;gap:8px}
.fhm-field label{font-weight:600;color:#111827;font-size:14px}
.fhm-field input{background:#ffffff;border:1px solid var(--border);color:var(--text);border-radius:14px;padding:14px 14px;outline:none;box-shadow:inset 0 1px 0 rgba(0,0,0,.02);transition:box-shadow .2s ease,border-color .2s ease;font-size:15px}
.fhm-field input:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(239,68,68,.12)}
.fhm-hint{font-size:12px;color:#9097a6}

/* Buttons */
.fhm-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border-radius:999px;border:1px solid transparent;text-decoration:none;font-weight:700;letter-spacing:.01em;cursor:pointer;transition:transform .08s ease,box-shadow .2s ease,background .2s ease}
.fhm-btn--primary{background:var(--primary);color:#fff;border:1px solid #b91c1c;box-shadow:0 6px 18px rgba(239,68,68,.25)}
.fhm-btn--primary:hover{transform:translateY(-2px);background:var(--primary-dark)}
.fhm-btn--outline{background:#fff;color:#111217;border:1px solid #e5e7eb}
.fhm-btn--arrow::after{content:'→';margin-left:10px;transition:transform .15s ease}
.fhm-btn--arrow:hover::after{transform:translateX(2px)}

/* Pulse */
@keyframes fhm-pulse-strong{
  0%{transform:translateY(0) scale(1); box-shadow:0 0 0 0 rgba(239,68,68,.45)}
  45%{transform:translateY(-2px) scale(1.05); box-shadow:0 0 0 14px rgba(239,68,68,.0)}
  100%{transform:translateY(0) scale(1); box-shadow:0 0 0 0 rgba(239,68,68,.0)}
}
.fhm-btn--pulse{ animation:fhm-pulse-strong 1.6s ease-in-out infinite }

/* Progress & results */
.fhm-progress{margin:22px 0}
.fhm-progress__labels{display:flex;justify-content:space-between;font-size:12px;color:#6b7280;margin-bottom:6px}
.fhm-progress__bar{height:12px;width:100%;border-radius:999px;background:#f6f7f9;overflow:hidden;border:1px solid #e6e7eb}
.fhm-progress__fill{height:100%;width:0;background:linear-gradient(135deg, rgba(239,68,68,.18), rgba(239,68,68,.08) 70%, rgba(37,99,235,.05));transition:width .5s ease}
.fhm-progress__status{color:#374151}
.fhm-results{display:grid;grid-template-columns:1fr;gap:16px;margin-top:20px}
.fhm-issue{display:grid;grid-template-columns:28px 1fr auto;gap:12px;align-items:start;padding:16px;border-radius:14px;border:1px solid var(--border);background:#fff}
.fhm-issue__icon{color:#f59e0b;margin-top:2px}
.fhm-issue__title{font-weight:700;margin:0;color:#111827}
.fhm-issue__tag{font-size:12px;background:#f6f7f9;border:1px solid var(--border);padding:4px 8px;border-radius:999px;color:#4b5563}
.fhm-results__cta{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:18px;border-radius:14px;border:1px dashed var(--border);background:#fff5f5}

/* Landing */
.fhm-landing .fhm-section{margin:56px 0}
.fhm-landing h2{font-size:clamp(22px,2.6vw,34px);margin:0 0 16px;color:#111217}
.fhm-icons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.fhm-icon-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:0 10px 24px rgba(15,23,42,.06)}
.fhm-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:rgba(239,68,68,.12);color:#ef4444;margin-bottom:10px}
.fhm-grid-2{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}
.fhm-list{margin:12px 0 0 18px}
.fhm-list li{margin:6px 0}
.fhm-accordion details{background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px 16px;margin:10px 0}
.fhm-accordion summary{list-style:none;cursor:pointer;font-weight:600;color:#0f172a}
.fhm-accordion summary::-webkit-details-marker{display:none}
.fhm-accordion details[open]{box-shadow:0 6px 18px rgba(15,23,42,.06)}
.fhm-accordion .fhm-ans{margin-top:10px;color:#374151;line-height:1.65}

@media (max-width: 960px){
  .fhm-hero-grid{grid-template-columns:1fr}
  .fhm-hero-form .fhm-grid{grid-template-columns:1fr}
  .fhm-grid-2{grid-template-columns:1fr}
  .fhm-icons{grid-template-columns:1fr}
}

/* Slightly lower the Run Audit button */
.fhm-hero-form .fhm-btn{ margin-top:16px }

/* Boxed sections for clarity */
.fhm-section .fhm-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:18px 20px;
  box-shadow:0 6px 14px rgba(15,23,42,.05);
}
.fhm-section .fhm-card + .fhm-card{margin-top:14px}

/* Hero title/subtitle stack */
.fhm-hero-title{ margin-bottom:6px }
.fhm-hero-sub{ margin-top:0 }

/* Team */
.fhm-team-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:22px;
}
.fhm-team-card{
  text-align:center;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 20px rgba(15,23,42,.06);
}
.fhm-team-card img{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius:12px;
  border:1px solid #eee;
  background:#fafafa;
}
.fhm-team-card h3{
  margin:12px 0 4px;
  font-size:20px;
  color:#ef4444;
  font-weight:800;
}
.fhm-team-card p{
  margin:0;
  color:#6b7280;
  font-weight:600;
}
@media (max-width: 960px){
  .fhm-team-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .fhm-team-grid{ grid-template-columns: 1fr; }
}

/* Hero kicker between title and sub */
.fhm-hero-kicker{
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  margin: 2px 0 8px;
  color: #111217;
}

/* Compact team section */
.fhm-team-grid{ gap:18px }
.fhm-team-card{ padding:12px; border-radius:16px }
.fhm-team-card img{
  border-radius:10px;
  transform: scale(.94);
  transform-origin: center;
}
.fhm-team-card h3{ font-size:18px; margin:10px 0 2px }
.fhm-team-card p{ font-size:13.5px }

/* Hero bottom spacing */
.fhm-hero-ctas{ margin-top:28px }
.fhm-hero-stats{ margin-top:22px }

/* Team images smaller */
.fhm-team-card img{
  transform: scale(.82);
  border-radius:10px;
}

/* Hero benefits badges */
.fhm-hero-benefits{
  display:flex; flex-wrap:wrap; gap:10px; margin-top:18px;
}
.fhm-hero-benefits .benefit{
  display:inline-flex; align-items:center; gap:8px;
  background:#fff5f5; border:1px solid #fde2e2; color:#b91c1c;
  padding:8px 12px; border-radius:999px; font-weight:600; font-size:13px;
  box-shadow:0 2px 8px rgba(239,68,68,.12);
}

/* Ensure hero is two-column on desktop */
@media (min-width: 1000px){
  .fhm-hero-grid{ display:grid; grid-template-columns: 1.2fr .9fr; gap:28px; align-items:start }
}

/* Clean out old stats spacing */
.fhm-hero-stats{ display:none !important }

@media (min-width: 1000px){
  .fhm-hero-grid{ grid-template-columns: 1.2fr .9fr; }
}

/* Hero feature chips */
.fhm-hero-features{ display:grid; grid-template-columns:1fr; gap:10px; margin-top:16px; max-width:560px }
.fhm-hero-features .feat{ display:flex; gap:10px; align-items:flex-start; background:#fff; border:1px solid #f1d6d6; border-radius:14px; padding:10px 12px; box-shadow:0 4px 12px rgba(239,68,68,.08) }
.fhm-hero-features .ic{ width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:#fff1f1 }
.fhm-hero-features strong{ font-weight:800; color:#111217 }
.fhm-hero-features span{ color:#6b7280; font-size:13px }

@media (min-width: 1100px){
  .fhm-hero-features{ grid-template-columns:1fr 1fr }
}

@media (min-width: 1100px){
  .fhm-hero-grid{ grid-template-columns: 1.15fr 0.85fr; }
}

/* Center-align hero left content with the form */
.fhm-hero-grid{ align-items: center }
.fhm-hero-left{ display:flex; flex-direction:column; justify-content:center }
.fhm-hero-benefits{ margin-top:16px }
.fhm-hero-title{ margin-bottom:6px }
.fhm-hero-kicker{ margin-top:2px; margin-bottom:8px }
.fhm-hero-sub{ margin-bottom:8px }

/* Hero spacing polish after clean rebuild */
.fhm-hero-benefits{ margin-top:14px }

/* ===== Mobile optimisations (<=768px) ===== */
@media (max-width: 768px){
  .fhm-container{padding:0 14px}
  .fhm-hero-grid{grid-template-columns:1fr; gap:16px}
  .fhm-hero-title{font-size: clamp(26px, 7vw, 34px)}
  .fhm-hero-sub{font-size: 15px}
  .fhm-hero-form{padding:14px}
  .fhm-hero-form .fhm-grid{grid-template-columns:1fr}
  .fhm-hero-form .fhm-field--half{grid-column: span 1}
  .fhm-hero-stats{grid-template-columns:1fr; gap:12px}
  .fhm-btn, .fhm-btn-secondary{width:100%; text-align:center}

  /* Results area */
  #fhm-results{display:block; min-height:12px; overflow:visible}
  #fhm-results .fhm-card{padding:14px}
  #fhm-results h3{font-size:20px}
  #fhm-results p, #fhm-results li{font-size:15px; line-height:1.5}
}

/* General safety for small screens */
#fhm-results, #fhm-results *{
  max-width:100%;
  box-sizing:border-box;
  -webkit-hyphens:auto; hyphens:auto;
  word-break:break-word; overflow-wrap:break-word;
}
#fhm-results img, .fhm-card img{height:auto; max-width:100%; display:block}
#fhm-results table{display:block; width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; border-collapse:collapse}
#fhm-results th, #fhm-results td{white-space:normal; padding:10px}
#fhm-results pre, #fhm-results code{white-space:pre-wrap; word-break:break-word}

/* Fix clipping if any ancestors use overflow hidden */
.fhm-audit-wrapper, .fhm-hero-band{overflow:visible}
/* Progress bar spacing on mobile */
#fhm-progress{margin-top:8px}

/* ===== Hero form + Results: responsive hardening ===== */
.fhm-hero-form, .fhm-hero-form *{max-width:100%}
.fhm-hero-form input, .fhm-hero-form select, .fhm-hero-form textarea{width:100%}
.fhm-hero-form .fhm-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.fhm-hero-form .fhm-field--full{grid-column:span 2}
@media (max-width: 992px){
  .fhm-hero-grid{grid-template-columns:1fr}
  .fhm-hero-form .fhm-grid{grid-template-columns:1fr}
  .fhm-hero-form .fhm-field--half{grid-column:span 1}
}
@media (max-width: 480px){
  .fhm-hero-form{padding:12px; border-radius:14px}
  .fhm-hero-form label{font-size:14px}
  .fhm-hero-form input, .fhm-hero-form button{font-size:16px; line-height:1.25}
}
/* Results block */
#fhm-results{display:block; width:100%; max-width:100%; overflow:visible}
#fhm-results .fhm-card{width:100%; border:1px solid var(--border); border-radius:16px; background:#fff; box-shadow: var(--shadow)}
#fhm-results .fhm-card > *{max-width:100%}
#fhm-results .fhm-grid{display:block}
/* Safe tables on phones */
#fhm-results table{display:block; max-width:100%; width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch}
#fhm-results thead, #fhm-results tbody, #fhm-results tr{width:100%}
#fhm-results th, #fhm-results td{white-space:normal}
