/* =============================================================================
   Refera — Onboard surface styles. Owned by the onboard surface agent.
   LAYOUT ONLY: reuse components from ../styles.css (the design-system API is
   documented at the top of that file). New shared components go in styles.css.

   Editorial Precision note: this surface is an explainer, not a data queue —
   but the a11y contract still holds. Every card FILL stays opaque
   (--surface/--paper) so the prose and the "hand it to your admin" snippets
   keep >= 4.5:1 (measured 16-18:1). Cards are flat at rest with the shared
   hover lift. The shared workspace transition owns route changes, so no text
   rides on translucency or a second mount animation.
   ========================================================================== */

/* ------------------------------------------------------------ section rhythm */
.ob-stack { gap: 28px; }

/* the section label gets a crisp teal accent bar — reads as "machined", ties the
   seven steps together without shouting. Global .section-label supplies the type. */
.ob-section > .section-label {
  position: relative; padding-left: 12px; margin-bottom: 12px;
}
.ob-section > .section-label::before {
  content: ''; position: absolute; left: 0; top: 1px; bottom: 1px;
  width: 3px; border-radius: var(--r-pill); background: var(--teal);
}

.ob-lead {
  font-size: 13.5px; line-height: 1.6; color: var(--ink2);
  max-width: 720px; margin: 0 0 16px;
}

/* The desktop command shell gives ordinary view headers a title/action grid.
   This explainer has supporting copy, not an action, so keep its hierarchy
   stacked and readable. Connected setup owns its separate .setup-head layout. */
@media (min-width: 960px) {
  .ob-head:not(.setup-head) {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 4px;
  }
  .ob-head:not(.setup-head) .view-sub {
    max-width: 80ch;
    margin-top: 0;
  }
}

/* -------------------------------------------------- the three mailbox path cards */
.ob-paths { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ob-path { display: flex; flex-direction: column; }
/* card hover physics come from the shared .card rule (flat at rest,
   2px lift + soft shadow on pointer hover) */
.ob-path-head { margin-bottom: 4px; row-gap: 4px; }
.ob-path-head .card-title { margin-bottom: 0; margin-right: 2px; }

/* the recommended path wears a fine teal cap inside its own radius — a second,
   quieter signal beyond the "Recommended" chip. Inset so there is no layout shift. */
.ob-path[data-testid="onboard-path-m365"] {
  box-shadow: inset 0 2.5px 0 var(--teal);
}
.ob-path[data-testid="onboard-path-m365"]:hover {
  box-shadow: inset 0 2.5px 0 var(--teal), var(--elev-lift);
}

/* ------------------------------------------------ numbered step lists — quiet, dense */
.ob-steps { margin: 4px 0 0; padding-left: 22px; font-size: 13px; }
.ob-steps li { margin: 8px 0; }
.ob-steps li::marker { color: var(--teal); font-weight: 600; font-variant-numeric: tabular-nums; }

/* plain-honesty asides */
.ob-note { font-size: 12px; color: var(--ink2); margin-top: 12px; }
.ob-note strong { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------- copyable snippet block
   'Hand this to your admin' content — must be crisp at rest in a 1/3-width card
   and at 390px. Opaque paper fill, ink-legible. The header reads as a labelled
   strip; the copy button preserves the exact text. */
.ob-snippet {
  margin: 14px 0 0; border: 1px solid var(--hair); border-radius: var(--r-input);
  background: var(--paper); overflow: hidden;
}
.ob-snippet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink3); background: var(--surface);
}
.ob-snippet-head .copy-btn { margin-left: 0; }
.ob-snippet-body {
  margin: 0; padding: 10px 12px; font-size: 11px; line-height: 1.6;
  color: var(--ink2);
  /* wrap, never clip */
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* -------------------------------------------------------- go-live gates checklist
   An empty (not-yet-ticked) amber box is the honest signal: nothing is done for
   you. Sits on the card's opaque surface. */
.ob-gates { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ob-gate {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--hair);
}
.ob-gate:first-child { border-top: 0; }
.ob-gate-mark {
  flex: none; width: 13px; height: 13px; align-self: center;
  border: 1.5px solid var(--amber); border-radius: 4px; background: var(--amber-wash);
}

/* --------------------------------------------------- 'put Refera on your phone' card
   The one install call-to-action on the page: a teal left-rail marks it out (same
   language as a selected queue row) without any coloured fill behind the steps, so
   contrast is untouched. */
.card[data-testid="onboard-pwa-install"] {
  box-shadow: inset 3px 0 0 var(--teal);
}
.card[data-testid="onboard-pwa-install"]:hover {
  box-shadow: inset 3px 0 0 var(--teal), var(--elev-lift);
}

/* guide footnote */
.ob-guide-line { font-size: 12px; color: var(--ink2); }
.ob-guide-line a {
  overflow-wrap: anywhere; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}

/* ------------------------------------------------ action-first demo preview */
.ob-preview { max-width: 1040px; }
.ob-preview-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 32px; align-items: center; padding: 28px;
  box-shadow: inset 3px 0 0 var(--teal);
}
.ob-preview-copy { min-width: 0; }
.ob-preview-copy .card-title { margin-top: 16px; font-size: 20px; }
.ob-preview-copy .card-sub { max-width: 58ch; }
.ob-preview-actions { margin-top: 18px; }
.ob-preview-flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ob-preview-step {
  position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px; min-height: 70px; padding-bottom: 17px;
}
.ob-preview-step:last-child { min-height: 0; padding-bottom: 0; }
.ob-preview-step:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 33px; bottom: 4px;
  width: 1px; background: var(--hair-dark);
}
.ob-preview-number {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 32px; height: 32px; border: 1px solid var(--teal); border-radius: 50%;
  color: var(--teal); background: var(--surface); font: 600 12px/1 var(--mono);
}
.ob-preview-step strong { display: block; padding-top: 2px; font-size: 13.5px; }
.ob-preview-step p { margin: 4px 0 0; color: var(--ink2); font-size: 12px; line-height: 1.45; }
.ob-preview-options {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ob-preview-option { min-width: 0; }
.ob-preview-details { margin-top: 16px; border-top: 1px solid var(--hair); }
.ob-preview-details summary {
  min-height: 44px; display: flex; align-items: center; color: var(--teal);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ob-preview-details .ob-snippet { margin-top: 2px; }
.ob-preview-included {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--hair); border-radius: var(--r-card); background: var(--surface);
}
.ob-preview-included-item { min-width: 0; padding: 18px; border-left: 1px solid var(--hair); }
.ob-preview-included-item:first-child { border-left: 0; }
.ob-preview-included-item strong { font-size: 13.5px; }
.ob-preview-included-item p,
.ob-preview-included-item > span {
  display: block; margin: 6px 0 0; color: var(--ink2); font-size: 12px; line-height: 1.5;
}
.ob-preview-included-item a { display: inline-flex; margin-top: 8px; font-size: 12px; }
.ob-preview-gates { padding: 22px; }
.ob-preview-gates .ob-gates { margin-top: 14px; }
.ob-preview-demo {
  padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  color: var(--ink2); font-size: 12.5px; line-height: 1.6;
}
.ob-preview-demo p { max-width: 76ch; margin: 0; }

/* ------------------------------------------------ connected first-run setup */
.setup-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 20px;
}
.setup-head > div { min-width: 0; }
.setup-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.setup-main, .setup-aside { display: grid; gap: 14px; min-width: 0; }
.setup-progress {
  padding: 15px 17px; border: 1px solid var(--hair); border-radius: var(--r-card);
  background: var(--surface);
}
.setup-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.setup-progress-copy strong { font-size: 14px; }
.setup-progress-copy span { color: var(--ink3); font-size: 12px; }
.setup-test-guide {
  padding: 15px 17px; border: 1px solid var(--hair); border-left: 3px solid var(--teal);
  border-radius: 8px; background: var(--surface);
}
.setup-test-guide .card-title { margin: 0; }
.setup-test-guide-copy { margin: 10px 0 0; color: var(--ink2); font-size: 12.5px; line-height: 1.5; }
.setup-test-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.setup-test-status { min-height: 1.4em; margin: 8px 0 0; color: var(--ink2); font-size: 12px; }
.setup-tasks { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.setup-task {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 82px; padding: 13px 14px; border: 1px solid var(--hair);
  border-radius: var(--r-card); background: var(--surface);
}
.setup-task.is-done { background: color-mix(in srgb, var(--teal-wash) 45%, var(--surface)); }
.setup-task-number {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: var(--ink3); background: var(--paper); border: 1px solid var(--hair); font: 600 12px/1 var(--mono);
}
.setup-task.is-done .setup-task-number { color: var(--teal); background: var(--teal-wash); border-color: var(--teal); }
.setup-task-copy { min-width: 0; }
.setup-task-copy label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.setup-task-copy label input { width: 16px; height: 16px; accent-color: var(--teal); flex: none; }
.setup-task-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--ink); }
.setup-task-label .chip { flex: none; }
.setup-task-copy p { margin: 4px 0 0; color: var(--ink2); font-size: 12px; line-height: 1.45; }
.setup-allowance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.setup-allowance .section-label { margin-bottom: 5px; }
.setup-plain { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--hair); color: var(--ink2); font-size: 12px; }
.setup-stage .row { margin-bottom: 10px; }
.setup-posture { margin: 12px 0 0; color: var(--ink3); font-size: 11px; }
.setup-loading, .setup-error { max-width: 600px; margin: 28px auto; }

/* Activation concierge: one decision surface, with implementation detail kept
   behind Connection settings instead of presented as customer homework. */
.setup-connected-flow {
  display: grid; gap: 16px; width: 100%; max-width: 1040px;
  animation: setup-surface-enter 180ms var(--ease-out) both;
}
@keyframes setup-surface-enter {
  from { transform: translateY(7px); }
  to { transform: translateY(0); }
}
/* One real notice component for every in-flow message on this route. Until
   now .callout carried no rule anywhere in the app bundle, so a failed save,
   a copied approval link, the no-inbox panel and the connected-inbox lock all
   rendered as unstyled body text on a connection-critical step. Tone comes
   from the wash tokens over an opaque surface: no glass, and text stays ink. */
.callout {
  margin: 16px 0 0; padding: 13px 15px; border: 1px solid var(--hair);
  border-left: 3px solid var(--teal); border-radius: 8px;
  background: color-mix(in srgb, var(--teal-wash) 55%, var(--surface));
  color: var(--ink2); font-size: 12.5px; line-height: 1.55;
}
.callout > strong { display: block; color: var(--ink); font-size: 13px; }
.callout p { margin: 4px 0 0; }
.callout[role="alert"], .callout.is-attention {
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber-wash) 65%, var(--surface));
}
.setup-m365-callback {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0; padding: 14px 16px; border: 1px solid var(--hair);
  border-left: 3px solid var(--teal);
  border-radius: 8px; background: var(--surface);
}
.setup-m365-callback[role="alert"] { border-left-color: var(--amber); }
.setup-m365-callback > div:first-child { min-width: 0; }
.setup-m365-callback strong { font-size: 13px; }
.setup-m365-callback p {
  max-width: 760px; margin: 4px 0 0; color: var(--ink2); font-size: 12px; line-height: 1.5;
}
.setup-m365-callback .setup-actions { flex: none; margin-top: 0; }
.setup-concierge-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 20px; align-items: start; width: min(100%, 780px);
}
.setup-concierge { padding: clamp(22px, 4vw, 34px); border-radius: 8px; }
.setup-concierge > .view-title {
  max-width: 18ch; margin-top: 5px; font-size: 36px; line-height: 1.08;
}
.setup-concierge > .view-sub { max-width: 62ch; margin-top: 10px; }
.setup-choice-list, .setup-services {
  display: grid; gap: 9px; margin: 22px 0 0; padding: 0; border: 0;
}
.setup-choice-list legend, .setup-services legend {
  margin-bottom: 9px; color: var(--ink); font-size: 12px; font-weight: 650;
}
.setup-choice {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 11px;
  min-height: 64px; padding: 12px 14px; border: 1px solid var(--hair);
  border-radius: 8px; background: var(--surface); cursor: pointer;
}
.setup-choice:hover { border-color: color-mix(in srgb, var(--teal) 55%, var(--hair)); }
.setup-choice.is-selected { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); }
.setup-choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--teal); }
.setup-choice span { display: grid; gap: 2px; }
.setup-choice strong { font-size: 13.5px; }
.setup-choice small { color: var(--ink2); font-size: 12px; line-height: 1.4; }
.setup-mailbox-plan-list { margin-top: 14px; }
.setup-mailbox-plan-list .setup-choice {
  min-height: 58px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.setup-single-inbox-note {
  margin: 10px 0 0;
  color: var(--ink2);
  font-size: 11.5px;
}
.setup-access-note {
  margin-top: 14px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.setup-access-note > summary {
  min-height: 48px; padding: 13px 0; color: var(--ink2); cursor: pointer;
  font-size: 12.5px; font-weight: 600;
}
.setup-access-note ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink2); }
.setup-access-note li { margin: 6px 0; font-size: 11.5px; line-height: 1.5; }
.setup-account-help .setup-identity-guide { margin-top: 0; border-top: 0; }
.setup-account-help .setup-single-inbox-note { margin-bottom: 12px; }
.setup-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
.setup-fields label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 600; }
.setup-fields label small { color: var(--ink3); font-weight: 400; }
.setup-fields input {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--hair);
  border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit;
}
.setup-service { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; }
.setup-service input { width: 18px; height: 18px; accent-color: var(--teal); }
.setup-identity-guide {
  display: grid; gap: 7px; margin-top: 18px; padding: 18px 0;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.setup-identity-guide > strong { color: var(--ink); font-size: 15px; }
.setup-identity-guide > p {
  margin: 0; color: var(--ink3); font-size: 12px; line-height: 1.5;
}
.setup-identity-guide ol {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 9px 0 0; padding: 0; list-style: none;
}
.setup-identity-guide li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px;
  min-width: 0; padding-right: 14px;
}
.setup-identity-guide li + li { padding-left: 14px; border-left: 1px solid var(--hair); }
.setup-guide-number {
  display: grid; width: 24px; height: 24px; place-items: center;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--hair));
  border-radius: 50%; background: var(--teal-wash); color: var(--teal-2);
  font-size: 11px; font-weight: 700;
}
.setup-identity-guide li > span:last-child { display: grid; min-width: 0; gap: 3px; }
.setup-identity-guide li small { color: var(--ink3); font-size: 10.5px; font-weight: 600; }
.setup-identity-guide li strong {
  color: var(--ink); font-size: 12px; font-weight: 650; overflow-wrap: anywhere;
}
.setup-identity-guide li em {
  color: var(--ink2); font-size: 11px; font-style: normal; line-height: 1.4;
}
.setup-identity-guide .setup-guide-note { margin-top: 5px; color: var(--ink2); }
.setup-approver-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}
.setup-approver-list legend { grid-column: 1 / -1; font-size: 15px; }
.setup-approver-choice { min-height: 72px; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.setup-actions .btn { min-height: 44px; }
.setup-finish-later { min-height: 44px; padding-inline: 10px; color: var(--ink2); }
.setup-included-strip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 10px 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair);
  color: var(--ink2); font-size: 12px; line-height: 1.45;
}
.setup-included-strip strong { color: var(--ink); font-size: 12.5px; }
.setup-included-strip a { white-space: nowrap; }
.setup-progress-page { width: 100%; max-width: 840px; }
.setup-timeline { display: grid; gap: 0; list-style: none; margin: 24px 0 0; padding: 0; }
.setup-timeline li {
  position: relative; display: grid; gap: 2px; min-height: 68px;
  padding: 0 0 18px 42px; color: var(--ink3);
}
.setup-timeline li::before {
  content: ''; position: absolute; left: 4px; top: 3px; width: 22px; height: 22px;
  border: 1.5px solid var(--hair); border-radius: 50%; background: var(--surface);
}
.setup-timeline li:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 28px; bottom: 2px; width: 1px; background: var(--hair);
}
.setup-timeline li.is-done::before { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 6px var(--surface); }
.setup-timeline li.is-current::before { border-color: var(--amber); background: var(--amber-wash); }
.setup-timeline strong { color: var(--ink); font-size: 13.5px; }
.setup-timeline span { font-size: 12px; }
.setup-home-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 0; align-items: stretch;
}
.setup-next-card {
  min-width: 0; padding: 26px 0 0; border-top: 1px solid var(--hair);
}
.setup-next-card .card-title { margin-top: 4px; font-size: 18px; }
.setup-next-card .card-sub { max-width: 58ch; }
.setup-home-actions { align-items: center; margin-top: 20px; }
.setup-edit-choice {
  min-height: 40px; padding: 8px 5px; font-size: 12.5px;
}
.setup-inline-status {
  min-width: 0; margin-top: 24px; padding: 22px 0;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.setup-status-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.setup-status-head .section-label { margin-bottom: 5px; }
.setup-status-head .chip { flex: none; }
.setup-status-list { display: grid; margin: 15px 0 0; }
.setup-status-list > div {
  display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr);
  gap: 12px; padding: 9px 0; border-top: 1px solid var(--hair);
}
.setup-status-list dt { color: var(--ink3); font-size: 11.5px; }
.setup-status-list dd {
  min-width: 0; margin: 0; color: var(--ink); font-size: 12px;
  font-weight: 550; overflow-wrap: anywhere;
}
.setup-team-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 20px; padding: 20px 0; border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.setup-team-copy { min-width: 0; max-width: 700px; }
.setup-team-copy .section-label { margin-bottom: 5px; }
.setup-team-copy .card-sub { margin-top: 5px; }
.setup-team-copy .setup-plain { margin-top: 8px; padding-top: 8px; }
.setup-team-strip > .btn { flex: none; }

/* ---------------------------------------------------------------- narrow */
@media (max-width: 959px) {
  .ob-paths { grid-template-columns: minmax(0, 1fr); }
  .ob-preview-hero { grid-template-columns: minmax(0, 1fr); }
  .ob-preview-included { grid-template-columns: minmax(0, 1fr); }
  .ob-preview-included-item {
    border-left: 0; border-top: 1px solid var(--hair);
  }
  .ob-preview-included-item:first-child { border-top: 0; }
  .setup-layout { grid-template-columns: minmax(0, 1fr); }
  .setup-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-concierge-grid { grid-template-columns: minmax(0, 1fr); }
  .setup-home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  :root { --topbar-h: 52px; }
  .ob-stack { gap: 22px; }
  /* no hover on touch; keep the resting card flat-lift, drop the transform */
  .ob-path:hover { transform: none; }
  .setup-head { align-items: flex-start; flex-direction: column; }
  .setup-head .btn { width: 100%; }
  .setup-aside { grid-template-columns: minmax(0, 1fr); }
  .setup-task { grid-template-columns: 30px minmax(0, 1fr); }
  .setup-task > .btn { grid-column: 2; width: fit-content; }
  .setup-task-label { align-items: flex-start; flex-direction: column; gap: 5px; }
  .setup-progress-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
  .setup-test-actions .btn { min-height: 44px; }
  .ob-preview-hero { gap: 24px; padding: 20px; }
  .ob-preview-options { grid-template-columns: minmax(0, 1fr); }
  .ob-preview-actions .btn { width: 100%; }
  .setup-fields { grid-template-columns: minmax(0, 1fr); }
  .setup-concierge > .view-title { font-size: 30px; }
  .setup-m365-callback { align-items: stretch; flex-direction: column; }
  .setup-m365-callback .setup-actions { width: 100%; }
  .setup-actions .btn { width: 100%; min-height: 44px; }
  .setup-included-strip { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .setup-included-strip a { min-height: 44px; padding-top: 10px; white-space: normal; }
  .setup-identity-guide ol { grid-template-columns: minmax(0, 1fr); }
  .setup-identity-guide li { padding: 10px 0; }
  .setup-identity-guide li + li { padding-left: 0; border-top: 1px solid var(--hair); border-left: 0; }
  .setup-approver-list { grid-template-columns: minmax(0, 1fr); }
  .setup-approver-list legend { grid-column: 1; }
  .setup-next-card { padding-top: 20px; }
  .setup-home-actions .setup-edit-choice { width: 100%; min-height: 44px; }
  .setup-team-strip { align-items: stretch; flex-direction: column; gap: 14px; }
  .setup-team-strip > .btn { width: 100%; min-height: 44px; }
  .setup-head,
  .setup-test-guide,
  .setup-test-actions .btn,
  .setup-task,
  .setup-task > .btn {
    scroll-margin-top: calc(var(--safe-top) + var(--topbar-h) + 12px);
    scroll-margin-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + var(--tabbar-gap) + 14px);
  }
}

.setup-route-guard {
  width: min(100%, 680px);
  margin: clamp(32px, 8vh, 88px) auto;
  padding: 0 20px;
  text-align: center;
}

.setup-route-guard .card-sub {
  max-width: 54ch;
  margin: 10px auto 22px;
}

@media (prefers-reduced-motion: reduce) {
  .setup-connected-flow { animation-duration: 1ms; }
}
