/* ===========================================================
   Bizfylr Annual Filing — Wizard + Checkout Styles
   Clean final layout with refined spacing, visibility, alignment
   =========================================================== */

/* ===========================================================
   Page base
   =========================================================== */

.wizard-page {
  padding: clamp(26px, 4.5vw, 46px) 0 clamp(56px, 7vw, 88px);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.075), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.wizard-page *,
.wizard-page *::before,
.wizard-page *::after {
  box-sizing: border-box;
}

.wizard-page [hidden],
.wizard-page [hidden="hidden"] {
  display: none !important;
}

.wizard-container {
  width: min(100% - 40px, 1240px);
  max-width: 1240px;
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 40px, 1240px);
  max-width: 1240px;
  margin-inline: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  color: #516588;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent, #2563eb);
}

/* ===========================================================
   Header
   =========================================================== */

.wizard-head,
.checkout-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto clamp(22px, 3.4vw, 30px);
  align-items: start;
}

@media (min-width: 980px) {
  .wizard-head {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.7fr);
    gap: 28px;
  }
}

.wizard-head-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.wizard-head h1,
.checkout-head h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text, #17233c);
  font-size: clamp(34px, 4.8vw, 52px);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.wizard-head h1 span {
  color: #516588;
}

.wizard-eyebrow,
.wizard-stage-note,
.card-kicker,
.checkout-eyebrow,
.checkout-section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent, #2563eb);
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wizard-head .lede,
.checkout-head .lede {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 15px;
  line-height: 1.65;
}

.wizard-head-aside {
  display: grid;
  gap: 8px;
  align-self: start;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 251, 0.95) 100%);
  border: 1px solid rgba(28, 43, 74, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(20, 32, 57, 0.055);
}

.wizard-head-aside strong {
  color: var(--text, #17233c);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.wizard-head-aside p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

/* ===========================================================
   Shell
   =========================================================== */

.wizard-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(18px, 3.2vw, 34px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(28, 43, 74, 0.1);
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(20, 32, 57, 0.08);
}

@media (min-width: 960px) {
  .wizard-shell {
    padding: 30px 38px 28px;
  }
}

/* ===========================================================
   Step indicator
   =========================================================== */

.wizard-progress {
  margin-bottom: clamp(24px, 3vw, 30px);
}

.step-indicator {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.16) transparent;
}

.step-indicator::-webkit-scrollbar {
  height: 5px;
}

.step-indicator::-webkit-scrollbar-track {
  background: transparent;
}

.step-indicator::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 999px;
}

.step-indicator li {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.step-indicator li:hover {
  color: var(--text, #17233c);
  border-color: rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

.step-indicator li span {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  border: 1px solid var(--border, #dbe3ef);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.step-indicator li.active {
  background: linear-gradient(135deg, var(--accent, #2563eb) 0%, #3b82f6 100%);
  color: #ffffff;
  border-color: var(--accent, #2563eb);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.step-indicator li.active span {
  background: #ffffff;
  color: var(--accent, #2563eb);
  border-color: transparent;
}

.step-indicator li.done {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success, #16a34a);
  border-color: rgba(22, 163, 74, 0.16);
}

.step-indicator li.done span {
  background: var(--success, #16a34a);
  color: #ffffff;
  border-color: transparent;
}

/* ===========================================================
   Step content
   =========================================================== */

.wstep {
  border: 0;
  padding: 0;
  margin: 0 0 clamp(22px, 3vw, 28px);
  min-width: 0;
}

.wstep legend {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--text, #17233c);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.3;
  font-weight: 850;
  letter-spacing: -0.018em;
}

.wstep > p {
  margin: -6px 0 22px;
  color: var(--text-muted, #64748b);
  font-size: 14px;
  line-height: 1.6;
}

.wstep h3 {
  margin: 0 0 12px;
  color: var(--text, #17233c);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -0.012em;
}

/* ===========================================================
   Cards
   =========================================================== */

.detail-card,
.section-card,
.checkout-summary-card,
.checkout-form-card,
.pricing-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(28, 43, 74, 0.1);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(20, 32, 57, 0.055);
}

.detail-card,
.section-card {
  padding: clamp(18px, 2.5vw, 24px);
}

.detail-card-head,
.section-head,
.checkout-card-head,
.checkout-form-head,
.pricing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin-bottom: 16px;
}

.detail-card-head > div,
.section-head > div,
.checkout-card-head > div,
.checkout-form-head > div,
.pricing-card-head > div {
  min-width: 0;
}

.detail-card-head h3,
.section-head h3,
.checkout-form-head h3,
.checkout-card-head h2,
.pricing-card-head h2 {
  margin: 0;
  color: var(--text, #17233c);
  font-size: 20px;
  line-height: 1.22;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.section-head-compact {
  margin-bottom: 14px;
}

.section-head-compact h3 {
  margin: 0;
}

/* ===========================================================
   Forms
   =========================================================== */

.grid2,
.checkout-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 640px) {
  .grid2,
  .checkout-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

.wizard-page .full,
.wizard-page .span-2 {
  grid-column: 1 / -1;
}

.wizard-page label {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--text, #17233c);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.wizard-page label small,
.wizard-page .field-hint,
.wizard-page .muted {
  color: var(--text-muted, #64748b);
}

.wizard-page small,
.wizard-page .small {
  font-size: 12px;
  line-height: 1.45;
}

.wizard-page input[type="text"],
.wizard-page input[type="email"],
.wizard-page input[type="tel"],
.wizard-page input[type="number"],
.wizard-page input[type="search"],
.wizard-page input[type="password"],
.wizard-page select,
.wizard-page textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text, #17233c);
  background: #ffffff;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.wizard-page textarea {
  min-height: 112px;
  resize: vertical;
}

.wizard-page select {
  cursor: pointer;
}

.wizard-page input::placeholder,
.wizard-page textarea::placeholder {
  color: #94a3b8;
}

.wizard-page input:hover,
.wizard-page select:hover,
.wizard-page textarea:hover {
  border-color: #cbd5e1;
}

.wizard-page input:focus,
.wizard-page select:focus,
.wizard-page textarea:focus {
  outline: 0;
  border-color: var(--accent, #2563eb);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.14),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.wizard-page input[aria-invalid="true"],
.wizard-page select[aria-invalid="true"],
.wizard-page textarea[aria-invalid="true"] {
  border-color: var(--danger, #dc2626);
}

.wizard-page input[aria-invalid="true"]:focus,
.wizard-page select[aria-invalid="true"]:focus,
.wizard-page textarea[aria-invalid="true"]:focus {
  box-shadow:
    0 0 0 3px rgba(220, 38, 38, 0.13),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.wizard-page input[readonly],
.wizard-page textarea[readonly],
.wizard-page input:disabled,
.wizard-page select:disabled,
.wizard-page textarea:disabled {
  color: #475569;
  background: #f1f5f9;
  border-color: #dbe3ef;
  cursor: not-allowed;
  box-shadow: none;
}

.wizard-page input[readonly]:focus,
.wizard-page textarea[readonly]:focus,
.wizard-page input:disabled:focus,
.wizard-page select:disabled:focus,
.wizard-page textarea:disabled:focus {
  border-color: #dbe3ef;
  box-shadow: none;
}

/* ===========================================================
   Buttons
   =========================================================== */

.wizard-page .btn,
.wizard-page button {
  max-width: 100%;
}

.btn.is-saving-mode,
button.is-saving-mode {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* ===========================================================
   Business search
   =========================================================== */

.search-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 980px) {
  .search-layout {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  }
}

.search-panel-card,
.search-results-card {
  min-height: 100%;
}

.search-panel-card {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.065), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.search-results-card {
  display: grid;
  align-content: start;
}

.search-panel-top,
.search-results-top {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.search-panel-top h3,
.search-results-top h3 {
  margin: 0;
  color: var(--text, #17233c);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.search-panel-subcopy,
.search-field-hint {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.65;
}

.search-type-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .search-type-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choice-pill {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(81, 101, 136, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text, #17233c);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill:hover {
  border-color: rgba(37, 99, 235, 0.22);
}

.choice-pill.is-active {
  border-color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent, #2563eb);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.11);
}

.choice-pill-block {
  width: 100%;
  justify-content: flex-start;
}

.choice-pill.search-mode-option,
.search-mode-option {
  display: grid;
  align-content: start;
  position: relative;
  width: 100%;
  min-height: 108px;
  gap: 6px;
  padding: 17px 17px 17px 50px;
  border-radius: 16px;
  white-space: normal;
}

.search-mode-option::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 19px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(81, 101, 136, 0.42);
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #ffffff;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.search-mode-option.is-active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.24);
  color: var(--text, #17233c);
}

.search-mode-option.is-active::before {
  border-color: var(--accent, #2563eb);
  background: var(--accent, #2563eb);
  box-shadow: inset 0 0 0 4px #ffffff;
}

.search-mode-title {
  display: block;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 850;
}

.search-mode-description {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 500;
}

.search-panel-label {
  display: block;
  margin: 0 0 9px;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.business-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

.business-search-row input[type="text"],
.business-search-row input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  margin: 0;
}

.business-search-row .btn,
.business-search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  height: 42px;
  min-width: 92px;
  margin: 0;
  padding: 0 16px;
  white-space: nowrap;
}

.search-field-hint {
  margin-top: 9px;
}

.search-feedback {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 12.5px;
  line-height: 1.45;
}

.search-feedback.error {
  color: var(--danger, #dc2626);
}

.search-feedback.success {
  color: var(--success, #16a34a);
}

.search-feedback.loading {
  color: var(--accent, #2563eb);
}

.search-empty-state {
  display: grid;
  gap: 6px;
  min-height: 240px;
  align-content: center;
  justify-items: center;
  padding: 26px 16px;
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

.search-empty-state strong {
  color: var(--text, #17233c);
  font-size: 15px;
  line-height: 1.35;
}

.selected-entity-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.09) 0%, rgba(22, 163, 74, 0.05) 100%);
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 14px;
}

.selected-entity-banner.active {
  display: flex;
}

.selected-entity-banner strong,
.selected-entity-banner span {
  display: block;
}

.selected-entity-banner strong {
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-entity-banner span {
  color: var(--text-muted, #64748b);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.search-results-shell {
  margin-top: 4px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.search-results-table {
  width: 100%;
  border-collapse: collapse;
}

.search-results-table th,
.search-results-table td {
  padding: 12px 14px;
  text-align: left;
}

.search-results-table thead {
  background: #f4f7fc;
}

.search-results-table th {
  color: var(--text, #17233c);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
}

.search-results-table td {
  color: var(--text, #17233c);
  font-size: 13px;
  line-height: 1.45;
  border-top: 1px solid var(--border, #dbe3ef);
  overflow-wrap: anywhere;
}

.search-result-row {
  cursor: pointer;
  transition:
    background-color 0.14s ease,
    box-shadow 0.14s ease;
}

.search-result-row:hover,
.search-result-row:focus-visible {
  background: var(--bg-soft, #f8fafc);
  outline: 0;
}

.search-result-row.is-selected {
  background: rgba(22, 163, 74, 0.08);
  box-shadow: inset 4px 0 0 var(--success, #16a34a);
}

.search-result-empty-row td {
  color: var(--text-muted, #64748b);
}

/* ===========================================================
   Details
   =========================================================== */

.detail-clear-btn {
  white-space: nowrap;
}

.detail-hero-title {
  margin: 0 0 22px;
  color: var(--text, #17233c);
  font-size: clamp(26px, 3.5vw, 34px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.detail-meta-block,
.summary-meta > div {
  min-width: 0;
}

.detail-meta-block span,
.summary-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-meta-block strong,
.summary-meta strong {
  display: block;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.detail-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.detail-section {
  min-width: 0;
}

.detail-section h4 {
  margin: 0 0 10px;
  color: var(--text, #17233c);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 850;
}

.detail-address-cluster {
  display: grid;
  gap: 15px;
}

.detail-section-label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-address-lines {
  display: grid;
  gap: 3px;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* ===========================================================
   Review
   =========================================================== */

.review-stack {
  display: grid;
  gap: 18px;
}

.summary-card {
  padding: 22px 26px;
}

.summary-card .section-head {
  display: block;
  margin-bottom: 16px;
  text-align: center;
}

.summary-card .detail-section-label {
  display: block;
  margin-bottom: 7px;
  text-align: center;
}

.summary-card h3 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.summary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 43, 74, 0.08);
}

.review-lede {
  margin: 0 0 8px;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.6;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.review-benefits {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text, #17233c);
  font-size: 13px;
  line-height: 1.55;
}

.address-review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 960px) {
  .address-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.address-review-card {
  display: grid;
  grid-template-rows: auto auto auto;
  min-width: 0;
  padding: 22px 24px;
}

.address-review-card .section-head {
  position: relative;
  display: block;
  min-height: 58px;
  margin-bottom: 15px;
  padding-right: 58px;
  text-align: center;
}

.address-review-card .section-head h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.01em;
}

.address-review-card .section-head .muted {
  max-width: 320px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.address-review-card .section-head .btn,
.address-review-card .section-head button[data-toggle-fields] {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}

.address-preview {
  display: grid;
  gap: 2px;
  min-height: 102px;
  padding: 15px 16px;
  color: #22304a;
  font-size: 13px;
  line-height: 1.55;
  background: #f8fbff;
  border: 1px solid rgba(28, 43, 74, 0.12);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow-wrap: anywhere;
}

.address-preview span {
  display: block;
  margin: 0;
}

.address-fields {
  margin-top: 16px;
  padding: 16px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
}

.address-fields.grid2 {
  gap: 14px;
}

.address-fields label {
  font-size: 12px;
}

.address-fields input,
.address-fields select,
.address-fields textarea {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 13px;
  border-radius: 8px;
}

.review-stack > .section-card:last-of-type {
  padding: 22px 24px;
}

.review-stack > .section-card:last-of-type .section-head {
  justify-content: center;
  margin-bottom: 16px;
  text-align: center;
}

.review-stack > .section-card:last-of-type .section-head h3 {
  font-size: 16px;
  line-height: 1.35;
}

.review-stack > .section-card:last-of-type .grid2 {
  gap: 18px;
}

.review-stack > .section-card:last-of-type label {
  font-size: 12px;
}

.review-stack > .section-card:last-of-type input {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 13px;
}

.review-continue-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.review-checkout-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.45;
}

/* ===========================================================
   Checkout page
   =========================================================== */

.checkout-page .checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 1020px) {
  .checkout-page .checkout-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }
}

.checkout-summary-card {
  padding: clamp(20px, 3vw, 28px);
}

.checkout-info-block {
  padding: 16px 0;
  border-top: 1px solid rgba(28, 43, 74, 0.08);
}

.checkout-info-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.checkout-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checkout-main-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: var(--text, #17233c);
  font-size: 14px;
  line-height: 1.5;
}

.checkout-main-line strong {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checkout-muted-line {
  margin: 4px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 12.5px;
  line-height: 1.45;
}

.checkout-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.checkout-address-head .checkout-label {
  margin: 0;
}

.checkout-address-head .btn,
.checkout-address-head button[data-checkout-toggle-address] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}

.checkout-address-fields {
  margin-top: 14px;
  padding: 16px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
}

.checkout-address-fields label {
  font-size: 12px;
}

.checkout-address-fields input,
.checkout-address-fields select,
.checkout-address-fields textarea {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 13px;
}

.checkout-form-card {
  margin-top: 18px;
  padding: 20px;
}

.checkout-consent-list {
  display: grid;
  gap: 12px;
}

.checkout-consent-list .checkbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.checkout-consent-list .checkbox input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin-top: 2px;
}

.checkout-security-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  padding: 14px 15px;
  background: rgba(22, 163, 74, 0.07);
  border: 1px solid rgba(22, 163, 74, 0.14);
  border-radius: 12px;
}

.checkout-security-strip p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.55;
}

.checkout-security-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--success, #16a34a);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.checkout-pricing-card {
  position: sticky;
  top: 20px;
  margin: 0;
  padding: 22px;
  border-radius: 16px;
}

.pricing-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.pricing-card-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.pricing-card-head p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.55;
}

.checkout-errors {
  margin: 14px 0;
  padding: 12px 14px;
  color: var(--danger, #dc2626);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.checkout-errors ul {
  margin: 0;
  padding-left: 18px;
}

.checkout-pay-btn {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px;
}

.pay-msg {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.pay-msg.error {
  color: var(--danger, #dc2626);
}

.pay-msg.ok {
  color: var(--success, #16a34a);
}

.checkout-terms {
  margin: 12px 0 0;
  text-align: center;
}

/* ===========================================================
   Pricing
   =========================================================== */

.pricing-card {
  margin: 18px 0 20px;
  padding: clamp(16px, 3vw, 22px);
  background: #ffffff;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.pricing-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 850;
}

.price-rows {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.price-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid var(--border, #dbe3ef);
}

.price-rows li:last-child {
  border-bottom: 0;
}

.price-rows li strong,
.price-rows li span:last-child {
  color: var(--text, #17233c);
  font-weight: 800;
  white-space: nowrap;
}

.price-rows .total-row {
  margin-top: 4px;
  padding-top: 14px;
  color: var(--text, #17233c);
  font-size: 15px;
  font-weight: 850;
}

.price-rows .total-row strong,
.price-rows .total-row span:last-child {
  font-size: 17px;
}

/* ===========================================================
   Callouts
   =========================================================== */

.callout {
  margin: 16px 0;
  padding: 14px 15px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 12px;
}

.callout p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

.callout strong {
  color: var(--text, #17233c);
}

/* ===========================================================
   Wizard navigation
   =========================================================== */

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #dbe3ef);
}

.wizard-nav > * {
  min-width: 0;
}

.wizard-nav .btn,
.wizard-nav button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 12px;
}

.autosave-indicator {
  min-height: 18px;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.autosave-indicator.saving {
  color: var(--warn, #d97706);
}

.autosave-indicator.saved {
  color: var(--success, #16a34a);
}

.autosave-indicator.error {
  color: var(--danger, #dc2626);
}

/* ===========================================================
   Legacy review summary support
   =========================================================== */

#review-summary {
  margin: 0 0 18px;
  padding: clamp(16px, 3vw, 22px);
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
}

#review-summary h4 {
  margin: 18px 0 8px;
  padding-top: 14px;
  color: var(--text, #17233c);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
  border-top: 1px solid var(--border, #dbe3ef);
}

#review-summary h4:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#review-summary .row {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px 16px;
  padding: 5px 0;
  color: var(--text-muted, #64748b);
}

#review-summary .row strong {
  color: var(--text, #17233c);
  font-weight: 750;
}

/* ===========================================================
   Officer rows
   =========================================================== */

.officer-row {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  padding: 18px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 12px;
}

.officer-row:last-child {
  margin-bottom: 0;
}

.officer-row .remove-officer {
  justify-self: start;
  margin-top: 2px;
  color: var(--danger, #dc2626);
}

/* ===========================================================
   Responsive
   =========================================================== */

@media (max-width: 1020px) {
  .checkout-pricing-card {
    position: static;
  }
}

@media (max-width: 960px) {
  .wizard-container,
  .container.narrow {
    width: min(100% - 28px, 1240px);
  }

  .wizard-shell {
    padding: 24px 22px;
  }

  .summary-meta,
  .detail-meta-grid,
  .detail-section-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .address-review-grid {
    grid-template-columns: 1fr;
  }

  .address-review-card .section-head {
    min-height: 54px;
  }
}

@media (max-width: 720px) {
  .search-results-shell {
    overflow-x: auto;
  }

  .search-results-table {
    min-width: 620px;
  }
}

@media (max-width: 640px) {
  .business-search-row {
    grid-template-columns: 1fr;
  }

  .business-search-row .btn,
  .business-search-row button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .wizard-page {
    padding-top: 22px;
    padding-bottom: 52px;
  }

  .wizard-container,
  .container.narrow {
    width: min(100% - 20px, 1240px);
  }

  .wizard-head h1,
  .checkout-head h1 {
    font-size: 32px;
    line-height: 1.02;
  }

  .wizard-head .lede,
  .checkout-head .lede {
    font-size: 14px;
    line-height: 1.6;
  }

  .wizard-shell {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .detail-card,
  .section-card,
  .checkout-summary-card,
  .checkout-form-card,
  .pricing-card {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .selected-entity-banner.active,
  .detail-card-head,
  .section-head,
  .checkout-card-head,
  .checkout-form-head {
    align-items: stretch;
    flex-direction: column;
  }

  .address-review-card .section-head {
    min-height: 0;
    padding-right: 0;
    text-align: left;
  }

  .address-review-card .section-head h3,
  .address-review-card .section-head .muted {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .address-review-card .section-head .btn,
  .address-review-card .section-head button[data-toggle-fields] {
    position: static;
    width: fit-content;
    margin-top: 12px;
  }

  .address-preview {
    min-height: auto;
  }

  .checkout-address-head {
    align-items: flex-start;
  }

  .wizard-nav {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 12px;
  }

  .wizard-nav .btn,
  .wizard-nav button {
    width: 100%;
    justify-content: center;
  }

  #review-summary .row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }
}

/* ===========================================================
   Reduced motion
   =========================================================== */

@media (prefers-reduced-motion: reduce) {
  .step-indicator li,
  .choice-pill,
  .search-result-row,
  .wizard-page input,
  .wizard-page select,
  .wizard-page textarea {
    transition: none;
  }
}

/* ===========================================================
   Final review-step correction
   Fixes signatory card, checkout button/note overlap, and bottom nav spacing
   =========================================================== */

.wizard-page fieldset[data-step="review"] {
  overflow: visible;
}

.wizard-page fieldset[data-step="review"] .review-stack {
  margin-bottom: 0;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type {
  display: block;
  padding: 26px 28px 24px;
  margin: 0;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .section-head {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 0;
  text-align: center;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .section-head h3 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text, #17233c);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  letter-spacing: -0.012em;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type label {
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 800;
}

.wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type input {
  min-height: 44px;
  height: 44px;
  padding: 10px 13px;
  font-size: 13px;
  border-radius: 8px;
}

.wizard-page #proceed-checkout.review-continue-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  height: 48px;
  margin: 18px 0 0 !important;
  padding: 0 24px;
  border-radius: 8px;
  line-height: 1;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  position: relative;
  z-index: 2;
  clear: both;
}

.wizard-page #proceed-checkout.review-continue-btn + .review-checkout-note {
  display: block;
  width: 100%;
  margin: 12px 0 0 !important;
  padding: 0 18px;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  position: relative;
  z-index: 1;
  clear: both;
}

.wizard-page .wizard-nav {
  margin-top: 52px !important;
  padding-top: 26px !important;
  border-top: 1px solid var(--border, #dbe3ef);
}

.wizard-page .wizard-nav .btn,
.wizard-page .wizard-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
}

.wizard-page .autosave-indicator {
  align-self: center;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .grid2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type {
    padding: 22px 16px 20px;
  }

  .wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .section-head {
    justify-content: flex-start;
    text-align: left;
  }

  .wizard-page fieldset[data-step="review"] .review-stack > .section-card:last-of-type .section-head h3 {
    margin: 0;
    font-size: 16px;
  }

  .wizard-page #proceed-checkout.review-continue-btn {
    min-height: 46px;
    height: 46px;
    margin-top: 16px !important;
  }

  .wizard-page #proceed-checkout.review-continue-btn + .review-checkout-note {
    margin-top: 10px !important;
    padding: 0 4px;
  }

  .wizard-page .wizard-nav {
    margin-top: 38px !important;
  }
}

