.tool-page {
  padding: 40px 0 100px;
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%), #0a0e1a;
  color: #f1f5f9;
}

.roi-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  margin-bottom: 60px;
  align-items: start;
}

@media (max-width: 1024px) {
  .roi-container { grid-template-columns: 1fr; }
}

/* ── Mini CTA Bar ──────────────────────────────────────────── */
.mini-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 999px;
  padding: 8px 20px;
  margin: -28px auto 28px;
  max-width: 560px;
  flex-wrap: wrap;
}
.mini-cta-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.mini-cta-text strong { color: var(--text-primary); font-weight: 700; }
.mini-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-primary);
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s, transform .2s;
  line-height: 1;
}
.mini-cta-link:hover { opacity: .88; transform: scale(1.03); }

/* ── Panels ─────────────────────────────────────────── */
.panel {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.panel:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.panel-header {
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.panel-body {
  padding: 30px 24px;
}

/* ── Inputs ─────────────────────────────────────────── */
.input-group { margin-bottom: 24px; }
.input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.input-label .badge {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #64748b;
}

.theme-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.theme-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-suffix {
  position: absolute;
  right: 14px;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.theme-input-with-suffix { padding-right: 48px; }

/* ── Result Cards ───────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.result-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.result-card.primary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.05));
  border-color: rgba(59, 130, 246, 0.2);
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.result-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.result-card.positive .result-value { color: #10b981; }
.result-card.primary .result-value { color: #3b82f6; }

/* ── ROI Chart ── */
.chart-container {
  height: 280px;
  margin-bottom: 24px;
  position: relative;
}

/* ── Funnel System ── */
.funnel-viz {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 32px;
}

.funnel-stage {
    position: relative;
    height: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-radius: 12px;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.funnel-stage.s1 { width: 100%; border-left: 4px solid #3b82f6; }
.funnel-stage.s2 { width: 90%;  border-left: 4px solid #60a5fa; }
.funnel-stage.s3 { width: 80%;  border-left: 4px solid #93c5fd; }
.funnel-stage.s4 { width: 70%;  border-left: 4px solid #bfdbfe; }
.funnel-stage.s5 { width: 60%;  border-left: 4px solid #10b981; background: rgba(16, 185, 129, 0.05); }

.stage-label {
    flex: 1;
}
.stage-name { font-size: 0.75rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.stage-val { font-size: 1.1rem; font-weight: 800; color: #fff; }

.stage-meta {
    text-align: right;
}
.stage-pct { font-size: 0.85rem; font-weight: 800; color: #3b82f6; }
.stage-desc { font-size: 0.65rem; color: #64748b; font-weight: 600; }

/* ── Benchmarks ── */
.roi-performance {
    margin-top: 24px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
}
.perf-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.perf-title { font-size: 0.75rem; font-weight: 700; color: #94a3b8; }
.perf-status { font-size: 0.75rem; font-weight: 800; color: #10b981; }

.perf-bar-bg { height: 6px; background: rgba(255,255,255,0.05); border-radius: 10px; position: relative; overflow: hidden; }
.perf-bar-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--gradient-primary); border-radius: 10px; transition: width 1s ease; }

/* ── Animations ── */
@keyframes update-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); filter: brightness(1.2); }
    100% { transform: scale(1); }
}

.update-pulse {
    animation: update-pulse 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── SEO Content Block ────────────────────────────────────────── */
.seo-content-block {
  max-width: 800px;
  margin: 64px auto 0;
}
.seo-content-block h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 52px 0 24px;
  padding-left: 18px;
  position: relative;
  letter-spacing: -.02em;
}
.seo-content-block h2::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #7c3aed, #a78bfa);
}
.seo-content-block h2:first-of-type { margin-top: 12px; }
.seo-content-block h3 {
  font-size: .97rem;
  font-weight: 700;
  color: #c4b5fd;
  margin: 28px 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: .01em;
}
.seo-content-block h3::before {
  content: '';
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 8px rgba(124,58,237,.5);
  flex-shrink: 0;
}
.seo-content-block p {
  color: rgba(255,255,255,.62);
  line-height: 1.85;
  margin-bottom: 14px;
  font-size: .94rem;
}
.seo-content-block ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seo-content-block ul li {
  position: relative;
  padding-left: 22px;
  color: rgba(255,255,255,.62);
  line-height: 1.8;
  font-size: .94rem;
}
.seo-content-block ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 6px rgba(124,58,237,.4);
}
.seo-content-block ul li strong { color: var(--text-primary); font-weight: 700; }
.seo-content-block p strong { color: var(--text-primary); font-weight: 700; }
.seo-content-block p a { color: #a78bfa; text-underline-offset: 3px; }
.seo-content-block p a:hover { color: #c4b5fd; }
.seo-content-block p code,
.seo-content-block li code {
  background: rgba(124,58,237,.13);
  border: 1px solid rgba(124,58,237,.22);
  border-radius: 5px;
  padding: 1px 7px;
  font-size: .82rem;
  color: #c4b5fd;
  font-family: 'Courier New', monospace;
}

/* ── FAQ Accordion ─────────────────────────────────────────── */
.faq-list { 
  margin-top: 24px; 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(10px);
}
.faq-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(17, 24, 39, 0.6);
}
.faq-item.open {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  user-select: none;
  transition: all 0.2s;
}
.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1;
}
.faq-item.open .faq-icon {
  border-color: var(--accent-purple);
  color: #fff;
  background: var(--accent-purple);
  transform: rotate(45deg);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { 
  max-height: 800px; 
  padding: 0 28px 28px; 
}
.faq-answer code {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .83rem;
  font-family: 'Courier New', monospace;
}
