/* ============================================================================
   Leif List USER PROFILE — guided "Your Values" card
   ----------------------------------------------------------------------------
   One card, four steps. Replaces the old two-card row (permanent weights card
   + scrolling survey card with a sticky footer).

   Loaded LAST in <head>, after user_profile.css and the theme files, so it can
   restyle the survey controls it inherits without fighting the 300-odd
   hard-coded hex values in user_profile.css.

   Rules of the house (same set the supplier page rework follows):
     • NAVY  (--ed-tile-ink) = selected / active / current, AND every button
       and link in this card. Primary buttons sit on a deeper navy block.
     • GREEN = a RATING and nothing else. On this page that is exactly one
       element: the example brand's grade.
     • GOLD  (--leif-gold) = the section label bar. Nothing else.
     • The offset "pop" block goes on CONTROLS — pills, toggles, buttons.
       Never on a container, a step row, or a content surface.
     • Two radii: 12px for boxes, 999px for pills.

   Everything here reads the shared --leif-* tokens from ../styles/theme.css,
   which are defined on a bare :root, so these rules hold whether or not the
   editorial theme flag is on.
   ============================================================================ */

:root {
  /* The one gold in the system. Same value the guides use for their rule. */
  --leif-gold: #C9902B;
  /* Local aliases so a token rename upstream surfaces here as one edit. */
  --step-ink:      var(--ed-tile-ink, #173a5e);
  --step-surface:  var(--leif-surface, #FFFFFF);
  --step-canvas:   var(--leif-canvas, #F6F4EF);
  --step-border:   var(--leif-border, #E8E4DC);
  --step-text:     var(--leif-text, #26241F);
  --step-text-2:   var(--leif-text-secondary, #7D7B73);
  --step-muted:    var(--leif-text-muted, #9A988F);
  /* No green in this card's chrome. Green on this site is reserved for a
     RATING (the example brand's grade, the score dot, eco tags) — every
     button, link and selected state here is navy, same as the settings rail.
     --step-ink is the face; --step-ink-deep is the block behind a primary
     button, so it still reads as two layers rather than one flat slab. */
  --step-ink-deep: var(--leif-ink, #0C1E3A);
}

/* =========================================================
   1 · The card
   ========================================================= */
.guided-card {
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--step-border);
  background: var(--step-surface);
  box-shadow: 0 1px 2px rgba(20, 40, 60, .04), 0 10px 24px rgba(20, 40, 60, .06);
  margin-bottom: 16px;
}

.guided-card__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--step-border);
}
.guided-card__eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--step-muted);
}
.guided-card .guided-card__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: var(--step-text);
}
/* Status string: "Step 3 of 4" while setting up, "All 4 sections complete" after. */
.guided-card__status {
  margin: 0;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--step-text-2);
  white-space: nowrap;
}
/* Complete is a state, not a rating — navy, matching the meter in the rail. */
.guided-card__status[data-complete="true"] { color: var(--step-ink); }

/* =========================================================
   2 · Step rows — hairline-separated, no box of their own
   ========================================================= */
.guided-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.guided-step + .guided-step { border-top: 1px solid var(--step-border); }

.guided-step__heading { margin: 0; font-family: inherit; font-weight: inherit; }

/* The whole row is the control. No pop shadow — this is a content row. */
.guided-step__header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 24px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background .12s ease;
}
.guided-step__header:hover { background: var(--step-canvas); }
.guided-step__header:focus-visible {
  outline: 2px solid var(--step-ink);
  outline-offset: -2px;
}

/* --- Number badge (decorative; state is also in .sr-only text) --- */
.guided-step__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.guided-step__badge-check { display: none; }

/* TODO — outlined */
[data-state="todo"] .guided-step__badge {
  border: 1.5px solid var(--step-border);
  background: transparent;
  color: var(--step-muted);
}
/* ACTIVE — filled number, navy */
[data-state="active"] .guided-step__badge {
  border: 1.5px solid var(--step-ink);
  background: var(--step-ink);
  color: #fff;
}
/* DONE — filled checkmark, navy */
[data-state="done"] .guided-step__badge {
  border: 1.5px solid var(--step-ink);
  background: var(--step-ink);
  color: #fff;
}
[data-state="done"] .guided-step__badge-num { display: none; }
[data-state="done"] .guided-step__badge-check { display: block; }

/* --- Title + subline --- */
.guided-step__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.guided-step__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--step-text);
  line-height: 1.25;
}
.guided-step__subline {
  font-size: 12.5px;
  color: var(--step-text-2);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-state="todo"] .guided-step__title,
[data-state="todo"] .guided-step__subline { color: var(--step-muted); }

/* --- Edit / Later link --- */
.guided-step__link {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--step-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
[data-state="todo"] .guided-step__link { color: var(--step-muted); }
/* The open step is its own affordance — the link would be a no-op. */
[data-state="active"] .guided-step__link { display: none; }

/* =========================================================
   3 · The expanded panel
   ========================================================= */
.guided-step__panel {
  padding: 2px 24px 24px;
  /* No internal scrollbar. The page scrolls; the panel does not. */
}
.guided-step__panel[hidden] { display: none; }

/* Gold-bar section label above the panel heading. */
.guided-step__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--step-text-2);
}
.guided-step__label-bar {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--leif-gold);
}

.guided-step__panel-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--step-text);
}
.guided-step__panel-title:focus { outline: none; }
.guided-step__panel-title:focus-visible {
  outline: 2px solid var(--step-ink);
  outline-offset: 3px;
  border-radius: 12px;
}
.guided-step__desc {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--step-text-2);
}

/* --- Panel footer: Back link · autosave note · Next button --- */
.guided-step__footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--step-border);
}
.guided-step__back {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--step-text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guided-step__back:hover { color: var(--step-text); }
.guided-step__back[hidden] { display: none; }

.guided-step__autosave {
  flex: 1;
  font-size: 12px;
  color: var(--step-muted);
}
.guided-step__save-state { color: var(--step-text-2); }

/* Primary button — navy face on a deeper-navy block, the only pop block
   in the footer. */
.guided-step__next {
  flex-shrink: 0;
  padding: 10px 18px;
  border: 2px solid var(--step-ink-deep);
  border-radius: 12px;
  background: var(--step-ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--step-ink-deep);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.guided-step__next:hover {
  background: var(--step-ink-deep);
  border-color: var(--step-ink-deep);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--step-ink-deep);
}
.guided-step__next:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .guided-step__next,
  .guided-step__header,
  .guided-step__badge { transition: none; }
  .guided-step__next:hover,
  .guided-step__next:active { transform: none; }
}

/* =========================================================
   4 · Reused survey controls, restyled
   ---------------------------------------------------------
   Same elements and ids as before; only the skin changes. Selected reads
   navy — the only green left on this page is the example brand grade.
   ========================================================= */
.guided-card .survey-questions { display: block; }
.guided-card .survey-question + .survey-question { margin-top: 0; }
.guided-card .survey-question__divider {
  height: 1px;
  background: var(--step-border);
  margin: 20px 0;
}
.guided-card .survey-question__label {
  margin: 0 0 2px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--step-text);
}
.guided-card .survey-question__hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--step-text-2);
}
.guided-card .survey-text-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  border: 1.5px solid var(--step-border);
  border-radius: 12px;
  background: var(--step-surface);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--step-text);
}
.guided-card .survey-text-input:focus {
  outline: none;
  border-color: var(--step-ink);
}

/* --- Pills (age, identity, priorities, price) --- */
.guided-card .survey-pill-group { gap: 8px 10px; }
.guided-card .survey-pill {
  padding: 8px 14px;
  border: 2px solid var(--step-ink);
  border-radius: 999px;
  background: var(--step-surface);
  color: var(--step-ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--pop-shadow-ctl, 4px 4px 0 #173a5e);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.guided-card .survey-pill:hover {
  background: var(--ed-tile-bg, #e7eff8);
  border-color: var(--step-ink);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--step-ink);
}
/* Selected = pressed fully into its block. */
.guided-card .survey-pill--active,
.guided-card .survey-pill--muted.survey-pill--active {
  background: var(--step-ink);
  border-color: var(--step-ink);
  color: #fff;
  transform: translate(4px, 4px);
  box-shadow: none;
}
.guided-card .survey-pill--active:hover {
  background: var(--step-ink);
  border-color: var(--step-ink);
}
.guided-card .survey-pill--muted {
  border-style: dashed;
  color: var(--step-text-2);
}
.guided-card .survey-pill--muted.survey-pill--active { border-style: solid; }
.guided-card .survey-pill:focus-visible {
  outline: 2px solid var(--leif-gold);
  outline-offset: 2px;
}
.guided-card .survey-pill__rank {
  background: rgba(255, 255, 255, .22);
  color: #fff;
  width: 20px;
  height: 20px;
  min-width: 20px;
  font-size: 11px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .guided-card .survey-pill { transition: none; }
  .guided-card .survey-pill:hover,
  .guided-card .survey-pill--active { transform: none; box-shadow: var(--pop-shadow-ctl, 4px 4px 0 #173a5e); }
  .guided-card .survey-pill--active { box-shadow: none; }
}

/* =========================================================
   5 · Step 3 — weights
   ========================================================= */
.weights-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--ed-tile-border, #c7d8ea);
  border-left: 3px solid var(--leif-gold);
  border-radius: 12px;
  background: var(--ed-tile-bg, #e7eff8);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ed-tile-ink, #173a5e);
}
.weights-note strong { font-weight: 600; }
/* "…rank your priorities in step 2" — a jump, so it reads as a link. */
.weights-note__link {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.weights-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.weights-layout__controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.weights-layout__example {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------------------------------------------------------
   Summary block — donut + legend, hairline off the sliders.
   The donut is a FIXED 120px and does not grow with the column;
   the legend takes whatever is left.
   --------------------------------------------------------- */
.weights-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--step-border);
}
.weights-summary__pie {
  flex: 0 0 120px;
  width: 120px;
  line-height: 0;
}
.weights-summary__pie svg {
  width: 120px;
  height: 120px;
  display: block;
}
.weights-summary__legend {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Swatch · name · percentage. The percentage lives ONLY here now. */
.guided-card .legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.guided-card .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.guided-card .legend-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--step-text);
  line-height: 1.3;
}
.guided-card .legend-value {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--step-text);
}

/* ---------------------------------------------------------
   Sliders — label over track. No swatch, no number: the legend
   above carries both.
   --------------------------------------------------------- */
.weights-sliders {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.guided-card .weights-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* The thumb picks up its pillar colour. user_profile.css keyed these off
   .legend-row, which the summary-block rework retired. */
.guided-card .weights-row[data-legend="env"] .weight-slider::-webkit-slider-thumb { border-color: var(--env); }
.guided-card .weights-row[data-legend="env"] .weight-slider::-moz-range-thumb { border-color: var(--env); }
.guided-card .weights-row[data-legend="lab"] .weight-slider::-webkit-slider-thumb { border-color: var(--lab); }
.guided-card .weights-row[data-legend="lab"] .weight-slider::-moz-range-thumb { border-color: var(--lab); }
.guided-card .weights-row[data-legend="com"] .weight-slider::-webkit-slider-thumb { border-color: var(--com); }
.guided-card .weights-row[data-legend="com"] .weight-slider::-moz-range-thumb { border-color: var(--com); }
.guided-card .weights-row__label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--step-text);
  cursor: pointer;
}
.guided-card .weight-slider {
  width: 100%;
  margin: 0;
}

.guided-card .values-reset-link {
  align-self: flex-start;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--step-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guided-card .values-reset-link:hover { color: var(--step-ink-deep); }

/* Example rating + insight — content surfaces, flat.
   align-self is reset because user_profile.css sets `align-self: start` on the
   card for the old grid; inside this flex column that shrink-wraps it to its
   text and truncates the pillar names. */
.guided-card .example-product-card,
.guided-card .values-insight {
  padding: 16px;
  border: 1px solid var(--step-border);
  border-radius: 12px;
  background: var(--step-canvas);
  box-shadow: none;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  /* user_profile.css caps this at 130-160px inside its old two-card
     breakpoints. Those numbers were sized for a card half this wide. */
  max-width: none;
  grid-column: auto;
  grid-row: auto;
}
.guided-card .example-product__eyebrow,
.guided-card .values-insight__eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--step-muted);
}
.guided-card .example-product__headline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.guided-card .example-product__of100 {
  font-size: 13px;
  color: var(--step-text-2);
}
/* The grade is a rating — this is where green belongs. */
.guided-card .example-product__number {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--leif-score-green, var(--planet, #2F6B45));
}
.guided-card .example-product__rating {
  font-size: 12px;
  color: var(--step-muted);
}
.guided-card .example-product__divider {
  height: 1px;
  background: var(--step-border);
  margin: 12px 0;
}
.guided-card .example-product__breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guided-card .example-product__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.guided-card .example-product__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
/* The pillar names are long by design (one vocabulary, spelled out) — let them
   wrap rather than ellipsing to "Environment…", which reads as a different word. */
.guided-card .example-product__cat-name {
  flex: 1;
  min-width: 0;
  color: var(--step-text-2);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.guided-card .example-product__cat-score { font-weight: 600; color: var(--step-text); }
.guided-card .values-insight__text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--step-text);
}

/* =========================================================
   6 · Step 4 — filter groups
   ---------------------------------------------------------
   The ten preference accordions. No internal scrollbar (the old card capped
   them at 320px and scrolled); they expand in place and the page scrolls.
   ========================================================= */
.guided-card .filter-groups {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--step-border);
  border-radius: 12px;
}
.guided-card .filter-groups .survey-acc {
  border: none;
  border-radius: 0;
  background: transparent;
}
.guided-card .filter-groups .survey-acc + .survey-acc { border-top: 1px solid var(--step-border); }
.guided-card .filter-groups .survey-acc__header {
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.guided-card .filter-groups .survey-acc__header:hover { background: var(--step-canvas); }
.guided-card .filter-groups .survey-acc__header:focus-visible {
  outline: 2px solid var(--step-ink);
  outline-offset: -2px;
}
.guided-card .filter-groups .survey-acc__title {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--step-text);
}
.guided-card .filter-groups .survey-acc__sub {
  font-size: 12px;
  color: var(--step-text-2);
}
/* Count badge: "4 of 8 on" / "none on". Flat text, not a chip. */
.guided-card .filter-groups .survey-acc__badge {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--step-muted);
  white-space: nowrap;
}
.guided-card .filter-groups .survey-acc__badge--has-count { color: var(--step-ink); }
.guided-card .filter-groups .survey-acc__body { padding: 0 16px; }
.guided-card .filter-groups .survey-acc--open .survey-acc__body { padding: 0 16px 16px; }
.guided-card .filter-groups .survey-acc__body .pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

/* Preference toggles — same pop-block control as the pills. */
.guided-card .pref-toggle {
  padding: 7px 14px;
  border: 2px solid var(--step-ink);
  border-radius: 999px;
  background: var(--step-surface);
  color: var(--step-ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--pop-shadow-ctl, 4px 4px 0 #173a5e);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.guided-card .pref-toggle[data-tier="0"] {
  border-color: var(--step-ink);
  background: var(--step-surface);
  color: var(--step-ink);
}
.guided-card .pref-toggle[data-tier="0"]:hover {
  background: var(--ed-tile-bg, #e7eff8);
  border-color: var(--step-ink);
  color: var(--step-ink);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--step-ink);
}
.guided-card .pref-toggle:not([data-tier="0"]) {
  background: var(--step-ink);
  border-color: var(--step-ink);
  color: #fff;
  transform: translate(4px, 4px);
  box-shadow: none;
}
.guided-card .pref-toggle:not([data-tier="0"]) .pref-toggle__label { color: #fff; }
.guided-card .pref-toggle:not([data-tier="0"]) .pref-toggle__icon::before { color: #fff; }
.guided-card .pref-toggle:focus-visible {
  outline: 2px solid var(--leif-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .guided-card .pref-toggle { transition: none; }
  .guided-card .pref-toggle[data-tier="0"]:hover { transform: none; box-shadow: var(--pop-shadow-ctl, 4px 4px 0 #173a5e); }
  .guided-card .pref-toggle:not([data-tier="0"]) { transform: none; box-shadow: none; }
}

/* =========================================================
   7 · Sidebar — navy, not green
   ---------------------------------------------------------
   The settings rail shipped in brand green (--brand-dark / --brand-sage) for
   its selected tab, avatar and sign-in button. Green on this site means a
   rating or a primary call to action; a selected settings tab is neither, and
   next to the navy band above it the green read as a different product. All
   three move to the same navy the rest of the page selects with.

   The .ed-theme prefixes are not decoration — theme-user_profile.css pins the
   sign-in button green at that specificity, so a bare class selector loses to
   it no matter which file loads last.
   ========================================================= */
.profile-sidebar .sidebar-nav-item--active,
.profile-sidebar .sidebar-nav-item--active:hover {
  background: var(--step-ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(23, 58, 94, .25);
}
.profile-sidebar .profile-sidebar__avatar { background: var(--step-ink); }

.profile-sidebar__signin-btn,
.ed-theme .profile-sidebar__signin-btn {
  background: none;
  color: var(--step-ink);
  border: 1px solid var(--step-ink);
  border-radius: 999px;
}
.profile-sidebar__signin-btn:hover,
.ed-theme .profile-sidebar__signin-btn:hover {
  background: var(--step-ink);
  color: #fff;
}

/* =========================================================
   7b · Profile strength meter
   ========================================================= */
.profile-meter {
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--step-border);
}
.profile-meter__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.profile-meter__label {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--step-text-2);
}
.profile-meter__pct {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--step-text);
}
.profile-meter__track {
  height: 5px;
  border-radius: 999px;
  background: var(--step-border);
  overflow: hidden;
}
.profile-meter__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--step-ink);
  transition: width .3s ease;
}
/* Complete is not a rating, so it does not earn the green. */
.profile-meter[data-complete="true"] .profile-meter__pct { color: var(--step-ink); }
.profile-meter__next {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--step-text-2);
}
@media (prefers-reduced-motion: reduce) {
  .profile-meter__fill { transition: none; }
}

/* =========================================================
   8 · Responsive
   ========================================================= */
/* Two columns, but the left one is now too narrow to hold a 120px donut
   AND a legend side by side. Drop the donut: the legend states every value in
   text, so the numbers survive and only the picture goes. */
@media (min-width: 901px) and (max-width: 1180px) {
  .weights-summary__pie { display: none; }
}

@media (max-width: 900px) {
  /* One column — the donut has room again, centred above its legend. */
  .weights-layout { grid-template-columns: minmax(0, 1fr); }
  .weights-summary {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .weights-summary__pie { display: block; flex: 0 0 auto; }
  .weights-summary__legend { width: 100%; }
}
@media (max-width: 640px) {
  .guided-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px 16px 14px;
  }
  .guided-step__header { padding: 16px; gap: 12px; }
  .guided-step__panel { padding: 2px 16px 20px; }
  /* The link is the least load-bearing thing in a cramped row — the row itself
     is still tappable and the state still reads from badge + subline. */
  .guided-step__link { display: none; }
  .guided-step__footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .guided-step__autosave { order: 3; flex-basis: 100%; }
  .guided-step__next { flex: 1; }
  /* Phones get a shallower offset — 4px behind a 32px pill eats the gap. */
  .guided-card .survey-pill,
  .guided-card .pref-toggle { box-shadow: 3px 3px 0 var(--step-ink); }
  .guided-step__next { box-shadow: 3px 3px 0 var(--step-ink-deep); }
  .guided-card .survey-pill--active,
  .guided-card .pref-toggle:not([data-tier="0"]) {
    box-shadow: none;
    transform: translate(3px, 3px);
  }
}
