:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #16211c;
  --muted: #5c6b62;
  --border: #e6e1d8;
  --brand: #0f7a5f;
  --brand-dark: #0b5f49;
  --brand-tint: #e8f5f0;
  --danger: #b3261e;
  --danger-tint: #fbeceb;
  --amber: #9a6a06;
  --amber-tint: #fbf3e2;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 33, 28, 0.04), 0 8px 24px rgba(22, 33, 28, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Vários elementos abaixo definem `display` explícito (inline-block/flex)
   pra quando visíveis — sem isso, essa regra garante que o atributo
   `hidden` nativo sempre vence, independente da classe. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.checkout {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loading-line {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.offer-card, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.offer-image {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: block;
}

.offer-partner {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.offer-title {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.offer-description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.offer-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.offer-price {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.offer-price-prev {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 1rem;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.field input {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  min-height: 46px;
}

.field input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: var(--surface);
}

.field-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.form-error {
  background: var(--danger-tint);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.88rem;
  margin: 0 0 14px;
}

.btn {
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }

.btn-secondary {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.status-line {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber);
  margin: 0 0 16px;
}

.status-line[data-tone="brand"] { background: var(--brand-tint); color: var(--brand-dark); }
.status-line[data-tone="danger"] { background: var(--danger-tint); color: var(--danger); }

.resume-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.qr-image {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 0 auto 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
}

.countdown {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 18px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.82rem;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
}

.copy-row .btn {
  width: auto;
  padding: 0 16px;
  min-height: 46px;
}

.copy-feedback {
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--brand-dark);
  margin: 8px 0 0;
}

.result h2 { margin-top: 0; }
.result p { color: var(--muted); line-height: 1.55; }

.upsell-slot { display: none; }

.footer {
  padding: 18px 16px 28px;
  text-align: center;
}

.footer p {
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (min-width: 640px) {
  .checkout { padding-top: 32px; }
  .offer-title { font-size: 1.55rem; }
  .offer-price { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
