/* ============================================================================
   RevScore - Revenue Recovery Estimator
   Styles converted 1:1 from the approved design (dark default + light theme).
   Tokens, type scale, gauge, options and buttons all match the mockup.
   ========================================================================== */

:root {
  --bg:#0B0F14; --surface:#151B23; --elev:#1C2530;
  --accent:#00E676; --accent-fill:#00E676; --accent-bright:#4DFFA6;
  --glow:rgba(0,230,118,.15);
  --tprimary:#FFFFFF; --tsecondary:#AEB8C4; --ttertiary:#6B7886;
  --border:#232A33; --border-hover:#36414E; --track:#232A33;
  --error:#FF5C5C; --errbg:rgba(255,92,92,.10);
  --on-accent:#08110B; --cta-glow:0 4px 24px rgba(0,230,118,.25);
  --dormant-bg:linear-gradient(135deg,#1d2530,#161d27); --dormant-border:#2f3a47;
}

[data-theme="light"] {
  --bg:#EEF2F5; --surface:#FFFFFF; --elev:#EAF8F0;
  --accent:#0E9F5A; --accent-fill:#00E676; --accent-bright:#00C46A;
  --glow:rgba(14,159,90,.16);
  --tprimary:#0B0F14; --tsecondary:#3E4B59; --ttertiary:#6B7886;
  --border:#E1E7EC; --border-hover:#C7D0D8; --track:#DCE3E9;
  --error:#D92D2D; --errbg:rgba(217,45,45,.08);
  --on-accent:#08110B; --cta-glow:0 4px 20px rgba(0,230,118,.32);
  --dormant-bg:linear-gradient(135deg,#EAFBF1,#F4FBF7); --dormant-border:#BBE9CE;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: transparent;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.rs-wrap { width: 100%; max-width: 460px; margin: 0 auto; }

.rs-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.rs-pad { padding: 28px 20px 30px; display: flex; flex-direction: column; gap: 22px; }
.rs-pad-q { padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 24px; }

/* ---- brand ---------------------------------------------------------------- */
.rs-brand { display: flex; align-items: center; gap: 9px; }
.rs-brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent-fill);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.rs-brand-name { font-size: 15px; font-weight: 700; color: var(--tprimary); letter-spacing: -.01em; }
.rs-brand-logo { height: 26px; width: auto; max-width: 160px; display: block; }

/* ---- typography ----------------------------------------------------------- */
.rs-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
.rs-h1 { font-size: 34px; line-height: 1.12; font-weight: 700; color: var(--tprimary); letter-spacing: -.03em; text-wrap: balance; }
.rs-h2 { font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--tprimary); letter-spacing: -.02em; }
.rs-h2-c { font-size: 28px; line-height: 1.15; font-weight: 700; color: var(--tprimary); letter-spacing: -.02em; }
.rs-lead { font-size: 16px; line-height: 1.55; color: var(--tsecondary); }
.rs-pattern { font-size: 14.5px; line-height: 1.5; color: var(--accent); font-weight: 600; margin-top: 4px; }
.rs-body { font-size: 15px; line-height: 1.55; color: var(--tsecondary); }
.rs-micro { font-size: 13px; color: var(--ttertiary); }
.rs-note { font-size: 13px; color: var(--ttertiary); line-height: 1.5; }
.rs-explainer { font-size: 13.5px; line-height: 1.5; color: var(--tsecondary); margin: 2px 0 0; }
.rs-center { text-align: center; }
.rs-strong { color: var(--tprimary); font-weight: 600; }
.rs-accent { color: var(--accent); }

.rs-intro-copy { display: flex; flex-direction: column; gap: 18px; padding: 20px 0; }

/* ---- trust line ----------------------------------------------------------- */
.rs-trust { display: flex; align-items: center; justify-content: center; gap: 7px; }
.rs-trust span { font-size: 13px; color: var(--ttertiary); }

/* ---- buttons -------------------------------------------------------------- */
.rs-btn {
  width: 100%; min-height: 56px; padding: 12px 18px; border: none; border-radius: 12px;
  background: var(--accent-fill); color: var(--on-accent);
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--cta-glow); transition: transform .12s ease, filter .12s ease;
}
.rs-btn:hover { filter: brightness(1.05); }
.rs-btn:active { transform: translateY(1px); }
.rs-btn[disabled] { opacity: .6; cursor: default; box-shadow: none; }
/* keep the icon a fixed size and vertically centered against wrapped text */
.rs-btn > svg { flex: 0 0 auto; display: block; }
.rs-btn-label { line-height: 1.28; text-align: center; }

.rs-btn-outline {
  width: 100%; min-height: 56px; padding: 12px 18px; border: 1.5px solid var(--accent); border-radius: 12px;
  background: transparent; color: var(--accent);
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  line-height: 1.28; transition: background .12s ease;
}
.rs-btn-outline:hover { background: var(--glow); }
.rs-btn-founding { background: var(--glow); font-weight: 700; }
.rs-btn-founding:hover { background: rgba(0,230,118,.22); }

.rs-download {
  align-self: center; display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent); font-size: 13px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  background: none; border: none; font-family: inherit;
}

/* ---- progress + back ------------------------------------------------------ */
.rs-prog-head { display: flex; align-items: center; gap: 14px; }
.rs-back {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none; transition: border-color .12s ease;
}
.rs-back:hover { border-color: var(--border-hover); }
.rs-prog { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rs-prog-row { display: flex; align-items: center; justify-content: space-between; }
.rs-prog-label { font-size: 13px; font-weight: 600; color: var(--ttertiary); }
.rs-track { height: 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.rs-fill { height: 100%; background: var(--accent-fill); border-radius: 999px; transition: width .35s cubic-bezier(.4,0,.2,1); }

.rs-q-head { display: flex; flex-direction: column; gap: 10px; }

/* ---- options -------------------------------------------------------------- */
.rs-options { display: flex; flex-direction: column; gap: 12px; }
.rs-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 56px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: left; width: 100%; font-family: inherit;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.rs-option:hover { border-color: var(--border-hover); }
.rs-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rs-option.is-selected {
  border: 1.5px solid var(--accent); background: var(--elev);
  box-shadow: 0 0 0 3px var(--glow);
}
.rs-option-label { font-size: 16px; font-weight: 600; color: var(--tprimary); }
.rs-option-desc { font-size: 13px; color: var(--ttertiary); margin-top: 3px; }
.rs-option.is-selected .rs-option-desc { color: var(--tsecondary); }
.rs-option-text { display: flex; flex-direction: column; }
.rs-check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-fill);
  display: none; align-items: center; justify-content: center; flex: none;
}
.rs-option.is-selected .rs-check { display: flex; }

/* ---- gauge ---------------------------------------------------------------- */
.rs-gauge { position: relative; width: 300px; align-self: center; }
.rs-gauge svg { display: block; }
.rs-gauge-arc { transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1); filter: drop-shadow(0 0 8px rgba(0,230,118,.5)); }
.rs-gauge-lock {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.rs-gauge-lock span { font-size: 11px; font-weight: 600; color: var(--ttertiary); }
.rs-gauge-val { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rs-gauge-num { font-size: 40px; font-weight: 700; color: var(--tprimary); letter-spacing: -.03em; line-height: 1; }
.rs-gauge-cap { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ttertiary); }
.rs-gauge-ends { display: flex; justify-content: space-between; margin-top: 2px; padding: 0 4px; }
.rs-gauge-ends span { font-size: 12px; font-weight: 600; color: var(--ttertiary); }

/* ---- email gate ----------------------------------------------------------- */
.rs-field-wrap { display: flex; flex-direction: column; gap: 10px; }
.rs-field {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
}
.rs-field.is-error { border: 1.5px solid var(--error); background: var(--errbg); }
.rs-field input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: inherit; font-size: 15px; color: var(--tprimary);
}
.rs-field input::placeholder { color: var(--ttertiary); }
.rs-field-icon { flex: none; display: flex; }
.rs-error-msg { display: flex; align-items: center; gap: 7px; }
.rs-error-msg span { font-size: 13px; color: var(--error); }

/* ---- results stats -------------------------------------------------------- */
.rs-stats { display: flex; flex-direction: column; gap: 10px; }
.rs-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
}
.rs-stat.is-mid { padding: 16px 18px; border: 1.5px solid var(--accent); background: var(--elev); box-shadow: 0 0 0 3px var(--glow); }
.rs-stat-key { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tsecondary); }
.rs-stat.is-mid .rs-stat-key { color: var(--accent); }
.rs-stat-val { font-size: 22px; font-weight: 700; color: var(--tprimary); letter-spacing: -.02em; }
.rs-stat.is-mid .rs-stat-val { font-size: 26px; }

/* ---- dormant -------------------------------------------------------------- */
.rs-dormant {
  position: relative; padding: 20px; border-radius: 16px;
  background: var(--dormant-bg); border: 1px solid var(--dormant-border);
  border-left: 3px solid var(--accent); overflow: hidden;
}
.rs-dormant-inner { display: flex; flex-direction: column; gap: 7px; }
.rs-dormant-head { display: flex; align-items: center; gap: 8px; }
.rs-dormant-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.rs-dormant-num { font-size: 30px; font-weight: 700; color: var(--tprimary); letter-spacing: -.03em; line-height: 1.05; }
.rs-dormant-body { font-size: 13.5px; line-height: 1.5; color: var(--tsecondary); }
.rs-dormant-sub { font-size: 12.5px; line-height: 1.45; color: var(--ttertiary); margin-top: 2px; }

/* hard-gate screen */
.rs-gate-copy { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; margin: 6px 0 4px; }
.rs-field-optional { font-size: 12px; font-weight: 600; color: var(--ttertiary); margin-top: 2px; }

/* bot honeypot - off-screen, not display:none so bots still fill it */
.rs-hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; }

/* question helper line */
.rs-q-helper { font-size: 13px; line-height: 1.45; color: var(--ttertiary); margin: 0; }

/* required accuracy disclaimer (under range + under dormant) */
.rs-disclaimer { font-size: 11.5px; line-height: 1.45; color: var(--ttertiary); margin: 8px 0 0; }

/* results secondary CTA (audit) */
.rs-cta-secondary { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rs-cta-secondary-intro { font-size: 13px; color: var(--tsecondary); text-align: center; }
.rs-cta-credit { font-size: 12px; line-height: 1.45; color: var(--ttertiary); text-align: center; margin: 0; }

/* Founding Member guarantee block (tiered) */
.rs-guarantee { background: rgba(0,230,118,.12); border: 1.5px solid var(--accent); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 0 0 3px var(--glow); }
.rs-guarantee-head { font-size: 15.5px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.rs-guarantee-body { font-size: 14px; line-height: 1.55; color: var(--tprimary); margin: 0; font-weight: 500; }
.rs-guarantee-compact { padding: 13px 16px; }

.rs-cta-group { display: flex; flex-direction: column; gap: 12px; }
.rs-cta-primary-wrap { display: flex; flex-direction: column; gap: 7px; }
.rs-cta-sub { text-align: center; font-size: 13px; color: var(--ttertiary); line-height: 1.45; }

/* ---- spinner -------------------------------------------------------------- */
.rs-spin {
  width: 18px; height: 18px; border: 2px solid var(--on-accent); border-top-color: transparent;
  border-radius: 50%; animation: rs-rot .7s linear infinite;
}
@keyframes rs-rot { to { transform: rotate(360deg); } }

/* ---- screen transition ---------------------------------------------------- */
.rs-screen { animation: rs-in .32s cubic-bezier(.22,1,.36,1); }
@keyframes rs-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- desktop reflow (wide iframe) ----------------------------------------- */
@media (min-width: 560px) {
  .rs-wrap { max-width: 480px; }
  .rs-pad, .rs-pad-q { padding: 36px 24px; }
  .rs-stats.rs-stats-row { flex-direction: row; gap: 10px; }
  .rs-stats-row .rs-stat { flex: 1; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 14px; }
  .rs-stats-row .rs-stat-val { font-size: 20px; }
  .rs-stats-row .rs-stat.is-mid .rs-stat-val { font-size: 22px; }
}

/* ---- reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rs-screen, .rs-fill, .rs-gauge-arc, .rs-btn { animation: none !important; transition: none !important; }
}
