:root {
  --teal: #2a9d8f; --teal-dark: #228478; --teal-light: #34b8a8;
  --teal-100: #d4efec; --teal-50: #edf8f7;
  --yellow: #ffd600; --yellow-light: #ffe033;
  --navy: #1a2b3c; --navy-dark: #0f1c2a;
  --text-primary: #1a2b3c; --text-secondary: #4a5d72; --text-muted: #7b8e9e;
  --text-on-dark: #e0e8f0; --text-on-dark-muted: #8fa3b8;
  --bg-page: #ffffff; --bg-light: #f7f9fb;
  --border: #dde4eb; --border-light: #eaeff4;
  --shadow-sm: 0 1px 3px rgba(26,43,60,0.05);
  --shadow-md: 0 4px 16px rgba(26,43,60,0.08);
  --shadow-lg: 0 8px 32px rgba(26,43,60,0.1);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max-w: 1100px;
  --star: #f5a623;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.analyzer-maps main.flex-shrink-0 { padding-top: 60px !important; }
body.analyzer-maps main .analyzer-maps-tool {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.analyzer-maps main .analyzer-maps-tool a { color: inherit; text-decoration: none; }
body.analyzer-maps main .analyzer-maps-tool .container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.btn-primary {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  background: var(--yellow); padding: 10px 22px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-family: var(--font-heading);
  text-transform: uppercase; letter-spacing: 0.3px;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--yellow-light); color: var(--text-primary); transform: translateY(-1px); }
.btn-primary:focus,
.btn-primary:active { color: var(--text-primary); }
.btn-primary:focus { outline: none; box-shadow: 0 0 0 3px rgba(42,157,143,0.18); }
body.analyzer-maps main .analyzer-maps-tool .btn-primary,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:visited,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:hover,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:focus,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:active,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:not(:disabled):not(.disabled):active,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:not(:disabled):not(.disabled).active,
body.analyzer-maps main .analyzer-maps-tool .show > .btn-primary.dropdown-toggle {
  background-color: var(--yellow) !important;
  border-color: var(--yellow) !important;
  color: var(--text-primary) !important;
}
body.analyzer-maps main .analyzer-maps-tool .btn-primary:hover {
  background-color: var(--yellow-light) !important;
  border-color: var(--yellow-light) !important;
}
body.analyzer-maps main .analyzer-maps-tool .btn-primary:focus,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:active:focus,
body.analyzer-maps main .analyzer-maps-tool .btn-primary:not(:disabled):not(.disabled):active:focus {
  box-shadow: 0 0 0 3px rgba(42,157,143,0.18) !important;
}
body.analyzer-maps main .analyzer-maps-tool a.btn-primary,
body.analyzer-maps main .analyzer-maps-tool a.btn-primary:visited,
body.analyzer-maps main .analyzer-maps-tool a.btn-primary:hover,
body.analyzer-maps main .analyzer-maps-tool a.btn-primary:focus,
body.analyzer-maps main .analyzer-maps-tool a.btn-primary:active {
  color: var(--text-primary) !important;
}
.btn-lg { font-size: 15px; padding: 14px 28px; }

/* Entry form (direct visits + second searches) */
.entry-section { padding: 72px 0 90px; background: var(--bg-page); border-bottom: 1px solid var(--border-light); }
.entry-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.entry-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal);
  margin-bottom: 14px;
}
.entry-eyebrow svg { width: 15px; height: 15px; }
.entry-inner h1 {
  font-family: var(--font-heading); font-size: 34px; font-weight: 800;
  letter-spacing: -0.8px; line-height: 1.2; margin-bottom: 12px;
}
.entry-inner .entry-sub { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; }
.entry-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.entry-form .field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 5px;
}
.entry-form .field-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 6px 0 0; }
.entry-form input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 16px; outline: none;
  transition: border-color 0.2s; background: var(--bg-page);
}
.entry-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,0.12); }
.entry-form button { justify-content: center; padding: 15px 24px; margin-top: 6px; width: 100%; }
.entry-fine { font-size: 12.5px; color: var(--text-muted); margin-top: 14px; }
.entry-error { display: none; font-size: 13px; color: #dc3545; margin-top: 10px; }

/* Page header / back link */
.page-header-inner { display: flex; align-items: center; justify-content: space-between; }
.back-link {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.back-link:hover { color: var(--teal); }

/* Context bar */
.context-bar {
  background: var(--teal-50); border-bottom: 1px solid var(--teal-100); padding: 12px 0;
}
.context-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--text-secondary);
}
.context-bar-inner strong { color: var(--text-primary); }
.context-new-search { color: var(--teal); font-weight: 600; white-space: nowrap; }
.context-new-search:hover { text-decoration: underline; }

/* Results intro band (orient -> diagnose -> direct) */
.results-intro-band {
  background: var(--bg-page); border-bottom: 1px solid var(--border-light);
  padding: 28px 0 24px;
}
.results-intro-band .ri-welcome {
  font-family: var(--font-heading); font-size: 24px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 6px; line-height: 1.25;
}
.results-intro-band .ri-welcome .keyword { color: var(--teal); }
.results-intro-band .ri-finding {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 16px; max-width: 760px;
}
.results-intro-band .ri-finding strong { color: var(--text-primary); }
.ri-opportunity {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: 18px;
  max-width: 760px;
}
.ri-opportunity svg { flex-shrink: 0; margin-top: 2px; color: var(--teal); }
.ri-opportunity .ri-opp-text { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.ri-opportunity .ri-opp-text strong { color: var(--text-primary); }
.ri-steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 13px; color: var(--text-muted);
}
.ri-steps .ri-step { display: inline-flex; align-items: center; gap: 6px; }
.ri-steps .ri-step .ri-step-num { color: var(--teal); font-weight: 700; font-family: var(--font-heading); }
.ri-steps .ri-arrow { color: var(--border); }

/* Main layout */
.results-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  padding: 32px 0 80px; align-items: start;
}

/* Maps result cards (local-pack visual language, mirrors the /local hero mock) */
.maps-result {
  background: var(--bg-page); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 10px; position: relative;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.25s;
}
.maps-result:hover { border-color: var(--teal-100); }
.maps-result.you {
  border-color: var(--teal); background: var(--teal-50);
  box-shadow: 0 6px 20px -8px rgba(42,157,143,0.35);
}
.maps-you-badge {
  position: absolute; top: -1px; right: 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 0 0 6px 6px;
  background: var(--teal); color: #fff;
}
.maps-pos-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-light); border: 1px solid var(--border);
  font-family: var(--font-heading); font-size: 14px; font-weight: 700;
  color: var(--text-secondary); flex-shrink: 0;
}
.maps-result.in-pack .maps-pos-badge { background: var(--navy); border-color: var(--navy); color: var(--yellow); }
.maps-result.you .maps-pos-badge,
.maps-result.you.in-pack .maps-pos-badge { background: var(--teal); border-color: var(--teal); color: #fff; }
.maps-biz { flex: 1; min-width: 0; }
.maps-biz-name { display: block; font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.3; margin-bottom: 2px; }
.maps-biz-meta { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.maps-biz-meta .stars { color: var(--star); letter-spacing: 0.5px; font-size: 13px; }
.maps-biz-meta .dot { color: var(--border); }
.maps-biz-domain { display: block; font-size: 12.5px; color: var(--teal-dark); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maps-result.you .maps-biz-domain { font-weight: 600; }

/* Map-pack zone label + cutoff divider */
.pack-zone-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--navy);
  margin-bottom: 10px;
}
.pack-zone-label .zl-chip { background: var(--yellow); border-radius: 5px; padding: 1px 8px; }
.pack-cutoff {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; font-size: 12.5px; font-weight: 700;
  font-family: var(--font-heading); letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-muted);
}
.pack-cutoff::before, .pack-cutoff::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 16px); }
.pack-cutoff .cut-label { display: inline-flex; align-items: center; gap: 6px; }
.pack-cutoff svg { color: var(--text-muted); }
.maps-gap-note { text-align: center; font-size: 12.5px; color: var(--text-muted); padding: 4px 0 12px; }

/* Ghost stack + lock banner */
.maps-ghost-stack { position: relative; margin-top: 4px; }
.maps-ghost {
  background: var(--bg-page); border: 2px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 10px; padding: 16px 20px; position: relative; overflow: hidden; user-select: none;
  display: flex; align-items: center; gap: 16px;
}
.maps-ghost .g-badge { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-light); border: 1px solid var(--border); flex-shrink: 0; }
.maps-ghost .g-name { display: block; font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text-primary); filter: blur(5px); letter-spacing: 0.5px; margin-bottom: 4px; }
.maps-ghost .g-meta { display: block; font-size: 13px; color: var(--text-secondary); filter: blur(4px); letter-spacing: 0.3px; }
.maps-ghost:nth-of-type(1) { opacity: 0.9; }
.maps-ghost:nth-of-type(2) { opacity: 0.7; }
.maps-ghost:nth-of-type(3) { opacity: 0.5; }
.maps-locked {
  position: relative; z-index: 2; margin-top: -34px;
  display: flex; align-items: center; gap: 20px; padding: 22px 26px;
  background: linear-gradient(135deg, var(--navy) 0%, #253b51 100%);
  border: 2px solid var(--teal); border-radius: var(--radius-md);
  box-shadow: 0 18px 36px -12px rgba(26,43,60,0.35); color: #fff;
}
.maps-locked-icon {
  width: 48px; height: 48px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); border-radius: 50%; color: #fff;
}
.maps-locked-body { flex: 1; min-width: 0; }
.maps-locked-headline { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 4px; }
.maps-locked-headline .count { color: var(--yellow); }
.maps-locked-sub { font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.5; margin: 0; }
.maps-locked .btn-primary { flex-shrink: 0; white-space: nowrap; padding: 12px 20px; font-size: 14px; }

/* Not-found panel */
.notfound-panel {
  background: var(--bg-page); border: 2px solid var(--yellow);
  border-radius: var(--radius-lg); padding: 28px 30px; margin-bottom: 24px;
}
.notfound-panel .nf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.notfound-panel .nf-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: #fff6d6; border: 1px solid #f0d68a; color: #a07d10;
  display: inline-flex; align-items: center; justify-content: center;
}
.notfound-panel h2 { font-family: var(--font-heading); font-size: 20px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.3; margin: 0; }
.notfound-panel h2 .nf-domain { color: var(--teal); }
.notfound-panel p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 10px; }
.notfound-panel p strong { color: var(--text-primary); }
.notfound-panel p:last-child { margin-bottom: 0; }

/* Summary panel */
.summary-panel {
  background: var(--bg-page); border: 2px solid var(--teal);
  border-radius: var(--radius-lg); padding: 28px;
  position: sticky; top: 80px;
}
.summary-panel h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.summary-bigstat { text-align: center; padding: 14px 0 18px; }
.summary-bigstat .big-num { font-family: var(--font-heading); font-size: 52px; font-weight: 800; line-height: 1; color: var(--teal); letter-spacing: -1.5px; }
.summary-bigstat .big-label { font-size: 13px; color: var(--text-secondary); margin-top: 6px; line-height: 1.5; }
.summary-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; gap: 12px;
}
.summary-stat:last-of-type { border-bottom: none; }
.summary-stat-label { color: var(--text-secondary); }
.summary-stat-value { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); text-align: right; }
.summary-stat-value.teal { color: var(--teal); }
.summary-note { font-size: 13px; color: var(--text-secondary); line-height: 1.6; background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; }
.summary-note strong { color: var(--text-primary); }
.summary-divider { height: 1px; background: var(--border-light); margin: 16px 0; }
.summary-cta { margin-top: 18px; }
.summary-cta .btn-primary { width: 100%; justify-content: center; padding: 14px 24px; font-size: 15px; }
.summary-fine-print { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 8px; line-height: 1.5; }

/* Proximity note */
.how-note {
  background: var(--teal-50); border: 1px solid var(--teal-100);
  border-radius: var(--radius-md); padding: 20px 24px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.how-note strong { color: var(--text-primary); }

/* How It Works */
.how-section {
  padding: 60px 0; background: var(--bg-page);
  border-top: 1px solid var(--border-light);
}
.how-section h2 {
  font-family: var(--font-heading); font-size: 28px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.how-section .how-subtitle {
  font-size: 15px; color: var(--text-secondary); margin-bottom: 36px;
  max-width: 640px;
}
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.how-step {
  background: var(--bg-page); border: 1px solid var(--border);
  border-top: 3px solid var(--teal); border-radius: var(--radius-md);
  padding: 28px 24px;
}
.how-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 14px; font-weight: 800;
  margin-bottom: 14px;
}
.how-step h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.how-step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Email gate */
.email-gate {
  max-width: 500px; margin: 80px auto;
  background: var(--bg-page); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  text-align: center;
}
.email-gate h2 {
  font-family: var(--font-heading); font-size: 24px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.email-gate .gate-keyword {
  font-size: 17px; color: var(--teal); font-weight: 700;
  font-family: var(--font-heading); margin-bottom: 16px; line-height: 1.4;
}
.email-gate p {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 24px;
}
.email-gate .gate-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.email-gate .gate-form input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 16px; outline: none;
  transition: border-color 0.2s;
}
.email-gate .gate-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,157,143,0.12);
}
.email-gate .gate-form button { padding: 14px 24px; white-space: nowrap; justify-content: center; }
.email-gate .gate-fine-print { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.gate-wrap { position: relative; max-width: 760px; margin: 32px auto 64px; }
.gate-wrap .email-gate { position: relative; z-index: 2; margin: 0 auto; box-shadow: var(--shadow-lg); }
.gate-preview {
  filter: blur(5px); opacity: 0.55; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  max-height: 320px; overflow: hidden; margin-bottom: -270px;
}
.gate-preview .maps-result { cursor: default; }
.gate-proof {
  position: relative; z-index: 3; text-align: center;
  font-size: 13px; color: var(--text-muted); margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.gate-proof strong { color: var(--text-secondary); font-weight: 700; }
.gate-proof .stars { color: var(--star); letter-spacing: 1px; }

/* Loading + slow-load warning */
.loading { text-align: center; padding: 80px 0; display: none; }
.loading-text { font-size: 16px; color: var(--text-muted); margin-top: 12px; }
.analyzer-loading-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto;
}
.analyzer-loading-main .spinner { margin: 0 auto; }
.analyzer-loading-warning[hidden] { display: none !important; }
.analyzer-loading-warning { width: 100%; }
.analyzer-warning-card {
  background: var(--bg-page);
  border: 2px solid #f0d68a;
  border-radius: 12px;
  padding: 20px 22px;
  text-align: left;
}
.analyzer-warning-card h2 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.analyzer-warning-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 16px;
}
.analyzer-warning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-secondary);
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--teal);
  background: rgba(42, 157, 143, 0.06);
}
.analyzer-error-flow { text-align: center; padding: 20px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--teal); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}

/* Final CTA */
.final-cta {
  padding: 60px 0; text-align: center;
  background: linear-gradient(170deg, #edf8f7 0%, #f0faf6 50%, #fef9ed 100%);
  border-top: 1px solid var(--border-light);
}
.final-cta h2 { font-family: var(--font-heading); font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.final-cta p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }
.final-cta .btn-primary { font-size: 15px; padding: 14px 28px; }
.final-cta .fine-print { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* Responsive */
@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .summary-panel { position: static; }
  .how-steps { grid-template-columns: 1fr; }
  .entry-inner h1 { font-size: 27px; }
}
@media (max-width: 640px) {
  .maps-locked { flex-direction: column; text-align: center; gap: 14px; }
  .maps-locked .btn-primary { width: 100%; justify-content: center; }
  .page-header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .context-bar-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .notfound-panel .nf-head { align-items: flex-start; }
}
