/* ==========================================================================
   SITE.CSS (refactored single file)
   - Base + tokens
   - Layout primitives
   - Components
   - Forms
   - Wizard + step flow
   - Results + Provider cards
   - Page-scoped: Step 3 / Results / Profile
   ========================================================================== */

/* ==========================================================================
   1) Design tokens
   ========================================================================== */
:root{
  --moss: #2F5D50;
  --moss-2: #3E6F62;
  --sage: #A8C3B1;
  --stone: #F3F1ED;
  --ink: #2B2B2B;
  --clay: #C26A4A;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);

  /* common tints */
  --glass: rgba(255,255,255,.65);
  --glass-2: rgba(255,255,255,.55);
  --border: rgba(47,93,80,.14);
  --border-soft: rgba(47,93,80,.10);
  --text-muted: rgba(43,43,43,.62);
  --text-soft: rgba(43,43,43,.78);
}

/* ==========================================================================
   2) Base / Reset
   ========================================================================== */
*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  color: var(--ink);
  background: var(--stone);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

a{ color: var(--moss); text-decoration:none; }
a:hover{ text-decoration: underline; }

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ==========================================================================
   3) Global layout
   ========================================================================== */
.topbar{
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 18px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.logo{ height: 42px; width:auto; display:block; }

.hero{
  min-height: calc(100vh - 130px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px 40px;
}

.hero-inner{
  width:100%;
  max-width: 760px;
  text-align:center;
  padding-top: 10px;
}
.hero-inner.profile-wide{
  max-width: 1040px;
}

.footer{ padding: 18px; }
.footer-inner{
  max-width: 1040px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid rgba(47,93,80,.10);
  padding-top: 14px;
}
.footer-links{ display:flex; gap: 14px; }

@media (max-width: 520px){
  .logo{ height: 36px; }
  .footer-inner{ flex-direction: column; }
}

/* ==========================================================================
   4) Typography blocks
   ========================================================================== */
.headline{
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.subhead{
  margin: 0 auto 22px;
  max-width: 54ch;
  color: rgba(43,43,43,.78);
  font-size: 16px;
}

/* ==========================================================================
   5) Buttons + icons
   ========================================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  user-select:none;
}

.btn-ghost{
  background: rgba(255,255,255,.6);
  border-color: rgba(47,93,80,.18);
  color: var(--moss);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover{
  text-decoration:none;
  border-color: rgba(47,93,80,.30);
}

.btn-primary{
  background: var(--moss);
  color: #fff;
}
.btn-primary:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.icon-btn{
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(47,93,80,.18);
  background: rgba(168,195,177,.35);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  user-select:none;
}
.icon-btn:hover{
  background: rgba(168,195,177,.48);
  border-color: rgba(47,93,80,.28);
}
.icon-btn:active{ transform: translateY(1px); }

.icon{
  width: 20px;
  height: 20px;
  fill: rgba(47,93,80,.85);
}

/* ==========================================================================
   6) Toast
   ========================================================================== */
.toast{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(43,43,43,.70);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(47,93,80,.12);
  border-radius: 12px;
  padding: 10px 12px;
  display: none;
}
.toast.show{ display:inline-block; }

/* ==========================================================================
   7) Cards + pills (generic)
   ========================================================================== */
.card{
  width:100%;
  max-width: 760px;
  display:flex;
  gap: 14px;
  text-align:left;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(47,93,80,.12);
  background: rgba(255,255,255,.7);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

.dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--clay);
  flex: 0 0 auto;
}

.card-title{
  margin: 0 0 2px;
  font-weight: 700;
  color: var(--moss);
}
.card-text{
  margin: 0;
  color: rgba(43,43,43,.78);
}

/* Generic pill used across pages */
.pill{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(168,195,177,.35);
  border: 1px solid rgba(47,93,80,.10);
  color: rgba(47,93,80,.85);
  white-space: nowrap;
}

.coming-soon{
  margin-top: 18px;
  display:flex;
  justify-content:center;
}

.directory-strip{
  margin-top: 18px;
  text-align: left;
  border: 1px solid rgba(47,93,80,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
  padding: 12px;
}
.directory-strip-title{
  margin: 0 0 8px;
}
.directory-marquee{
  width: 100%;
  overflow: hidden;
  margin-top: 8px;
}
.directory-marquee.is-static{
  overflow-x: auto;
  overflow-y: hidden;
}
.directory-track{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  will-change: transform;
}
.directory-track-centered{
  width: 100%;
  justify-content: center;
}
.directory-provider-tile{
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 144px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(47,93,80,.16);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  display: block;
  background: rgba(255,255,255,.92);
}
.directory-provider-tile:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  text-decoration: none;
}
.directory-provider-tile img{
  width: 96px;
  height: 144px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.directory-verified-badge{
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(47,93,80,.20);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.directory-verified-badge img{
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.coverage-wrap{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  align-items:flex-start;
}
.coverage-toggle{
  border: 1px solid rgba(47,93,80,.18);
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  color: rgba(47,93,80,.9);
  cursor: pointer;
}
.coverage-toggle:hover{
  border-color: rgba(47,93,80,.32);
}
.coverage-panel{
  width: 100%;
}
.coverage-map{
  margin-top: 10px;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(168,195,177,.18);
  border: 1px solid rgba(47,93,80,.10);
}
.coverage-map svg{
  width: 100%;
  max-width: 100%;
  height: auto;
  display:block;
}

/* Profile browse: denser grid + slightly smaller map */
.profile-browse #stateResults{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.profile-browse .browse-map .coverage-map{
  max-height: 320px;
  overflow: hidden;
}
.profile-browse .browse-map .coverage-map svg{
  max-height: 320px;
}
.coverage-map svg [data-id]{
  fill: rgba(120,120,120,.16);
  stroke: rgba(47,93,80,.22);
  stroke-width: 0.6;
  transition: fill .15s ease, stroke .15s ease;
}
.coverage-map svg .is-covered{
  fill: rgba(47,93,80,.55);
  stroke: rgba(47,93,80,.65);
}
.coverage-map svg [data-id]:hover{
  fill: rgba(47,93,80,.35);
  stroke: rgba(47,93,80,.85);
}
.coverage-tip{
  position: fixed;
  z-index: 10060;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(47,93,80,.18);
  color: rgba(47,93,80,.9);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
}
.coverage-modal{
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
  isolation: isolate;
}
.coverage-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
  z-index: 0;
}
.coverage-card{
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(47,93,80,.14);
  background: rgba(255,255,255,.96);
  box-shadow: 0 22px 60px rgba(0,0,0,.20);
  padding: 18px 18px 16px;
}
.coverage-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(47,93,80,.14);
  background: rgba(255,255,255,.85);
  font-weight: 900;
  cursor: pointer;
  color: var(--moss);
}
.coverage-close:hover{
  background: rgba(168,195,177,.28);
  border-color: rgba(47,93,80,.26);
}
.coverage-kicker{
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(47,93,80,.75);
  text-transform: uppercase;
}
.coverage-title{
  margin: 6px 0 8px;
  font-size: 22px;
  font-weight: 900;
  color: rgba(43,43,43,.92);
}
.coverage-text{
  margin: 0;
  color: rgba(43,43,43,.78);
}
.coverage-actions{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  margin-top: 14px;
}
[hidden] { display: none !important; }

/* ==========================================================================
   8) Search bar (city + state unified field)
   ========================================================================== */
.search{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(47,93,80,.14);
  border-radius: 999px;
  padding: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.search-row{
  display:flex;
  align-items:center;
  gap: 10px;
}

.field{
  flex: 1;
  display:flex;
  align-items:center;
  gap: 10px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(47,93,80,.14);
  border-radius: 999px;
  padding: 8px 10px;
}

#city{
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 6px 10px 8px;
  font-size: 16px;
  color: var(--ink);
}
#city::placeholder{ color: rgba(43,43,43,.45); }

.divider{
  width: 1px;
  height: 22px;
  background: rgba(47,93,80,.16);
  flex: 0 0 auto;
}

#state{
  border: none;
  outline: none;
  background: transparent;
  color: rgba(47,93,80,.95);
  font-weight: 700;
  padding: 10px 26px 10px 8px;
  border-radius: 10px;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  min-width: 92px;
  text-align: left;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(47,93,80,.7) 50%),
    linear-gradient(135deg, rgba(47,93,80,.7) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
#state:focus{ background-color: rgba(168,195,177,.18); }

.hint-row{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 6px 0;
  font-size: 13px;
  color: rgba(43,43,43,.62);
}

@media (max-width: 520px){
  .field{ padding: 6px 8px; gap: 8px; }
  #state{ min-width: 74px; }
  .hint-row{ flex-direction: column; align-items:center; }
}

/* ==========================================================================
   9) Panels (step/wizard containers)
   ========================================================================== */
.panel{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(47,93,80,.14);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  text-align: left;
}

/* ==========================================================================
   10) Form inputs
   ========================================================================== */
.input{
  width:100%;
  max-width:520px;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(47,93,80,.14);
  background: rgba(255,255,255,.55);
  outline:none;
  font-weight:600;
}
.input:focus{
  border-color: rgba(47,93,80,.30);
  box-shadow: 0 0 0 4px rgba(168,195,177,.20);
  background: rgba(255,255,255,.70);
}

.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:13px;
  color: rgba(43,43,43,.70);
}
.check input{ margin-top:4px; }

/* Unified select styling (replaces duplicate blocks) */
.select{
  width: 100%;
  max-width: 520px;
  padding: 12px 44px 12px 12px; /* room for chevron */
  border-radius: 12px;
  border: 1px solid rgba(47,93,80,.14);
  background-color: rgba(255,255,255,.55);
  color: var(--ink);
  font-weight: 650;
  outline: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(47,93,80,.7) 50%),
    linear-gradient(135deg, rgba(47,93,80,.7) 50%, transparent 50%),
    linear-gradient(to right, rgba(47,93,80,.10), rgba(47,93,80,.10));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 40px) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 22px;
  background-repeat: no-repeat;
}
.select:focus{
  border-color: rgba(47,93,80,.30);
  box-shadow: 0 0 0 4px rgba(168,195,177,.20);
  background-color: rgba(255,255,255,.65);
}
.select:disabled{
  opacity: .65;
  cursor: not-allowed;
}

/* ==========================================================================
   11) Segmented control (3-toggle)
   ========================================================================== */
.segmented{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid rgba(47,93,80,.14);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.55);
  margin: 4px 0 14px;
}

.segmented input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.segmented label{
  padding: 12px 10px;
  text-align: center;
  font-weight: 700;
  color: rgba(47,93,80,.90);
  cursor: pointer;
  user-select: none;
  border-radius: 0;
}

.segmented label:first-of-type{
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}
.segmented label:last-of-type{
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.segmented input:checked + label{
  background: rgba(168,195,177,.40);
  color: rgba(47,93,80,1);
}
.segmented label + input + label{
  border-left: 1px solid rgba(47,93,80,.10);
}

/* ==========================================================================
   12) Radius pills
   ========================================================================== */
.radius-wrap{ margin-top: 8px; }

.radius-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.radius-label{
  font-weight: 700;
  color: rgba(43,43,43,.78);
}

.radius-pills{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radius-pill{
  min-width: 44px;
  justify-content:center;
}
.radius-pill.is-active{
  background: rgba(47,93,80,.10);
  border-color: rgba(47,93,80,.25);
  color: rgba(47,93,80,1);
}

/* ==========================================================================
   13) Map preview card
   ========================================================================== */
.map-card{
  border: 1px solid rgba(47,93,80,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.7);
  padding: 12px;
}
.map{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(168,195,177,.18);
}
.map-note{
  margin: 10px 2px 0;
  font-size: 13px;
  color: rgba(43,43,43,.62);
}
.map-disabled .map{ display:none; }

/* ==========================================================================
   14) Actions row + warnings
   ========================================================================== */
.actions{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  margin-top: 14px;
}
.form-warn{
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(43,43,43,.62);
}

/* ==========================================================================
   15) Wizard progress (single canonical version)
   ========================================================================== */
.wiz{
  margin: 14px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}
.wiz-left{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.wiz-step{
  font-weight: 800;
  color: rgba(47,93,80,1);
  font-size: 13px;
  letter-spacing:.02em;
  text-transform: uppercase;
}
.wiz-hint{
  font-size: 13px;
  color: rgba(43,43,43,.62);
  margin-top: 2px;
}
.wiz-bar{
  flex: 0 0 220px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,93,80,.12);
  background: rgba(255,255,255,.55);
  overflow:hidden;
}
.wiz-bar > span{
  display:block;
  height:100%;
  width: var(--wiz-progress, 0%);
  background: rgba(47,93,80,.22);
}
@media (max-width: 520px){
  .wiz{ flex-direction: column; align-items: flex-start; }
  .wiz-bar{ width: 100%; flex: 0 0 auto; }
}

/* ==========================================================================
   16) Step forms
   ========================================================================== */
.step-summary{
  font-size: 13px;
  color: rgba(43,43,43,.68);
  margin: 6px 0 0;
}

.step-form .q{
  padding: 14px 0;
  border-top: 1px solid rgba(47,93,80,.08);
}
.step-form .q:first-of-type{
  border-top: none;
  padding-top: 0;
}

.q-title{
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--ink);
}
.q-help{
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(43,43,43,.62);
}
.req{
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(43,43,43,.55);
}

/* ==========================================================================
   17) Choice chips + option pills
   ========================================================================== */
.chips{ display:flex; flex-wrap:wrap; gap:10px; }

.chip input,
.opt input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.chip label,
.opt label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(168,195,177,.20);
  border: 1px solid rgba(47,93,80,.12);
  color: rgba(47,93,80,.92);
  font-weight: 700;
  cursor: pointer;
  user-select:none;
}

.chip input:checked + label{
  background: rgba(194,106,74,.16);
  border-color: rgba(194,106,74,.45);
  color: rgba(47,93,80,.95);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.chip input:focus-visible + label{
  outline: 3px solid rgba(47,93,80,.25);
  outline-offset: 2px;
}

/* Radio “pills” */
.opts{ display:flex; flex-wrap:wrap; gap:10px; }
.opt label{ padding: 10px 12px; font-weight: 750; }

.opt input:checked + label{
  background: rgba(194,106,74,.14);
  border-color: rgba(194,106,74,.45);
  color: rgba(47,93,80,1);
}
.opt input:checked + label::after{
  content:"✓";
  font-weight: 900;
  color: rgba(194,106,74,1);
}

/* ==========================================================================
   18) Provider / results cards (canonical)
   ========================================================================== */
.provider-card{
  text-decoration: none;
  color: inherit;
  display:block;
}
.provider-card:hover{ text-decoration:none; }
.provider-card .card-body{ width:100%; }

.provider-grid{
  display:grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}

/* avatar */
.avatar{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(168,195,177,.22);
  border: 1px solid rgba(47,93,80,.10);
  display:flex;
  align-items:center;
  justify-content:center;
}
.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.avatar-fallback{ font-size: 20px; opacity:.75; }

/* header row */
.provider-top{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.provider-name{
  font-weight: 850;
  color: var(--moss);
  line-height: 1.2;
}
.provider-creds{
  margin-left: 8px;
  font-weight: 700;
  color: rgba(43,43,43,.62);
  font-size: 13px;
}

/* compact blurb */
.provider-why,
.provider-blurb{
  margin: 6px 0 0;
  color: rgba(43,43,43,.78);
  font-size: 14px;
  line-height: 1.35;
}
.provider-why{
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* verified controls (kept as-is for your markup) */
.verified{
  display:inline-flex;
  align-items:center;
  margin-left: 8px;
  cursor: default;
  position: relative;
}
.verified[data-tip]::after,
.verified[data-tip]::before{
  opacity: 0;
  pointer-events: none;
}
.verified[data-tip]:hover::after,
.verified[data-tip]:focus-visible::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  max-width: min(360px, 86vw);
  white-space: normal;
  text-align: left;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(47,93,80,.14);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(43,43,43,.78);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  opacity: 1;
  z-index: 5;
}
.verified[data-tip]:hover::before,
.verified[data-tip]:focus-visible::before{
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(47,93,80,.12);
  opacity: 1;
  z-index: 4;
}

/* alt verified badge icon */
.vbadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 26px;
  height: 26px;
  vertical-align: middle;
}
.vbadge-img{
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display:block;
}

/* clamp badge size on results cards */
.match-card .vbadge{
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.match-card .vbadge-img{
  width: 100%;
  height: 100%;
  max-width: 26px;
  max-height: 26px;
}

/* meta badges (single canonical version) */
.meta{
  margin-top: 8px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}
.badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(43,43,43,.72);
  font-weight: 600;
  font-size: 12px;
}
.badge--distance{
  color: rgba(47,93,80,.86);
  border-color: rgba(47,93,80,.16);
}
.badge-soft{
  background: rgba(168,195,177,.18);
  border-color: rgba(47,93,80,.10);
}
.meta-soft .badge{
  background: rgba(43,43,43,.06);
  border-color: rgba(43,43,43,.08);
  color: rgba(43,43,43,.75);
}

/* hover calm */
.match-card:hover .badge{
  border-color: rgba(47,93,80,.16);
}

@media (max-width: 520px){
  .provider-grid{ grid-template-columns: 52px 1fr; }
  .avatar{ width: 52px; height: 52px; border-radius: 12px; }
  .provider-top{ align-items:flex-start; }
}

/* ==========================================================================
   19) Utilities
   ========================================================================== */
.hidden{ display:none; }

/* ==========================================================================
   20) PAGE-SCOPED: Step 3 (step3.php inline)
   ========================================================================== */
details.moreprefs{
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.72);
  border-radius:16px;
  padding:12px 12px 2px;
  margin-top:14px;
}
details.moreprefs > summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:900;
  color: rgba(43,43,43,.86);
  padding:4px 2px 10px;
  user-select:none;
}
details.moreprefs > summary::-webkit-details-marker{ display:none; }

.chev{
  width:10px; height:10px;
  border-right:2px solid rgba(43,43,43,.45);
  border-bottom:2px solid rgba(43,43,43,.45);
  transform: rotate(45deg);
  transition: transform .15s ease;
  margin-top:-2px;
  flex:0 0 auto;
}
details.moreprefs[open] .chev{
  transform: rotate(225deg);
  margin-top:4px;
}
.morehelp{
  margin:-4px 0 10px;
  font-size:12px;
  color: rgba(43,43,43,.60);
  line-height:1.35;
}
.moreprefs .q{ margin-top:10px; }

/* ==========================================================================
   21) PAGE-SCOPED: Results (results.php inline)
   ========================================================================== */
.tier-title{ margin: 0 0 8px; font-weight: 800; color: var(--moss); }
.tier-sub{ margin: 0 0 12px; color: rgba(43,43,43,.70); font-size: 13px; }

.match-card{
  margin-bottom: 12px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.match-card:hover{
  transform: translateY(-1px);
  border-color: rgba(47,93,80,.20);
  box-shadow: 0 10px 30px rgba(0,0,0,.09);
}

.badge.clay{
  background: rgba(194,106,74,.14);
  border-color: rgba(194,106,74,.35);
}

.tier-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top: 10px;
  flex-wrap:wrap;
}

/* ==========================================================================
   22) PAGE-SCOPED: Profile (profile/index.php inline)
   ========================================================================== */
.profile-wrap{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  align-items:start;
}
@media (max-width: 900px){
  .profile-wrap{ grid-template-columns: 1fr; }
}

.profile-hero{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

.profile-photo{
  width:144px;
  height:144px;
  border-radius:18px;
  overflow:hidden;
  flex:0 0 auto;
  background: rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.06);
}
@media (max-width: 520px){
  .profile-photo{ width:112px; height:112px; }
}

.profile-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position: 50% 12%;
  display:block;
}

.profile-name{
  font-weight:900;
  font-size:20px;
  line-height:1.15;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.profile-creds{
  margin-top:4px;
  font-size:13px;
  font-weight:800;
  color: rgba(43,43,43,.62);
}

.profile-sub{
  margin-top:6px;
  color: rgba(43,43,43,.70);
  font-size: 13px;
}

/* Media modal */
.media-modal{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.media-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
}
.media-frame{
  position: relative;
  z-index: 1;
  max-width: 960px;
  width: min(94vw, 960px);
  background: rgba(255,255,255,.96);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.12);
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.media-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 220px;
}
.media-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.85);
  font-weight: 900;
  cursor: pointer;
}
body.media-open{ overflow: hidden; }
[hidden]{ display: none !important; }

/* Match modal (index) */
.match-modal{
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.match-modal.is-open{ display: flex; }
.match-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(3px);
}
.match-frame{
  position: relative;
  z-index: 1;
  width: min(94vw, 980px);
  height: min(86vh, 860px);
  background: rgba(255,255,255,.98);
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.match-shell{
  height: 100%;
  display: flex;
  flex-direction: column;
}
.match-shell-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(47,93,80,.10);
  background: rgba(168,195,177,.18);
}
.match-shell-title{
  font-weight: 950;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: rgba(43,43,43,.92);
}
.match-shell-progress{
  display:flex;
  align-items:center;
  gap: 10px;
}
.match-shell-bar{
  width: 160px;
  height: 8px;
  border-radius: 999px;
  background: rgba(47,93,80,.12);
  overflow: hidden;
}
.match-shell-bar span{
  display:block;
  height:100%;
  width:0%;
  background: rgba(47,93,80,.5);
}
.match-shell-step{
  font-size: 12px;
  color: rgba(43,43,43,.6);
  font-weight: 800;
}
.match-shell-body{
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 16px;
  overflow: auto;
}
.match-frame iframe{
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.match-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.85);
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
}
body.match-open{ overflow: hidden; }

/* Embedded step pages: remove extra chrome and spacing */
body.embed .hero{
  min-height: auto;
  padding: 0;
  align-items: stretch;
}
body.embed .hero-inner{
  max-width: 100%;
  text-align: left;
  padding: 0;
}
body.embed .headline,
body.embed .subhead,
body.embed .wiz,
body.embed .step-summary{
  display: none !important;
}
body.embed .q{ margin-top: 0; }
body.embed .actions{ margin-top: 16px; }
body.embed .panel{
  box-shadow: none;
  border-radius: 0;
  border: none;
  background: transparent;
}
body.embed,
body.embed .step-form{
  min-height: 100%;
}
body.embed .step-form{
  display: flex;
  flex-direction: column;
}
body.embed .step-form .actions{
  margin-top: auto;
}

.pillrow{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.pill.clay{
  background: rgba(194,106,74,.14);
  border-color: rgba(194,106,74,.30);
  color: rgba(140,66,40,.92);
}

.section-title{ margin: 0 0 8px; font-weight:900; color: var(--moss); }

.kv{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.kv li{ display:flex; flex-direction:column; gap:4px; }
.kv .k{ font-size:12px; color: rgba(43,43,43,.55); font-weight:800; }

/* Why page */
.why-cardgrid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.why-card{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(47,93,80,.12);
  background: rgba(255,255,255,.75);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.why-ico{
  width: 28px;
  height: 28px;
  border-radius: 12px;
  background: rgba(168,195,177,.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(47,93,80,.9);
  flex: 0 0 auto;
}
.why-ico svg{ width: 16px; height: 16px; fill: currentColor; }
.why-title{ font-weight: 800; color: rgba(43,43,43,.92); }
.why-text{ color: rgba(43,43,43,.72); }

.why-pillrow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.why-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(168,195,177,.35);
  border: 1px solid rgba(47,93,80,.12);
  color: rgba(47,93,80,.9);
}
.why-pill-num{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(47,93,80,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: rgba(47,93,80,.92);
}
.why-pill-body strong{ color: rgba(43,43,43,.92); }
.why-pillcard{
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(47,93,80,.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.why-pillcard-title{ font-weight: 800; color: rgba(43,43,43,.92); }
.why-pillcard-text{ color: rgba(43,43,43,.72); font-size: 13px; }
.kv .v{ font-size:14px; color: rgba(43,43,43,.88); }

.list{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  display:inline-flex;
  padding: 4px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.75);
  font-weight:750;
  font-size:12px;
  color: rgba(43,43,43,.78);
}

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

.prose{ color: rgba(43,43,43,.86); line-height:1.55; }
.prose p{ margin: 0 0 10px; }
.prose p:last-child{ margin-bottom:0; }

.grid-photos{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
@media (max-width: 900px){
  .grid-photos{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .grid-photos{ grid-template-columns: 1fr; }
}

.photo-tile{
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.7);
}
.photo-tile img{
  width:100%;
  height:170px;
  object-fit:cover;
  display:block;
}
.photo-cap{ padding:8px 10px; font-size:12px; color: rgba(43,43,43,.70); }

.quotes{ display:grid; gap:10px; }
.quote{
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.72);
  border-radius:14px;
  padding:12px;
}
.quote .q{
  margin:0;
  font-size:14px;
  color: rgba(43,43,43,.86);
  line-height:1.45;
}
.quote .m{
  margin-top:8px;
  font-size:12px;
  color: rgba(43,43,43,.55);
  display:flex;
  gap:10px;
  align-items:center;
}
.stars{ letter-spacing:1px; }

@keyframes ctaPulse{
  0%   { box-shadow: 0 0 0 0 rgba(47,93,80,.35); }
  70%  { box-shadow: 0 0 0 10px rgba(47,93,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,93,80,0); }
}
.cta-attn{ animation: ctaPulse 1.25s ease-out 3; }
@media (prefers-reduced-motion: reduce){
  .cta-attn{ animation:none; }
}

/* Badge share module */
.badge-share-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.badge-share-panel .badge-preview{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--border-soft);
  background:#fff;
  box-shadow: 0 6px 18px rgba(47,93,80,.08);
}

.badge-share-panel .badge-preview img{
  width:auto;
  height:46px;
  display:block;
  border-radius:8px;
}

.badge-share-panel .badge-preview-info{
  flex:1;
  min-width:0;
}

.badge-share-panel .badge-preview-info strong{
  display:block;
  font-size:16px;
  color: var(--ink);
}

.badge-share-panel .badge-preview-info .muted{
  margin-top:4px;
  font-size:14px;
}

.badge-share-panel .badge-embed{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding: 12px 14px 14px;
  border-radius:12px;
  border:1px solid var(--border-soft);
  background: var(--stone);
}

.badge-share-panel .badge-embed label{
  font-size:13px;
  font-weight:600;
  color: var(--ink);
}

.badge-share-panel .badge-embed textarea{
  width:100%;
  min-height:96px;
  border-radius:10px;
  border:1px solid rgba(47,93,80,.25);
  padding:10px;
  font-family: "JetBrains Mono", "DM Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:13px;
  background:#fff;
  color: var(--ink);
  resize:vertical;
}

.badge-share-panel .badge-embed-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.badge-share-panel .badge-embed-actions .muted{
  font-size:13px;
  color: var(--text-muted);
}

@media (max-width: 640px){
  .badge-share-panel .badge-preview{
    flex-direction:column;
    align-items:flex-start;
  }
}
