:root {
  --bg: #f7f8f2;
  --bg-soft: #fcfdf9;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-dark: #0f172a;
  --text: #101414;
  --text-soft: #5b6259;
  --text-muted: #7a8378;
  --stroke: rgba(16, 20, 20, 0.08);
  --stroke-strong: rgba(16, 20, 20, 0.16);
  --accent: #d4ff66;
  --accent-strong: #b4f000;
  --accent-deep: #6d9300;
  --success: #0f9f6e;
  --warning: #c98511;
  --danger: #d64545;
  --shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.12);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --radius-pill: 999px;
  --max-width: 1280px;
  --transition: 240ms cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 255, 77, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(201, 255, 77, 0.1), transparent 18%),
    linear-gradient(180deg, #fbfcf8 0%, #f7f8f2 52%, #eff1e6 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.container { width: min(calc(100% - 32px), var(--max-width)); margin: 0 auto; }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(16, 20, 20, 0.06);
}
.topbar-inner {
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.04em; font-size: 1rem; }
/* =====================
   BRAND LOGO
===================== */
.rd-logo {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  text-decoration: none;
  color: #383838;
  line-height: 1;
  flex-shrink: 0;
}
.rd-logo-wordmark {
  font-family: 'Nunito', -apple-system, 'Helvetica Neue', sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  line-height: 1;
  color: #383838;
}
.rd-logo-play {
  width: 13px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  stroke: #383838;
}

/* Legacy — kept for existing markup that hasn't been updated yet */
.site-logo {
  font-size: 1.25rem; font-weight: 900; letter-spacing: -0.05em;
  text-transform: uppercase; color: var(--text); text-decoration: none; line-height: 1;
}
.site-logo-dot { color: #3b82f6; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; position: relative; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(201,255,77,.95), rgba(180,240,0,.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 10px 24px rgba(180,240,0,.24);
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; background: #101414; border-radius: 999px;
}
.brand-mark::before { width: 20px; height: 5px; top: 10px; left: 8px; transform: rotate(42deg); }
.brand-mark::after { width: 22px; height: 5px; bottom: 10px; right: 7px; transform: rotate(42deg); }

.top-actions, .hero-actions, .cta-actions, .nav-inline-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 13px 20px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font-weight: 700; font-size: 0.94rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: #111; font-weight: 800; box-shadow: 0 12px 28px rgba(180, 240, 0, 0.22); }
.btn-primary:hover { box-shadow: 0 18px 36px rgba(180, 240, 0, 0.3); }
.btn-secondary { background: rgba(255,255,255,.92); color: var(--text); border-color: var(--stroke-strong); }
.btn-ghost { background: transparent; color: var(--text-soft); border-color: var(--stroke); min-height: 40px; padding: 9px 14px; }
.btn-danger { background: rgba(214,69,69,.1); color: var(--danger); border-color: rgba(214,69,69,.16); }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(201,255,77,.18); color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.kicker { color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.lead, .muted { color: var(--text-soft); line-height: 1.75; }
.accent-text { color: var(--accent-deep); }
.small-note { color: var(--text-muted); font-size: .88rem; line-height: 1.6; }

.card, .glass-panel, .stat-card, .value-card, .feature-card, .info-card, .result-card, .panel, .admin-card {
  background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-md); border-radius: var(--radius-md);
}

.page { padding: 40px 0 120px; }
.page-shell, .estimator-shell {
  background: rgba(255,255,255,.72); border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg); border-radius: 28px; padding: 36px;
}
.progress-wrap { display: grid; gap: 12px; margin-bottom: 22px; }
.progress-track { height: 10px; border-radius: 999px; background: rgba(16,20,20,.08); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); transition: width var(--transition); }
.progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary-bar, .notice {
  padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.82); border: 1px solid var(--stroke); color: var(--text-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
/* Desktop: static bar below the shell */
.funnel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: min(calc(100% - 32px), 1280px);
  margin: 20px auto 0;
  padding: 16px 0;
}
#next-btn {
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(180, 240, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.16);
}
.options-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.option-card {
  text-align: left; min-height: 160px; padding: 20px; border-radius: 22px; border: 1px solid var(--stroke); background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm); transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.option-card:hover { transform: translateY(-2px); border-color: rgba(180,240,0,.55); }
.option-card.selected { border-color: rgba(180,240,0,.85); background: linear-gradient(180deg, rgba(212,255,102,.16), rgba(255,255,255,.96)); box-shadow: 0 16px 36px rgba(180,240,0,.1); }
.option-card h3 { margin: 14px 0 7px; font-size: 1.08rem; letter-spacing: -.03em; }
.option-card p { margin: 0; color: var(--text-soft); line-height: 1.6; font-size: 0.9rem; }
.option-check { width: 20px; height: 20px; border-radius: 999px; border: 2px solid rgba(16,20,20,.18); display: inline-block; flex-shrink: 0; }
.option-card.selected .option-check { background: var(--accent-strong); border-color: var(--accent-deep); }

.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; font-weight: 700; color: var(--text-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--stroke-strong); background: #fff; padding: 12px 14px; color: var(--text);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-error { color: var(--danger); font-size: .85rem; min-height: 18px; }

.result-shell { display: grid; gap: 22px; }

.result-cta-hero {
  background: #101414;
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-estimate-block .kicker { color: rgba(255,255,255,.5); margin-bottom: 8px; }
.result-estimate-block .price-range {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.06em;
  line-height: .95;
  margin: 0 0 10px;
}
.result-estimate-block .muted { color: rgba(255,255,255,.4); font-size: .88rem; }
.result-action-block { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 480px; margin: 0 auto; width: 100%; }

.btn-discovery {
  width: 100%;
  min-height: 60px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #111;
  box-shadow: 0 12px 32px rgba(180,240,0,.35);
  letter-spacing: -.01em;
}
.btn-discovery:hover { box-shadow: 0 18px 40px rgba(180,240,0,.48); }
.btn-discovery:disabled { opacity: .65; }

.result-action-block .small-note { color: var(--text-muted); text-align: center; }
.discovery-feedback {
  background: rgba(212,255,102,.14); border: 1px solid rgba(180,240,0,.35);
  border-radius: 12px; padding: 12px 16px; font-size: .9rem; font-weight: 600;
  color: var(--accent-deep); text-align: center; line-height: 1.5;
}

.result-detail-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.price-panel { padding: 22px; border-radius: 22px; border: 1px solid var(--stroke); background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }
.checklist { display: grid; gap: 10px; margin-top: 14px; }
.checklist-item { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-soft); }

.checklist-item .option-check {
  position: relative; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 999px;
  background: linear-gradient(135deg, #cfe86a 0%, #9fcb3b 100%);
  border: 1.5px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0,0,0,.1);
}
.checklist-item .option-check::after {
  content: ""; position: absolute; left: 6px; top: 3px;
  width: 5px; height: 9px;
  border-right: 2px solid #111; border-bottom: 2px solid #111;
  transform: rotate(45deg);
}

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  padding: 12px 18px; border-radius: 14px; background: #101414; color: #fff;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  font-size: .9rem; font-weight: 600; max-width: 320px;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .topbar-inner { min-height: 60px; }
  .options-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .toast { bottom: 110px; right: 16px; left: 16px; max-width: none; text-align: center; }
  .funnel-controls {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    margin: 0;
    padding: 8px;
    border-top: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 200;
    gap: 8px;
    justify-content: stretch;
  }
  .funnel-controls .btn {
    flex: 1;
    min-height: 52px;
    justify-content: center;
    border-radius: 999px;
  }
  .page { padding-bottom: 140px; }
  .page-shell, .estimator-shell { padding: 20px; border-radius: 22px; }
  .result-cta-hero { padding: 22px; border-radius: 20px; }
  .btn-discovery { min-height: 56px; font-size: .96rem; }
  .progress-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-inline-actions .btn { padding: 10px 14px; font-size: .85rem; min-height: 42px; }
}

@media (max-width: 480px) {
  .result-estimate-block .price-range { font-size: 2.2rem; }
  .option-card { min-height: 120px; padding: 16px; }
}
