.bc-match {
  --bcm-ink: #173f59;
  --bcm-text: #354b54;
  --bcm-muted: #64767c;
  --bcm-teal: #2f8f86;
  --bcm-teal-dark: #155d62;
  --bcm-mint: #e7f3ee;
  --bcm-cream: #fffaf1;
  --bcm-line: #d8e4df;
  --bcm-peach: #f9e6d6;
  --bcm-shadow: 0 24px 60px rgba(22, 63, 74, 0.14);
  width: 100%;
  color: var(--bcm-text);
}

.bc-match,
.bc-match * {
  box-sizing: border-box;
}

/* Defensive cleanup if another content filter formats shortcode HTML. */
.bc-match-form > br,
.bc-match-form > p:empty,
.bc-match-progress > p:empty,
.bc-match-option-grid > br,
.bc-match-topic-grid > br,
.bc-match-chip-grid > br,
.bc-match-check-list > br,
.bc-match-contact-grid > br {
  display: none !important;
}

.bc-match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: clamp(1rem, 2.8vw, 2rem);
  align-items: start;
}

.bc-match-card,
.bc-match-summary,
.bc-match-success {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(23, 63, 89, 0.1);
  border-radius: 28px;
  box-shadow: var(--bcm-shadow);
}

.bc-match-card {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 2.25rem);
}

.bc-match--compact .bc-match-layout {
  display: block;
}

.bc-match--compact .bc-match-summary {
  display: none;
}

.bc-match--compact .bc-match-card {
  border-radius: 24px;
  box-shadow: 0 22px 56px rgba(22, 63, 74, 0.18);
}

.bc-match-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.bc-match-progress__count {
  align-self: flex-end;
  color: var(--bcm-ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.bc-match-progress__track {
  height: 7px;
  overflow: hidden;
  background: #e8eeeb;
  border-radius: 999px;
}

.bc-match-progress__track span {
  display: block;
  width: 14.285%;
  height: 100%;
  background: linear-gradient(90deg, var(--bcm-teal), #62b8a9);
  border-radius: inherit;
  transition: width 220ms ease;
}

.bc-match-step[hidden],
.bc-call-details[hidden] {
  display: none !important;
}

.bc-match-step {
  animation: bc-match-in 180ms ease both;
}

.bc-match-step h2,
.bc-match-summary h2,
.bc-match-success h2 {
  margin: 0;
  color: var(--bcm-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.bc-match-step h2 {
  max-width: 760px;
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
}

.bc-match--compact .bc-match-step h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  text-align: center;
}

.bc-match-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--bcm-teal-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bc-match--compact .bc-match-eyebrow {
  text-align: center;
}

.bc-match-step__intro {
  max-width: 700px;
  margin: 0.75rem 0 1.25rem;
  color: var(--bcm-muted);
  line-height: 1.55;
}

.bc-match-option-grid,
.bc-match-topic-grid,
.bc-match-chip-grid,
.bc-match-contact-grid {
  display: grid;
  gap: 0.75rem;
}

.bc-match-option-grid {
  margin-top: 1.35rem;
}

.bc-match-option-grid--people {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bc-match--compact .bc-match-option-grid--people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bc-match-option-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bc-match-option-grid--three,
.bc-match-chip-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bc-match-option-grid--two,
.bc-match-chip-grid--two,
.bc-match-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bc-match-option-card,
.bc-match-pill-card,
.bc-match-topic,
.bc-match-chip-grid label,
.bc-match-check-list label {
  position: relative;
  cursor: pointer;
}

.bc-match-option-card input,
.bc-match-pill-card input,
.bc-match-topic input,
.bc-match-chip-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.bc-match-option-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  color: var(--bcm-ink);
  background: #fbfcfb;
  border: 1px solid var(--bcm-line);
  border-radius: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bc-match-option-card:hover,
.bc-match-pill-card:hover,
.bc-match-topic:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 134, 0.55);
}

.bc-match-option-card:has(input:checked),
.bc-match-pill-card:has(input:checked),
.bc-match-topic:has(input:checked) {
  border-color: var(--bcm-teal);
  box-shadow: 0 0 0 2px rgba(47, 143, 134, 0.16), 0 10px 24px rgba(22, 63, 74, 0.1);
}

.bc-match-option-card:has(input:focus-visible),
.bc-match-pill-card:has(input:focus-visible),
.bc-match-topic:has(input:focus-visible),
.bc-match-chip-grid label:has(input:focus-visible) span {
  outline: 3px solid #e3a14e;
  outline-offset: 3px;
}

.bc-match-option-card__media {
  display: grid;
  min-height: 120px;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(145deg, #eff8f5, #fff8ed);
}

.bc-match-option-card__media img {
  display: block;
  width: min(100%, 165px);
  height: 125px;
  object-fit: contain;
  object-position: center bottom;
}

.bc-match--compact .bc-match-option-card__media {
  min-height: 100px;
}

.bc-match--compact .bc-match-option-card__media img {
  height: 105px;
}

.bc-match-option-card__label {
  display: block;
  padding: 0.72rem 0.55rem;
  font-size: 0.93rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: center;
}

.bc-match-option-card:has(input:checked)::after,
.bc-match-pill-card:has(input:checked)::after,
.bc-match-topic:has(input:checked)::after {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  content: "✓";
  font-size: 0.73rem;
  font-weight: 900;
  background: var(--bcm-teal-dark);
  border-radius: 50%;
}

.bc-match-field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-top: 1.2rem;
}

.bc-match-field > span,
.bc-match-choice-group legend {
  color: var(--bcm-ink);
  font-size: 0.92rem;
  font-weight: 760;
}

.bc-match-field__label,
.bc-match-choice-heading {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}

.bc-match-field__label img,
.bc-match-choice-heading img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.bc-match-field input {
  width: 100%;
  min-height: 52px;
  padding: 0.78rem 0.9rem;
  color: var(--bcm-text);
  background: #fff;
  border: 1px solid #b9cac4;
  border-radius: 11px;
  font-size: 1rem;
}

.bc-match-field input:focus {
  border-color: var(--bcm-teal);
  box-shadow: 0 0 0 3px rgba(47, 143, 134, 0.14);
  outline: 0;
}

.bc-location-suggestions {
  overflow: hidden;
  margin-top: 0.55rem;
  border: 1px solid var(--bcm-line);
  border-radius: 12px;
}

.bc-location-suggestions button {
  display: block;
  width: 100%;
  padding: 0.68rem 0.9rem;
  color: var(--bcm-text);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--bcm-line);
  text-align: left;
  cursor: pointer;
}

.bc-location-suggestions button:last-child {
  border-bottom: 0;
}

.bc-location-suggestions button:hover {
  background: var(--bcm-mint);
}

.bc-match-topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 1.3rem 0 0;
  padding: 0;
  border: 0;
}

.bc-match-topic {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  color: var(--bcm-ink);
  background: #f9fbfa;
  border: 1px solid var(--bcm-line);
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
}

.bc-match-topic:nth-of-type(3n + 1) { background: #fff5ec; }
.bc-match-topic:nth-of-type(3n + 2) { background: #eef7f3; }
.bc-match-topic:nth-of-type(3n + 3) { background: #f7f3e6; }

.bc-match-topic__icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
}

.bc-match-topic__icon img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.bc-match-choice-group {
  min-width: 0;
  margin: 1.4rem 0 0;
  padding: 0;
  border: 0;
}

.bc-match-choice-group small,
.bc-match-pill-card small {
  display: block;
  margin-top: 0.35rem;
  color: var(--bcm-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.bc-match-pill-card {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  color: var(--bcm-ink);
  background: #fff;
  border: 1px solid var(--bcm-line);
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
}

.bc-match-pill-card__icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
}

.bc-match-pill-card__icon img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.bc-match-pill-card--large {
  min-height: 130px;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.bc-match-pill-card--large .bc-match-pill-card__icon {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
}

.bc-match-pill-card--large .bc-match-pill-card__icon img {
  width: 70px;
  height: 70px;
}

.bc-match-pill-card--large strong {
  display: block;
  color: var(--bcm-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.bc-match-chip-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0.7rem;
}

.bc-match-chip-grid label span {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.65rem;
  color: var(--bcm-ink);
  background: #fff;
  border: 1px solid var(--bcm-line);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.bc-match-chip-grid label:has(input:checked) span {
  color: #fff;
  background: var(--bcm-teal-dark);
  border-color: var(--bcm-teal-dark);
}

.bc-match-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.bc-match-check-list label {
  display: flex;
  min-height: 46px;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  color: var(--bcm-ink);
  background: #fff;
  border: 1px solid var(--bcm-line);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 650;
}

.bc-match-check-list__icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
}

.bc-match-check-list__icon img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.bc-match-check-list label:has(input:checked) {
  background: var(--bcm-mint);
  border-color: var(--bcm-teal);
}

.bc-call-details {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(145deg, #eff8f5, #fffaf2);
  border: 1px solid var(--bcm-line);
  border-radius: 16px;
}

.bc-match-contact-grid {
  margin-top: 1.25rem;
}

.bc-match-contact-grid .bc-match-field {
  margin: 0;
}

.bc-match-contact-grid .bc-match-field:last-child {
  grid-column: 1 / -1;
}

.bc-match-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 0.85rem;
  padding: 0.8rem;
  color: var(--bcm-text);
  background: #fffdf8;
  border: 1px solid var(--bcm-line);
  border-radius: 11px;
  font-size: 0.81rem;
  line-height: 1.45;
}

.bc-match-consent input,
.bc-match-check-list input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--bcm-teal-dark);
}

.bc-match-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.bc-match-actions--end {
  justify-content: flex-end;
}

.bc-match-back,
.bc-match-next,
.bc-match-submit {
  min-height: 48px;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 760;
  cursor: pointer;
}

.bc-match-back {
  color: var(--bcm-ink);
  background: transparent;
  border: 1px solid transparent;
}

.bc-match-back:hover {
  background: var(--bcm-mint);
}

.bc-match-next,
.bc-match-submit {
  min-width: 150px;
  color: #fff;
  background: linear-gradient(135deg, var(--bcm-teal), var(--bcm-teal-dark));
  border: 0;
  box-shadow: 0 8px 22px rgba(21, 93, 98, 0.18);
}

.bc-match-next:hover,
.bc-match-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(21, 93, 98, 0.26);
}

.bc-match-summary {
  position: sticky;
  top: 1.25rem;
  overflow: hidden;
  padding: 1.2rem;
  background: linear-gradient(180deg, #eff8f5, #fffdf7);
}

.bc-match-summary__art {
  display: block;
  width: 100%;
  height: 165px;
  margin: -0.55rem 0 0.75rem;
  object-fit: contain;
}

.bc-match-summary h2 {
  font-size: 1.72rem;
}

.bc-match-summary > p {
  margin: 0.55rem 0 1rem;
  color: var(--bcm-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.bc-match-summary dl {
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--bcm-line);
  border-radius: 14px;
}

.bc-match-summary dl div {
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--bcm-line);
}

.bc-match-summary dl div:last-child {
  border-bottom: 0;
}

.bc-match-summary dt {
  color: var(--bcm-teal-dark);
  font-size: 0.72rem;
  font-weight: 760;
}

.bc-match-summary dd {
  margin: 0.15rem 0 0;
  color: var(--bcm-ink);
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.35;
}

.bc-match-summary__call {
  display: block;
  width: 118px;
  height: 118px;
  margin: 1rem auto 0.45rem;
  object-fit: contain;
}

.bc-match-summary > strong,
.bc-match-summary > span {
  display: block;
  text-align: center;
}

.bc-match-summary > strong {
  color: var(--bcm-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.bc-match-summary > span {
  margin-top: 0.2rem;
  color: var(--bcm-muted);
  font-size: 0.78rem;
}

.bc-match-success {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, 260px);
  gap: 1.4rem;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.75rem);
}

.bc-match-success__check {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: #fff;
  background: var(--bcm-teal-dark);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
}

.bc-match-success h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.bc-match-success p,
.bc-match-success li {
  color: var(--bcm-muted);
}

.bc-match-success img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.bc-form-alert,
.bc-match-group-error {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  font-size: 0.88rem;
}

.bc-form-error,
.bc-match-group-error {
  color: #7b2929;
  background: #fde8e8;
  border: 1px solid #efbcbc;
}

.bc-form-note {
  color: var(--bcm-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.bc-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@keyframes bc-match-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .bc-match-layout { grid-template-columns: 1fr; }
  .bc-match-summary { position: static; display: none; }
  .bc-match-option-grid--people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-match-option-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-match-chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .bc-match-card { padding: 1rem; border-radius: 18px; }
  .bc-match-step h2 { font-size: clamp(1.65rem, 8vw, 2.3rem); }
  .bc-match-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-match-option-grid--two,
  .bc-match-chip-grid,
  .bc-match-chip-grid--three,
  .bc-match-chip-grid--two,
  .bc-match-contact-grid,
  .bc-match-check-list { grid-template-columns: 1fr; }
  .bc-match-option-grid--three,
  .bc-match-option-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-match-option-card__media { min-height: 92px; }
  .bc-match-option-card__media img { height: 98px; }
  .bc-match-pill-card--large { min-height: 96px; }
  .bc-match-contact-grid .bc-match-field:last-child { grid-column: auto; }
  .bc-match-actions { align-items: stretch; }
  .bc-match-next,
  .bc-match-submit { flex: 1 1 auto; min-width: 0; }
  .bc-match-back { padding-inline: 0.7rem; }
  .bc-match-success { grid-template-columns: 1fr; text-align: center; }
  .bc-match-success__check { margin-inline: auto; }
  .bc-match-success img { max-height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .bc-match *,
  .bc-match *::before,
  .bc-match *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* Compact-home form hardening (v1.5.1).
 * Keep icon choices in a real grid even inside a narrow hero column. */
.bc-match--compact fieldset.bc-match-topic-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  width: 100%;
  min-width: 0;
}

.bc-match--compact .bc-match-topic {
  min-width: 0;
  min-height: 102px;
  padding: 0.62rem 0.4rem;
  border-radius: 14px;
  font-size: 0.77rem;
}

.bc-match--compact .bc-match-topic__icon,
.bc-match--compact .bc-match-topic__icon img {
  width: 54px;
  height: 54px;
}

.bc-match--compact .bc-match-step__intro {
  margin-bottom: 0.9rem;
}

@media (max-width: 640px) {
  .bc-match--compact fieldset.bc-match-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bc-match--compact .bc-match-topic {
    min-height: 96px;
  }
}
