/* Preview setup, one step per screen (DESK-117; DESK-113 card 3, approved-screens row 12).
   The header (Back, "N of 5", progress bar) never moves. Only .setup-content slides 16px in the
   direction of travel and fades, over --motion-move (320ms). Reduce Motion: a 150ms fade, no slide. */
.setup-header { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md); }
.setup-count { font-size: var(--font-size-meta); color: var(--color-text-secondary); margin-left: auto; }
/* DESK-225 (board-ux-stepped-setup A): Back is a text link with a chevron, top left; the bar is five
   segments with the steps reached lit; the step heading is large; the six sit in one grouped list. */
.setup-back { background: none; border: 0; padding: var(--space-xs) 0; min-height: 44px; font: inherit; font-size: var(--font-size-body);
  color: var(--color-text-primary); cursor: pointer; text-decoration: none; }
.setup-back::before { content: "\2039\00a0"; }
.setup-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0 var(--space-md); }
.setup-progress span { height: 3px; border-radius: 2px; background: var(--color-border-strong); }
.setup-progress span.is-done { background: var(--color-action-primary); }
.setup-progress[hidden] { display: none; } /* the summary and the microphone step show no bar */
main.setup-content h1 { margin: 0; } /* size from the page h1 in pages.css */
.setup-list { list-style: none; margin: var(--space-sm) 0; padding: 0; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card);
  background: var(--color-surface-subtle); overflow: hidden; }
.setup-list li { padding: var(--space-sm) var(--space-md); color: var(--color-text-primary); }
.setup-list li + li { border-top: 1px solid var(--color-border-subtle); }
/* Each line of a step is its own paragraph, 8px apart, so the step reads as separate points (Zara, design review 2026-11-18). */
#body > p + p, .setup-body > p + p { margin-top: var(--space-xs); }
/* The stage holds only the sliding content and clips the slide, so nothing scrolls sideways mid-move.
   hidden first for browsers without clip; clip keeps a 4px margin for focus rings (Zara, DESK-117). */
.setup-stage { overflow-x: hidden; overflow-x: clip; overflow-clip-margin: 4px; }
.setup-content { padding: var(--space-lg) var(--space-md); }
.setup-content.setup-enter[data-direction="forward"] { animation: setup-in-forward var(--motion-move) both; }
.setup-content.setup-enter[data-direction="back"] { animation: setup-in-back var(--motion-move) both; }
@keyframes setup-in-forward { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes setup-in-back { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes setup-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .setup-content.setup-enter[data-direction="forward"],
  .setup-content.setup-enter[data-direction="back"] { animation: setup-fade var(--motion-reduced) ease-out both; }
}

/* The sign-in field's visible label (design review 2026-11-18): meta size, primary text, 8px above the field (the grid gap is 16px, so pull it 8px closer). */
.setup-field-label { display: block; margin: 0 0 calc(var(--space-xs) - var(--space-md)); font-size: var(--font-size-meta); font-weight: 500; color: var(--color-text-primary); }
.setup-field-label[hidden] { display: none; }

/* Connecting GitHub (DESK-211, board-desk211-connect-github). The can and can't lists are grouped cards: a blue
   tick for can, a slate cross for can't (never red: it isn't an error). The note under the main button is meta size. */
.gh-ask { margin-top: var(--space-md); }
.gh-ask strong { color: var(--color-text-primary); }
.gh-card { margin-top: var(--space-sm); padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card); background: var(--color-surface-subtle); }
.gh-card-title { margin: 0 0 var(--space-xs); font-size: var(--font-size-meta); font-weight: 600; color: var(--color-text-secondary); }
.gh-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.gh-card-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-xs); color: var(--color-text-primary); }
.gh-card-list li::before { content: "\2713"; color: var(--color-text-link); }
.gh-card[data-mark="cant"] .gh-card-list li::before { content: "\00d7"; color: var(--color-text-secondary); }
.setup-after { display: grid; gap: var(--space-sm); margin-top: var(--space-sm); }
.setup-after[hidden] { display: none; }
.gh-note { margin: 0; font-size: var(--font-size-meta); color: var(--color-text-secondary); }
.gh-link { justify-self: center; min-height: 44px; padding: 0 var(--space-sm); background: none; border: 0; font: inherit;
  color: var(--color-text-link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: center; }
.gh-link:hover { color: var(--color-text-link-hover); }
.gh-failed { display: flex; align-items: center; gap: var(--space-xs); margin: 0; color: var(--color-status-failed-text); }
.gh-failed-icon { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1; }
.gh-failed-icon::before { content: "!"; }
.gh-pick { margin: var(--space-md) 0 0; padding: 0; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card);
  background: var(--color-surface-subtle); overflow: hidden; }
.gh-pick-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gh-pick-row { display: flex; align-items: center; gap: var(--space-sm); min-height: 48px; padding: 0 var(--space-md); cursor: pointer; }
.gh-pick-row + .gh-pick-row { border-top: 1px solid var(--color-border-subtle); }
.gh-pick-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-action-primary); }
.gh-pick-name { font-family: var(--font-family-mono); color: var(--color-text-primary); overflow-wrap: anywhere; }
/* Continue stays off until a repository is picked (#182234 / #64748B on the board; not a contrast target). */
main.setup-content .btn-primary:disabled:not([aria-busy="true"]) { background: var(--color-surface-raised); color: var(--color-text-muted); cursor: default; }
main.setup-content .btn-primary[aria-busy="true"] { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  background: var(--color-action-hover); cursor: progress; }
main.setup-content .btn-primary .spin { width: 14px; height: 14px; border-color: currentColor; border-right-color: transparent; }

/* GitHub's mark before "Connect GitHub" (Tate, 2026-11-24): one colour, smaller than the words. */
.btn .gh-mark { width: 16px; height: 16px; flex: none; } /* .btn is inline-flex with its own gap */

/* The sign-in card (DESK-458, board-signin-github option B, Tate 2026-11-24). No header or bar: one centred card
   on the canvas, the Desk card mark above the title, GitHub first, then email. Existing tokens only. */
body.on-signin .setup-header, body.on-signin .setup-progress { display: none; }
body.on-signin main.setup-content { max-width: 420px; margin: var(--space-lg) auto 0; padding: var(--space-lg) 20px 20px;
  background: var(--color-surface-subtle); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-sheet); }
@media (max-width: 459px) { body.on-signin main.setup-content { margin: var(--space-md) var(--space-md) 0; } }
body.on-signin main.setup-content h1 { text-align: center; }
.signin-mark { display: block; justify-self: center; width: 40px; height: 40px; }
.signin-mark[hidden] { display: none; }
.signin-lead { margin: calc(var(--space-xs) - var(--space-md)) 0 0; text-align: center; color: var(--color-text-secondary); }
.signin-switch { display: flex; padding: 3px; gap: 3px; background: var(--color-canvas-base); border: 1px solid var(--color-border-subtle); border-radius: 10px; }
.signin-switch[hidden] { display: none; }
.signin-switch button { flex: 1; min-height: 40px; border: 0; border-radius: 7px; background: none; font: inherit; font-weight: 500;
  font-size: var(--font-size-body); color: var(--color-text-secondary); cursor: pointer; transition: background-color var(--motion-tap); }
.signin-switch button.is-on { background: var(--color-border-strong); color: var(--color-text-primary); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--color-border-control); } /* DESK-504 fixes: a 3:1 edge and heavier words, not the fill alone */
/* GitHub's button: light fill so it is the first thing seen on navy; its mark in one colour (dark on light). */
.btn-github { height: 52px; border-radius: var(--radius-card); background: var(--color-text-primary); color: var(--color-canvas-base); font-size: 16px; }
/* DESK-504 fixes: the hover fades the fill a little instead of a typed grey, which hid the white label in light. In
   navy it lands near main's #E2E8F0; the label keeps 12:1 or more in every look. */
.btn-github:hover { opacity: 0.88; }
.btn-github .gh-mark { width: 20px; height: 20px; }
.btn-github[aria-busy="true"] { cursor: progress; opacity: .8; }
.btn-github[hidden] { display: none; }
.signin-divider { display: flex; align-items: center; gap: var(--space-sm); margin: 0; color: var(--color-text-muted); font-size: var(--font-size-meta); }
.signin-divider::before, .signin-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border-strong); }
.signin-divider[hidden] { display: none; }
body.on-signin #email, body.on-signin #name { height: 48px; border-radius: 10px; background: var(--color-canvas-base); font-size: 16px; }
body.on-signin #button { height: 48px; border-radius: var(--radius-card); }
/* With GitHub shown, email is the second way in, so its button is the kit secondary; without GitHub it stays primary. */
/* DESK-504 fixes: the secondary fill takes the secondary label (text.primary), not the primary's action.label, which
   is cream in the light theme (1.2:1 here); the hover adds a 3:1 edge instead of a white fill that vanished on white. */
body.on-signin:has(#github:not([hidden])) #button { background: var(--color-border-strong); color: var(--color-text-primary); }
body.on-signin:has(#github:not([hidden])) #button:hover { background: var(--color-border-strong); box-shadow: inset 0 0 0 1px var(--color-border-control); }
.signin-note { margin: 0; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); background: var(--color-status-review-bg);
  color: var(--color-status-review-text); font-size: var(--font-size-meta); line-height: 18px; }
.signin-note[hidden], .signin-terms[hidden] { display: none; }
.signin-terms { margin: 0; text-align: center; color: var(--color-text-muted); font-size: var(--font-size-meta); }
.signin-foot { margin: var(--space-lg) var(--space-md); text-align: center; color: var(--color-text-secondary); }
.signin-foot[hidden] { display: none; }
.signin-foot a { color: var(--color-text-link); font-weight: 600; text-decoration: none; }
.signin-foot a:hover { color: var(--color-text-link-hover); }
