/* "Tell us your problem": the closing chapter, carried on as a conversation.
   Same rules as the page: no boxes, type set bare over the scene. The scene stays alive
   behind a soft shade and blur (like .veil); kickers glow HUD blue, questions are set in
   the display face, answers are hairline rows and the page's own buttons. Money is gold. */

html.sv-lock, html.sv-lock body { overflow: hidden; }

.sv {
  position: fixed; inset: 0; z-index: 40;
  display: grid; grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background:
    radial-gradient(ellipse 75% 65% at 50% 50%, rgba(3, 5, 9, 0.22), rgba(3, 5, 9, 0.72)),
    linear-gradient(to top, rgba(3, 5, 9, 0.55), transparent 35%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.sv.is-open { opacity: 1; visibility: visible; transition: opacity 0.6s ease, visibility 0s; }

/* ---------- top line: name, progress, count, close ---------- */
.sv-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 28px; padding: 28px var(--edge); }
.sv-brand, .sv-count, .sv-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
}
.sv-brand { color: var(--hud); text-shadow: 0 0 16px rgba(169, 230, 255, 0.45); }
.sv-count { color: var(--ink-muted); min-width: 64px; text-align: right; }
.sv-progress { height: 1px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.sv-progress i {
  display: block; height: 100%; background: var(--hud); box-shadow: 0 0 12px var(--hud);
  transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.sv-close { background: none; cursor: pointer; }

/* ---------- the question ---------- */
.sv-scroll { overflow-y: auto; overscroll-behavior: contain; display: grid; }
.sv-stage { align-self: center; width: min(720px, 100% - 2 * var(--edge)); margin: 0 auto; padding: 24px 0 40px; text-align: center; }
.sv-step > * { animation: sv-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.sv-step > :nth-child(2) { animation-delay: 0.06s; }
.sv-step > :nth-child(3) { animation-delay: 0.12s; }
.sv-step > :nth-child(n + 4) { animation-delay: 0.18s; }
.sv-step--back > * { animation-name: sv-back; }
@keyframes sv-in { from { opacity: 0; transform: translateY(22px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sv-back { from { opacity: 0; transform: translateY(-22px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.sv-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--hud);
  margin-bottom: 22px; text-shadow: 0 0 16px rgba(169, 230, 255, 0.45), 0 1px 12px rgba(0, 0, 0, 0.6);
}
.sv-q {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(22px, 3vw, 42px); line-height: 1.14; letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(169, 230, 255, 0.22), 0 2px 34px rgba(0, 0, 0, 0.35);
}
.sv-hint { margin: 18px auto 0; max-width: 520px; color: var(--ink-dim); font-size: 16.5px; line-height: 1.6; text-shadow: 0 1px 18px rgba(0, 0, 0, 0.75); }
.sv-label { display: block; color: rgba(235, 240, 246, 0.5); margin-bottom: 12px; }

/* ---------- answers ---------- */
.sv-input {
  width: 100%; margin-top: 36px; padding: 12px 0;
  font: 400 clamp(18px, 1.8vw, 22px) / 1.5 var(--sans); color: #fff;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.35); border-radius: 0; outline: none; resize: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.sv-input::placeholder { color: rgba(235, 240, 246, 0.35); }
.sv-input:focus { border-color: var(--hud); box-shadow: 0 1px 0 var(--hud), 0 12px 24px -18px var(--hud); }
.sv-area { text-align: left; min-height: 3em; }
select.sv-input { margin-top: 0; appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9e6ff' stroke-width='1.2'/%3E%3C/svg%3E") right 4px center no-repeat; }
select.sv-input option { background: #0b1016; color: var(--ink); }
.sv-field { margin-top: 30px; text-align: left; }
.sv-field .sv-input { margin-top: 0; }
.sv-step > .sv-field:first-of-type { margin-top: 40px; }

.sv-detect { min-height: 30px; margin-top: 14px; font-size: 14px; color: var(--ink-dim); text-align: left; opacity: 0; transition: opacity 0.3s; }
.sv-detect.on { opacity: 1; }
.sv-tag {
  display: inline-block; margin: 0 2px; padding: 3px 10px; vertical-align: 1px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--hud); border: 1px solid var(--hud-dim); box-shadow: 0 0 14px rgba(169, 230, 255, 0.15);
}
.sv-examples { margin-top: 28px; text-align: left; }

/* single choice: hairline rows, like the credits */
.sv-list { margin: 36px auto 0; max-width: 560px; text-align: left; border-bottom: 1px solid var(--line); }
.sv-row {
  display: flex; align-items: baseline; gap: 22px; width: 100%; padding: 18px 4px;
  font: 400 18px / 1.4 var(--sans); color: var(--ink-dim); text-align: left;
  background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer;
  transition: color 0.2s, padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.2s;
}
.sv-row-n { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; color: rgba(235, 240, 246, 0.4); transition: color 0.2s; }
.sv-row:hover, .sv-row:focus-visible { color: #fff; padding-left: 12px; outline: none; }
.sv-row:hover .sv-row-n, .sv-row:focus-visible .sv-row-n { color: var(--hud); }
.sv-row.on { color: #fff; padding-left: 12px; text-shadow: 0 0 22px rgba(169, 230, 255, 0.35); }
.sv-row.on .sv-row-n { color: var(--hud); }
.sv-row.on::after { content: ""; margin-left: auto; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--hud); box-shadow: 0 0 12px var(--hud); }

/* many choices: the page's buttons, outlined until picked */
.sv-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sv-chips--big { justify-content: center; margin-top: 36px; }
.sv-chip {
  padding: 10px 16px; font: 400 14px / 1.3 var(--sans); color: var(--ink); text-align: left; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(6, 10, 16, 0.35);
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.sv-chips--big .sv-chip { padding: 13px 20px; font-size: 15px; }
.sv-chip:hover, .sv-chip:focus-visible { border-color: var(--hud); box-shadow: 0 0 18px rgba(169, 230, 255, 0.25); outline: none; }
.sv-chip.on { background: var(--ink); color: #0a0d12; border-color: var(--ink); }
.sv-chip.on:hover { background: #fff; box-shadow: 0 0 24px rgba(169, 230, 255, 0.45); }
.sv-examples .sv-chip { font-size: 13px; color: var(--ink-dim); border-color: rgba(255, 255, 255, 0.18); }

/* hours: a big number and a hairline */
.sv-big { margin-top: 34px; font-family: var(--display); font-size: clamp(56px, 9vw, 110px); line-height: 1; text-shadow: 0 0 40px rgba(169, 230, 255, 0.25); }
.sv-big small { display: block; margin-top: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted); }
.sv-range { -webkit-appearance: none; appearance: none; display: block; width: min(520px, 100%); height: 1px; margin: 38px auto 12px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--hud) var(--p, 10%), rgba(255, 255, 255, 0.22) var(--p, 10%)); }
.sv-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #05080d; border: 1px solid var(--hud); box-shadow: 0 0 0 4px rgba(169, 230, 255, 0.12), 0 0 16px var(--hud); }
.sv-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #05080d; border: 1px solid var(--hud); box-shadow: 0 0 16px var(--hud); }
.sv-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(169, 230, 255, 0.25), 0 0 16px var(--hud); }
.sv-scale { display: flex; justify-content: space-between; width: min(520px, 100%); margin: 0 auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--ink-muted); }

/* the cost: gold, the one warm number on the page */
.sv-money {
  margin: 26px 0 4px; font-family: var(--display); font-size: clamp(44px, 8.5vw, 116px); line-height: 1; letter-spacing: 0.01em;
  color: var(--gold); text-shadow: 0 0 44px rgba(230, 198, 138, 0.45), 0 2px 30px rgba(0, 0, 0, 0.4); font-variant-numeric: tabular-nums;
}
.sv-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 38px auto 0; max-width: 620px; text-align: left; }
.sv-stats > div { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 26px 4px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.sv-stats > div:first-child { border-left: 0; padding-left: 0; }
.sv-stats .sv-label { margin-bottom: 10px; }
.sv-stat { font: 500 24px / 1.2 var(--sans); letter-spacing: -0.02em; color: #fff; }
.sv-match { margin-top: 34px; }

/* contact */
.sv-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 30px; font-size: 14px; color: var(--ink-dim); text-align: left; cursor: pointer; }
.sv-check input { margin-top: 4px; accent-color: var(--hud); }
.sv-err { min-height: 22px; margin-top: 14px; font-size: 14px; color: #ffb4a8; text-align: left; }
.sv-err a { color: var(--hud); }
.sv-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* received */
.sv-statement { margin: 28px auto 0; max-width: 600px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink); }
.sv-statement strong { font-weight: 500; color: #fff; }
.sv-statement .sv-gold { color: var(--gold); text-shadow: 0 0 22px rgba(230, 198, 138, 0.4); }
.sv-quote { margin: 22px auto 0; max-width: 560px; font-size: 15px; font-style: italic; color: var(--ink-muted); }
.sv-next-list { list-style: none; display: grid; gap: 10px; width: fit-content; margin: 34px auto 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.22); text-align: left; }
.sv-next-list li { position: relative; padding-left: 22px; font-size: 15px; color: rgba(235, 240, 246, 0.72); }
.sv-next-list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 10px; height: 1px; background: rgba(235, 240, 246, 0.5); }

/* ---------- bottom: back and continue ---------- */
.sv-foot { display: flex; justify-content: center; gap: 14px; padding: 18px var(--edge) calc(var(--foot) + env(safe-area-inset-bottom)); }
.sv-foot .btn { cursor: pointer; border: 0; }
.sv-foot .btn-line { border: 1px solid rgba(255, 255, 255, 0.45); }
.sv-foot .btn[disabled] { opacity: 0.3; pointer-events: none; }
.sv-foot .btn[hidden] { display: none; }

@media (max-width: 640px) {
  .sv-top { grid-template-columns: 1fr auto; gap: 14px 18px; padding: 18px var(--edge); }
  .sv-progress { grid-column: 1 / -1; grid-row: 2; }
  .sv-count { display: none; }
  .sv-stats { grid-template-columns: 1fr; row-gap: 18px; }
  .sv-stats > div { border-left: 0; padding-left: 0; }
  .sv-row { font-size: 16px; padding: 15px 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .sv, .sv-progress i { transition: none; }
  .sv-step > * { animation: none; }
}
