.bfm-st-tool {
  --bfm-st-navy: var(--bfm-navy, #10263f);
  --bfm-st-navy-deep: var(--bfm-navy-deep, #091a2b);
  --bfm-st-steel: var(--bfm-steel, #596775);
  --bfm-st-amber: var(--bfm-amber, #d28a2e);
  --bfm-st-amber-dark: var(--bfm-amber-dark, #9a5e16);
  --bfm-st-paper: var(--bfm-paper, #ffffff);
  --bfm-st-offwhite: var(--bfm-offwhite, #f5f6f3);
  --bfm-st-ink: var(--bfm-ink, #18222c);
  --bfm-st-border: var(--bfm-border, #d8dde0);
  --bfm-st-success: var(--bfm-success, #2f6f61);
  --bfm-st-danger: var(--bfm-danger, #8b3935);
  color: var(--bfm-st-ink);
  margin: clamp(1.75rem, 4vw, 3.5rem) 0;
  padding: clamp(1.15rem, 3vw, 2.25rem);
  background: var(--bfm-st-paper);
  border: 1px solid var(--bfm-st-border);
  border-top: 5px solid var(--bfm-st-amber);
  border-radius: 5px;
  box-shadow: 0 18px 42px rgba(16, 38, 63, 0.1);
}

.bfm-st-tool,
.bfm-st-tool *,
.bfm-st-tool *::before,
.bfm-st-tool *::after {
  box-sizing: border-box;
}

.bfm-st-tool [hidden] {
  display: none !important;
}

.bfm-st-heading {
  max-width: 58rem;
  margin-bottom: 1.5rem;
}

.bfm-st-heading h2,
.bfm-st-result-header h2 {
  margin: 0.22rem 0 0.7rem;
  color: var(--bfm-st-navy);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.12;
}

.bfm-st-heading p:last-child,
.bfm-st-result-header p:last-child {
  margin-bottom: 0;
  color: var(--bfm-st-steel);
}

.bfm-st-kicker {
  margin: 0;
  color: var(--bfm-st-amber-dark);
  font: 750 0.75rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bfm-st-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.bfm-st-stepper li {
  display: grid;
  gap: 0.38rem;
  justify-items: center;
  color: var(--bfm-st-steel);
  font: 700 0.68rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  position: relative;
  text-align: center;
}

.bfm-st-stepper li::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: calc(50% + 1.1rem);
  width: calc(100% - 2.2rem + 0.45rem);
  height: 1px;
  background: var(--bfm-st-border);
  z-index: 0;
}

.bfm-st-stepper li:last-child::after {
  display: none;
}

.bfm-st-stepper span {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  background: #edf0f1;
  border: 1px solid #c8ced2;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.bfm-st-stepper b {
  font: inherit;
}

.bfm-st-stepper li.is-current {
  color: var(--bfm-st-navy);
}

.bfm-st-stepper li.is-current span {
  color: #fff;
  background: var(--bfm-st-navy);
  border-color: var(--bfm-st-navy);
}

.bfm-st-stepper li.is-complete span {
  color: var(--bfm-st-navy-deep);
  background: #f8e8d1;
  border-color: var(--bfm-st-amber);
}

.bfm-st-step {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 3vw, 1.65rem);
  background: var(--bfm-st-offwhite);
  border: 1px solid var(--bfm-st-border);
  border-radius: 4px;
}

.bfm-st-step > legend {
  max-width: calc(100% - 1rem);
  padding: 0 0.5rem;
  color: var(--bfm-st-navy);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.25;
}

.bfm-st-step > legend span {
  color: var(--bfm-st-amber-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.bfm-st-step-intro {
  max-width: 54rem;
  color: var(--bfm-st-steel);
}

.bfm-st-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.bfm-st-field {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.bfm-st-field label {
  color: var(--bfm-st-navy);
  font-weight: 750;
  line-height: 1.35;
}

.bfm-st-required {
  color: var(--bfm-st-danger);
}

.bfm-st-field input,
.bfm-st-field select,
.bfm-st-field textarea {
  width: 100%;
  min-height: 2.8rem;
  margin: 0;
  padding: 0.65rem 0.72rem;
  color: var(--bfm-st-ink);
  background: #fff;
  border: 1px solid #a9b2ba;
  border-radius: 4px;
  box-shadow: none;
  font: inherit;
  line-height: 1.4;
}

.bfm-st-file-field {
  margin-top: 0.25rem;
  padding: 1rem;
  background: #f7f9fa;
  border: 1px solid var(--bfm-st-border);
  border-radius: 4px;
}

.bfm-st-file-field input[type="file"] {
  min-height: 3.15rem;
  padding: 0.42rem;
  background: #fff;
}

.bfm-st-file-field input[type="file"]::file-selector-button {
  min-height: 2.1rem;
  margin-right: 0.7rem;
  padding: 0.42rem 0.7rem;
  color: #fff;
  background: var(--bfm-st-navy);
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.bfm-st-field-help,
.bfm-st-file-summary {
  margin: 0;
  color: var(--bfm-st-steel);
  font-size: 0.84rem;
  line-height: 1.5;
}

.bfm-st-file-summary[data-state="ready"] {
  color: var(--bfm-st-success);
  font-weight: 700;
}

.bfm-st-file-summary[data-state="error"] {
  color: var(--bfm-st-danger);
  font-weight: 700;
}

.bfm-st-field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.bfm-st-field input:focus,
.bfm-st-field select:focus,
.bfm-st-field textarea:focus {
  border-color: var(--bfm-st-amber-dark);
  outline: 3px solid rgba(210, 138, 46, 0.28);
  outline-offset: 0;
}

.bfm-st-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.bfm-st-selector-nav,
.bfm-st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1rem;
}

.bfm-st-selector-nav [data-bfm-next],
.bfm-st-selector-nav [data-bfm-generate] {
  margin-left: auto;
}

.bfm-st-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.67rem 1rem;
  border: 1px solid var(--bfm-st-navy);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.bfm-st-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(16, 38, 63, 0.15);
}

.bfm-st-button:focus-visible {
  outline: 3px solid rgba(210, 138, 46, 0.48);
  outline-offset: 2px;
}

.bfm-st-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.bfm-st-button-primary {
  color: #fff;
  background: var(--bfm-st-navy);
  border-color: var(--bfm-st-navy);
}

.bfm-st-button-primary:hover:not(:disabled) {
  color: #fff;
  background: #183a5d;
}

.bfm-st-button-secondary,
.bfm-st-button-link {
  color: var(--bfm-st-navy);
  background: #fff;
}

.bfm-st-button-link {
  background: var(--bfm-st-offwhite);
  border-color: #a9b2ba;
}

.bfm-st-selector-result {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1rem, 3vw, 1.75rem);
  background: #f8fafb;
  border: 1px solid #bec8cf;
  border-left: 5px solid var(--bfm-st-navy);
  border-radius: 4px;
}

.bfm-st-selector-result:focus {
  outline: 3px solid rgba(210, 138, 46, 0.36);
  outline-offset: 3px;
}

.bfm-st-result-header {
  max-width: 58rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bfm-st-border);
}

.bfm-st-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.bfm-st-result-grid > section {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--bfm-st-border);
  border-radius: 4px;
}

.bfm-st-result-grid h3 {
  margin: 0 0 0.65rem;
  color: var(--bfm-st-navy);
  font-size: 1.08rem;
}

.bfm-st-result-grid p:last-child,
.bfm-st-result-grid ul:last-child {
  margin-bottom: 0;
}

.bfm-st-result-grid ul {
  margin: 0;
  padding-left: 1.2rem;
}

.bfm-st-result-grid li + li {
  margin-top: 0.5rem;
}

.bfm-st-result-next {
  grid-column: 1 / -1;
  border-left: 4px solid var(--bfm-st-amber) !important;
}

.bfm-st-action-status,
.bfm-st-form-status {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
}

.bfm-st-action-status:not(:empty),
.bfm-st-form-status:not(:empty) {
  padding: 0.85rem 1rem;
  background: #eff4f6;
  border-left: 4px solid var(--bfm-st-navy);
  border-radius: 0 4px 4px 0;
}

.bfm-st-form-status[data-state="pending"] {
  color: var(--bfm-st-navy);
  background: #eef4f8;
}

.bfm-st-form-status[data-state="success"] {
  color: #205a45;
  background: #eaf6ef;
  border-left-color: var(--bfm-st-success);
}

.bfm-st-form-status[data-state="error"] {
  color: #7d2f2b;
  background: #fff0ed;
  border-left-color: var(--bfm-st-danger);
}

.bfm-st-attachment-note {
  margin-top: 0.25rem;
  padding: 1rem;
  color: #5f4318;
  background: #fff8e8;
  border: 1px solid #dfbd83;
  border-radius: 4px;
}

.bfm-st-attachment-note strong {
  color: #6e460f;
}

.bfm-st-attachment-note p {
  margin: 0.35rem 0;
}

.bfm-st-attachment-note a {
  color: var(--bfm-st-navy);
  font-weight: 750;
}

.bfm-st-privacy {
  margin: 0.85rem 0 0;
  color: var(--bfm-st-steel);
  font-size: 0.86rem;
  line-height: 1.55;
}

.bfm-st-contact-rule {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.85rem;
  color: var(--bfm-st-navy);
  background: #eef4f7;
  border-left: 3px solid var(--bfm-st-amber);
  font-size: 0.88rem;
  font-weight: 700;
}

.bfm-st-lead-form.has-selector-prefill {
  padding-top: 1rem;
  border-top: 3px solid #d7a256;
}

@media (max-width: 760px) {
  .bfm-st-stepper {
    grid-template-columns: repeat(6, 2.25rem);
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 0.3rem;
  }

  .bfm-st-stepper b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .bfm-st-grid,
  .bfm-st-result-grid {
    grid-template-columns: 1fr;
  }

  .bfm-st-result-next {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .bfm-st-selector-nav,
  .bfm-st-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bfm-st-selector-nav [data-bfm-next],
  .bfm-st-selector-nav [data-bfm-generate] {
    margin-left: 0;
  }

  .bfm-st-button {
    width: 100%;
  }
}

@media print {
  body.bfm-st-print-mode * {
    visibility: hidden !important;
  }

  body.bfm-st-print-mode .bfm-st-print-target,
  body.bfm-st-print-mode .bfm-st-print-target * {
    visibility: visible !important;
  }

  body.bfm-st-print-mode .bfm-st-print-target {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .bfm-st-no-print,
  .bfm-st-selector-nav,
  .bfm-st-stepper,
  .bfm-st-attachment-note {
    display: none !important;
  }

  .bfm-st-result-grid {
    display: block;
  }

  .bfm-st-result-grid > section {
    break-inside: avoid;
    margin-bottom: 0.65rem;
    border-color: #bbb;
  }
}
