/*
 * The getting-started flow.
 *
 * Built on the tokens in shared.css rather than fresh colours — the plan's design-token
 * step is still ahead, and adding a sixth private palette here is what that step exists
 * to undo.
 */

.onboarding-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.925rem;
  color: var(--muted);
}

.onboarding-progress li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.onboarding-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/*
 * Current and done are marked by weight, a filled circle and a tick — never by colour
 * alone, which the brief rules out. The tick is inserted here rather than in the markup
 * so the number stays the accessible name of the circle, and the state is carried by
 * aria-current for anyone not looking at it.
 */
.onboarding-progress li[aria-current="step"] {
  color: var(--ink);
  font-weight: 600;
}

.onboarding-progress li[aria-current="step"] .onboarding-progress-num {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.onboarding-progress li[data-done="true"] .onboarding-progress-num {
  border-color: var(--brand);
  color: var(--brand);
}

.onboarding-progress li[data-done="true"] .onboarding-progress-num::after {
  content: "✓";
  font-size: 0.9rem;
}

.onboarding-progress li[data-done="true"] .onboarding-progress-num {
  /* The tick replaces the number once the step is behind you: two glyphs in a
     1.65rem circle is a smudge at 320px. */
  font-size: 0;
}

.onboarding-step .card-footer {
  padding-bottom: 1.25rem;
}

.onboarding-actions,
.onboarding-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/*
 * Skip sits after the primary action in the DOM, so it is also after it for the
 * keyboard — the same order it reads in. Pushed to the end of the row on wide screens
 * without reordering anything, because a visual order that disagrees with the tab order
 * is its own accessibility failure.
 */
.onboarding-nav [data-onboarding-skip] {
  margin-left: auto;
  text-decoration: underline;
}

@media (max-width: 575px) {
  .onboarding-nav [data-onboarding-skip] {
    margin-left: 0;
  }

  /* Full-width targets at phone widths, where a 44px tap target matters more than a
     tidy row. */
  .onboarding-nav .btn:not([data-onboarding-skip]),
  .onboarding-actions .btn {
    flex: 1 1 100%;
  }
}

.onboarding-facts {
  margin: 0 0 1.25rem;
}

.onboarding-facts dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 1rem;
}

.onboarding-facts dt:first-child {
  margin-top: 0;
}

.onboarding-facts dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/*
 * The purpose shortcut on step 2, and the list of next things on step 4.
 *
 * The buttons wrap rather than scroll: six of them do not fit a phone in one row,
 * and a row that scrolls sideways hides the last options from anyone who does not
 * think to drag it.
 */
.onboarding-purpose {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.onboarding-purpose .btn.active {
  border-color: var(--brand);
  background: var(--brand-ground);
  color: var(--brand);
}

.onboarding-next li {
  margin-top: 0.75rem;
}

.onboarding-next li:first-child {
  margin-top: 0;
}
