.setup-main { min-width: 0; }
.setup-content {
  max-width: 36rem;
  margin-inline: auto;
  padding-block: clamp(24px, 3vw, 44px);
}
.setup-heading { margin-bottom: 20px; }
.setup-heading h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 3rem);
  line-height: 1.08;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.setup-heading > p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.setup-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.setup-title-row h1 { min-width: 0; }
.setup-step { margin: 0; color: var(--copper); font-size: .875rem; font-weight: 700; }
.setup-content .feedback { margin: 0 0 20px; }
.setup-form { display: grid; gap: 16px; }
.setup-form .field { gap: 6px; }
.setup-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}
.setup-label-row .text-link { display: inline-flex; align-items: center; min-height: 44px; }

.setup-fields { display: grid; min-width: 0; gap: 14px; margin: 0; padding: 0; border: 0; }
.setup-fields legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.setup-fields + .setup-fields legend { width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
.setup-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.setup-signup .consent { gap: 0; }
.setup-signup .consent legend { width: 100%; padding-top: 12px; margin-bottom: 2px; border-top: 1px solid var(--line); font-size: 1rem; }
.setup-signup .check { align-items: start; font-size: .9375rem; line-height: 1.5; }
.setup-signup .check input { margin-top: .8125rem; }
.setup-signup .check label { display: flex; min-height: 44px; flex-wrap: wrap; align-content: center; column-gap: .25em; padding-block: 8px; }
.setup-signup .check label:has(a) { display: block; padding-block: 11px; }
.setup-marketing { margin-top: -8px; border-top: 1px solid var(--line-on-card); }
.setup-alternatives { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 12px; }
.setup-alternatives a { display: inline-flex; align-items: center; min-height: 44px; }

.setup-interests { min-width: 0; padding: 0; margin: 0; border: 0; }
.setup-interests legend { padding: 0; font-weight: 700; }
.setup-selection { display: block; margin: 4px 0 12px; color: var(--muted); font-size: .85rem; }
.setup-choices { border-top: 1px solid var(--line); }
.setup-choice {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 19px;
  align-items: center;
  min-height: 52px;
  gap: 11px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 160ms;
}
.setup-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.setup-choice:has(input:focus-visible) { outline: 2px solid var(--copper); outline-offset: 2px; z-index: 1; }
.setup-choice strong { font-size: .9rem; line-height: 1.35; }
.setup-choice-icon { color: var(--copper); }
.setup-choice-icon .app-icon { width: 18px; height: 18px; }
.setup-choice-check { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid var(--control-line); border-radius: 4px; }
.setup-choice-check .app-icon {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(.7);
  transition: opacity 150ms, transform 180ms cubic-bezier(.2,.75,.3,1.2);
}
.setup-choice:has(:checked) { background: var(--paper); }
.setup-choice:has(:checked) .setup-choice-check { background: var(--ink); border-color: var(--ink); color: var(--paper-light); }
.setup-choice:has(:checked) .setup-choice-check .app-icon { opacity: 1; transform: none; }
@media (hover: hover) {
  .setup-choice:hover { background: var(--sage); }
}
@media (forced-colors: active) {
  .setup-choice:has(:checked) .setup-choice-check { outline: 1px solid Highlight; }
}

.setup-goal label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; font-size: .9rem; }
.setup-goal label span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.setup-goal textarea { min-height: 72px; line-height: 1.5; }
.setup-actions { display: flex; }
.setup-body .button { min-height: 48px; padding: 13px 18px; border-radius: 4px; font-weight: 600; }

@media (max-width: 520px) {
  .setup-actions .button { width: 100%; }
}

@media (max-width: 600px) {
  .setup-credentials { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .setup-field-pair { grid-template-columns: minmax(0, 1fr); }
}
