*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --navy: #0d2b45;
  --navy-light: #1a4060;
  --gold: #c8972b;
  --gold-light: #e8b84b;
  --cream: #f9f5ef;
  --cream-dark: #f0e9dc;
  --text: #1c1c1c;
  --muted: #5a6070;
  --border: #d8d2c7;
  --white: #ffffff;
  --green: #2a7a4b;
  --red: #b53030;
  --star: #e8a020;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(13,43,69,0.09);
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}
h1, h2, h3, .logo-text {
  font-family: 'Fraunces', serif;
}

/* ── NAV ── */
nav {
  background: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.logo-text {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.logo-text span {
  color: var(--gold-light);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
nav ul a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav ul a:hover {
  color: var(--gold-light);
}
.nav-cta {
  background: var(--gold);
  color: var(--navy);
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--gold-light);
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: rgba(200,151,43,0.18);
  color: var(--gold-light);
  border: 1px solid rgba(200,151,43,0.4);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 span {
  color: var(--gold-light);
}
.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  text-align: left;
}
.hero-search {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 0.97rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  background: transparent;
}
.hero-search button {
  background: var(--gold);
  border: none;
  padding: 14px 22px;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}
.hero-search button:hover {
  background: var(--gold-light);
}

/* ── POSTCODE AUTOCOMPLETE ── */
.postcode-suggestions {
  list-style: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  max-height: 260px;
  overflow-y: auto;
  z-index: 150;
  display: none;
}
.postcode-suggestions.open {
  display: block;
}
.postcode-suggestions li {
  padding: 11px 18px;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.12s;
}
.postcode-suggestions li:last-child {
  border-bottom: none;
}
.postcode-suggestions li:hover,
.postcode-suggestions li.active {
  background: var(--cream);
}
.postcode-suggestions li.note {
  color: var(--muted);
  font-size: 0.83rem;
  cursor: default;
}
.postcode-suggestions li.note:hover {
  background: var(--white);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.hero-stat {
  color: var(--white);
  text-align: center;
}
.hero-stat .num {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  display: block;
}
.hero-stat .label {
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ── SECTIONS ── */
section {
  padding: 4rem 2rem;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.section-sub {
  color: var(--muted);
  max-width: 600px;
}

/* ── SURVEY TYPES ── */
.survey-types {
  background: var(--white);
}
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.type-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background: var(--white);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}
.type-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.type-card.recommended {
  border-color: var(--gold);
}
.recommended-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}
/* desktop: header is just a passthrough wrapper */
.type-card-header {
  display: contents;
}
.type-chevron {
  display: none;
}
.type-header-text {
  display: contents;
}
.type-icon {
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
}
.type-name {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.type-cost {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.type-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
.type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.8rem;
}
.tag {
  background: var(--cream);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 20px;
  color: var(--muted);
}

/* ── QUIZ ── */
.quiz-section {
  background: var(--cream-dark);
}
.quiz-box {
  background: var(--white);
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 2rem auto 0;
  border: 1.5px solid var(--border);
}
.quiz-step {
  display: none;
}
.quiz-step.active {
  display: block;
}
.quiz-q {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.quiz-opt {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-size: 0.93rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  transition: all 0.15s;
  text-align: left;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-opt:hover {
  border-color: var(--navy);
  background: var(--white);
}
.quiz-opt.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.quiz-opt .opt-icon {
  font-size: 1.2rem;
}
.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}
.progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.progress-dot.done {
  background: var(--navy);
}
.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  align-items: center;
}
.quiz-back {
  background: none;
  border: 1.5px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s;
}
.quiz-back:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.quiz-next {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  transition: background 0.2s;
}
.quiz-next:hover {
  background: var(--navy-light);
}
.quiz-result {
  background: var(--cream);
  border-radius: 10px;
  padding: 1.5rem;
  border: 2px solid var(--gold);
  display: none;
}
.quiz-result-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.quiz-result h3 {
  font-family: 'Fraunces', serif;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}
.quiz-result p {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.result-cost {
  font-weight: 600;
  color: var(--green);
  font-size: 0.95rem;
}

/* ── FIRMS ── */
.firms-section {
  background: var(--white);
}
.firms-search-wrap {
  position: relative;
  max-width: 540px;
  margin: 1.8rem 0 2rem;
}
.firms-search {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(13,43,69,0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.firms-search:focus-within {
  border-color: var(--navy);
  box-shadow: 0 2px 20px rgba(13,43,69,0.13);
}
.firms-search-icon {
  display: flex;
  align-items: center;
  padding-left: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.firms-search input {
  flex: 1;
  border: none;
  padding: 15px 12px;
  font-size: 0.97rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  background: transparent;
  color: var(--text);
}
.firms-search input::placeholder {
  color: #a0a8b4;
}
.firms-search button {
  background: var(--navy);
  border: none;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
  white-space: nowrap;
  margin: 5px;
  border-radius: 8px;
}
.firms-search button:hover {
  background: var(--navy-light);
}
.firms-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
}
.firms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}
.firm-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 270px; /* uniform card height across the grid */
}
.firm-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.firm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}
.firm-name {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.firm-location {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.firm-rics {
  background: #e8f0fe;
  color: #1a4060;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
}
.stars {
  color: var(--star);
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.firm-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.7rem;
}
.rating-num {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}
.review-count {
  font-size: 0.8rem;
  color: var(--muted);
}
.firm-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.8rem;
}
.service-tag {
  background: var(--cream);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--muted);
}
.service-tag.service-more {
  background: var(--white);
  border-style: dashed;
  color: var(--navy);
  font-weight: 600;
}
.service-tag.service-none {
  font-style: italic;
}
.firm-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.55;
  /* Clamp to 2 lines so every card's body block is the same height. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.firm-desc-empty {
  font-style: italic;
  opacity: 0.7;
}
.firm-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto; /* pin actions to the bottom of the card */
  padding-top: 0.4rem;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover {
  background: var(--navy-light);
}
.btn-outline {
  background: none;
  color: var(--navy);
  border: 1.5px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline:hover {
  border-color: var(--navy);
}

/* ── RATING MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: 14px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}
.modal h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1.2rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 0.93rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--navy);
  background: var(--white);
}
.star-rating {
  display: flex;
  gap: 8px;
  font-size: 1.8rem;
  cursor: pointer;
}
.star-rating span {
  color: var(--border);
  transition: color 0.15s;
}
.star-rating span.lit {
  color: var(--star);
}
.form-submit {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 13px;
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.form-submit:hover {
  background: var(--navy-light);
}
/* ── COMING SOON (reviews) ── */
.coming-soon {
  text-align: center;
  padding: 1rem 0.5rem;
}
.coming-soon-icon {
  font-size: 3rem;
  margin-bottom: 0.6rem;
}
.coming-soon-badge {
  display: inline-block;
  background: rgba(200,151,43,0.15);
  color: var(--gold);
  border: 1px solid rgba(200,151,43,0.4);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}
.coming-soon h2 {
  margin-bottom: 0.7rem;
}
.coming-soon p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}
.coming-soon-sub {
  font-size: 0.85rem;
  margin-top: 0.6rem;
  opacity: 0.85;
}

/* ── FIRM DETAIL MODAL ── */
.firm-detail-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
  padding-right: 1.5rem; /* clear the close button */
}
.firm-detail-head h2 {
  margin-bottom: 0;
}
.detail-location {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.detail-about {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.detail-h3 {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  color: var(--navy);
  margin: 1.2rem 0 0.6rem;
}
.detail-muted {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.detail-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.detail-row {
  display: flex;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.detail-label {
  flex: 0 0 70px;
  font-weight: 600;
  color: var(--navy);
}
.detail-contact a {
  color: var(--navy);
  text-decoration: none;
  word-break: break-all;
}
.detail-contact a:hover {
  text-decoration: underline;
}
.firm-detail-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ── FACTS ── */
.facts-section {
  background: var(--navy);
}
.facts-section .section-title {
  color: var(--white);
}
.facts-section .section-label {
  color: var(--gold-light);
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.fact-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  cursor: pointer;
}
/* desktop: header/body are invisible wrappers */
.fact-header {
  display: contents;
}
.fact-body {
  display: contents;
}
.fact-chevron {
  display: none;
}
.fact-icon {
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
}
.fact-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.fact-text {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  background: #07182a;
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
}
footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
footer a:hover {
  color: var(--gold-light);
}
.rics-notice {
  background: rgba(200,151,43,0.1);
  border: 1px solid rgba(200,151,43,0.25);
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  display: inline-block;
  font-size: 0.8rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

/* ── INFO BAR ── */
.info-bar {
  background: var(--gold);
  padding: 10px 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── HOW IT WORKS ── */
.how-section {
  background: var(--cream);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}
.step {
  text-align: center;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-header {
  display: contents;
}
.step-chevron {
  display: none;
}
.step-body {
  display: contents;
}
.step h3 {
  font-family: 'Fraunces', serif;
  color: var(--navy);
  margin-bottom: 0.4rem;
  font-size: 1rem;
}
.step p {
  font-size: 0.87rem;
  color: var(--muted);
}
/* ── MOBILE ── */
@media (max-width: 768px) {
  /* Global */
  section {
    padding: 2.5rem 1rem;
  }
  .container {
    padding: 0 0.25rem;
  }

  /* Nav */
  nav {
    padding: 0 1rem;
    height: 56px;
  }
  nav ul {
    display: none;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .nav-cta {
    padding: 7px 13px;
    font-size: 0.82rem;
  }

  /* Hero */
  .hero {
    padding: 3rem 1.25rem 2.5rem;
  }
  .hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.25;
  }
  .hero p {
    font-size: 0.97rem;
  }
  .hero-search-wrap {
    max-width: 100%;
  }
  .hero-search input {
    font-size: 0.9rem;
    padding: 13px 14px;
  }
  .hero-search button {
    padding: 13px 16px;
    font-size: 0.88rem;
  }
  .hero-stats {
    gap: 1rem 1.5rem;
    margin-top: 2rem;
  }
  .hero-stat .num {
    font-size: 1.5rem;
  }

  /* Survey types → accordion */
  .types-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 1.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .type-card {
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    transform: none !important;
    box-shadow: none !important;
  }
  .type-card:last-child {
    border-bottom: none;
  }
  .type-card:hover {
    border-color: var(--border);
  }
  .type-card.recommended {
    border-color: var(--border);
    border-bottom-color: var(--border);
  }
  .recommended-badge {
    position: static;
    display: inline-block;
    font-size: 0.62rem;
    margin-bottom: 0;
    padding: 1px 7px;
    border-radius: 6px;
    align-self: center;
    flex-shrink: 0;
  }
  .type-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0.75rem;
    contents: unset;
  }
  .type-icon {
    font-size: 1.2rem;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 1.4rem;
    text-align: center;
  }
  .type-header-text {
    display: block;
    contents: unset;
    flex: 1;
    min-width: 0;
  }
  .type-name {
    font-size: 0.87rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .type-cost {
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  .type-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.25s ease;
    width: 18px;
    height: 18px;
    margin-left: 2px;
  }
  .type-card.open .type-chevron {
    transform: rotate(180deg);
  }
  .type-card-body {
    display: none;
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid var(--cream-dark);
  }
  .type-card.open .type-card-body {
    display: block;
  }
  .type-desc {
    font-size: 0.86rem;
    margin-top: 0.75rem;
  }
  .type-tags {
    margin-top: 0.65rem;
  }

  /* How it works → accordion */
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 1.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .step {
    text-align: left;
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    background: var(--white);
  }
  .step:last-child {
    border-bottom: none;
  }
  .step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    contents: unset;
  }
  .step-num {
    flex-shrink: 0;
    margin: 0;
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
  .step h3 {
    flex: 1;
    font-size: 0.95rem;
    margin: 0;
  }
  .step-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform 0.25s ease;
  }
  .step.open .step-chevron {
    transform: rotate(180deg);
  }
  .step-body {
    display: none;
    contents: unset;
    padding: 0 0.9rem 0.9rem 3.5rem;
    border-top: 1px solid var(--cream-dark);
  }
  .step.open .step-body {
    display: block;
  }
  .step p {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 0.6rem;
  }

  /* Quiz */
  .quiz-box {
    padding: 1.5rem 1.1rem;
    margin-top: 1.5rem;
    border-radius: 10px;
  }
  .quiz-q {
    font-size: 1.05rem;
  }
  .quiz-options {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .quiz-opt {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }
  .quiz-nav {
    gap: 0.5rem;
  }
  .quiz-next,
  .quiz-back {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* step 1 has no Back button — keep Next right-aligned */
  .quiz-nav > span:first-child + .quiz-next {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .quiz-result-actions {
    flex-direction: column;
  }
  .quiz-result-actions .btn-primary,
  .quiz-result-actions .quiz-back {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  /* Firms */
  .firms-search-wrap {
    max-width: 100%;
    margin: 1rem 0 1.5rem;
  }
  .firms-search button {
    padding: 11px 14px;
    font-size: 0.85rem;
    margin: 4px;
  }
  .firms-search input {
    padding: 13px 10px;
    font-size: 0.92rem;
  }
  .firms-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .firm-card {
    min-height: auto;
    padding: 1rem 1rem 0.9rem;
    transform: none !important;
  }
  .firm-header {
    margin-bottom: 0.55rem;
    gap: 0.5rem;
    align-items: center;
  }
  .firm-name {
    font-size: 0.97rem;
  }
  .firm-location {
    font-size: 0.75rem;
    margin-top: 1px;
  }
  .firm-rics {
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 2px 7px;
  }
  .firm-rating {
    margin-bottom: 0.5rem;
  }
  .firm-services {
    margin-bottom: 0.55rem;
  }
  .firm-desc {
    font-size: 0.83rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.75rem;
  }
  .firm-actions {
    gap: 0.5rem;
  }
  .btn-primary,
  .btn-outline {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.88rem;
  }
  /* Firm detail modal on mobile */
  .firm-detail-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-right: 2rem;
  }
  .firm-detail-head h2 {
    font-size: 1.1rem;
  }
  .detail-location {
    font-size: 0.83rem;
  }
  .detail-row {
    flex-direction: column;
    gap: 0.1rem;
  }
  .detail-label {
    flex: unset;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
  }
  .firm-detail-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.2rem;
  }
  .firm-detail-actions .btn-primary,
  .firm-detail-actions .btn-outline {
    width: 100%;
    text-align: center;
    padding: 11px 14px;
  }

  /* Facts → accordion */
  .facts-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 1.5rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .fact-card {
    padding: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
  }
  .fact-card:last-child {
    border-bottom: none;
  }
  .fact-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    contents: unset;
  }
  .fact-icon {
    font-size: 1.2rem;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 1.4rem;
    text-align: center;
  }
  .fact-title {
    flex: 1;
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  .fact-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.4);
    transition: transform 0.25s ease;
  }
  .fact-card.open .fact-chevron {
    transform: rotate(180deg);
  }
  .fact-body {
    display: none;
    contents: unset;
    padding: 0 0.9rem 0.9rem 3.05rem;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .fact-card.open .fact-body {
    display: block;
  }
  .fact-text {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 0.6rem;
  }

  /* Modals */
  .modal {
    padding: 1.5rem 1.25rem;
    border-radius: 10px;
  }

  /* Footer */
  footer {
    padding: 2rem 1.25rem;
    font-size: 0.82rem;
  }
  footer .footer-links {
    gap: 1rem;
  }

  /* Info bar */
  .info-bar {
    padding: 10px 1rem;
    font-size: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 0.8rem 1rem;
  }

  /* Firms search → stack vertically */
  .firms-search {
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    gap: 0;
  }
  .firms-search-icon {
    display: none;
  }
  .firms-search input {
    padding: 13px 14px;
    font-size: 0.93rem;
    border-bottom: 1px solid var(--border);
  }
  .firms-search button {
    margin: 6px;
    padding: 12px;
    font-size: 0.92rem;
    border-radius: 8px;
    text-align: center;
  }
}
