/* ─── QUAD — IQAR · Índice Quad de Alta Renda ───
   Design tokens alinhados com quiz/perfil e wealth_v0.2
*/

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

:root {
  --bg:         #0a0a0b;
  --bg-2:       #0e0e11;
  --card:       #121217;
  --surface:    #17171d;
  --surface-2:  #1c1c23;
  --red:        #D52B34;
  --red-dark:   #A1242A;
  --red-glow:   rgba(213, 43, 52, 0.18);
  --red-faint:  rgba(213, 43, 52, 0.05);
  --steel:      #293541;
  --steel-2:    #354859;
  --text:       #ffffff;
  --text-2:     rgba(255, 255, 255, 0.68);
  --text-3:     rgba(255, 255, 255, 0.42);
  --text-4:     rgba(255, 255, 255, 0.22);
  --hairline:   rgba(255, 255, 255, 0.07);
  --hairline-2: rgba(255, 255, 255, 0.12);
  --red-line:   rgba(213, 43, 52, 0.30);

  /* Semântica de dashboard — utilitárias */
  --good:       #5fc592;
  --good-faint: rgba(95, 197, 146, 0.12);
  --bad:        #D52B34;
  --bad-faint:  rgba(213, 43, 52, 0.10);
  --warn:       #e0a84a;
  --warn-faint: rgba(224, 168, 74, 0.10);

  --display:    'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  --body:       'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono:       'Fragment Mono', ui-monospace, monospace;

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; }
::selection { background: var(--red); color: #fff; }

.accent { color: var(--red); }
.hidden { display: none !important; }

/* ─── TOP BAR ─── */
.topbar {
  height: 60px;
  padding: 0 24px;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.topbar-brand img { width: 22px; height: auto; }
.topbar-brand-accent { color: var(--text-3); font-weight: 500; }

.topbar-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ─── BADGE (chip) ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--red-line);
  background: var(--red-faint);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 17px 30px;
  border: 1px solid var(--red);
  border-radius: 2px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: var(--text);
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: 0 14px 34px -14px rgba(213,43,52,0.55);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--surface);
  border-color: var(--hairline-2);
  color: var(--text-3);
  box-shadow: none;
}
.btn .arrow {
  width: 16px; height: 10px;
  position: relative;
  transition: transform 0.3s var(--ease);
}
.btn .arrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}
.btn .arrow::after {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.btn:hover:not(:disabled) .arrow { transform: translateX(5px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--hairline-2);
  border-radius: 2px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.btn-ghost:hover {
  border-color: var(--text-2);
  background: var(--surface);
  color: var(--text);
}
.btn-back::before {
  content: '←';
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.btn-back:hover::before { transform: translateX(-3px); }

.btn-wide { width: 100%; }

/* ═════════════════════════════════════════
   PÁGINA 1 — LANDING
   ═════════════════════════════════════════ */
.start {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 72px;
  position: relative;
  overflow: hidden;
}
.start::before {
  content: '';
  position: absolute;
  top: -10%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--red-glow), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.start::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.start-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  text-align: left;
}

.iqar-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}
.iqar-mark {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(68px, 13vw, 120px);
  letter-spacing: 0.14em;
  line-height: 0.9;
  color: var(--text);
  text-transform: uppercase;
}
.iqar-mark .dot {
  color: var(--red);
  letter-spacing: 0;
  margin-left: -0.08em;
}
.iqar-full {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Variante "secondary": quando a brand aparece abaixo do CTA, como
   contexto de marca, não como elemento hero. */
.iqar-brand--secondary {
  margin: 56px 0 4px;
  gap: 10px;
}
.iqar-brand--secondary .iqar-mark {
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--text-2, var(--text));
  opacity: 0.85;
}
.iqar-brand--secondary + .iqar-full {
  font-size: 10px;
  opacity: 0.7;
  margin-bottom: 24px;
}

.start-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.024em;
  margin: 26px 0 22px;
  color: var(--text);
}
.start-sub {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 28px;
  max-width: 580px;
}

.start-pull {
  padding: 18px 22px;
  border-left: 2px solid var(--red);
  background: var(--red-faint);
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.start-pull strong { color: var(--red); font-weight: 600; }

.start-bullets {
  list-style: none;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.start-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}
.start-bullets svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--red);
  margin-top: 1px;
}

.dp-wrap--landing { margin-top: 36px; margin-bottom: 44px; }

.start-logo {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.start-logo img { opacity: 0.65; }
.start-logo-accent { color: var(--text-4); font-weight: 400; }
.dp-wrap--landing .dp-hd-badge {
  background: rgba(213, 43, 52, 0.12);
  color: var(--red);
  padding: 2px 8px;
  border-radius: 3px;
}

.start-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.start-proof {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.proof-item { display: flex; flex-direction: column; gap: 4px; }
.proof-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--red);
  line-height: 1;
}
.proof-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.proof-divider { width: 1px; height: 26px; background: var(--hairline-2); }

/* ═════════════════════════════════════════
   PÁGINA 2 — QUIZ (grupos de gasto)
   ═════════════════════════════════════════ */
.quiz {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 20px 60px;
  position: relative;
}
.quiz-inner {
  width: 100%;
  max-width: 720px;
}

/* Progress header */
.quiz-head { margin-bottom: 30px; }
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.quiz-meta .current { color: var(--text); font-weight: 500; }

.quiz-bar {
  position: relative;
  height: 3px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.quiz-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--red-glow);
  transition: width 0.45s var(--ease);
  width: 0%;
}
.quiz-bar-next {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(213,43,52,0.28) 0 6px,
    rgba(213,43,52,0.08) 6px 12px
  );
  border-radius: 2px;
  transition: width 0.45s var(--ease);
  width: 0%;
}

/* Group step */
.group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.group-icon {
  font-size: 22px;
  line-height: 1;
}
.group-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -0.02em;
  color: var(--text);
}
.group-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 4px 10px;
  border: 1px solid var(--hairline-2);
  border-radius: 100px;
}
.group-desc {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

/* UF / cidade — somente no step 0 */
.uf-selector {
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--red-faint);
  border: 1px solid var(--red-line);
  border-radius: 3px;
}
.uf-selector-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.uf-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.uf-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
input.uf-select { cursor: text; }
.uf-badge {
  font-size: 12px;
  margin-top: 7px;
  color: var(--good);
}

/* Items list */
.items { display: flex; flex-direction: column; gap: 10px; }

.item {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 16px 18px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.item.filled {
  border-color: var(--red-line);
  background: linear-gradient(180deg, rgba(213,43,52,0.04), transparent);
}
.item.na { opacity: 0.55; }

.item-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.item-name-col { flex: 1; min-width: 200px; }
.item-name { font-size: 14.5px; color: var(--text); line-height: 1.35; }
.item-desc {
  color: var(--text-3);
  font-size: 12.5px;
  margin-top: 3px;
  line-height: 1.4;
}
.item-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.na-badge {
  display: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 6px 12px;
  border: 1px dashed var(--hairline-2);
  border-radius: 2px;
}
.item.na .item-controls { display: none; }
.item.na .na-badge { display: inline-block; }

.item-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-na {
  background: none;
  border: none;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s var(--ease);
}
.btn-na:hover { color: var(--red); }
.item.na .btn-na { color: var(--red); }
.na-off { display: inline; }
.na-on  { display: none; }
.item.na .na-off { display: none; }
.item.na .na-on  { display: inline; }

/* Currency input */
.input-wrap { position: relative; }
.input-wrap .prefix {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.input-wrap input[type="text"] {
  width: 160px;
  background: var(--bg-2);
  border: 1px solid var(--hairline-2);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  padding: 11px 14px 11px 34px;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.input-wrap input[type="text"]:focus {
  border-color: var(--red);
  background: var(--surface);
}
.input-wrap input:disabled { opacity: 0.4; cursor: not-allowed; }

.period-sel {
  background: var(--bg-2);
  border: 1px solid var(--hairline-2);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 10px;
  cursor: pointer;
  height: 41px;
}
.period-sel:disabled { opacity: 0.4; cursor: not-allowed; }

/* Step mini-progress */
.step-progress {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 14px 16px;
  margin-top: 20px;
}
.step-progress-hd {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.step-progress-hd strong { color: var(--text); font-weight: 600; }
.step-progress-bar {
  position: relative;
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.sp-done {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}
.sp-next {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(213,43,52,0.32) 0 6px,
    rgba(213,43,52,0.08) 6px 12px
  );
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}

/* Step footer */
.step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 14px;
  flex-wrap: wrap;
}
.group-summary {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--body);
}
.group-summary strong {
  color: var(--text);
  font-weight: 600;
  font-family: var(--mono);
}
.step-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.step-actions .btn-primary { padding: 14px 24px; font-size: 12px; }

/* Patrimonio step (radios) */
.patrimonio-q {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 16px 0 18px;
  color: var(--text);
}
.pat-opts { display: flex; flex-direction: column; gap: 10px; }
.pat-label { display: block; cursor: pointer; }
.pat-label input { display: none; }
.pat-card {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.4;
  transition: all 0.2s var(--ease);
  position: relative;
}
.pat-card:hover {
  background: var(--surface);
  border-color: var(--hairline-2);
  transform: translateX(3px);
}
.pat-label input:checked + .pat-card {
  background: rgba(213, 43, 52, 0.08);
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}
.pat-label input:checked + .pat-card::before {
  content: '';
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

/* ═════════════════════════════════════════
   PÁGINA 3 — LOADING (cálculo)
   ═════════════════════════════════════════ */
.loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}
.loading::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--red-glow), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.loading-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.loading-spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  border: 2px solid var(--hairline-2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 4.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.loading-msg {
  font-size: 14.5px;
  color: var(--text-2);
  min-height: 26px;
  margin-bottom: 30px;
  transition: opacity 0.3s ease;
}
.loading-progress {
  height: 6px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.loading-fill {
  height: 100%;
  width: 0;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  transition: width 0.1s linear;
}
.loading-pct {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

/* ═════════════════════════════════════════
   PÁGINA 4 — LEAD CAPTURE
   ═════════════════════════════════════════ */
.lead {
  flex: 1;
  padding: 40px 20px 60px;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.lead::before {
  content: '';
  position: absolute;
  top: 0; right: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--red-glow), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.lead-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}
.lead-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--red-faint);
  border: 1px solid var(--red-line);
  color: var(--red);
  margin-bottom: 18px;
}
.lead-check svg { width: 20px; height: 20px; }
.lead-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.lead-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 24px;
}
.spoiler {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--red);
  border-radius: 3px;
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.spoiler strong { color: var(--red); }

.lead-mini-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 24px;
  padding: 14px 12px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}
.lmp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.lmp-svg {
  width: 100%;
  max-width: 56px;
  height: 30px;
}
.lmp-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.3;
}
@media (max-width: 480px) {
  .lead-mini-preview { gap: 6px; padding: 12px 8px; }
  .lmp-label { font-size: 8.5px; }
}

.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--hairline-2);
  border-radius: 2px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--body);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-input:focus {
  outline: none;
  border-color: var(--red);
  background: var(--surface);
}
.form-input.invalid { border-color: var(--red); }
.form-input::placeholder { color: var(--text-4); }
.form-err {
  display: none;
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.form-input.invalid ~ .form-err { display: block; }

.lead-inner .btn-primary { width: 100%; margin-top: 10px; }
.lead-privacy {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
}

/* ─── DASHBOARD PREVIEW MOCKUP (lead screen) ─── */
.dp-wrap {
  position: relative;
  margin-bottom: 28px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline-2);
}
.dp-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.dp-hd-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dp-hd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
}
.dp-hd-badge svg { flex-shrink: 0; }
.dp-body {
  background: var(--card);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dp-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 12px;
}
.dp-card-main { grid-column: 1 / 2; }
.dp-card-proj { grid-column: 2 / 3; }
.dp-card-cats { grid-column: 1 / -1; }
.dp-card-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 10px;
}

/* Bar chart */
.dp-bars-area {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 4px;
  height: 70px;
}
.dp-year {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.dp-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 56px;
  width: 100%;
  justify-content: center;
}
.dp-bar {
  width: 40%;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  transition: height 0.6s var(--ease);
}
.dp-bar-iqar { background: var(--red); opacity: 0.9; }
.dp-bar-ipca { background: rgba(255,255,255,0.18); }
.dp-year-label {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}
.dp-bars-legend {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.dp-leg {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--text-3);
  letter-spacing: 0.05em;
}
.dp-leg::before {
  content: '';
  display: inline-block;
  width: 10px; height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dp-leg-iqar::before { background: var(--red); }
.dp-leg-ipca::before { background: rgba(255,255,255,0.22); }

/* Line chart */
.dp-line-svg {
  width: 100%;
  height: 62px;
  display: block;
}
.dp-proj-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text-4);
  letter-spacing: 0.05em;
}

/* Category bars */
.dp-cat-list { display: flex; flex-direction: column; gap: 7px; }
.dp-cat-row {
  display: grid;
  grid-template-columns: 72px 1fr 24px;
  align-items: center;
  gap: 8px;
}
.dp-cat-name {
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-cat-track {
  height: 3px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.dp-cat-fill {
  height: 100%;
  width: var(--w);
  background: var(--red);
  border-radius: 2px;
  opacity: 0.55;
}
.dp-cat-val {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--text-4);
  text-align: right;
  letter-spacing: 0.04em;
}
.dp-cat-more .dp-cat-name,
.dp-cat-more .dp-cat-fill { opacity: 0.4; }

/* Overlay */
.dp-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(18,18,23,0.55) 30%,
    rgba(18,18,23,0.95) 65%,
    rgba(18,18,23,1) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 18px;
  pointer-events: none;
}
.dp-lock-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  margin-bottom: 8px;
}
.dp-lock-icon svg { width: 13px; height: 13px; }
.dp-overlay-text {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
}
.dp-arrow {
  font-size: 14px;
  color: var(--red);
  margin-top: 6px;
  animation: dp-bounce 1.5s ease-in-out infinite;
}
@keyframes dp-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ═════════════════════════════════════════
   PÁGINA 5 — DASHBOARD
   ═════════════════════════════════════════ */
.dash {
  flex: 1;
  padding: 32px 20px 60px;
}
.dash-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.dash-hello {
  background: linear-gradient(180deg, var(--red-faint), transparent);
  border: 1px solid var(--red-line);
  border-radius: 3px;
  padding: 16px 22px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.55;
}
.dash-hello strong { color: var(--red); }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 28px 28px;
  margin-bottom: 20px;
  position: relative;
}
.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  color: var(--text);
}
.card-lead {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.kpi {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 18px 18px;
  min-width: 0;
}
.kpi-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.kpi-val {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  word-break: break-word;
}
.kpi-dlt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-top: 8px;
  color: var(--text-3);
}
.kpi-dlt.good { color: var(--good); }
.kpi-dlt.bad  { color: var(--bad); }

/* Charts */
.chart-wrap { position: relative; height: 300px; }
.chart-wrap.tall { height: 360px; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 460px;
}
th, td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
th:first-child, td:first-child {
  text-align: left;
  white-space: normal;
  min-width: 140px;
}
thead th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom-color: var(--hairline-2);
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--hairline-2);
  border-bottom: none;
  color: var(--text);
}
.cell-good { color: var(--good); }
.cell-bad  { color: var(--bad); }
.cell-warn { color: var(--warn); }

/* Color legend */
.color-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.color-legend .ci { display: flex; align-items: center; gap: 8px; }
.color-legend .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Details */
details { margin-top: 14px; }
details summary {
  cursor: pointer;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 0;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: '+';
  display: inline-block;
  margin-right: 10px;
  color: var(--red);
  font-family: var(--mono);
  transition: transform 0.2s var(--ease);
}
details[open] summary { color: var(--text); }
details[open] summary::before { content: '−'; }
details p {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.65;
  margin-top: 10px;
  padding-left: 22px;
}
details .table-wrap { margin-top: 12px; padding-left: 22px; }

/* CTA card */
.cta-card {
  background: linear-gradient(135deg, var(--red-faint), transparent 60%), var(--card);
  border-color: var(--red-line);
  padding: 32px 28px;
}
.cta-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-text { flex: 1; min-width: 260px; }
.cta-text .card-title {
  color: var(--red);
  margin-bottom: 8px;
  font-size: 22px;
}
.cta-text p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}
.cta-action { flex-shrink: 0; min-width: 260px; width: 100%; }
@media (min-width: 720px) {
  .cta-action { width: auto; }
}

/* Restart */
.restart { text-align: center; margin: 20px 0 40px; }

/* ─── FOOTER ─── */
.footer-mini {
  text-align: center;
  padding: 24px 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  border-top: 1px solid var(--hairline);
}

/* ═════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════ */
@media (min-width: 720px) {
  .topbar { padding: 0 44px; height: 66px; }
  .start { padding: 80px 44px 96px; }
  .quiz { padding: 48px 44px 80px; }
  .lead { padding: 56px 44px 80px; }
  .dash { padding: 40px 44px 80px; }
  .card { padding: 32px 36px; }
  .cta-card { padding: 36px 36px; }
}

@media (max-width: 820px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-action { width: 100%; }
}
@media (max-width: 600px) {
  .item-controls { width: 100%; justify-content: space-between; }
  .input-wrap { flex: 1; }
  .input-wrap input[type="text"] { width: 100%; }
  .period-sel { flex-shrink: 0; }
}

/* Animações de entrada */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.start-inner > * { animation: fadeUp 0.7s var(--ease) both; }
.start-inner > *:nth-child(1) { animation-delay: 0.05s; }
.start-inner > *:nth-child(2) { animation-delay: 0.15s; }
.start-inner > *:nth-child(3) { animation-delay: 0.25s; }
.start-inner > *:nth-child(4) { animation-delay: 0.35s; }
.start-inner > *:nth-child(5) { animation-delay: 0.45s; }
.start-inner > *:nth-child(6) { animation-delay: 0.55s; }
.start-inner > *:nth-child(7) { animation-delay: 0.65s; }

.quiz-inner > *,
.lead-inner > *,
.loading-inner > *,
.dash-inner > * { animation: fadeUp 0.5s var(--ease) both; }
