/* Portage wizard */
.wizard { max-width: var(--measure); }
.callout-title { font-size: var(--fs-lg); line-height: var(--lh-lg); }
.callout-note .stack { min-width: 0; }
.reminder { align-items: flex-start; }

.stepper,
.band-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step,
.band-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--sunken);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.step.is-done,
.band-chip.is-done { color: var(--text); }
.step.is-current,
.band-chip.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.band-chip.is-skipped {
  color: var(--muted);
  border-style: dashed;
}
.chip-note { font-size: var(--fs-xs); }

.band-title { margin-top: var(--sp-2); }
.wizard-progress {
  display: block;
  width: 100%;
  height: 8px;
  appearance: none;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--sunken);
}
.wizard-progress::-webkit-progress-bar { background: var(--sunken); border-radius: var(--r-pill); }
.wizard-progress::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
.wizard-progress::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }

.guidance > summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.guidance[open] > summary { margin-bottom: var(--sp-2); }

/* Questions */
.questions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.6;
}
.question-fs { display: flex; flex-direction: column; gap: var(--sp-3); }
.question-legend {
  padding: 0;
  font-size: var(--fs-base);
  font-weight: 400;
}
.q-num { font-weight: 700; margin-inline-end: var(--sp-1); }
.prefill-tag {
  display: inline-block;
  margin-inline-start: var(--sp-2);
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  background: var(--sunken);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 400;
  white-space: nowrap;
}

/* Segmented Da / Nu */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}
@media (min-width: 600px) {
  .segmented { grid-template-columns: 120px 120px; }
}
.seg-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--control);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.seg-opt:hover { background: var(--accent-soft); }
.seg-opt svg { display: none; }
.segmented input:checked + .seg-opt {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.segmented input:checked + .seg-opt svg { display: inline-block; }
.segmented input:focus-visible + .seg-opt {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Choices on the intro and footer */
.choices {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  min-width: 0;
}
.choices legend { margin-bottom: var(--sp-3); }
.choice {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--control);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.choice-text { font-weight: 600; }

.wizard-footer,
.dialog-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.wizard-footer { justify-content: space-between; margin-top: var(--sp-5); }
.form-message,
.field-error,
.form-error { color: var(--danger); font-weight: 600; }
.form-error {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--danger);
  border-radius: var(--r-md);
}
.form-error p + .btn,
.form-error p + * { margin-top: var(--sp-2); }
.case-form input[aria-invalid="true"],
#dob[aria-invalid="true"] { border-width: 2px; border-color: var(--danger); }
.dob-summary { margin: 0; padding-inline-start: var(--sp-5); }
.case-result { min-height: 0; }

dialog.confirm {
  max-width: min(30rem, calc(100vw - 2rem));
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
dialog.confirm::backdrop { background: var(--overlay); }
dialog.confirm h2 { margin-bottom: var(--sp-4); }

/* Phones: the footer stays in reach while scrolling a band */
@media (max-width: 599.98px) {
  .wizard-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-inline: calc(var(--gutter) * -1);
    padding: var(--sp-3) var(--gutter);
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .wizard-footer .btn { flex: 1 1 0; }
}
