/* CW Product Lab — styles
   Palette: hot pink #EC2684, blush tints, white, black.
   Mobile first. Everything below 640px is the real design; wider screens just get more room.
*/

:root {
  --pink: #EC2684;
  --pink-dark: #C9156B;
  --pink-soft: #FBD9E8;
  --blush: #FFF3F8;
  --blush-deep: #FDE7F1;
  --ink: #000000;
  --muted: #6B5F66;
  --line: #F0DCE6;
  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --tap: 60px;
  --shell: 520px;
  --shell-wide: 620px;

  /* Spacing scale. Everything added from UX polish #3 onward uses these
     rather than ad hoc pixel values. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Type scale. Seven steps, no more. */
  --fs-hero: 2rem;
  --fs-screen: 1.5rem;
  --fs-question: 1.25rem;
  --fs-section: 1.05rem;
  --fs-card: 1rem;
  --fs-helper: 0.88rem;
  --fs-meta: 0.75rem;

  --motion: 180ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);

  /* System font stacks. Nothing is fetched, so typography is identical
     offline, on a static host and opened straight off disk. */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
}

/* One global motion switch. Every transition added in this batch reads it, so
   a reduced-motion request turns all of them off at once. */
@media (prefers-reduced-motion: reduce) {
  :root { --motion: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px calc(48px + env(safe-area-inset-bottom));
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 8px;
}

h1:focus { outline: none; }

/* ---------- shell ---------- */

.screen {
  padding-top: 20px;
  animation: fade 220ms ease-out;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 18px;
}

.back {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 14px 10px 0;
}

.back::before { content: '\2190'; margin-right: 7px; }
.back:hover { color: var(--pink); }
.back-spacer { display: block; }

.wordmark {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pink);
}

/* ---------- progress ---------- */

.progress { margin-bottom: 26px; }

.pips {
  display: flex;
  gap: 6px;
  margin-bottom: 9px;
}

.pip {
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: var(--pink-soft);
}

.pip.done { background: var(--pink); opacity: 0.45; }
.pip.now { background: var(--pink); }

.stage-name {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- welcome ---------- */

.welcome {
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-bottom: 40px;
}

.lab-mark {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-bottom: 30px;
}

.lab-mark span {
  width: 12px;
  border-radius: 99px;
  background: var(--pink);
}

.lab-mark span:nth-child(1) { height: 26px; opacity: 0.3; }
.lab-mark span:nth-child(2) { height: 46px; }
.lab-mark span:nth-child(3) { height: 34px; opacity: 0.6; }

.hero {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 21em;
  margin: 0 auto 34px;
}

.signoff {
  margin-top: 34px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--pink);
  font-size: 16px;
}

/* ---------- questions ---------- */

.question {
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.question-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 22px;
}

.question + .options { margin-top: 22px; }

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: var(--tap);
  padding: 16px 18px;
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.options.grid .option {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 10px;
}

.option:hover:not(:disabled) { border-color: var(--pink); }
.option:active:not(:disabled) { transform: scale(0.99); }

.option.selected {
  border-color: var(--pink);
  background: var(--blush-deep);
}

.option.selected::after {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--pink);
}

.options.grid .option.selected::after { display: none; }

.option.soft { background: transparent; border-style: dashed; }

.option.locked {
  opacity: 0.42;
  cursor: default;
  background: transparent;
}

.option-label { font-weight: 500; font-size: 16px; }

.option-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

/* ---------- buttons ---------- */

.btn {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 17px 22px;
  border-radius: 99px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: background 130ms ease, transform 130ms ease;
}

.btn + .btn { margin-top: 10px; }

.btn.primary { background: var(--pink); color: var(--white); }
.btn.primary:hover { background: var(--pink-dark); }
.btn.primary:active { transform: scale(0.99); }

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
}

.btn.ghost:hover { color: var(--pink); border-color: var(--pink); }

.btn.big { font-size: 17px; }

/* ---------- placeholder screen ---------- */

.placeholder-body {
  color: var(--muted);
  font-size: 16px;
  margin: 14px 0 26px;
}

/* ---------- results ---------- */

.results-head { margin-bottom: 18px; }

.results-title {
  font-size: 26px;
  line-height: 1.2;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 14px;
}

.card.best {
  border-color: var(--pink);
  border-width: 2px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 10px;
}

.product-name {
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.15;
  font-weight: 600;
  margin-bottom: 16px;
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.score {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pink);
  line-height: 1;
}

.score-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.meter {
  height: 8px;
  border-radius: 99px;
  background: var(--pink-soft);
  margin: 12px 0 8px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--pink);
}

.score-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.block { margin-top: 22px; }

.block-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.block-body { font-size: 16px; }

.ticks li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 7px;
  font-size: 15.5px;
}

.ticks li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--pink);
  font-weight: 700;
}

.ticks.small li { font-size: 14.5px; }

.gap-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--blush-deep);
  font-size: 14px;
  color: var(--muted);
}

.price-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--pink);
}

.disclaimer {
  margin-top: 18px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--blush-deep);
  border-left: 3px solid var(--pink);
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.ref {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 12px;
}

.card.alt { padding: 20px; }

.alt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.alt-name {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
}

.alt-score {
  font-size: 17px;
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
}

.alt-body {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.alt-price {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink);
}

.card.promo { background: var(--blush-deep); border-color: transparent; }

.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.4;
  padding-left: 14px;
  border-left: 3px solid var(--pink);
}

.card.broad { border-color: var(--pink-soft); }

.broad-title {
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.broad-body {
  font-size: 15.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.refine .btn { margin-top: 10px; }

.single-note {
  font-size: 14.5px;
  color: var(--muted);
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blush-deep);
}

.next { margin-top: 30px; }

/* ---------- modal ---------- */

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: var(--shell);
  animation: rise 200ms ease-out;
}

@keyframes rise {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal h2 { font-size: 22px; margin-bottom: 12px; }
.modal p { font-size: 15.5px; color: var(--muted); margin-bottom: 10px; }
.modal .btn { margin-top: 18px; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  body { font-size: 17.5px; }
  #app { padding: 0 28px 64px; }
  .hero { font-size: 50px; }
  .question { font-size: 30px; }
  .card { padding: 30px 28px; }
  .product-name { font-size: 32px; }
  .options.grid { grid-template-columns: repeat(3, 1fr); }
  .modal-wrap { align-items: center; }
  .btn.primary, .btn.ghost { max-width: 340px; }
  .next .btn, .refine .btn { max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}


/* ===========================================================================
   Long sub-niche lists (UX polish #1)
   Grouped, searchable sub-niche screens for categories with 8 or more
   options. Mobile first: full-width targets, no horizontal scroll, labels
   wrap rather than clip.
   =========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.list-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 18px;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px; /* 16px or larger stops iOS zooming the page on focus */
  color: var(--ink, #1a1a1a);
  background: #fff;
  border: 2px solid rgba(236, 38, 132, 0.22);
  border-radius: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder { color: rgba(26, 26, 26, 0.45); }

.search-input:focus {
  outline: none;
  border-color: var(--pink, #EC2684);
  box-shadow: 0 0 0 3px rgba(236, 38, 132, 0.18);
}

.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-clear {
  position: absolute;
  right: 8px;
  min-height: 40px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink, #EC2684);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.search-clear:focus-visible {
  outline: 2px solid var(--pink, #EC2684);
  outline-offset: 2px;
}

.option-group { margin: 0 0 22px; }

.group-heading {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
}

.options.long { display: block; }

.long-row { margin: 0 0 10px; }
.long-row.is-folded,
.long-row.is-hidden,
.option-group.is-hidden,
.show-more.is-hidden { display: none; }

.option.long-option {
  width: 100%;
  text-align: left;
  min-height: 56px;
}

.option.long-option .option-label { overflow-wrap: anywhere; }

.option.long-option .option-note {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(26, 26, 26, 0.6);
  overflow-wrap: anywhere;
}

.option.long-option[aria-current="true"] {
  border-color: var(--pink, #EC2684);
}

.show-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 4px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pink, #EC2684);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.show-more:focus-visible {
  outline: 2px solid var(--pink, #EC2684);
  outline-offset: 2px;
  border-radius: 8px;
}

.list-empty {
  margin: 6px 0 0;
  padding: 18px 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.7);
  background: rgba(236, 38, 132, 0.05);
  border-radius: 14px;
}

.not-sure-block {
  margin: 6px 0 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.option.not-sure { width: 100%; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .long-row, .option-group { transition: none !important; }
}


/* ===========================================================================
   Results page (UX polish #2)
   The product name leads, the score supports it. Mixed density: one main card,
   light blocks inside it, a couple of secondary cards.
   =========================================================================== */

.best-head { margin: 0 0 18px; }

.best .product-name {
  margin: 4px 0 10px;
  font-size: 1.5rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.best .score-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 8px;
}

/* Deliberately smaller than the product name: this supports the title, it
   does not lead the page. */
.best .score {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pink, #EC2684);
}

.best .score-label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.5);
}

.score-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.55);
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px;
  background: rgba(236, 38, 132, 0.05);
  border-radius: 14px;
}

.sum-item { min-width: 0; }

.sum-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.5);
}

.sum-value {
  margin: 3px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pair { margin: 0 0 18px; }
.pair-half + .pair-half { margin-top: 14px; }

.price-note {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.55);
}

.quote-block { margin-bottom: 16px; }

.quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.quote-head .block-title { margin: 0; }

.copy-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pink, #EC2684);
  background: #fff;
  border: 1.5px solid rgba(236, 38, 132, 0.35);
  border-radius: 999px;
  cursor: pointer;
}

.copy-btn:hover { border-color: var(--pink, #EC2684); }

.copy-btn:focus-visible {
  outline: 2px solid var(--pink, #EC2684);
  outline-offset: 2px;
}

.copy-btn.copied {
  color: #fff;
  background: var(--pink, #EC2684);
  border-color: var(--pink, #EC2684);
}

.quote { overflow-wrap: anywhere; }

.alts { margin: 0 0 26px; }

.card.alt { padding: 16px; }

.alt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.alt-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.alt-score {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(26, 26, 26, 0.55);
}

.alt-why {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.7);
}

.notice {
  margin: 0 0 18px;
  padding: 16px;
  background: rgba(236, 38, 132, 0.06);
  border-left: 3px solid var(--pink, #EC2684);
  border-radius: 0 14px 14px 0;
}

.notice-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

.notice-body {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(26, 26, 26, 0.7);
}

.refine { display: flex; flex-direction: column; gap: 8px; }

.btn.small {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.88rem;
}

.build-note {
  margin: 8px 0 14px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.55);
}

@media (max-width: 359px) {
  .summary { grid-template-columns: 1fr; }
  .best .product-name { font-size: 1.32rem; }
  .quote-head { flex-wrap: wrap; }
}


/* ===========================================================================
   Design system (UX polish #3)
   Shared button, card, spacing and motion language across the whole flow.
   =========================================================================== */

/* ---------- entrance ---------- */

.screen.enter, .results.enter {
  opacity: 0;
  transform: translateY(6px);
}

.screen.enter.entered, .results.enter.entered {
  opacity: 1;
  transform: none;
  transition: opacity var(--motion) var(--ease), transform var(--motion) var(--ease);
}

/* ---------- buttons ---------- */

.btn {
  display: block;
  width: 100%;
  min-height: 54px;
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-card);
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition: background-color var(--motion) var(--ease),
              border-color var(--motion) var(--ease),
              transform var(--motion) var(--ease);
}

.btn.primary { background: var(--pink); color: var(--white); border-color: var(--pink); }
.btn.secondary { background: var(--white); color: var(--ink); border-color: var(--pink-soft); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }

@media (hover: hover) {
  .btn.primary:hover { background: var(--pink-dark); border-color: var(--pink-dark); }
  .btn.secondary:hover, .btn.ghost:hover { border-color: var(--pink); }
}

.btn:active { transform: translateY(1px); }

.btn.big { min-height: 60px; font-size: 1.05rem; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) 0 var(--sp-2);
}

.wordmark {
  flex: 1 1 auto;
  text-align: center;
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.back, .restart-link {
  flex: 0 0 auto;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-helper);
  font-weight: 600;
  color: var(--pink);
  border-radius: var(--radius-sm);
}

.restart-link { color: var(--muted); font-weight: 500; }

@media (hover: hover) {
  .back:hover { color: var(--pink-dark); }
  .restart-link:hover { color: var(--ink); }
}

.back-spacer { flex: 0 0 auto; min-width: 56px; }

/* ---------- progress ---------- */

.progress { margin: 0 0 var(--sp-5); }

.pips {
  display: flex;
  gap: var(--sp-1);
  margin: 0 0 var(--sp-2);
}

.pip {
  flex: 1 1 0;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--line);
  transition: background-color var(--motion) var(--ease);
}

.pip.done { background: var(--pink-soft); }
.pip.now { background: var(--pink); }

.progress-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-meta);
}

.step-count {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink);
}

.step-dot { color: var(--line); }

.stage-name {
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- welcome ---------- */

.welcome { padding-top: var(--sp-7); text-align: left; }

.hero-block { margin: 0 0 var(--sp-6); }

.eyebrow.brand {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
}

.hero {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-hero);
  line-height: 1.12;
}

.hero-headline {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-screen);
  font-weight: 600;
  line-height: 1.25;
}

.hero-sub {
  margin: 0;
  font-size: var(--fs-card);
  line-height: 1.55;
  color: var(--muted);
}

.hero-trust {
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-helper);
  text-align: center;
  color: var(--muted);
}

.hero-support {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.hero-secondary {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-helper);
  line-height: 1.5;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

/* ---------- option cards ---------- */

.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  transition: border-color var(--motion) var(--ease),
              background-color var(--motion) var(--ease),
              transform var(--motion) var(--ease);
}

.option-text { display: block; min-width: 0; }

/* Helper text always sits on its own line, on every card type, so a label and
   its explanation never run together. */
.option-note {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-helper);
  line-height: 1.4;
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .option:not(.locked):hover { border-color: var(--pink); }
}

.option:not(.locked):active { transform: translateY(1px); }

/* Selected state carries three signals: border, tint and a tick. */
.option.selected,
.option[aria-pressed="true"] {
  border-color: var(--pink);
  background: var(--blush-deep);
}

.option-tick {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  background: var(--pink);
  border-radius: var(--radius-pill);
}

/* ---------- footer ---------- */

.app-footer {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-note {
  margin: 0;
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- wider screens ----------
   More room, not a different product. The guided flow stays narrow so the
   line length stays readable; results get a little more width. */

@media (min-width: 700px) {
  #app { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .welcome { padding-top: 64px; }
  :root { --fs-hero: 2.4rem; }
}

@media (min-width: 900px) {
  .screen.results { max-width: var(--shell-wide); margin: 0 auto; }
}

/* ---------- very narrow phones ---------- */

@media (max-width: 359px) {
  :root { --fs-hero: 1.7rem; --fs-screen: 1.3rem; --fs-question: 1.15rem; }
  .chips { gap: var(--sp-1); }
  .topbar { gap: var(--sp-2); }
  .back-spacer { min-width: 40px; }
}


/* ---------- clipboard fallback (launch readiness) ---------- */

.copy-fallback {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-helper);
  line-height: 1.45;
  color: var(--muted);
}

.copy-btn.copy-failed {
  color: var(--ink);
  border-color: var(--line);
}


/* ===========================================================================
   Policy pages (launch readiness #2)
   privacy.html, terms.html and disclaimer.html share this stylesheet so they
   belong to the same product. No JavaScript, no external assets.
   =========================================================================== */

.policy-page {
  max-width: 660px;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-7);
}

.policy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
}

.policy-head .wordmark { text-align: left; flex: 0 1 auto; }

.policy-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-helper);
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

@media (hover: hover) {
  .policy-back:hover { color: var(--pink-dark); text-decoration: underline; }
}

.policy-back:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.policy-title {
  margin: var(--sp-6) 0 var(--sp-2);
  font-size: var(--fs-screen);
  line-height: 1.2;
}

.policy-date {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.policy-intro {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-card);
  line-height: 1.65;
}

.policy-body h2 {
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: var(--fs-section);
  line-height: 1.3;
}

.policy-body p {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-card);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.policy-body ul {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-5);
}

.policy-body li {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-card);
  line-height: 1.55;
}

.policy-body a { color: var(--pink); }

.policy-body a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.policy-contact {
  margin: var(--sp-5) 0 0;
  padding: var(--sp-4);
  background: var(--blush);
  border-radius: var(--radius);
}

.policy-contact p { margin: 0 0 var(--sp-1); }
.policy-contact p:last-child { margin: 0; }

.policy-return {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

/* ---------- policy links in the app footer ---------- */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1) var(--sp-3);
  margin: 0 0 var(--sp-3);
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

@media (hover: hover) {
  .footer-links a:hover { color: var(--pink); text-decoration: underline; }
}

.footer-links a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}


/* ===========================================================================
   Product Builder (V1)
   Uses the existing card, button, spacing and type system. No new brand.
   =========================================================================== */

.builder .question { margin-bottom: var(--sp-3); }

.builder-notice {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4);
  background: var(--blush);
  border-radius: var(--radius);
}

.builder-notice p {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-helper);
  line-height: 1.5;
  color: var(--muted);
}

.builder-notice p:last-child { margin: 0; }

.builder-low {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-helper);
  line-height: 1.5;
  color: var(--muted);
  border-left: 3px solid var(--pink);
  background: rgba(236, 38, 132, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.builder-nav { margin-top: var(--sp-5); }

.field-hint {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-helper);
  color: var(--muted);
}

.notes-field { margin: 0 0 var(--sp-3); }

.notes-label {
  display: block;
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-meta);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.notes-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--sp-3);
  font-family: var(--font-sans);
  font-size: 16px; /* keeps iOS from zooming when the field is focused */
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}

.notes-input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(236, 38, 132, 0.18);
}

.rename-input { min-height: 48px; resize: none; }

/* ---------- structure list ---------- */

.struct-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.struct-row {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
}

.struct-row:last-child { border-bottom: 0; }

.struct-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-3);
}

.struct-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: var(--fs-meta);
  font-weight: 700;
  color: var(--white);
  background: var(--pink);
  border-radius: var(--radius-pill);
}

.struct-label {
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Skipped is shown by label, opacity and a strike, never by colour alone. */
.struct-row.is-skipped .struct-label {
  text-decoration: line-through;
  color: var(--muted);
}

.struct-row.is-skipped .struct-num { background: var(--muted); }

.struct-row .btn.small { margin: 0; width: auto; }

/* ---------- plan ---------- */

.plan-list { margin: 0; padding-left: var(--sp-5); }

.plan-section { margin: 0 0 var(--sp-3); }

.plan-section-name {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-card);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plan-notes {
  margin: 0;
  font-size: var(--fs-helper);
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.build-checklist { padding-left: var(--sp-5); }

.build-checklist li { margin: 0 0 var(--sp-2); }

@media (min-width: 900px) {
  .screen.builder { max-width: var(--shell-wide); margin: 0 auto; }
}
/* Launch Path V1 — consistent with existing Product Builder */
.launch .launch-field{border:0;margin:22px 0;padding:0;min-width:0}.launch legend{font-weight:800;margin-bottom:12px}.launch .option{display:block;width:100%;text-align:left;margin:8px 0}.launch .launch-input{box-sizing:border-box;width:100%;font:inherit;padding:15px;border:2px solid #edd5e0;border-radius:14px;background:#fff;color:#141414}.launch .launch-label{display:block;font-weight:700;margin:18px 0 7px}.launch .launch-progress{height:7px;background:#f0dce5;border-radius:10px;overflow:hidden}.launch .launch-progress span{display:block;height:100%;background:#ec2684}.launch .launch-list{padding-left:23px;line-height:1.65}.launch .launch-list li{margin:9px 0}.launch .launch-prompt{margin:18px 0}.launch .launch-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:370px;overflow:auto;background:white;border:1px solid #f1d8e2;padding:15px;border-radius:12px;font-size:14px}.launch button:focus-visible,.launch input:focus-visible{outline:3px solid #111;outline-offset:3px}.launch .builder-nav{margin:22px 0}.launch .builder-nav .btn{max-width:100%}
/* Marketing Foundation 1.18.0 */
.wealth-eyebrow{font-weight:900;letter-spacing:.15em;color:#ec2684}.wealth-entry .hero{font-size:clamp(2.2rem,7vw,4rem);line-height:1.05}.wealth-entry h2{margin:32px 0 14px}.wealth-path{width:100%;display:flex;flex-direction:column;text-align:left;gap:8px;background:white;border:2px solid #f0d8e4;border-radius:22px;padding:22px;margin:12px 0;color:#191219;cursor:pointer;min-height:100px}.wealth-path strong{font-size:1.19rem}.wealth-path span{color:#665d63;font-size:1rem;line-height:1.45}.wealth-path.chosen,.wealth-path:focus-visible{border-color:#ec2684;outline-offset:3px}.market-input{display:block;width:100%;min-height:94px;box-sizing:border-box;padding:14px;border:2px solid #efdae4;border-radius:14px;resize:vertical;font:inherit;background:white;color:#171217;margin:8px 0 20px}.market-import-label{display:block;font-weight:700;padding:14px;border:2px dashed #e6b8d0;border-radius:15px;margin:16px 0;overflow-wrap:anywhere}.market-import-label input{display:block;margin-top:8px;max-width:100%}.market-error{color:#9b173d;font-weight:700}.wealthy-market details{margin:16px 0;max-width:100%;overflow:hidden}.wealthy-market summary{cursor:pointer;font-weight:700}.wealthy-market .launch-preview{white-space:pre-wrap;overflow-wrap:anywhere;background:white;border:1px solid #ebccdb;border-radius:12px;padding:12px;max-height:350px;overflow:auto;font-size:14px}.wealthy-market button:focus-visible,.wealthy-market textarea:focus-visible{outline:3px solid #181118;outline-offset:3px}
