/* MV_SharedTour — the first-visit welcome for an invited relative (#429).
   Lives inside an ordinary modal; these styles shape the one-idea-per-card
   rhythm: a quiet progress line and thin bar (borrowed from the interview
   sitting, so the two guided surfaces read as one family), then a centred
   hero — a tinted glyph disc, a serif heading, one calm paragraph. The disc
   hues come from the heritage kind palette in variables.css so the welcome
   is warm rather than a grey dialog (UI/UX RULE 13). */

.shared-tour__progress {
  margin: 0;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.shared-tour__bar {
  height: 4px;
  margin: var(--space-xs) 0 var(--space-lg);
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.shared-tour__bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
}

.shared-tour__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xs) 0 var(--space-sm);
}

/* The card content settles in on each step change — a short rise, no travel
   across the screen (motion conventions, BUILD-NOTES → Motion & animation). */
@media (prefers-reduced-motion: no-preference) {
  .shared-tour__card {
    animation: mv-rise-in 320ms var(--ease-out-soft) backwards;
  }
}

/* Tinted glyph disc — the medallion's "authored content" treatment (soft wash,
   strong glyph, faint porcelain ring) rather than a flat circle, but with its
   own tone vocabulary: a tour step isn't one of MV_Medallion's content kinds,
   so it doesn't borrow that component's kind names. */
.shared-tour__glyph {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(
    circle at 32% 26%,
    rgba(255, 255, 255, 0.55) 0%,
    transparent 60%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(28, 25, 23, 0.12);
}

.shared-tour__glyph .icon {
  display: inline-flex;
  width: 52%;
  height: 52%;
}

.shared-tour__glyph .icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sage — the app's "people and life" hue: the welcome and the send-for-review
   steps, the two that are about the family rather than the mechanics. */
.shared-tour__glyph--life {
  background-color: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Antique-ink plum — the colour of the tree's own connector lines, so the
   "how the lines join people" step is tinted with the thing it describes. */
.shared-tour__glyph--link {
  background-color: var(--color-moment-soft);
  color: var(--color-moment);
}

/* Terracotta — the story lane, for the steps about reading and writing a
   person's page. */
.shared-tour__glyph--story {
  background-color: var(--color-highlight-soft);
  color: var(--color-highlight-hover);
}

.shared-tour__title {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-serif);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text);
  max-width: 30ch;
}

/* The heading is the per-step focus target (js sets tabindex="-1" and focuses
   it so a screen reader announces the step the reader just moved to). Chromium
   raises :focus-visible for that programmatic focus, drawing a ring around a
   heading that can't be activated — meaningless to a sighted user and the only
   boxed thing on the card. Stripped here, and here only: UI/UX RULE 5's "don't
   strip outlines" governs interactive controls, and Back/Next keep theirs. */
.shared-tour__title:focus,
.shared-tour__title:focus-visible {
  outline: none;
}

.shared-tour__body {
  margin: 0;
  max-width: 46ch;
  color: var(--color-text-muted);
  line-height: var(--line-height-normal);
}

.shared-tour__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* Back (when present) sits left, the primary always right — so the forward
   action never moves as the reader steps through. */
.shared-tour__next {
  margin-left: auto;
}

/* MOBILE/TOUCH PARITY — comfortable targets on a phone. */
@media (hover: none) and (pointer: coarse) {
  .shared-tour__back,
  .shared-tour__next {
    min-height: var(--touch-target-min);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shared-tour__bar-fill {
    transition: none;
  }
}
