/* SEO Audit — premium tool styling, harmonised with the rest of TvorivýKútik */

:root {
  --seo-primary: #2563eb;
  --seo-primary-dark: #1d4ed8;
  --seo-accent: #0ea5e9;
  --seo-bg-grad: linear-gradient(135deg, #1e3a8a 0%, #4338ca 60%, #7c3aed 100%);
  --seo-card-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --seo-card-shadow-hover: 0 20px 48px rgba(15, 23, 42, 0.14);
  --seo-text-dark: #0f172a;
  --seo-text-muted: #64748b;
  --seo-border: #e2e8f0;
  --seo-bg-soft: #f1f5f9;

  --seo-critical: #dc2626;
  --seo-critical-bg: #fef2f2;
  --seo-warning: #d97706;
  --seo-warning-bg: #fffbeb;
  --seo-info: #0284c7;
  --seo-info-bg: #f0f9ff;
  --seo-good: #16a34a;
  --seo-good-bg: #f0fdf4;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f8fafc; color: var(--seo-text-dark); font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif; }

.seo-page { min-height: 100vh; }
.seo-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- HERO ---------- */
.seo-hero {
  background: var(--seo-bg-grad);
  color: white;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.seo-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.10), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 50%);
  pointer-events: none;
}
.seo-hero > .seo-container { position: relative; }
.seo-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.seo-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  margin-bottom: 0; backdrop-filter: blur(6px);
}
.seo-hero-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: white;
  text-decoration: none;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.seo-hero-home:hover { background: rgba(255,255,255,0.18); color: white; }
.seo-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; line-height: 1.15; margin: 0 0 16px; max-width: 820px; }
.seo-lead { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; opacity: 0.95; max-width: 720px; margin: 0 0 32px; }

@media (max-width: 640px) {
  .seo-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.seo-form { max-width: 760px; }
.seo-input-row {
  display: flex; align-items: stretch; background: white; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18); overflow: hidden;
}
.seo-input-icon { display: flex; align-items: center; padding: 0 18px; color: var(--seo-text-muted); font-size: 18px; }
.seo-input-row input {
  flex: 1; border: 0; outline: none; padding: 18px 8px; font-size: 17px; color: var(--seo-text-dark);
  font-family: inherit;
}
.seo-input-row input::placeholder { color: #94a3b8; }
.seo-btn-primary {
  border: 0; background: var(--seo-primary); color: white; font-weight: 600; padding: 0 26px;
  font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s ease;
}
.seo-btn-primary:hover { background: var(--seo-primary-dark); }
.seo-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.seo-btn-secondary {
  border: 1px solid var(--seo-border); background: white; color: var(--seo-text-dark);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.seo-btn-secondary:hover { background: var(--seo-bg-soft); }

.seo-helper {
  display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px;
  font-size: 13.5px; opacity: 0.92;
}
.seo-helper span i { margin-right: 6px; opacity: 0.85; }
.seo-link-btn {
  background: none; border: 0; color: white; font-weight: 600; cursor: pointer;
  text-decoration: underline; padding: 0; font-size: inherit;
}
.seo-link-btn:hover { opacity: 0.85; }

/* ---------- LOADING ---------- */
.seo-loading { padding: 56px 0; }
.seo-loading-card {
  background: white; border-radius: 18px; padding: 40px; box-shadow: var(--seo-card-shadow);
  text-align: center;
}
.seo-spinner {
  width: 56px; height: 56px; border: 4px solid var(--seo-bg-soft); border-top-color: var(--seo-primary);
  border-radius: 50%; margin: 0 auto 20px; animation: seo-spin 0.9s linear infinite;
}
@keyframes seo-spin { to { transform: rotate(360deg); } }
.seo-loading-card h2 { margin: 0 0 6px; font-size: 22px; }
.seo-loading-card p { color: var(--seo-text-muted); margin: 0 0 22px; }
.seo-progress { background: var(--seo-bg-soft); border-radius: 999px; overflow: hidden; height: 8px; margin: 18px auto 24px; max-width: 480px; }
.seo-progress-bar { height: 100%; background: var(--seo-primary); width: 5%; transition: width 0.5s ease; border-radius: 999px; }
.seo-stages { list-style: none; padding: 0; margin: 0 auto; max-width: 420px; text-align: left; }
.seo-stages li { padding: 8px 0; color: var(--seo-text-muted); font-size: 14px; }
.seo-stages li i { width: 20px; margin-right: 10px; }
.seo-stages li.active { color: var(--seo-text-dark); font-weight: 600; }
.seo-stages li.done { color: var(--seo-good); }
.seo-stages li.done i:before { content: "\f00c"; }

/* ---------- ERROR ---------- */
.seo-error { padding: 56px 0; }
.seo-error-card {
  background: white; border-radius: 18px; padding: 28px; box-shadow: var(--seo-card-shadow);
  display: flex; gap: 18px; align-items: flex-start; border-left: 6px solid var(--seo-critical);
}
.seo-error-card > i { color: var(--seo-critical); font-size: 28px; padding-top: 4px; }
.seo-error-card h3 { margin: 0 0 6px; font-size: 18px; }
.seo-error-card p { margin: 0 0 14px; color: var(--seo-text-muted); }

/* ---------- RESULT ---------- */
.seo-result { padding: 48px 0 80px; }
.seo-section-title {
  display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700;
  margin: 36px 0 16px; color: var(--seo-text-dark);
}
.seo-section-title i { color: var(--seo-primary); }

.seo-sample-banner {
  background: var(--seo-info-bg); border: 1px solid #bae6fd; border-radius: 12px;
  padding: 12px 18px; margin-bottom: 24px; color: #0c4a6e; display: flex; align-items: center; gap: 10px;
}
.seo-sample-banner .seo-link-btn { color: #0c4a6e; }

/* Score header */
.seo-score-header {
  background: white; border-radius: 18px; padding: 28px; box-shadow: var(--seo-card-shadow);
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
}
@media (max-width: 640px) { .seo-score-header { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.seo-score-ring {
  width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--seo-good) 0% 100%, var(--seo-bg-soft) 100%);
  position: relative;
}
.seo-score-ring::before {
  content: ''; position: absolute; inset: 12px; background: white; border-radius: 50%;
}
.seo-score-value { position: relative; font-weight: 700; font-size: 34px; line-height: 1; color: var(--seo-text-dark); }
.seo-score-value small { font-size: 14px; color: var(--seo-text-muted); margin-left: 2px; }
.seo-score-meta h2 { margin: 0 0 6px; font-size: 22px; }
.seo-domain { color: var(--seo-text-muted); margin: 0 0 14px; font-size: 14px; }
.seo-meta-line { color: var(--seo-text-muted); font-size: 13px; margin: 12px 0 0; }
.seo-scope-note { color: #475569; font-size: 13px; margin: 8px 0 0; line-height: 1.5; }
.seo-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.seo-upgrade-card {
  margin: 22px 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 20px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
  border: 1px solid #fdba74;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--seo-card-shadow);
}
.seo-upgrade-copy h3 { margin: 0 0 8px; font-size: 24px; }
.seo-upgrade-copy p { margin: 0; color: var(--seo-text-muted); }
.seo-upgrade-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.seo-upgrade-stats div {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--seo-border);
  border-radius: 14px;
  padding: 14px 12px;
}
.seo-upgrade-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: #c2410c;
}
.seo-upgrade-stats span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--seo-text-muted);
}
.seo-upgrade-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.seo-upgrade-note {
  margin: 0;
  font-size: 13px;
  color: var(--seo-text-muted);
}

.seo-severity-row { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
}
.seo-pill-critical { background: var(--seo-critical-bg); color: var(--seo-critical); }
.seo-pill-warning  { background: var(--seo-warning-bg); color: var(--seo-warning); }
.seo-pill-info     { background: var(--seo-info-bg); color: var(--seo-info); }
.seo-pill-good     { background: var(--seo-good-bg); color: var(--seo-good); }

/* AI summary */
.seo-ai-summary {
  margin-top: 20px; background: linear-gradient(135deg, #faf5ff 0%, #eef2ff 100%);
  border: 1px solid #e9d5ff; border-radius: 16px; padding: 22px; position: relative;
}
.seo-ai-badge {
  display: inline-flex; align-items: center; gap: 6px; background: #7c3aed; color: white;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-bottom: 8px;
}
.seo-ai-summary p { margin: 0; line-height: 1.65; color: #1e1b4b; font-size: 15px; }

/* Top fixes */
.seo-fix-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.seo-fix-card {
  background: white; border-radius: 14px; padding: 20px; box-shadow: var(--seo-card-shadow);
  border-top: 4px solid var(--seo-primary); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.seo-fix-card:hover { transform: translateY(-2px); box-shadow: var(--seo-card-shadow-hover); }
.seo-fix-card.severity-critical { border-top-color: var(--seo-critical); }
.seo-fix-card.severity-warning  { border-top-color: var(--seo-warning); }
.seo-fix-card.severity-info     { border-top-color: var(--seo-info); }
.seo-fix-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.seo-fix-card h4 { margin: 6px 0 8px; font-size: 16px; line-height: 1.4; }
.seo-fix-card p { margin: 0; color: var(--seo-text-muted); font-size: 14px; line-height: 1.55; }

/* URL consistency panel */
.seo-url-panel {
  background: white; border-radius: 14px; padding: 22px; box-shadow: var(--seo-card-shadow);
}
.seo-url-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--seo-border); }
.seo-url-row:last-child { border-bottom: 0; }
.seo-url-row dt { color: var(--seo-text-muted); font-size: 14px; }
.seo-url-row dd { margin: 0; font-size: 14px; word-break: break-all; }
.seo-url-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.seo-url-table th, .seo-url-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--seo-border); }
.seo-url-table th { background: var(--seo-bg-soft); font-weight: 600; color: var(--seo-text-muted); }
.seo-url-table td.status-ok { color: var(--seo-good); font-weight: 600; }
.seo-url-table td.status-bad { color: var(--seo-critical); font-weight: 600; }

/* Index state */
.seo-index-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.seo-index-card {
  background: white; border-radius: 14px; padding: 18px; box-shadow: var(--seo-card-shadow);
  display: flex; gap: 14px; align-items: flex-start;
}
.seo-index-card i { font-size: 22px; padding-top: 2px; }
.seo-index-card.ok i { color: var(--seo-good); }
.seo-index-card.bad i { color: var(--seo-critical); }
.seo-index-card h4 { margin: 0 0 4px; font-size: 15px; }
.seo-index-card p { margin: 0; font-size: 13px; color: var(--seo-text-muted); word-break: break-all; }

/* Categories / accordion */
.seo-categories { display: flex; flex-direction: column; gap: 12px; }
.seo-category {
  background: white; border-radius: 14px; box-shadow: var(--seo-card-shadow); overflow: hidden;
}
.seo-category-head {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer;
  user-select: none;
}
.seo-category-head:hover { background: var(--seo-bg-soft); }
.seo-category-head h4 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 12px; }
.seo-category-head .seo-chevron { transition: transform 0.2s ease; color: var(--seo-text-muted); }
.seo-category.open .seo-chevron { transform: rotate(90deg); }
.seo-category-body { padding: 0 22px 18px; display: none; }
.seo-category.open .seo-category-body { display: block; }

.seo-issue {
  border-left: 4px solid var(--seo-info); padding: 14px 16px; margin: 10px 0; background: var(--seo-bg-soft); border-radius: 8px;
}
.seo-issue.severity-critical { border-color: var(--seo-critical); background: var(--seo-critical-bg); }
.seo-issue.severity-warning  { border-color: var(--seo-warning);  background: var(--seo-warning-bg); }
.seo-issue.severity-info     { border-color: var(--seo-info);     background: var(--seo-info-bg); }
.seo-issue h5 { margin: 0 0 6px; font-size: 14.5px; }
.seo-issue p { margin: 4px 0; font-size: 13.5px; line-height: 1.55; color: #1f2937; }
.seo-issue .seo-recommendation { color: var(--seo-text-dark); }
.seo-issue .seo-recommendation strong { color: var(--seo-text-dark); }
.seo-issue code { background: rgba(15,23,42,0.07); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.seo-bonus-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seo-bonus-list li {
  background: var(--seo-good-bg); color: var(--seo-good); border: 1px solid #bbf7d0;
  padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
}

/* ----- 5-layer issue cards (rich narrative) ----- */
.seo-issue { padding: 16px 18px; }
.seo-issue-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.seo-issue-head h5 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--seo-text-dark); }
.seo-issue-body { display: flex; flex-direction: column; gap: 10px; }
.seo-issue-section { padding: 10px 12px; background: rgba(255,255,255,0.65); border-radius: 8px; border: 1px solid rgba(15,23,42,0.06); }
.seo-issue-section p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: #1f2937; white-space: pre-wrap; }
.seo-issue-label {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--seo-text-muted);
}
.seo-issue-how { background: #fffdf3; border-color: #fde68a; }
.seo-issue-how .seo-issue-label { color: #92400e; }
.seo-issue-after { background: #f0fdf4; border-color: #bbf7d0; }
.seo-issue-after .seo-issue-label { color: #166534; }
.seo-issue-page { font-size: 12px; color: var(--seo-text-muted); margin: 4px 0 0; }

/* Top-3 fix cards extra layout */
.seo-fix-card .seo-fix-cat { color: var(--seo-text-muted); font-size: 12.5px; }
.seo-fix-card .seo-fix-what { font-size: 13.5px; line-height: 1.55; color: #1f2937; }
.seo-fix-card .seo-fix-how {
  margin-top: 8px; padding: 10px 12px; background: #fffdf3; border: 1px solid #fde68a;
  border-radius: 8px; font-size: 13px; line-height: 1.55; color: #92400e; white-space: pre-wrap;
}
.seo-fix-card .seo-fix-how strong { color: #78350f; }

/* ----- Post-fix guidance ("Čo spraviť po úpravách") ----- */
.seo-postfix-card {
  background: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);
  border: 1px solid #c7d2fe; border-radius: 16px; padding: 24px 28px; margin-top: 8px;
}
.seo-postfix-intro { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; color: #1e293b; }
.seo-postfix-steps {
  list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px;
  counter-reset: postfix;
}
.seo-postfix-steps li {
  background: white; padding: 16px 18px; border-radius: 10px; border: 1px solid #e2e8f0;
}
.seo-postfix-steps h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--seo-text-dark); }
.seo-postfix-steps p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #334155; }
.seo-postfix-footer {
  margin: 18px 0 0; padding: 12px 14px; background: rgba(255,255,255,0.55);
  border-left: 3px solid var(--seo-primary); border-radius: 6px;
  font-size: 13px; color: #1e293b;
}
.seo-postfix-footer i { color: var(--seo-primary); margin-right: 6px; }

/* CTA */
.seo-cta-card {
  margin-top: 36px; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); color: white;
  border-radius: 18px; padding: 32px; text-align: center;
}
.seo-cta-card h3 { margin: 0 0 10px; font-size: 22px; }
.seo-cta-card p { margin: 0 0 18px; opacity: 0.85; }

@media (max-width: 900px) {
  .seo-upgrade-card { grid-template-columns: 1fr; }
  .seo-upgrade-stats { grid-template-columns: 1fr; }
}

/* ---------- TABS (interactive result nav) ---------- */
.seo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 22px;
  padding: 6px;
  background: white;
  border-radius: 14px;
  box-shadow: var(--seo-card-shadow);
  border: 1px solid var(--seo-border);
  position: sticky;
  top: 10px;
  z-index: 5;
  backdrop-filter: blur(6px);
}
.seo-tab {
  flex: 1 1 auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: var(--seo-text-muted);
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  position: relative;
  font-family: inherit;
}
.seo-tab i { font-size: 14px; opacity: 0.85; }
.seo-tab:hover { background: var(--seo-bg-soft); color: var(--seo-text-dark); }
.seo-tab.active {
  background: linear-gradient(135deg, var(--seo-primary) 0%, #4338ca 100%);
  color: white;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.seo-tab.active i { opacity: 1; }
.seo-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--seo-primary);
  background: var(--seo-bg-soft);
  border-radius: 999px;
  line-height: 1;
}
.seo-tab.active .seo-tab-count { background: rgba(255,255,255,0.25); color: white; }

.seo-tab-panel {
  animation: seo-fade-in 0.25s ease;
}
.seo-tab-panel[hidden] { display: none !important; }
@keyframes seo-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .seo-tabs { position: static; gap: 4px; }
  .seo-tab { flex: 1 1 45%; padding: 10px 10px; font-size: 13px; min-width: 0; }
  .seo-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Categories toolbar ---------- */
.seo-categories-toolbar {
  display: flex;
  gap: 18px;
  margin: -8px 0 14px;
  justify-content: flex-end;
}
.seo-categories-toolbar .seo-link-btn {
  color: var(--seo-primary);
  font-size: 13px;
}
.seo-categories-toolbar .seo-link-btn:hover { color: var(--seo-primary-dark); }

/* Category smooth animation (overrides earlier display:none) */
.seo-category-body {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  transition: max-height 0.28s ease, padding 0.28s ease;
}
.seo-category.open .seo-category-body {
  max-height: 20000px;
  padding: 0 22px 18px;
}

/* Issue cards micro-interactions */
.seo-issue {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.seo-issue:hover {
  transform: translateX(2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Score ring subtle animation */
.seo-score-ring { transition: background 0.6s ease; }
.seo-score-ring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  filter: blur(14px);
  opacity: 0.18;
  z-index: -1;
}

/* ---------- Crawled pages list (PRO) ---------- */
.seo-pages-intro {
  margin: 0 0 14px;
  color: var(--seo-text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.seo-pages-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: white;
  border: 1px solid var(--seo-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: var(--seo-card-shadow);
}
.seo-pages-filter > i {
  color: var(--seo-text-muted);
  font-size: 14px;
}
.seo-pages-filter input[type="text"] {
  flex: 1;
  min-width: 200px;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--seo-text-dark);
}
.seo-pages-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--seo-text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.seo-pages-check input { accent-color: var(--seo-primary); }

.seo-pages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.seo-page-row {
  background: white;
  border: 1px solid var(--seo-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.seo-page-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--seo-card-shadow);
  border-color: #cbd5e1;
}
.seo-page-index {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--seo-bg-soft);
  color: var(--seo-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  margin-top: 2px;
}
.seo-page-main { min-width: 0; }
.seo-page-title {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--seo-text-dark);
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seo-page-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--seo-primary);
  text-decoration: none;
  word-break: break-all;
  margin-bottom: 8px;
}
.seo-page-url:hover { color: var(--seo-primary-dark); text-decoration: underline; }
.seo-page-url i { font-size: 11px; opacity: 0.7; }

.seo-page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seo-page-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--seo-bg-soft);
  color: var(--seo-text-muted);
  border: 1px solid transparent;
}
.seo-page-chip i { font-size: 10.5px; }
.seo-page-chip.chip-good { background: var(--seo-good-bg); color: var(--seo-good); border-color: #bbf7d0; }
.seo-page-chip.chip-warn { background: var(--seo-warning-bg); color: var(--seo-warning); border-color: #fed7aa; }
.seo-page-chip.chip-bad  { background: var(--seo-critical-bg); color: var(--seo-critical); border-color: #fecaca; }
.seo-page-chip.chip-ok   { background: var(--seo-good-bg); color: var(--seo-good); border-color: #bbf7d0; }
.seo-page-chip.chip-info { background: var(--seo-info-bg); color: var(--seo-info); border-color: #bae6fd; }
.seo-pages-empty {
  text-align: center;
  color: var(--seo-text-muted);
  padding: 24px 0;
  font-size: 14px;
}

/* ---------- Visual summary ---------- */
.seo-visual-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.seo-visual-card {
  background: white;
  border: 1px solid var(--seo-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--seo-card-shadow);
}
.seo-visual-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.seo-visual-head h3 i { color: var(--seo-primary); }
.seo-visual-head p {
  margin: 0;
  color: var(--seo-text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.seo-visual-donut-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}
.seo-visual-donut {
  width: 160px;
  min-width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(var(--seo-info) 100%, var(--seo-bg-soft) 0);
}
.seo-visual-donut::before {
  content: "";
  position: absolute;
  inset: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.seo-visual-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  text-align: center;
}
.seo-visual-donut-center strong {
  font-size: 34px;
  line-height: 1;
  color: var(--seo-text-dark);
}
.seo-visual-donut-center span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--seo-text-muted);
  font-weight: 600;
}
.seo-visual-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.seo-visual-legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
}
.seo-visual-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.seo-visual-legend-label {
  color: var(--seo-text-dark);
  font-weight: 600;
}
.seo-visual-legend-value {
  color: var(--seo-text-muted);
  font-variant-numeric: tabular-nums;
}
.seo-impact-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.seo-impact-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
}
.seo-impact-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--seo-text-dark);
}
.seo-impact-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--seo-bg-soft);
  overflow: hidden;
}
.seo-impact-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}
.seo-impact-fill.high { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.seo-impact-fill.medium { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.seo-impact-fill.low { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); }
.seo-impact-value {
  font-size: 13px;
  color: var(--seo-text-muted);
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

@media (max-width: 640px) {
  .seo-visual-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .seo-impact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .seo-impact-value {
    text-align: left;
  }
}

@media print {
  .seo-tabs,
  .seo-pages-filter,
  .seo-categories-toolbar,
  .seo-result-actions,
  .seo-cta-card,
  .seo-sample-banner {
    display: none !important;
  }
  .seo-tab-panel,
  .seo-tab-panel[hidden] {
    display: block !important;
  }
  .seo-category .seo-category-body {
    display: block !important;
    max-height: none !important;
    padding: 0 22px 18px !important;
  }
}

/* Info / FAQ */
.seo-info { background: white; padding: 56px 0; border-top: 1px solid var(--seo-border); }
.seo-info h2 { margin: 0 0 24px; font-size: 24px; display: flex; align-items: center; gap: 10px; }
.seo-info h2 i { color: var(--seo-primary); }
.seo-info details {
  background: var(--seo-bg-soft); border-radius: 10px; padding: 14px 18px; margin-bottom: 12px;
}
.seo-info summary { font-weight: 600; cursor: pointer; }
.seo-info details[open] summary { margin-bottom: 8px; }
.seo-info details p { margin: 0; line-height: 1.6; color: var(--seo-text-muted); }
