/* ==========================================================================
   /start/ page: the single client page (form + photos). Loads after
   site.css (brand tokens, .onboarding-card, .form-section-title, .mockup-form,
   .field, .form-error) and upload.css (the mountable SWFBUploader component).
   Everything here is scoped to the elements this page adds on top of those.
   ========================================================================== */

/* Aligns the hero (eyebrow/h1/sub) to the same centred column as the progress
   bar and both cards below it, instead of sitting at .container's full-width
   left edge. Scoped to this page only, .page-hero itself is shared. */
.start-hero {
  max-width: 860px;
  margin-inline: auto;
}

/* js/start.js scrollIntoView({block:'start'})s here after a successful
   submit; without this the sticky .site-header would sit over the top of
   the box. */
#photos {
  scroll-margin-top: 104px;
}

.start-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto clamp(20px, 3vw, 32px);
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: 700 14px/1 var(--font-body);
  color: var(--ink);
}
.start-progress-step {
  display: flex;
  align-items: center;
  gap: 7px;
}
.start-progress-step.is-done { color: var(--primary); }
.start-progress-sep { color: var(--line-strong); }
.start-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-size: 12px;
}
.start-progress-tick {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  flex-shrink: 0;
}
.start-progress-step.is-done .start-progress-tick { display: inline-flex; }
.start-progress-step.is-done .start-progress-num { display: none; }

/* ---------- All-done panel (shown once the form AND photos are both in) ----------
   Sits under the progress bar, above Box 1 (see js/start.js checkAllDone).
   Light card like the rest of the page, not a solid colour block, so it
   reads as "part of this page" rather than a separate success screen. */
.start-alldone {
  max-width: 860px;
  margin: 0 auto clamp(20px, 3vw, 32px);
  padding: clamp(24px, 5vw, 40px);
  background: var(--white);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  text-align: center;
  /* js/start.js scrollIntoView({block:'start'}) targets this panel on the
     live transition; without this the sticky .site-header (up to ~95px on
     mobile) would land on top of the heading. */
  scroll-margin-top: 104px;
}
.start-alldone h2 {
  font: 800 clamp(21px, 3.2vw, 27px)/1.25 var(--font-display);
  margin: 14px 0 20px;
  color: var(--ink);
}
.start-alldone-steps {
  list-style: none;
  counter-reset: alldone;
  margin: 0 auto 20px;
  padding: 0;
  max-width: 480px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.start-alldone-steps li {
  counter-increment: alldone;
  position: relative;
  padding-left: 36px;
  font: 600 15px/1.5 var(--font-body);
  color: var(--ink);
}
.start-alldone-steps li::before {
  content: counter(alldone);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--action);
  color: var(--ink);
  font: 800 13px/24px var(--font-body);
  text-align: center;
}
.start-alldone > p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

.start-boxes {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.start-boxes .onboarding-card { margin-inline: auto; width: 100%; max-width: 860px; }

/* ---------- Optional extras <details> ---------- */
.form-extras { grid-column: 1 / -1; margin-top: 4px; }
.form-extras summary {
  cursor: pointer;
  list-style: none;
  font: 700 15px/1.3 var(--font-body);
  color: var(--primary);
  padding: 14px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-extras summary::-webkit-details-marker { display: none; }
.form-extras summary::before {
  content: '+';
  font: 900 16px/1 var(--font-display);
  color: var(--action-text);
  flex-shrink: 0;
}
.form-extras[open] summary::before { content: '\2212'; }
.form-extras summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.form-extras-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 900px) { .form-extras-body { grid-template-columns: 1fr; } }

/* ---------- Confirmation panel (replaces the old full-page success box) ----------
   flex-wrap is unconditional (not gated behind a max-width media query) so the
   wrap decision always matches the actual available width. The wrap algorithm
   decides per-line fit using each item's flex-basis, not its post-shrink size,
   so giving .start-confirm-body a real basis (220px, not 0%/auto) is what makes
   the row correctly break the button onto its own line on narrow screens
   instead of squeezing the text into a sliver. min-width:0 alone (with a 0%/
   auto basis) let the row "fit" by shrinking the text to almost nothing rather
   than wrapping, which is what produced the one-character-per-line bug. */
.start-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  background: var(--paper);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 24px;
}
.start-confirm svg { flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.start-confirm-body { flex: 1 1 220px; min-width: 0; }
.start-confirm-body h3 { font: 800 19px/1.3 var(--font-display); margin-bottom: 4px; }
.start-confirm-body p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.start-confirm > .btn-ink {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 14px;
  padding: 12px 18px;
}

.start-promise {
  font: 600 15px/1.5 var(--font-body);
  color: var(--primary);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 24px;
}

/* ---------- Box 2: photos ---------- */
.start-photos-done-note {
  font: 600 14px/1.5 var(--font-body);
  color: var(--primary);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 4px;
}
.start-photos-nojs,
.start-photos-locked p,
.start-photos-invalid p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.start-photos-locked,
.start-photos-invalid {
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
/* Hides the no-JS note once JS has taken over, before start.js has even run
   (the no-js -> js class swap happens synchronously in <head>). upload.css's
   global `[hidden] { display: none !important; }` (loaded on this page for
   the uploader component) handles every other hide/show toggle here, since
   they're all done via the hidden attribute/property from start.js. */
.js .start-photos-nojs { display: none; }
