/* Phone-first quick start (/start): one column, one main action per screen.
   Reuses site.css tokens, buttons and the dark code panel. */
.start-page.text-page { max-width: 640px; padding-block: 32px 64px; }
.start-page h1 { font-size: clamp(30px, 6vw, 40px); margin-bottom: 12px; }
.start-page .lead { font-size: 16px; margin-bottom: 24px; }
.start-page h2 { font-size: 24px; line-height: 1.3; margin: 0 0 12px; }
.start-page h2[tabindex="-1"]:focus { outline: none; }
.start-page h3 { font-size: 16px; margin: 24px 0 8px; }

.qs-progress-wrap { margin-bottom: 28px; }
.start-page .qs-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0; }
.start-page .qs-progress li { display: block; margin: 0; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.qs-progress li::before { content: ''; display: block; height: 4px; margin-bottom: 6px; border-radius: 2px; background: var(--line); }
.qs-progress li[data-state=done]::before { background: var(--green); }
.qs-progress li[data-state=current]::before { background: var(--blue); }
.qs-progress li[data-state=current] { color: var(--ink); font-weight: 600; }
.qs-progress-number { display: none; }
.qs-progress-label { overflow-wrap: anywhere; }
.start-page .qs-progress-caption { display: none; margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.qs-field { margin-bottom: 16px; }
.qs-field label { display: block; font-weight: 500; margin-bottom: 8px; }
.start-page .qs-field .fine { margin: 0 0 8px; }
.qs-input { display: block; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--sh-control-line, #7b8794); border-radius: var(--sh-radius-control, 8px); background: var(--paper); color: var(--ink); font-size: 16px; }
.qs-input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.qs-input[aria-invalid=true] { border-color: var(--sh-danger, #ac3f46); }
.qs-code-input { max-width: 220px; font-size: 24px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.start-page .qs-field .qs-code-input + .fine { margin: 8px 0 0; }
.start-page .qs-error { color: var(--sh-danger, #ac3f46); font-size: 14px; font-weight: 500; margin: 0 0 16px; }
.start-page .qs-status { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.start-page .qs-status:empty { margin: 0; }
.button.qs-wide { width: 100%; min-height: 52px; font-size: 16px; }
.qs-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.qs-link:hover { color: var(--blue-dark); }
.qs-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.qs-link[aria-disabled=true] { color: var(--meta); text-decoration: none; cursor: not-allowed; }
.start-page .qs-resend { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin: 16px 0 0; }
.start-page .qs-resend .fine { margin: 0; }
.start-page .qs-resend + p { margin-bottom: 8px; }

.start-page .qs-choices { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.qs-choice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.qs-choice:hover { border-color: var(--sh-control-line, #7b8794); }
.qs-choice:has(input:checked) { border-color: var(--blue); background: var(--sh-accent-soft, #edf1fd); }
.qs-choice input, .qs-terms input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); }
.qs-choice input:focus-visible, .qs-terms input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.qs-choice strong { display: block; font-weight: 600; }
.qs-choice span span { display: block; font-size: 14px; color: var(--muted); }
.qs-terms { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; font-size: 14px; line-height: 1.6; }
.qs-terms label { cursor: pointer; }

.qs-qr { display: block; width: 240px; max-width: 100%; height: auto; margin: 0 auto 12px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.start-page .qs-paste-hint { font-size: 14px; color: var(--muted); margin: 8px 0 12px; }
.start-page .qs-manual-code code { display: block; padding: 12px; background: var(--field); border-radius: 8px; font: 13px/1.5 var(--mono); overflow-wrap: anywhere; user-select: all; }

.start-page .qs-linked { color: var(--green); font-weight: 500; }
.start-page .qs-integrations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; }
.start-page .qs-integrations li { margin: 0; }
.qs-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; height: 100%; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.qs-card:hover { border-color: var(--blue); }
.qs-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.qs-card strong { font-size: 16px; font-weight: 600; }
.qs-card span { font-size: 13px; line-height: 1.5; color: var(--muted); }

.start-page .qs-tool { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.qs-code { margin: 16px 0 8px; }
.qs-code-file { min-width: 0; padding-left: 8px; font-size: 12px; color: #b6c3d1; overflow-wrap: anywhere; }
.qs-code pre { max-height: 360px; margin: 0; padding: 16px; overflow: auto; font: 12px/1.6 var(--mono); tab-size: 2; }
.qs-code pre:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.qs-code code { font: inherit; }
.start-page .qs-steps { padding-left: 24px; }
.start-page .qs-steps li + li { margin-top: 6px; }

.start-page .qs-ticks { list-style: none; padding: 0; margin: 16px 0; border-bottom: 1px solid var(--line); }
.start-page .qs-ticks li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.qs-ticks li[data-state=done], .qs-ticks li[data-state=waiting], .qs-ticks li[data-state=failed] { color: var(--ink); }
.qs-tick-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; }
.qs-ticks li[data-state=done] .qs-tick-mark { background: var(--green); border-color: var(--green); }
.qs-ticks li[data-state=done] .qs-tick-mark::after { content: ''; width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(45deg); }
.qs-ticks li[data-state=waiting] .qs-tick-mark { border-color: var(--blue); border-top-color: transparent; }
.qs-ticks li[data-state=failed] .qs-tick-mark { border-color: var(--sh-danger, #ac3f46); }
.qs-ticks li[data-state=failed] .qs-tick-mark::after { content: '!'; color: var(--sh-danger, #ac3f46); font-size: 13px; font-weight: 700; line-height: 1; }

.start-page .qs-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 24px; }
.start-page .qs-actions .qs-link, .start-page .qs-actions .qs-text-link { align-self: flex-start; }
.qs-text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }

@media (min-width: 561px) {
  .qs-progress-number { display: inline; }
  .qs-progress-number::after { content: '. '; }
  .start-page .qs-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .start-page .qs-actions .button.qs-wide { width: auto; min-width: 200px; }
  .start-page form .button.qs-wide { width: auto; min-width: 200px; }
}
@media (max-width: 560px) {
  .start-page.text-page { padding-block: 24px 48px; }
  .start-page .qs-progress-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .start-page .qs-progress-caption { display: block; }
  .start-page h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .qs-ticks li[data-state=waiting] .qs-tick-mark { animation: qs-spin 1s linear infinite; }
  @keyframes qs-spin { to { transform: rotate(360deg); } }
}
.start-page .qs-resume { margin-block: 0 24px; }
.start-page .qs-resume p:last-child { margin-bottom: 0; }
.start-page select.qs-input { padding-right: 32px; }
