.check-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: var(--space-4);
}

.check-logo {
  display: flex;
  justify-content: center;
  padding: var(--space-4) 0;
}

.check-main .progress-dots,
.card-stack,
.form-error-banner--inset {
  width: min(100%, 34rem);
  margin-left: auto;
  margin-right: auto;
}

.card-stack {
  position: relative;
  flex: 1;
  padding: var(--space-6) 0 var(--space-4);
  transition: min-height var(--dur-state-swap) var(--ease-spring);
  /* No flex:1 or min-height — the active child drives the container's
     natural height via position:relative below. Inactive cards sit
     stacked absolutely behind, invisible, and don't contribute to
     layout. The bottom-bar's margin-top:auto handles the vertical
     spacing to push it to the viewport bottom regardless. */
}

.question-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-6) + var(--space-1));
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity var(--dur-card-fwd) var(--ease-spring),
              transform var(--dur-card-fwd) var(--ease-spring);
}
.question-card[data-card="activeClient"].active {
  align-items: center;
  justify-content: center;
  min-height: min(40vh, 23rem);
  gap: var(--space-4);
}
.question-card[data-card="activeClient"] .question-headline {
  text-align: center;
  max-width: 14ch;
}
.question-card[data-card="activeClient"] .radio-card-list {
  width: min(100%, 24rem);
}
.question-card.active {
  /* Take the card out of absolute flow so its natural height grows
     the card-stack container. During class swaps the old card stays
     absolute (with a fading opacity transition) while the new card
     becomes relative and resizes the container in place. */
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.question-card.past {
  transform: translateX(-40px);
}

.question-headline {
  font: var(--text-headline);
  color: var(--go-headline);
  text-align: left;
  letter-spacing: -0.01em;
  max-width: 19ch;
}
.question-card[data-card="insurance"] .question-headline,
.question-card[data-card="hours"] .question-headline {
  max-width: 20ch;
  font-size: 25px;
  line-height: 1.16;
}
.question-card[data-card="county"] .question-headline,
.question-card[data-card="insurance"] .question-headline,
.question-card[data-card="hours"] .question-headline {
  text-align: center;
  align-self: center;
  max-width: 24ch;
}

.radio-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.radio-card-list--hours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.radio-card-list--hours .radio-card {
  padding: var(--space-5) var(--space-4);
}
.radio-card-list--hours .radio-card:last-child {
  grid-column: 1 / -1;
}

.check-back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--go-hairline);
  border-radius: var(--radius-pill);
  background: var(--go-surface);
  color: var(--go-headline);
  font: var(--text-label);
  align-self: flex-start;
  transition: border-color var(--dur-press) ease-out,
              box-shadow var(--dur-press) ease-out,
              transform var(--dur-press) ease-out;
}
.check-back-btn img {
  width: 20px;
  height: 20px;
}
.check-back-btn:hover,
.check-back-btn:focus-visible {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: var(--go-shadow);
}

.county-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-1);
}
.county-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.county-chip {
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-pill);
  background: var(--go-success-soft);
  font: var(--text-label);
  color: var(--go-headline);
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
  transition: border-color var(--dur-press) ease-out,
              background-color var(--dur-press) ease-out,
              color var(--dur-press) ease-out,
              transform var(--dur-press) ease-out,
              box-shadow var(--dur-press) ease-out;
}
.county-chip:hover,
.county-chip:focus-visible {
  border-color: var(--go-headline);
  box-shadow: var(--go-shadow-lg);
}
.county-chip:active {
  transform: scale(0.98);
}
.county-chip[aria-pressed="true"] {
  border-color: var(--go-headline);
  background: rgba(16, 185, 129, 0.14);
  color: var(--go-headline);
}
.county-picker input {
  padding: var(--space-4) 0;
  font: var(--text-label);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--go-hairline);
}
.county-picker label {
  margin-bottom: var(--space-2);
}
.county-picker #county-help {
  font-size: 13px;
  color: var(--go-ink-soft);
  letter-spacing: 0;
  margin-bottom: 0;
}
.county-picker input:focus {
  outline: none;
  border-bottom-color: var(--go-headline);
}
.county-picker-results {
  margin-top: var(--space-2);
  max-height: 40vh;
  overflow-y: auto;
  border-top: 1px solid var(--go-hairline);
}
.county-picker-results li {
  padding: var(--space-4);
  border-bottom: 1px solid var(--go-hairline);
  font: var(--text-label);
  cursor: pointer;
}
.county-picker-results li:hover,
.county-picker-results li.highlighted {
  background: var(--go-success-soft);
}

.bottom-bar {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.bottom-bar .btn {
  width: min(100%, 34rem);
  margin: 0 auto;
}

@media (max-width: 390px) {
  .question-card[data-card="insurance"] .question-headline,
  .question-card[data-card="hours"] .question-headline {
    font-size: 23px;
  }
}
