/* ── Free Scanner page — scanner-specific styles ─────────────── */

/* Hero / input area */
.scanner-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0f2a4a 100%);
  color: #fff;
  padding: 64px 0 72px;
  text-align: center;
}

.scanner-hero h1 {
  font-family: var(--font-display, 'DM Serif Display', serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin: 0 0 16px;
  line-height: 1.2;
}

.scanner-hero p.scanner-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin: 0 0 36px;
}

.scanner-trust {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  margin-top: 12px;
  letter-spacing: .02em;
}

/* URL input row */
.scanner-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.scanner-form input[type="url"] {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body, 'Outfit', sans-serif);
  background: rgba(255,255,255,.95);
  color: #1a1a1a;
  outline: none;
  transition: box-shadow .15s;
}

.scanner-form input[type="url"]:focus {
  box-shadow: 0 0 0 3px rgba(99,179,237,.6);
}

.scanner-form .btn-scan {
  padding: 14px 28px;
  background: #0d9488;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  font-family: var(--font-body, 'Outfit', sans-serif);
}

.scanner-form .btn-scan:hover {
  background: #0f766e;
}

.scanner-form .btn-scan:disabled {
  opacity: .6;
  cursor: default;
}

/* ── Progress section ──────────────────────────────────────── */
#scanner-progress {
  display: none;
  padding: 48px 0;
  text-align: center;
}

.progress-headline {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.progress-subline {
  font-size: .9rem;
  color: #6b7280;
  margin: 0 0 36px;
}

.progress-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.module-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 16px;
  transition: border-color .3s, box-shadow .3s;
}

.module-card.running {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.module-card.done {
  border-color: #10b981;
}

.module-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.module-name {
  font-size: .9rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 6px;
}

.module-status {
  font-size: .8rem;
  color: #9ca3af;
}

.module-card.running .module-status { color: #3b82f6; }
.module-card.done    .module-status { color: #10b981; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

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

/* ── Results section ───────────────────────────────────────── */
#scanner-results {
  display: none;
  padding: 48px 0 64px;
}

/* Score hero */
.score-hero {
  text-align: center;
  margin-bottom: 40px;
}

.score-circle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid #e5e7eb;
  margin: 0 auto 16px;
  transition: border-color .4s;
}

.score-circle.grade-A { border-color: #16a34a; }
.score-circle.grade-B { border-color: #65a30d; }
.score-circle.grade-C { border-color: #ca8a04; }
.score-circle.grade-D { border-color: #ea580c; }
.score-circle.grade-F { border-color: #dc2626; }

.score-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.score-100 {
  font-size: .9rem;
  color: #9ca3af;
}

.grade-badge {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.grade-badge.grade-A { background: #16a34a; }
.grade-badge.grade-B { background: #65a30d; }
.grade-badge.grade-C { background: #ca8a04; }
.grade-badge.grade-D { background: #ea580c; }
.grade-badge.grade-F { background: #dc2626; }

.score-store-url {
  font-size: .85rem;
  color: #6b7280;
}

/* Category cards grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.category-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.category-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.category-card-icon { font-size: 1.4rem; }

.category-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

.category-score-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.category-score-fill {
  height: 100%;
  border-radius: 3px;
  background: #10b981;
  transition: width .6s ease;
}

.category-score-fill.score-low  { background: #dc2626; }
.category-score-fill.score-mid  { background: #ca8a04; }
.category-score-fill.score-high { background: #10b981; }

.category-score-label {
  font-size: .8rem;
  color: #6b7280;
  margin-bottom: 10px;
}

.category-issue {
  font-size: .82rem;
  color: #374151;
  padding: 6px 10px;
  background: #fef9c3;
  border-radius: 6px;
  margin-bottom: 6px;
}

.category-issue.issue-critical {
  background: #fee2e2;
  color: #991b1b;
}

.gpsr-limited-note {
  font-size: .8rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 8px;
}

/* Recommendations */
.recommendations-section {
  margin-bottom: 40px;
}

.recommendations-section h2 {
  font-family: var(--font-display, 'DM Serif Display', serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 20px;
}

.rec-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.rec-severity {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.rec-severity.critical { background: #dc2626; }
.rec-severity.warning  { background: #f59e0b; }
.rec-severity.info     { background: #3b82f6; }

.rec-body { flex: 1; }

.rec-title {
  font-weight: 600;
  font-size: .95rem;
  color: #111827;
  margin: 0 0 4px;
}

.rec-desc {
  font-size: .85rem;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.5;
}

.rec-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rec-link-primary {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: #0f6fec;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}

.rec-link-primary:hover { background: #1d4ed8; }

.rec-link-learn {
  font-size: .82rem;
  color: #0f6fec;
  text-decoration: underline;
}

.rec-link-alt {
  font-size: .78rem;
  color: #9ca3af;
  text-decoration: none;
}

.rec-link-alt:hover { color: #6b7280; }

/* ── Lead capture ──────────────────────────────────────────── */
.lead-section {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
  text-align: center;
}

.lead-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: #0c4a6e;
}

.lead-section p {
  font-size: .9rem;
  color: #0369a1;
  margin: 0 0 20px;
}

.lead-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 12px;
}

.lead-form input[type="email"] {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font-body, 'Outfit', sans-serif);
  outline: none;
  transition: border-color .15s;
}

.lead-form input[type="email"]:focus {
  border-color: #0f6fec;
}

.lead-form button {
  padding: 11px 22px;
  background: #0f6fec;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body, 'Outfit', sans-serif);
  transition: background .15s;
}

.lead-form button:hover { background: #1d4ed8; }
.lead-form button:disabled { opacity: .6; cursor: default; }

.lead-consent {
  font-size: .78rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lead-success {
  color: #16a34a;
  font-weight: 600;
  font-size: .95rem;
  margin-top: 8px;
  display: none;
}

/* ── Error state ───────────────────────────────────────────── */
#scanner-error {
  display: none;
  padding: 48px 0;
}

.error-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.error-icon { font-size: 3rem; margin-bottom: 16px; }
.error-title { font-size: 1.2rem; font-weight: 600; color: #1a1a1a; margin: 0 0 8px; }
.error-desc  { font-size: .95rem; color: #6b7280; margin: 0 0 24px; line-height: 1.5; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .scanner-form {
    flex-direction: column;
  }

  .scanner-form .btn-scan {
    width: 100%;
  }

  .lead-form {
    flex-direction: column;
  }

  .lead-form button {
    width: 100%;
  }

  .rec-card {
    flex-direction: column;
    gap: 8px;
  }

  .score-circle {
    width: 110px;
    height: 110px;
  }

  .score-number { font-size: 2.2rem; }
}
