/* ============================================================
   iago — Adaptive journey (SPA shell)
   ============================================================ */

/* Theme tokens are swapped at runtime for the partner identity transition */
.j-app {
  --accent: var(--brand-700);
  --accent-2: var(--brand-500);
  --accent-ink: #ffffff;
  --surface: #ffffff;
  --sheet: #ffffff;
  --surface-tint: var(--brand-050);
  --stage-ink: var(--ink);
  --ring: rgba(124, 58, 237, 0.16);

  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--stage-ink);
  background: var(--surface-tint);
  transition: background 0.9s var(--ease), color 0.6s var(--ease);
  position: relative;
  overflow-x: hidden;
}

/* Tema dark do iago: palco quase preto, cartão e campos em roxo-carvão.
   Ativado pelo data-theme="dark" no <html> (padrão na jornada). */
html[data-theme="dark"] .j-app {
  --surface: #171029;
  --sheet: #1e1535;
  --surface-tint: #0a0714;
  --stage-ink: #f4f1ff;
  --ring: rgba(139, 92, 246, 0.38);
}
html[data-theme="dark"] .j-card { color-scheme: dark; }
.j-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none; /* flat app surface: the old radial glows were removed */
  transition: background 0.9s var(--ease);
  opacity: 0;
}

/* ---------- Top bar ---------- */
.j-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(18px, 4vw, 40px) 10px;
  user-select: none;
}
.j-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  position: relative;
  height: 40px;
  min-width: 150px;
}
.j-brand .swap {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.j-brand .swap.out { opacity: 0; transform: translateY(-10px) scale(0.96); pointer-events: none; }
.j-brand .swap.in { opacity: 1; transform: none; }
.j-brand .swap.pre { opacity: 0; transform: translateY(12px) scale(0.96); }
.j-brand .mark { width: 32px; height: 32px; flex: none; }
.j-brand .swap img { height: 26px; width: auto; display: block; }
/* logo animada (look) montada pelo IagoMount: mesma altura do wordmark estático */
.j-brand .j-iago { display: block; width: 68px; }
.j-brand .mark .a { fill: var(--accent); transition: fill 0.7s var(--ease); }
.j-brand .mark .b { fill: var(--accent-2); transition: fill 0.7s var(--ease); }
.j-brand .b-vc { color: var(--accent); transition: color 0.7s var(--ease); }
/* Logo recolors via currentColor; journey.js sets an explicit tone on the
   wrapping .p-logo per background, so inherit it instead of forcing --accent. */
.j-brand .p-logo { color: var(--accent); }
.j-brand .p-logo svg { height: 32px; width: auto; color: inherit; }

.j-progress {
  flex: 1;
  max-width: 420px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.j-progress .track {
  height: 7px;
  border-radius: 999px;
  background: rgba(25, 16, 54, 0.09);
  overflow: hidden;
}
.j-progress .fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.6s var(--ease), background 0.7s var(--ease);
}
.j-progress .lbl {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: right;
}
.j-top .spacer { width: 150px; }
.j-back {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; font-size: 0.95rem;
  padding: 8px 10px; border-radius: 10px; width: 150px; align-self: center; transition: color 0.2s, background 0.2s;
}
.j-back svg { width: 18px; height: 18px; }
.j-back:hover { color: var(--accent); background: rgba(0,0,0,0.03); }
.j-back[hidden] { display: none; }

/* ---------- Stage ---------- */
.j-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 10px clamp(18px, 5vw, 40px) 48px;
}
.j-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 5vw, 46px);
  position: relative;
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
}
/* Phone: roomy sheet with generous rounding — still visibly a card, but
   near-screen-width. The stage repeats the top safe-area inset at the bottom
   so the card stays optically centered even though the bar is notch-padded. */
@media (max-width: 600px) {
  .j-stage {
    padding: 6px 14px calc(20px + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  }
  .j-card {
    width: 100%;
    border-radius: 20px;
    padding: 26px 22px;
  }
}
.j-screen { animation: step-in 0.5s var(--ease) both; }
.j-screen.leaving { animation: step-out 0.32s var(--ease) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(18px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes step-out { to { opacity: 0; transform: translateY(-14px) scale(0.99); } }

.j-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 14px; transition: color 0.7s var(--ease);
}
.j-eyebrow svg { width: 16px; height: 16px; }
.j-title { font-size: clamp(1.5rem, 3.4vw, 2.05rem); margin-bottom: 10px; }
.j-sub { color: var(--muted); font-size: 1.02rem; margin-bottom: 26px; }
/* Partner stage: headings on the tinted stage follow the partner's ink;
   base.css h1..h4{color:var(--ink)} would otherwise win over --stage-ink.
   Card titles stay on the sheet, so they keep the theme ink. */
.j-app[data-theme="partner"] .j-title { color: var(--stage-ink); }
.j-app[data-theme="partner"] .rc-name { color: var(--ink); }

/* ---------- Inputs ---------- */
.j-field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--ink-soft); }
.j-input {
  width: 100%;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.j-input::placeholder { color: #b3c2be; font-weight: 500; }
.j-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
/* Selects inside the card get the same bordered look with a painted chevron —
   the native macOS rendering would otherwise sit as a white box in the field. */
select.j-input { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b807b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.j-money { position: relative; }
.j-money::before {
  content: "R$"; position: absolute; left: 18px; top: 50%; translate: 0 -50%;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--muted); pointer-events: none;
}
.j-money .j-input { padding-left: 52px; }

.j-actions { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.j-next {
  width: 100%;
  justify-content: space-between;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 30px -12px color-mix(in oklab, var(--accent) 60%, transparent);
  transition: transform 0.22s var(--ease), background 0.7s var(--ease), box-shadow 0.25s;
}
.j-next:hover:not(:disabled) { transform: translateY(-2px); }
.j-next svg { width: 20px; height: 20px; }
.j-hint { text-align: center; font-size: 0.82rem; color: var(--muted); }

/* ---------- Amount slider ---------- */
.j-slider { display: grid; gap: 20px; padding-top: 4px; }
.j-slider__val {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2rem, 9vw, 2.7rem); letter-spacing: -0.03em;
  color: var(--accent); text-align: center; transition: color 0.5s var(--ease);
}
.j-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 999px; outline: none; cursor: pointer;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 / var(--fill, 50%) 100% no-repeat,
    var(--brand-050);
}
.j-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sheet); border: 3px solid var(--accent); box-shadow: var(--shadow-md);
  cursor: grab; transition: transform 0.15s var(--ease);
}
.j-range:active::-webkit-slider-thumb { transform: scale(1.14); cursor: grabbing; }
.j-range::-moz-range-thumb {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--accent);
  background: var(--sheet); box-shadow: var(--shadow-md); cursor: grab;
}
.j-range:focus-visible { box-shadow: 0 0 0 4px var(--ring); }
.j-slider__scale { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

/* ---------- CPF field ---------- */
.j-cpf { position: relative; }
.j-cpf__ic {
  position: absolute; left: 16px; top: 50%; translate: 0 -50%;
  color: var(--accent); display: inline-flex; pointer-events: none; transition: color 0.6s var(--ease);
}
.j-cpf__ic svg { width: 22px; height: 22px; }
.j-input--cpf { padding-left: 48px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.j-err { margin: 8px 2px 0; font-size: 0.84rem; font-weight: 600; color: #d1483b; }
.j-next:disabled { opacity: 0.72; cursor: progress; }
.j-next:disabled svg { animation: spin 0.9s linear infinite; }

/* ---------- Live field validation status ---------- */
.j-ctl { position: relative; }
.j-field__status {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  display: inline-flex; opacity: 0; transform: scale(0.5); pointer-events: none;
  transition: opacity 0.18s, transform 0.22s var(--ease), color 0.2s;
}
.j-field__status svg { width: 20px; height: 20px; }
.j-field.is-ok .j-field__status { opacity: 1; transform: none; color: var(--accent); }
.j-field.is-bad .j-field__status { opacity: 1; transform: none; color: #d1483b; }
.j-field.is-ok .j-input { border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); padding-right: 48px; }
.j-field.is-bad .j-input { border-color: #e2a49c; padding-right: 48px; }

/* live status inside the standalone CPF step (.j-cpf is already relative) */
.j-cpf__status { position: absolute; right: 14px; top: 50%; translate: 0 -50%; display: inline-flex; transition: color 0.2s; }
.j-cpf__status svg { width: 22px; height: 22px; }
.j-cpf.is-ok .j-cpf__status { color: var(--accent); }
.j-cpf.is-ok .j-input--cpf { border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); padding-right: 48px; }
.j-cpf.is-bad .j-cpf__status { color: #d1483b; }
.j-cpf.is-bad .j-input--cpf { border-color: #e2a49c; padding-right: 48px; }

/* ---------- File upload field ---------- */
.j-file {
  width: 100%; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--ink-soft);
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--sheet); padding: 13px 14px; cursor: pointer;
  transition: border-color 0.2s;
}
.j-file:hover { border-color: var(--accent-2); }
.j-file::file-selector-button {
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--accent);
  background: var(--brand-050); border: 0; border-radius: 10px; padding: 8px 14px; margin-right: 14px; cursor: pointer;
}
.j-field.is-bad .j-file { border-color: #e2a49c; }

/* ---------- Preset field: document photo (standardized) ---------- */
/* Native pickers/popups inside the white card always follow the light scheme. */
.j-card { color-scheme: light; }
.j-photo {
  display: grid; justify-items: center; gap: 8px; width: 100%;
  padding: 22px 16px 18px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--sheet));
  color: var(--ink-soft); text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.j-photo:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); }
.j-photo:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.j-photo__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.j-photo__ic { display: grid; place-items: center; width: 76px; height: 58px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); box-shadow: var(--shadow-sm); }
.j-photo__ic svg { width: 46px; height: 31px; }
.j-photo__txt { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--accent); }
.j-photo__hint { margin: 8px 2px 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.j-photo.is-done { cursor: pointer; border-style: solid; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 12px; padding: 14px 16px; text-align: left; }
.j-photo.is-done .j-photo__ok { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
.j-photo.is-done .j-photo__ok svg { width: 19px; height: 19px; }
.j-photo__file { font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-photo__change { grid-column: 2; font-size: 0.76rem; color: var(--muted); }
.j-field.is-bad .j-photo { border-color: #e2a49c; }

/* ---------- Preset field: device brand → model (standardized) ---------- */
.j-device { display: grid; gap: 10px; }
.j-device .j-input { font-size: 1rem; }

/* ---------- Campo CEP enriquecido ---------- */
/* O endereço aparece sozinho abaixo do input assim que os 8 dígitos fecham a
   consulta em api/cep.php (com cache local): ninguém digita rua, bairro e cidade. */
.j-cep__addr {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 9px 2px 0; padding: 9px 12px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--sheet));
  font-size: 0.84rem; line-height: 1.45; color: var(--ink-soft);
}
.j-cep__addr svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.j-cep__addr strong { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.j-cep__addr[hidden] { display: none; }
.j-cep__addr.is-bad { border-color: #e2a49c; background: color-mix(in srgb, #d1483b 8%, var(--sheet)); color: #a03428; }
.j-cep__addr.is-bad svg { color: #d1483b; }
.j-cep__addr.is-loading { opacity: 0.7; }
/* No admin a linha é só ilustrativa: mostra o que o campo devolve. */
.j-cep__addr.is-pv { opacity: 0.72; font-style: italic; }

/* ---------- Campo Sim / Não ---------- */
.j-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.j-yn button {
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--sheet); color: var(--ink-soft);
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.12s;
}
.j-yn button:hover { border-color: var(--accent-2); }
.j-yn button:active { transform: scale(0.985); }
.j-yn button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--sheet)); color: var(--accent); }
.j-field.is-bad .j-yn button { border-color: #e2a49c; }

/* ---------- Lista de opções com resposta livre ("Outra") ---------- */
.j-selectwrap { display: grid; gap: 10px; }
.j-selectwrap .j-input { font-size: 1rem; }

/* ---------- Range slider inside a form field ---------- */
.j-range-field { display: grid; gap: 12px; }
.j-range-field output { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--accent); letter-spacing: -0.02em; }
.j-range-field .j-range { height: 8px; }
.j-range-field .j-range::-webkit-slider-thumb { width: 26px; height: 26px; }
.j-range-field .j-range::-moz-range-thumb { width: 26px; height: 26px; }


/* ---------- Choice grid ---------- */
.j-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.j-choices.one { grid-template-columns: 1fr; }
.j-choice {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 15px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: pop-in 0.4s var(--ease) both;
}
.j-choice .ci { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-tint); color: var(--accent); transition: background 0.3s, color 0.3s; }
.j-choice .ci svg { width: 19px; height: 19px; }
.j-choice:hover { border-color: var(--accent-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.j-choice.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); box-shadow: 0 0 0 3px var(--ring); }
.j-choice.sel .ci { background: var(--accent); color: #fff; }
.j-choice .tick { margin-left: auto; opacity: 0; color: var(--accent); width: 20px; height: 20px; transition: opacity 0.2s; }
.j-choice.sel .tick { opacity: 1; }

/* ---------- Confirm (yes/no) ---------- */
.j-confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.j-opt {
  padding: 26px 18px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--sheet); cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  color: var(--ink); transition: border-color 0.2s, background 0.2s, transform 0.18s, box-shadow 0.2s;
  animation: pop-in 0.4s var(--ease) both;
}
.j-opt small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.j-opt:hover { border-color: var(--accent-2); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.j-opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); box-shadow: 0 0 0 3px var(--ring); }

/* ---------- Analysis / matching screens ---------- */
.j-center { text-align: center; }
.spinner {
  width: 74px; height: 74px; margin: 8px auto 24px; position: relative;
}
.spinner .ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--surface-tint); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.spinner .ring2 { inset: 12px; border-top-color: var(--accent-2); animation-duration: 1.4s; animation-direction: reverse; }
.spinner .core { position: absolute; width: 30px; height: 30px; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
/* Keep the icon well inside the disc so the 2px stroke never clips the edge */
.spinner .core svg { width: 17px; height: 17px; }
/* núcleo com o rosto do iago pensando (loader das cenas de análise) */
.spinner .core--iago { width: 46px; height: 46px; background: #140d24; border: 1px solid var(--ring); }
.spinner .core--iago .spin-face { display: block; width: 32px; }

.checklist { list-style: none; padding: 0; margin: 4px auto 0; max-width: 340px; display: grid; gap: 14px; text-align: left; }
.checklist li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; transition: color 0.4s; }
.checklist .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; position: relative; }
.checklist .box svg { width: 15px; height: 15px; color: #fff; opacity: 0; transform: scale(0.4); transition: opacity 0.3s, transform 0.3s var(--ease); }
.checklist li.done { color: var(--ink); }
.checklist li.done .box { background: var(--accent); border-color: var(--accent); }
.checklist li.done .box svg { opacity: 1; transform: none; }
.checklist li.active .box { border-color: var(--accent); }
.checklist li.active .box::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse-ring 1.2s var(--ease) infinite; }

/* partner search orbit */
.orbit { width: 190px; height: 190px; margin: 6px auto 22px; position: relative; }
.orbit .center-node { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-brand); z-index: 2; }
.orbit .center-node svg { width: 26px; height: 26px; }
.orbit .center-node--iago { width: 66px; height: 66px; background: #140d24; border: 1px solid var(--ring); }
.orbit .center-node--iago .spin-face { display: block; width: 44px; }
.orbit .p-orbit { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in oklab, var(--accent) 40%, var(--line)); animation: spin 8s linear infinite; }
.orbit .p-node { position: absolute; top: -20px; left: 50%; margin-left: -20px; width: 40px; height: 40px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow-sm); animation: spin 8s linear infinite reverse; }
.orbit .p-node svg { width: 20px; height: 20px; }
.orbit .p-orbit:nth-child(3) { inset: 34px; animation-duration: 5.5s; }
.orbit .p-orbit:nth-child(4) { inset: 16px; animation-duration: 11s; animation-direction: reverse; }

/* ---------- Reveal product / partner cards ---------- */
.reveal-card { text-align: center; }
.rc-badge {
  width: 92px; height: 92px; border-radius: 26px; margin: 0 auto 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px -16px rgba(25, 16, 54, 0.25); animation: pop-in 0.6s var(--ease) both;
}
.rc-badge svg { width: 46px; height: 46px; }
/* A partner wordmark svg keeps its ratio inside the badge instead of being
   forced into a 46px square. */
.rc-badge > svg { width: auto; height: 46px; max-width: 64px; }
.rc-badge img, .rc-badge svg.logo { width: 60px; height: 60px; }
.rc-eyebrow { font-family: var(--font-head); font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.rc-name { font-size: clamp(1.5rem, 4vw, 2rem); margin: 4px 0 8px; }
.rc-tag { color: var(--muted); margin-bottom: 20px; }
.rc-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }

/* partner logo reveal big */
.partner-logo-big { display: grid; place-items: center; margin-bottom: 8px; }
.partner-logo-big svg { height: 60px; width: auto; color: var(--accent); }

.soon-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.soon-tag svg { width: 16px; height: 16px; flex: none; }
/* Any inline icon inside a text hint (e.g. the lock note under form actions) */
.j-hint svg { width: 14px; height: 14px; flex: none; vertical-align: -2px; }

/* ---------- Partner form ---------- */
.j-form-grid { display: grid; gap: 16px; }
.j-form-grid .j-field label { margin-bottom: 6px; }
.j-stepcount { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }

/* Reuse of prior answers summary (Valor / Necessidade / Renda). Neutral on
   purpose: it sits inside the white card, so it must not reuse the partner's
   --surface-tint, which can be a very dark secondary color. */
.j-known {
  background: color-mix(in oklab, var(--ink) 4%, var(--sheet));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 18px;
  display: grid;
}
.j-known__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; }
.j-known__row + .j-known__row { border-top: 1px solid var(--line); }
.j-known__k { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); flex: none; }
.j-known__v { font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--ink); text-align: right; }

/* ---------- Success ---------- */
/* Marks are brand-tinted. Derive the soft fill from --accent so it stays
   visible even when a partner sets primary == secondary (Juvo), where the
   previous --surface-tint fill collided with the --accent glyph/border. */
.success-mark { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--sheet)); display: grid; place-items: center; position: relative; color: var(--accent); }
.success-mark svg { width: 52px; height: 52px; }
.success-mark::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--sheet)); animation: pulse-ring 1.8s var(--ease) infinite; }
.protocol { display: inline-block; margin: 4px 0 18px; padding: 10px 18px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, var(--sheet)); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--sheet)); font-family: var(--font-head); font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }

/* ---------- Intro screen ---------- */
.j-intro .intro-art { display: flex; justify-content: center; margin-bottom: 6px; }
/* multiply some o fundo quase-branco do png no cartão, seja ele branco ou
   lavanda: a figura permanece intacta e nenhuma caixa cinza aparece */
.j-intro .intro-art img { width: min(280px, 66%); height: auto; object-fit: contain; mix-blend-mode: multiply; }
/* O mascote já é um png transparente: no dark a arte flutua direto no stage,
   sem cartão claro nem blend (multiply apagaria a figura no fundo escuro). */
html[data-theme="dark"] .j-intro .intro-art img { mix-blend-mode: normal; }

/* ---------- Partner identity on dark backgrounds / light logos ---------- */
/* The stage keeps the partner's own colour: NO white sheet. When the
   background is dark we only flip the chrome TEXT to light so it stays
   legible. A brand flagged light_logo rides its white wordmark on a small
   badge chip (in the brand colour) so it never disappears on a light surface. */
.j-app[data-stage-tone="dark"] .j-progress .track { background: rgba(255, 255, 255, 0.28); }
/* Some brands set primary == stage colour, so the accent fill would vanish;
   on a dark stage the bar always reads as solid white against the tint. */
.j-app[data-stage-tone="dark"] .j-progress .fill { background: #ffffff; }
.j-app[data-stage-tone="dark"] .j-progress .lbl,
.j-app[data-stage-tone="dark"] .j-back { color: rgba(255, 255, 255, 0.94); }
.j-app[data-stage-tone="dark"] .j-back:hover { background: rgba(255, 255, 255, 0.14); }

.j-brand .p-logo--chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--logo-chip, var(--accent));
  color: #fff;
}
.j-brand .p-logo--chip svg { color: #fff; }

/* Complementary accent used by the reveal pill: lighter tint of the accent so
   the screens don't drown in a single green. */
.pill--accent { background: color-mix(in srgb, var(--accent) 10%, #fff); border-color: color-mix(in srgb, var(--accent) 26%, #fff); color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .j-top { flex-wrap: wrap; }
  .j-progress { order: 3; flex-basis: 100%; max-width: none; }
  .j-top .spacer { display: none; }
  .j-choices, .j-confirm { grid-template-columns: 1fr; }
  .j-back { width: auto; margin-left: auto; }
}
