/* ====================================================
   AUDIT BOT STYLES
   ==================================================== */

/* ── Free Tool Popup ── */
.free-tool-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.free-tool-overlay--in { opacity: 1; }

.free-tool-popup {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 901;
  width: 320px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.free-tool-popup--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.free-tool-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.free-tool-close:hover { color: #374151; }
.free-tool-emoji {
  font-size: 32px;
  margin-bottom: 10px;
}
.free-tool-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 10px;
  line-height: 1.3;
}
.free-tool-body {
  font-size: 13.5px;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 20px;
}
.free-tool-cta {
  width: 100%;
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.free-tool-cta:hover { background: #1D4ED8; }

@media (max-width: 480px) {
  .free-tool-popup {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* Navbar full-width on audit pages — covers the full viewport so content
   can't bleed through the sides when scrolling */
.audit-body .navbar {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  transform: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

/* No longer needed with full-width navbar */
.audit-body::before { display: none; }

/* Constrain nav content and lock height so results-tabs top: 60px always aligns */
.audit-body .nav-container {
  max-width: 1100px;
  margin: 0 auto;
  height: 60px;
}

/* Nav action buttons (New Audit / Export Report) */
#navRight {
  display: flex;
  align-items: center;
  gap: 8px;
}
#navRight .btn-outline,
#navRight .btn-primary {
  font-size: 12.5px;
  padding: 7px 16px;
}

.audit-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: linear-gradient(160deg, #fff 0%, #EEF2FF 45%, #E8EFFF 100%);
  min-height: 100vh;
  color: #0F172A;
}

.audit-app {
  padding-top: 68px;
}

.audit-step {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.audit-step.active {
  display: block;
}

/* Typography & Layout */
.badge-blue {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2563EB;
  animation: pulse 2s infinite;
}
.badge-blue span {
  font-size: 13px; color: #2563EB; font-weight: 600;
}

.audit-h1 {
  font-weight: 800; font-size: 42px; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px;
}
.text-blue { color: #2563EB; }
.audit-sub {
  color: #64748B; font-size: 16px; line-height: 1.7; max-width: 420px; margin: 0 auto;
}
.input-header { text-align: center; margin-bottom: 48px; }

/* Form Card */
.form-card {
  background: #fff;
  border: 1px solid #E8ECF8;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(37,99,235,0.08);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group label {
  font-size: 13px; font-weight: 700; color: #374151; display: flex; align-items: baseline; gap: 5px;
}
.field-group .note { font-size: 12px; color: #94A3B8; font-weight: 400; }
.inp {
  background: #F8FAFC; border: 1.5px solid #E2E8F0; color: #0F172A;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; padding: 11px 14px;
  border-radius: 10px; width: 100%; outline: none; transition: all 0.18s;
}
.inp:focus {
  border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); background: #fff;
}
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 15px; color: #94A3B8; display: flex; align-items: center; }
.inp-icon { padding-left: 38px; }

.btn-full { width: 100%; padding: 14px; font-size: 15px; }
.btn-primary, .btn-outline { border-radius: 100px; }
.audit-footer-note { text-align: center; font-size: 12px; color: #94A3B8; }
.audit-error { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; padding: 12px 16px; color: #DC2626; font-size: 13px; }

/* Analyzing Step */
.analyzing-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72vh; gap: 24px; text-align: center; }
.spinner-wrapper { position: relative; width: 80px; height: 80px; margin: 0 auto; }
.spinner-circle { animation: spin 1.1s linear infinite; transform-origin: 40px 40px; stroke-dasharray: 50 164; }
.spinner-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; }
.analyzing-title { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 6px; }
.analyzing-url { color: #64748B; font-size: 14px; max-width: 360px; word-break: break-all; margin: 0 auto; }
.analyzing-steps { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 4px; }
.a-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #94A3B8; transition: color 0.2s; }
.a-step.step-done    { color: #059669; }
.a-step.step-active  { color: #2563EB; }
.a-step.step-pending { color: #CBD5E1; }
.step-icon-char { width: 14px; display: inline-block; text-align: center; font-size: 12px; font-weight: 700; }
.progress-bar-wrap { width: 220px; height: 4px; background: #EEF2FF; border-radius: 100px; overflow: hidden; margin: 0 auto 8px; }
.progress-bar-fill { height: 100%; background: #2563EB; border-radius: 100px; width: 0%; transition: width 0.6s ease; }
.countdown-text { font-size: 13px; color: #94A3B8; }

/* Gate & Shared Cards */
.gate-container { max-width: 540px; margin: 0 auto; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.white-card { background: #fff; border: 1px solid #E8ECF8; border-radius: 14px; box-shadow: 0 1px 3px rgba(37,99,235,0.04), 0 4px 16px rgba(37,99,235,0.04); }
.score-card { padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.score-card svg { flex-shrink: 0; }
.score-ring { transform: rotate(-90deg); transform-origin: 36px 36px; transition: stroke-dasharray 1s ease-out; }
.score-text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 16px; }
.score-label { font-size: 12px; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.score-val { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 2px; }
.score-sub { font-size: 12px; color: #94A3B8; }

.p-24 { padding: 24px; }
.mb-10 { margin-bottom: 10px; } .mb-12 { margin-bottom: 12px; } .mb-14 { margin-bottom: 14px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mt-16 { margin-top: 16px; }
.field-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #94A3B8; }
.text-body { font-size: 14.5px; line-height: 1.75; color: #374151; }

.gate-counts { display: flex; gap: 10px; margin-bottom: 28px; }
.count-box { flex: 1; border-radius: 12px; padding: 16px; text-align: center; border: 1.5px solid transparent; }
.count-val { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.count-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; }

.sev-critical { background: #FEF2F2; border-color: #FECACA; color: #DC2626; }
.sev-medium { background: #FFFBEB; border-color: #FDE68A; color: #D97706; }
.sev-low { background: #F0FDF4; border-color: #BBF7D0; color: #059669; }

.clickable-counts .count-box { cursor: pointer; transition: transform 0.15s; }
.clickable-counts .count-box:hover { transform: translateY(-2px); }

.gate-unlock { padding: 28px 32px; text-align: center; }
.gate-icon { font-size: 22px; margin-bottom: 10px; }
.gate-title { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 8px; }
.gate-desc { font-size: 14px; color: #64748B; line-height: 1.65; margin-bottom: 24px; }
.gate-form { display: flex; gap: 8px; }
.gate-form .btn-primary { font-size: 13px; padding: 10px 18px; white-space: nowrap; }
.gate-form input { flex: 1; }
.gate-note { font-size: 12px; color: #94A3B8; margin-top: 10px; }

/* Results Tabs */
.results-tabs { background: #F8FAFC; border-bottom: 1px solid #E8ECF8; position: sticky; top: 60px; z-index: 90; padding: 8px 24px; }
.tabs-container { display: flex; gap: 2px; max-width: 900px; margin: 0 auto; background: #fff; border: 1.5px solid #E8ECF8; border-radius: 100px; padding: 4px; width: fit-content; box-shadow: 0 1px 6px rgba(37,99,235,0.07); }
.tab { background: transparent; border: none; border-radius: 100px; color: #94A3B8; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 13px; padding: 6px 16px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tab-active { color: #2563EB !important; background: #EFF6FF !important; }
.tab:hover:not(.tab-active) { color: #374151; background: #F8FAFC; }
.tab-pane { display: none; opacity: 0; transition: opacity 0.18s cubic-bezier(0.23, 1, 0.32, 1); }
.tab-pane.active { display: block; }
.tab-pane.tab-visible { opacity: 1; }
.results-content { max-width: 900px; margin: 0 auto; padding: 32px 24px; }

/* Overview Tab */
.overview-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.store-name-val { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; margin-bottom: 5px; }
.store-url-val { font-size: 11px; color: #94A3B8; word-break: break-all; font-family: monospace; }
.overview-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.text-green { color: #059669; } .text-blue { color: #2563EB; }
.strengths-list, .wins-list { display: flex; flex-direction: column; gap: 10px; }
.strength-item, .win-item { display: flex; gap: 10px; align-items: flex-start; }
.strength-dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; margin-top: 6px; flex-shrink: 0; }
.win-num { width: 20px; height: 20px; background: #EFF6FF; color: #2563EB; border-radius: 50%; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }

/* Issues Tab */
.filters { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-pill { background: #fff; border: 1.5px solid #E2E8F0; color: #64748B; font-size: 12.5px; font-weight: 500; padding: 5px 13px; border-radius: 100px; cursor: pointer; transition: all 0.15s; font-family: 'Plus Jakarta Sans', sans-serif; }
.filter-pill.active { font-weight: 700; }
.filter-pill.active[data-sev="all"], .filter-pill.active[data-cat="all"] { border-color: #2563EB; color: #2563EB; background: #EFF6FF; }
.filter-pill.pill-critical.active { border-color: #DC2626; color: #DC2626; background: #FEF2F2; }
.filter-pill.pill-medium.active { border-color: #D97706; color: #D97706; background: #FFFBEB; }
.filter-pill.pill-low.active { border-color: #059669; color: #059669; background: #F0FDF4; }
.filter-pill.pill-cat1.active { border-color: #2563EB; color: #2563EB; background: #EFF6FF; }
.filter-pill.pill-cat2.active { border-color: #7C3AED; color: #7C3AED; background: #F5F3FF; }
.filter-pill.pill-cat3.active { border-color: #D97706; color: #D97706; background: #FFFBEB; }
.filter-pill.pill-cat4.active { border-color: #0891B2; color: #0891B2; background: #ECFEFF; }
.filter-divider { width: 1px; background: #E2E8F0; margin: 0 4px; }

.issues-list { display: flex; flex-direction: column; gap: 8px; }
.issue-card { background: #fff; border: 1.5px solid #E8ECF8; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.issue-card:hover { border-color: #BFDBFE; box-shadow: 0 2px 12px rgba(37,99,235,0.08); }
.issue-card.open { border-color: #2563EB !important; box-shadow: 0 2px 16px rgba(37,99,235,0.1) !important; }
.issue-head { padding: 15px 20px; display: flex; align-items: center; gap: 12px; }
.issue-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.issue-title-area { flex: 1; min-width: 0; }
.issue-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.issue-card.open .issue-title { margin-bottom: 0; }
.issue-prob-trunc { font-size: 13px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-tags { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 100px; font-weight: 700; border: 1px solid transparent; }
.tag-cat { background: #F8FAFC; color: #64748B; font-weight: 600; }
.issue-arrow { color: #CBD5E1; font-size: 12px; margin-left: 2px; }

.issue-body { border-top: 1px solid #F1F5F9; padding: 20px; display: none; cursor: default; opacity: 0; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
.issue-card.open .issue-body { display: block; }
.issue-card.open .issue-body.body-visible { opacity: 1; }
.issue-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.issue-sect-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #94A3B8; margin-bottom: 7px; }
.issue-sect-title.text-green { color: #059669; }
.issue-sect-text { font-size: 13.5px; color: #374151; line-height: 1.6; }
.where-tag { font-size: 12.5px; background: #EFF6FF; color: #2563EB; padding: 4px 12px; border-radius: 100px; font-weight: 600; display: inline-block; }
.code-block { border-radius: 8px; padding: 10px 14px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; margin-bottom: 14px; }
.code-bad { background: #FEF2F2; border: 1px solid #FECACA; color: #7F1D1D; }
.code-good { background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D; margin-bottom: 0; }

.fix-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.copy-btn { background: #F8FAFC; border: 1.5px solid #E2E8F0; color: #64748B; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 100px; cursor: pointer; transition: all 0.18s; white-space: nowrap; }
.copy-btn:hover { border-color: #2563EB; color: #2563EB; background: #EFF6FF; }
.copy-done { background: #F0FDF4 !important; border-color: #10B981 !important; color: #059669 !important; }

/* Checklist Tab */
.fixes-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.text-body-sm { color: #64748B; font-size: 14px; }
.fixes-list { display: flex; flex-direction: column; gap: 10px; }
.fix-card { padding: 18px 22px; }
.fix-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.fix-card-title { font-weight: 700; font-size: 14px; margin-bottom: 0; }

.checklist-progress-bar-wrap { height: 5px; background: #E2E8F0; border-radius: 100px; width: 240px; overflow: hidden; }
.checklist-progress-bar { height: 100%; background: #10B981; border-radius: 100px; transition: width 0.35s ease; }

.fix-check-wrap { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; flex: 1; min-width: 0; }
.fix-checkbox { width: 17px; height: 17px; accent-color: #059669; cursor: pointer; flex-shrink: 0; margin-top: 2px; }

.fix-done { border-left: 3px solid #10B981 !important; }
.fix-done .fix-card-title { text-decoration: line-through; color: #94A3B8; }
.fix-done .code-block { opacity: 0.45; }

/* Report PDF */
.report-container { max-width: 1040px; margin: 0 auto; padding: 32px 32px 80px; }
.report-actions { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.report-actions .btn-primary { white-space: nowrap; font-size: 13px; padding: 10px 20px; }
.report-doc { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #E8ECF8; box-shadow: 0 4px 24px rgba(37,99,235,0.08); }
.report-head { background: linear-gradient(135deg,#1E40AF 0%,#2563EB 60%,#3B82F6 100%); padding: 44px 56px; color: #fff; }
.report-head-flex { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.report-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 10px; }
.report-store { font-weight: 800; font-size: 28px; letter-spacing: -0.02em; margin-bottom: 6px; }
.report-meta { font-size: 12px; color: rgba(255,255,255,0.55); font-family: monospace; }
.report-prep { font-size: 10px; color: rgba(255,255,255,0.45); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px; }
.report-agency { font-weight: 800; font-size: 18px; }
.report-stats { display: flex; gap: 12px; }
.stat-box { flex: 1; background: rgba(255,255,255,0.12); border-radius: 12px; padding: 18px 16px; text-align: center; }
.stat-val { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 4px; font-weight: 600; }
.report-body { padding: 44px 56px; }
.r-section { margin-bottom: 34px; }
.r-sect-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.r-sect-bar { width: 3px; height: 18px; border-radius: 2px; }
.r-sect-title { font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.r-win { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #F1F5F9; }
.r-win:last-child { border-bottom: none; }
.r-issue-card { border-radius: 12px; padding: 20px 24px; margin-bottom: 12px; border: 1.5px solid transparent; }
.r-issue-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.r-issue-prob { font-size: 13.5px; color: #4B5563; line-height: 1.65; margin-bottom: 12px; }
.report-foot { background: #F8FAFC; border-top: 1px solid #E8ECF8; padding: 20px 56px; display: flex; justify-content: space-between; align-items: center; }

/* Competitor Feature */
.comp-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; gap: 16px; text-align: center; color: #64748B; font-size: 14px; line-height: 1.6; }
@keyframes comp-spin { to { transform: rotate(360deg); } }
.comp-spin { animation: comp-spin 1s linear infinite; transform-origin: center; display: block; }

/* Gate teaser */
.comp-teaser-finding { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #94A3B8; padding: 12px 16px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; }
.comp-locked-card { padding: 18px 20px; }
.comp-locked-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 12px; }
.comp-locked-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.comp-locked-sub { font-size: 12.5px; color: #64748B; }
.comp-locked-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; background: #F1F5F9; color: #94A3B8; padding: 3px 9px; border-radius: 100px; flex-shrink: 0; }
.comp-locked-rows { display: flex; flex-direction: column; gap: 8px; }
.comp-locked-row { display: grid; grid-template-columns: 90px 48px 1fr 1fr; align-items: center; gap: 8px; }
.comp-locked-label { font-size: 12px; font-weight: 600; color: #94A3B8; }
.comp-locked-you { font-size: 14px; font-weight: 800; color: #0F172A; text-align: center; }
.comp-blur-val { height: 18px; background: #E2E8F0; border-radius: 4px; filter: blur(4px); }

/* Competitors results tab */
.comp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.comp-table th, .comp-table td { padding: 11px 14px; text-align: center; }
.comp-th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #94A3B8; border-bottom: 2px solid #F1F5F9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-th-label { width: 120px; }
.comp-th-you { background: #EFF6FF; color: #2563EB; border-radius: 8px 8px 0 0; border-bottom-color: #BFDBFE; }
.comp-td { border-top: 1px solid #F1F5F9; }
.comp-td-you { background: #EFF6FF; }
.comp-row-label { font-size: 13px; font-weight: 600; color: #64748B; text-align: left; }

.comp-th-missing { color: #CBD5E1; font-style: italic; }
.comp-td-empty { background: #FAFAFA; }
.comp-one-notice { margin-top: 14px; font-size: 13px; color: #D97706; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 10px 14px; }
.comp-strengths-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 16px; border-top: 1px solid #F1F5F9; }
.comp-strength-chip { font-size: 12px; color: #065F46; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 6px; padding: 5px 10px; line-height: 1.45; }

.comp-insight-item { display: flex; gap: 10px; align-items: flex-start; }
.comp-insight-bar { width: 3px; height: 16px; border-radius: 2px; flex-shrink: 0; margin-top: 3px; }

.comp-override { margin-top: 0; }
.comp-override-row { display: flex; gap: 8px; align-items: center; }
.comp-replace-btn { white-space: nowrap; font-size: 12.5px; padding: 9px 14px; border-radius: 100px; }

/* Share Modal */
.share-score-preview { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.share-store-name { font-weight: 700; font-size: 14px; color: #0F172A; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.share-scores { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.share-score-item { text-align: center; }
.share-score-num { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #0F172A; line-height: 1; margin-bottom: 3px; }
.share-score-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #94A3B8; }
.share-score-divider { width: 1px; height: 32px; background: #E2E8F0; }

.share-actions { display: flex; flex-direction: column; gap: 8px; }
.share-action-btn { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 10px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.share-action-btn:hover { border-color: #2563EB; color: #2563EB; background: #F0F6FF; }
.share-action-note { font-size: 11px; font-weight: 500; color: #94A3B8; margin-left: auto; }

/* Multi-Audit Toggle */
.multi-audit-toggle { margin-top: 2px; }
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle-wrap input[type="checkbox"] {
  width: 36px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: #CBD5E1;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-wrap input[type="checkbox"]:checked { background: #2563EB; }
.toggle-wrap input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.toggle-wrap input[type="checkbox"]:checked::after { transform: translateX(16px); }
.toggle-label { font-size: 14px; font-weight: 600; color: #374151; }
.toggle-label .note { font-weight: 400; color: #94A3B8; }

/* Page filter row (in issues tab, multi mode only) */
.page-filters {
  padding: 8px 20px 0;
  gap: 6px;
  border-top: 1px solid #F1F5F9;
  margin-top: 0;
}
.filter-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94A3B8;
  align-self: center;
  margin-right: 4px;
}

/* Page tags on issue/fix cards */
.page-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}
.page-tag-hp   { background: #EFF6FF; color: #1D4ED8; }
.page-tag-prod { background: #F5F3FF; color: #6D28D9; }
.page-tag-cat  { background: #F0FDF4; color: #15803D; }

/* Page breakdown grid (overview tab, multi mode) */
.page-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) { .page-breakdown-grid { grid-template-columns: 1fr; } }

.page-card {
  border-radius: 10px;
  padding: 14px 16px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  min-width: 0;
}
.page-card-hp   { border-color: #BFDBFE; background: #EFF6FF; }
.page-card-prod { border-color: #DDD6FE; background: #F5F3FF; }
.page-card-cat  { border-color: #BBF7D0; background: #F0FDF4; }
.page-card-missing { border-color: #E2E8F0; background: #F8FAFC; opacity: 0.65; }

.page-card-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-card-label-hp   { color: #1D4ED8; }
.page-card-label-prod { color: #6D28D9; }
.page-card-label-cat  { color: #15803D; }

.page-card-url {
  font-size: 11px;
  color: #64748B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 10px;
}
.page-card-status {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 4px;
  font-style: italic;
}
.page-card-scores {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.page-score-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.page-score-val  { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.page-score-lbl  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #94A3B8; }

/* ── Category Score Breakdown ── */
.cat-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .cat-breakdown { grid-template-columns: 1fr; gap: 16px; }
}
.cat-breakdown-group {}
.cat-breakdown-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94A3B8;
  margin-bottom: 10px;
}
.cat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.cat-bar-name {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  min-width: 108px;
}
.cat-bar-track {
  flex: 1;
  height: 7px;
  background: #F1F5F9;
  border-radius: 100px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}
.cat-bar-score {
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  text-align: right;
}

.perf-metrics { display: flex; flex-direction: column; gap: 10px; }
.perf-metric-row { display: flex; align-items: center; gap: 12px; }
.perf-metric-name { font-size: 13px; font-weight: 700; color: #374151; min-width: 40px; }
.perf-metric-value { font-size: 13px; color: #1F2937; min-width: 56px; }
.perf-metric-band { font-size: 12px; font-weight: 700; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.fade-in { animation: fadeIn 0.3s ease both; }

@media print {
  body { background: white !important; }
  nav, .report-actions { display: none !important; }
  .audit-app { padding-top: 0; }
  .report-container { padding: 0; max-width: 100%; }
  .report-doc { box-shadow: none; border: none; }
}

/* ====================================================
   MOBILE RESPONSIVE — ≤768px
   ==================================================== */
@media (max-width: 768px) {

  /* Input step typography */
  .audit-h1 { font-size: clamp(28px, 8vw, 38px); }
  .audit-step { padding: 48px 20px 64px; }
  .input-header { margin-bottom: 36px; }

  /* Gate: score cards stack to 1 column */
  .score-grid { grid-template-columns: 1fr; gap: 10px; }
  .gate-counts { flex-wrap: wrap; gap: 8px; }

  /* Gate form: stack email + button vertically */
  .gate-form { flex-direction: column; }
  .gate-form input { width: 100%; }
  .gate-form .btn-primary { width: 100%; justify-content: center; font-size: 14px; padding: 12px 20px; }

  /* Results tabs: scrollable pill, no left padding */
  .results-tabs { top: 60px; padding: 8px 12px; }
  .tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }
  .tabs-container::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 12px; font-size: 12px; white-space: nowrap; }

  /* Results content: tighter padding */
  .results-content { padding: 20px 16px; }

  /* Filters: wrap pills */
  .filters { flex-wrap: wrap; gap: 5px; }
  .filter-divider { display: none; }
  .filter-pill { font-size: 12px; padding: 5px 11px; }

  /* Overview grids: single column */
  .overview-grid-3 { grid-template-columns: 1fr; gap: 10px; }
  .overview-grid-2 { grid-template-columns: 1fr; gap: 10px; }

  /* Score cards: horizontal stays but tighten padding */
  .score-card { padding: 18px 20px; gap: 14px; }

  /* Issues */
  .issue-head { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
  .issue-tags { flex-wrap: wrap; gap: 4px; }
  .tag { font-size: 10px; padding: 2px 8px; }
  .issue-body { padding: 16px; }
  .issue-body-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Fix-code header */
  .fixes-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .checklist-progress-bar-wrap { width: 100%; }

  /* Competitors: allow horizontal scroll on the table */
  .comp-locked-rows { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comp-locked-row {
    grid-template-columns: 80px 44px 1fr 1fr;
    font-size: 11.5px;
    gap: 6px;
  }
  .comp-strengths-grid { grid-template-columns: 1fr; gap: 10px; }
  .comp-table-wrap,
  #compContent { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comp-table { min-width: 440px; table-layout: auto; }
  .comp-th, .comp-td { padding: 8px 10px; font-size: 11.5px; }

  /* Category bar names: allow shrink */
  .cat-bar-name { min-width: 80px; font-size: 11.5px; }

  /* Report */
  .report-container { padding: 16px 12px 48px; }
  .report-head { padding: 28px 24px; }
  .report-head-flex { flex-direction: column; gap: 14px; }
  .report-store { font-size: 22px; }
  .report-stats { flex-wrap: wrap; gap: 8px; }
  .report-body { padding: 24px 20px; }
  .report-foot {
    padding: 16px 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    align-items: center;
  }

  /* Page breakdown */
  .page-breakdown-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* ====================================================
   MOBILE RESPONSIVE — ≤480px
   ==================================================== */
@media (max-width: 480px) {
  .audit-h1 { font-size: 28px; }
  .audit-sub { font-size: 15px; }
  .audit-step { padding: 40px 16px 56px; }
  .input-header { margin-bottom: 28px; }

  .form-card { padding: 22px 16px; gap: 14px; }
  .badge-blue { font-size: 12px; padding: 4px 12px; }
  .badge-blue span { font-size: 12px; }

  /* Gate */
  .gate-container { padding: 0; }
  .score-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 16px;
    gap: 10px;
  }
  .score-info { align-items: center; }
  .count-box { padding: 12px 10px; }
  .count-val { font-size: 22px; }
  .gate-counts { gap: 6px; }

  /* Tabs */
  .tab { padding: 11px 11px; font-size: 11.5px; }
  .results-content { padding: 14px 12px; }

  /* Issues */
  .issue-head { padding: 11px 14px; }
  .issue-body { padding: 14px 12px; }

  /* Report */
  .report-container { padding: 10px 8px 40px; }
  .report-head { padding: 20px 16px; }
  .report-store { font-size: 19px; }
  .report-body { padding: 16px 14px; }
  .report-foot { padding: 12px 14px; }

  /* Competitors locked rows: single column list */
  .comp-locked-row { grid-template-columns: 1fr 1fr; gap: 4px; font-size: 11px; }
}
