/* ============================================================
   KWRT - Keywords Research Tool
   Design: Sego/DexignZone Inspired
   Primary: #ea7a9a (rose-pink)  |  Dark: #1a1f2e  |  Accent: #fac7b6
   Font: Poppins (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@600;700&display=swap');

/* ---- RESET WITHIN KWRT ---- */
.kwrt-page, .kwrt-popup-overlay, .kwrt-lead-modal {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #374151;
  line-height: 1.6;
  box-sizing: border-box;
}
.kwrt-page *, .kwrt-popup-overlay *, .kwrt-lead-modal * {
  box-sizing: border-box;
}
.kwrt-mono { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   HERO
   ============================================================ */
.kwrt-hero {
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3450 50%, #1a1f2e 100%);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.kwrt-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(234,122,154,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.kwrt-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(250,199,182,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.kwrt-hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(234,122,154,0.2);
  color: #fac7b6;
  border: 1px solid rgba(234,122,154,0.4);
  border-radius: 30px;
  padding: 6px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.kwrt-hero-title {
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 auto 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 760px;
  position: relative;
}
.kwrt-accent {
  background: linear-gradient(90deg, #fac7b6, #ea7a9a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.kwrt-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 30px;
  font-weight: 400;
  position: relative;
}
.kwrt-stat-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 34px;
  position: relative;
}
.kwrt-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}
.kwrt-stat-lbl {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* ============================================================
   TRUST ROW
   ============================================================ */
.kwrt-trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.kwrt-trust-row span {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

/* ============================================================
   INTRO COPY
   ============================================================ */
.kwrt-intro-col {
  max-width: 740px;
  margin: 0 auto 36px;
  text-align: left;
}
.kwrt-intro-col p {
  font-size: 16px;
  color: #374151;
  line-height: 1.75;
  margin: 0 0 16px;
}
.kwrt-intro-col p:last-child { margin-bottom: 0; }
.kwrt-intro-col strong { color: #1a1f2e; }

/* ============================================================
   POINTER TO TOOL
   ============================================================ */
.kwrt-pointer { text-align: center; margin-bottom: 30px; }
.kwrt-pointer-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c7c4d;
  background: #d1fae5;
  border-radius: 100px;
  padding: 6px 18px;
  margin-bottom: 12px;
}
.kwrt-pointer h2 {
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a1f2e;
  margin: 0 0 8px;
}
.kwrt-pointer p {
  color: #6b7280;
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto;
}
.kwrt-arrow {
  font-size: 22px;
  color: #ea7a9a;
  margin-top: 14px;
}

/* ============================================================
   FORM CARD
   ============================================================ */
.kwrt-form-card {
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.kwrt-form-card-header {
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3450 100%);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.kwrt-form-card-icon {
  font-size: 36px;
  width: 60px; height: 60px;
  background: rgba(234,122,154,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kwrt-form-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
}
.kwrt-form-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

#kwrt-form { padding: 32px; }

/* ---- FORM GRID ---- */
.kwrt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.kwrt-field-full { grid-column: 1 / -1; }

/* ---- FIELD / LABEL ---- */
.kwrt-field { display: flex; flex-direction: column; gap: 7px; }
.kwrt-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kwrt-label-icon { font-size: 15px; }
.kwrt-label-opt { color: #9ca3af; font-weight: 400; font-size: 12px; }
.kwrt-req { color: #ea7a9a; }
.kwrt-hint { font-size: 12px; color: #9ca3af; margin: 0; }

/* ---- INPUTS ---- */
.kwrt-input {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.kwrt-input:focus {
  border-color: #ea7a9a;
  box-shadow: 0 0 0 3px rgba(234,122,154,0.12);
  background: #fff;
}

/* Prefix wrapper */
.kwrt-input-prefix-wrap { display: flex; align-items: center; }
.kwrt-input-prefix {
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 11px 12px;
  font-size: 13px;
  color: #9ca3af;
  white-space: nowrap;
}
.kwrt-input-prefixed { border-radius: 0 10px 10px 0; flex: 1; }

/* ---- RADIO CARDS ---- */
.kwrt-radio-cards { display: flex; gap: 12px; }
.kwrt-radio-card { flex: 1; cursor: pointer; }
.kwrt-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.kwrt-radio-card-inner {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  background: #fafafa;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.kwrt-radio-card-icon { font-size: 24px; }
.kwrt-radio-card-label { font-size: 13px; font-weight: 600; color: #374151; }
.kwrt-radio-card input:checked + .kwrt-radio-card-inner {
  border-color: #ea7a9a;
  background: #fff5f7;
  box-shadow: 0 0 0 3px rgba(234,122,154,0.12);
}

/* ---- LOCATIONS ---- */
.kwrt-location-row { display: flex; gap: 8px; margin-bottom: 10px; }
.kwrt-location-row .kwrt-input { flex: 1; }
.kwrt-remove-loc {
  background: #fee2e2;
  border: none;
  border-radius: 8px;
  color: #ef4444;
  cursor: pointer;
  padding: 0 14px;
  font-size: 18px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.kwrt-remove-loc:hover { background: #fecaca; }
.kwrt-add-loc-btn {
  background: none;
  border: 1.5px dashed #d1d5db;
  border-radius: 10px;
  color: #ea7a9a;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
  width: auto;
}
.kwrt-add-loc-btn:hover { border-color: #ea7a9a; background: #fff5f7; }

/* ---- AI TOGGLE ---- */
.kwrt-ai-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1a1f2e, #2d3450);
  border-radius: 12px;
  padding: 16px 20px;
}
.kwrt-toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.kwrt-toggle-switch input { opacity: 0; width: 0; height: 0; }
.kwrt-toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #4b5563;
  border-radius: 24px;
  transition: 0.3s;
}
.kwrt-toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.kwrt-toggle-switch input:checked + .kwrt-toggle-slider { background: #ea7a9a; }
.kwrt-toggle-switch input:checked + .kwrt-toggle-slider:before { transform: translateX(20px); }
.kwrt-ai-toggle-text strong { display: block; color: #fff; font-size: 14px; font-weight: 600; }
.kwrt-ai-toggle-text span { color: rgba(255,255,255,0.55); font-size: 12px; }

/* ---- FORM FOOTER ---- */
.kwrt-form-footer {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.kwrt-form-note { font-size: 12px; color: #9ca3af; margin: 0; }

/* ---- BUTTONS ---- */
.kwrt-btn-research {
  background: linear-gradient(135deg, #ea7a9a 0%, #d4607e 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(234,122,154,0.35);
  min-width: 220px;
  justify-content: center;
}
.kwrt-btn-research:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(234,122,154,0.45); }
.kwrt-btn-research:disabled { opacity: 0.7; transform: none; cursor: not-allowed; }
.kwrt-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.kwrt-btn-secondary:hover { background: #e5e7eb; }

/* ---- STATUS ---- */
.kwrt-status {
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kwrt-status-loading { background: #eff6ff; color: #2563eb; }
.kwrt-status-loading::before { content: '⏳'; }
.kwrt-status-error { background: #fef2f2; color: #dc2626; }
.kwrt-status-error::before { content: '⚠️'; }
.kwrt-status-warning { background: #fffbeb; color: #d97706; }
.kwrt-status-warning::before { content: '⚠️'; }

/* ============================================================
   LANDING CONTENT (How It Works, Features, Sample Output,
   Industries, Why It Matters, FAQ, CTA)
   ============================================================ */
.kwrt-section { margin: 56px 0; }

.kwrt-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ea7a9a;
  display: block;
  margin-bottom: 8px;
}
.kwrt-section-h2 {
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a1f2e;
  line-height: 1.3;
  margin: 0 0 16px;
}
.kwrt-section-h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1f2e;
  margin: 26px 0 10px;
}
.kwrt-copy { max-width: 740px; }
.kwrt-copy p { color: #374151; margin: 0 0 14px; font-size: 15.5px; line-height: 1.7; }
.kwrt-copy p strong { color: #1a1f2e; }
.kwrt-copy ul, .kwrt-copy ol { padding-left: 22px; color: #374151; margin: 0 0 14px; }
.kwrt-copy li { margin-bottom: 8px; line-height: 1.6; }
.kwrt-copy li strong { color: #1a1f2e; }

.kwrt-divider { border: none; border-top: 1px solid #e5e7eb; margin: 0; }

/* ---- Steps grid (How It Works, post-form) ---- */
.kwrt-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}
.kwrt-step-card {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 20px;
  position: relative;
}
.kwrt-step-card .kwrt-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  color: #fde2e9;
  position: absolute;
  top: 14px; right: 18px;
  line-height: 1;
}
.kwrt-step-icon { font-size: 26px; margin-bottom: 12px; }
.kwrt-step-card h4 { font-size: 15px; font-weight: 700; color: #1a1f2e; margin: 0 0 6px; }
.kwrt-step-card p { font-size: 13.5px; color: #6b7280; margin: 0; line-height: 1.55; }

/* ---- Feature grid ---- */
.kwrt-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}
.kwrt-feature-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}
.kwrt-feature-icon { font-size: 24px; margin-bottom: 10px; display: block; }
.kwrt-feature-title { font-size: 15px; font-weight: 700; color: #1a1f2e; margin-bottom: 6px; }
.kwrt-feature-desc { font-size: 13.5px; color: #6b7280; line-height: 1.6; }

/* ---- Sample output (terminal-style card) ---- */
.kwrt-example {
  background: #1a1f2e;
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0;
}
.kwrt-example-bar {
  background: rgba(255,255,255,0.05);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.kwrt-dot { width: 8px; height: 8px; border-radius: 50%; }
.kwrt-dot-r { background: #ff5f57; }
.kwrt-dot-y { background: #febc2e; }
.kwrt-dot-g { background: #28c840; }
.kwrt-example-bar span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  margin-left: 6px;
  letter-spacing: 0.04em;
}
.kwrt-example-body { padding: 22px 24px; }
.kwrt-example-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  gap: 12px;
}
.kwrt-example-row:last-child { border-bottom: none; }
.kwrt-ex-kw { color: #e2e8f0; }
.kwrt-ex-vol { color: #6ee7b7; font-weight: 700; font-size: 11px; white-space: nowrap; }
.kwrt-ex-diff {
  color: #fac7b6;
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(250,199,182,0.12);
  border-radius: 4px;
  white-space: nowrap;
}

/* ---- Industry chips ---- */
.kwrt-chip-wrap { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 0; }
.kwrt-chip {
  background: #fff0f4;
  color: #d4607e;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 100px;
}
.kwrt-chip-more {
  background: #1a1f2e;
  color: #fac7b6;
}

/* ---- Callouts ---- */
.kwrt-callout {
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 760px;
}
.kwrt-callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.kwrt-callout strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.kwrt-callout p { font-size: 14px; margin: 0; line-height: 1.6; color: inherit; }
.kwrt-callout-primary { background: #fff0f4; border-left: 4px solid #ea7a9a; color: #8a3349; }
.kwrt-callout-primary strong { color: #d4607e; }
.kwrt-callout-success { background: #d1fae5; border-left: 4px solid #059669; color: #064e3b; }
.kwrt-callout-success strong { color: #047857; }

/* ---- Content table ("Why It Matters") -- distinct from the
   popup results .kwrt-table so the two never share styling ---- */
.kwrt-table-wrap {
  overflow-x: auto;
  margin: 20px 0 0;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  max-width: 900px;
}
.kwrt-content-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kwrt-content-table thead th {
  background: #1a1f2e;
  color: #e2e8f0;
  padding: 12px 16px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.kwrt-content-table tbody td { padding: 12px 16px; border-top: 1px solid #e5e7eb; color: #374151; vertical-align: top; }
.kwrt-content-table tbody td:first-child { font-weight: 600; color: #1a1f2e; }
.kwrt-content-table tbody tr:hover td { background: #fafafa; }

/* ---- FAQ accordion ---- */
.kwrt-faq { margin: 20px 0 0; max-width: 900px; }
.kwrt-faq-item { border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.kwrt-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-size: 14.5px;
  font-weight: 700;
  color: #1a1f2e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}
.kwrt-faq-item summary::-webkit-details-marker { display: none; }
.kwrt-faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: #ea7a9a;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 12px;
}
.kwrt-faq-item[open] summary::after { content: '−'; }
.kwrt-faq-answer { padding: 16px 20px 20px; font-size: 14px; color: #374151; line-height: 1.7; }

/* ---- Final CTA ---- */
.kwrt-cta {
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3450 55%, #3a2a52 100%);
  border-radius: 18px;
  padding: 46px 42px;
  text-align: center;
  margin-top: 56px;
}
.kwrt-cta h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 12px; letter-spacing: -0.01em; }
.kwrt-cta p { font-size: 15px; color: rgba(255,255,255,0.65); max-width: 460px; margin: 0 auto 26px; }
.kwrt-cta a {
  display: inline-block;
  background: linear-gradient(135deg, #ea7a9a, #d4607e);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(234,122,154,0.35);
}

/* ============================================================
   POPUP OVERLAY
   ============================================================ */
.kwrt-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.kwrt-popup {
  background: #f4f5f8;
  border-radius: 20px;
  width: 100%;
  max-width: 1360px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  animation: kwrtSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes kwrtSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Popup Header */
.kwrt-popup-header {
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3450 100%);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.kwrt-popup-header-left { display: flex; align-items: center; gap: 14px; }
.kwrt-popup-logo {
  width: 50px; height: 50px;
  background: rgba(234,122,154,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.kwrt-popup-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 3px; }
.kwrt-popup-subtitle { font-size: 12px; color: rgba(255,255,255,0.55); margin: 0; }
.kwrt-popup-header-actions { display: flex; align-items: center; gap: 10px; }
.kwrt-btn-download {
  background: linear-gradient(135deg, #ea7a9a, #d4607e);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(234,122,154,0.3);
}
.kwrt-btn-download:hover { transform: translateY(-1px); }
.kwrt-popup-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.kwrt-popup-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Stats Strip */
.kwrt-stats-strip {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
}
.kwrt-stat-item {
  flex: 1;
  min-width: 120px;
  padding: 16px 20px;
  text-align: center;
  border-right: 1px solid #f3f4f6;
}
.kwrt-stat-item:last-child { border-right: none; }
.kwrt-stat-item-clickable { cursor: pointer; transition: background 0.15s; }
.kwrt-stat-item-clickable:hover { background: #fff5f7; }
.kwrt-stat-value { font-size: 26px; font-weight: 800; color: #1a1f2e; line-height: 1; }
.kwrt-stat-label { font-size: 11px; color: #9ca3af; margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.kwrt-stat-icon { font-size: 18px; margin-bottom: 4px; }

/* Single Chart (full width — replaces the old redundant donut+bar pair) */
.kwrt-chart-section {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 22px 28px;
}
.kwrt-chart-card-full-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.kwrt-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kwrt-chart-hint { font-size: 11.5px; color: #9ca3af; font-style: italic; }
#kwrt-chart-bar { min-height: 220px; }
#kwrt-chart-bar .apexcharts-bar-area { cursor: pointer; }

/* ============================================================
   SIDEBAR TABS + WIDE CONTENT
   Desktop: vertical nav on the left, full-width results on the
   right. Mobile (<900px): collapses to a wrapping pill row above
   a full-width panel -- see media query below.
   ============================================================ */
.kwrt-popup-body { padding: 0; }
.kwrt-results-layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  align-items: start;
}
.kwrt-sidebar-tabs {
  background: #fafafa;
  border-right: 1px solid #e5e7eb;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 580px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.kwrt-tab {
  --tab-color: #ea7a9a;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  text-align: left;
  transition: all 0.15s;
}
.kwrt-tab-icon { font-size: 15px; flex-shrink: 0; }
.kwrt-tab-label { flex: 1; line-height: 1.3; }
.kwrt-tab:hover { background: #fff; color: var(--tab-color); }
.kwrt-tab.active {
  background: #fff;
  color: var(--tab-color);
  border-left-color: var(--tab-color);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.kwrt-tab-count {
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.kwrt-tab.active .kwrt-tab-count { background: var(--tab-color); color: #fff; }

/* Tab Panels (now full-width content next to the sidebar) */
.kwrt-tab-panel { display: none; }
.kwrt-tab-panel.active { display: block; }

.kwrt-panel-section { padding: 22px 28px; }
.kwrt-panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.kwrt-panel-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1f2e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kwrt-panel-kw-count {
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Results table -- intentionally named differently from the static
   landing-page .kwrt-table-wrap so the two never share styling. */
.kwrt-results-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.kwrt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.kwrt-table thead th {
  position: sticky;
  top: 0;
  background: #1a1f2e;
  color: rgba(255,255,255,0.85);
  text-align: left;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  z-index: 1;
}
.kwrt-table tbody tr { transition: background 0.1s; }
.kwrt-table tbody tr:hover { background: #fdf2f5; }
.kwrt-table tbody tr:nth-child(even) { background: #fafafa; }
.kwrt-table tbody tr:nth-child(even):hover { background: #fdf2f5; }
.kwrt-table td { padding: 10px 16px; border-bottom: 1px solid #f3f4f6; }
.kwrt-table td:last-child { border-bottom: none; }
.kwrt-col-no { width: 56px; color: #9ca3af; font-weight: 600; }
.kwrt-col-cat { width: 190px; }
.kwrt-kw-text { font-weight: 500; color: #1a1f2e; }
.kwrt-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: #f3f4f6;
  color: #6b7280;
}

/* ============================================================
   LEAD MODAL
   ============================================================ */
.kwrt-lead-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.7);
  backdrop-filter: blur(4px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kwrt-lead-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: kwrtSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.kwrt-lead-header { text-align: center; margin-bottom: 24px; }
.kwrt-lead-icon {
  font-size: 40px;
  width: 72px; height: 72px;
  background: linear-gradient(135deg, rgba(234,122,154,0.15), rgba(250,199,182,0.15));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.kwrt-lead-header h3 { font-size: 20px; font-weight: 700; color: #1a1f2e; margin: 0 0 8px; }
.kwrt-lead-header p { font-size: 14px; color: #6b7280; margin: 0; }
.kwrt-lead-fields { display: flex; flex-direction: column; gap: 14px; }
#kwrt-lead-status {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Sidebar tabs collapse to a wrapping pill row above the content --
   needs a wider breakpoint than general mobile since a 232px sidebar
   next to a results table needs real horizontal room to make sense. */
@media (max-width: 900px) {
  .kwrt-results-layout { grid-template-columns: 1fr; }
  .kwrt-sidebar-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    max-height: none;
  }
  .kwrt-tab {
    width: auto;
    border-left: none;
    border: 1.5px solid #e5e7eb;
    border-radius: 30px;
  }
  .kwrt-tab.active { border-color: var(--tab-color); background: var(--tab-color); color: #fff; }
  .kwrt-tab.active .kwrt-tab-count { background: rgba(255,255,255,0.25); color: #fff; }
  .kwrt-popup { max-width: 760px; }
}

@media (max-width: 768px) {
  .kwrt-hero { padding: 36px 20px; }
  .kwrt-stat-row { gap: 20px; }
  .kwrt-form-grid { grid-template-columns: 1fr; }
  .kwrt-field-full { grid-column: 1; }
  #kwrt-form { padding: 20px; }
  .kwrt-form-card-header { padding: 20px; flex-direction: column; align-items: flex-start; }
  .kwrt-chart-section { padding: 16px 18px; }
  .kwrt-popup-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .kwrt-popup-header-actions { width: 100%; justify-content: space-between; }
  .kwrt-stats-strip { flex-wrap: wrap; }
  .kwrt-stat-item { flex: 0 0 50%; border-bottom: 1px solid #f3f4f6; }
  .kwrt-radio-cards { flex-direction: column; }
  .kwrt-lead-box { padding: 24px; }
  .kwrt-steps-grid, .kwrt-feature-grid { grid-template-columns: 1fr; }
  .kwrt-cta { padding: 32px 22px; }
  .kwrt-section { margin: 40px 0; }
}
@media (max-width: 600px) {
  .kwrt-popup-overlay { padding: 0; }
  .kwrt-popup { max-width: 100%; min-height: 100%; border-radius: 0; }
  .kwrt-stat-item { flex: 0 0 100%; }
  .kwrt-panel-section { padding: 16px; }
  .kwrt-table thead th, .kwrt-table td { padding: 8px 10px; }
  .kwrt-col-cat { width: 110px; }
}
@media (max-width: 480px) {
  .kwrt-popup { border-radius: 0; }
  .kwrt-popup-header { padding: 16px; }
  .kwrt-popup-title { font-size: 16px; }
  .kwrt-btn-download-label { display: none; }
  .kwrt-btn-download { padding: 9px 12px; }
}
