/* The Upgrade, standalone site only: the optional "leave your details" card on the results (js/upgradeleadcard.js).
   Uses the app's tokens (styles.css), so light and dark both work. Not loaded by app/index.html. */

.up-lead {
  margin-top: 40px; padding: clamp(20px, 3.4vw, 34px); border-radius: 22px; background: var(--paper);
  border: 1.5px solid var(--line); box-shadow: var(--card-shadow); animation: up-rise 0.45s 0.2s both;
}
.up-lead__head { max-width: 640px; }
.up-lead__tag {
  display: inline-block; margin-bottom: 12px; padding: 5px 9px 4px; border-radius: 6px; background: var(--yellow); color: #0b0b0c;
  font: 800 11px/1 var(--f-head); letter-spacing: 0.12em; text-transform: uppercase;
}
.up-lead__title { font: 400 clamp(26px, 3.4vw, 36px)/1.12 var(--f-serif); letter-spacing: -0.02em; color: var(--ink); }
.up-lead__title b { font-weight: 700; }
.up-lead__title:focus { outline: none; }
.up-lead__line { margin-top: 10px; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.up-lead__honest { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }

.up-lead__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 24px; }
.up-lead__field, .up-lead__ages, .up-lead__minor, .up-lead__consent, .up-lead__error, .up-lead__actions, .up-lead__fine { grid-column: 1 / -1; }
.up-lead__field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.up-lead__form > .up-lead__field:nth-of-type(2), .up-lead__form > .up-lead__field:nth-of-type(3) { grid-column: auto; }
.up-lead__label { font: 700 13.5px/1.3 var(--f-head); color: var(--ink); }
.up-lead__opt { font-weight: 600; color: var(--muted); }
.up-lead__input {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--dash);
  background: var(--paper); color: var(--ink); font: 500 16px/1.3 var(--f-body);
}
.up-lead__input::placeholder { color: var(--muted); opacity: 0.75; }
.up-lead__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--hover); }
.up-lead__input[aria-invalid="true"] { border-color: var(--red); }

.up-lead__ages { margin: 0; padding: 0; border: 0; min-width: 0; }
.up-lead__ages legend { margin-bottom: 8px; padding: 0; }
.up-lead__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.up-lead__chip { position: relative; cursor: pointer; }
.up-lead__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.up-lead__chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--dash);
  background: var(--paper); color: var(--ink); font: 700 14.5px/1 var(--f-head); transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.up-lead__chip:hover span { border-color: var(--ink); }
.up-lead__radio:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.up-lead__radio:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.up-lead__radio[aria-invalid="true"] + span { border-color: var(--red); }

.up-lead__minor[hidden] { display: none; }
.up-lead__minor {
  padding: 12px 15px; border-radius: 12px; border-left: 4px solid var(--yellow); background: var(--up-yellow-soft, #fff8d6);
  font-size: 15px; line-height: 1.5; color: var(--ink-2);
}
.up-lead__minor b { color: var(--ink); }

.up-lead__phone { display: flex; gap: 8px; align-items: stretch; position: relative; }
.up-lead__phone .up-lead__input { flex: 1; min-width: 0; }
.up-cc { position: static; flex: none; }
.up-cc__btn {
  height: 100%; min-height: 50px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--dash); background: var(--paper);
  color: var(--ink); font: 700 15px/1 var(--f-head); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.up-cc__btn:hover, .up-cc__btn[aria-expanded="true"] { border-color: var(--ink); }
.up-cc__caret { font-size: 11px; color: var(--muted); }
.up-cc__pop {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); padding: 8px; border-radius: 14px;
  background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--card-shadow);
}
.up-cc__pop[hidden] { display: none; }
.up-cc__search {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--dash);
  background: var(--paper); color: var(--ink); font: 500 15px var(--f-body);
}
.up-cc__search:focus { outline: none; border-color: var(--ink); }
.up-cc__list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.up-cc__opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 15px; color: var(--ink); }
.up-cc__opt.is-active, .up-cc__opt:hover { background: var(--hover); }
.up-cc__opt[aria-selected="true"] { font-weight: 700; }
.up-cc__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-cc__dial { color: var(--muted); font-variant-numeric: tabular-nums; }
.up-cc__none { padding: 10px; color: var(--muted); font-size: 14.5px; }

.up-lead__consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.up-lead__box { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--red-btn); cursor: pointer; }
.up-lead__box[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: 2px; }
.up-lead__error { min-height: 1.4em; font: 600 14.5px/1.4 var(--f-body); color: var(--red-ink); }
.up-lead__error:empty { min-height: 0; display: none; }
.up-lead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.up-lead__send { min-width: 220px; }
.up-lead__fine { font-size: 13px; color: var(--muted); }

.up-lead.is-skipped { padding: 16px 20px; box-shadow: none; background: transparent; border-style: dashed; }
.up-lead__skipped { font-size: 15px; color: var(--muted); }
.up-lead__skipped .ob-link { padding: 4px 6px; }

.up-lead.is-done { border-color: var(--green); }
.up-lead__done { display: flex; gap: 16px; align-items: flex-start; }
.up-lead__check {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff;
}
.up-lead__check .icon, .up-lead__check svg { width: 22px; height: 22px; }
.up-lead__note { margin-top: 8px; font-size: 14px; color: var(--muted); }

@media (max-width: 600px) {
  .up-lead { margin-top: 32px; border-radius: 18px; }
  .up-lead__form { grid-template-columns: 1fr; gap: 14px; }
  .up-lead__form > .up-lead__field:nth-of-type(2), .up-lead__form > .up-lead__field:nth-of-type(3) { grid-column: 1 / -1; }
  .up-lead__chip span { padding: 0 13px; font-size: 14px; }
  .up-lead__send { width: 100%; }
  .up-lead__actions { justify-content: center; }
  .up-lead__done { gap: 12px; }
  .up-lead__check { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .up-lead { animation: none; } }
