/* ================================================================
   SEO Score Checker — Complete Professional Stylesheet
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-bg: #eef2ff;
  --primary-ring: rgba(99, 102, 241, 0.25);

  /* Semantic */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #6b7280;
  --info-bg: #f9fafb;
  --info-border: #e5e7eb;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

  /* Font */
  --font:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main {
  flex: 1;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-hover);
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.hidden {
  display: none !important;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-outline {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
/* Loading state inside buttons */
.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-spinner {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: btnSpin 0.65s linear infinite;
}
@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}
/* Keep the analyze button from collapsing in width during load */
#analyze-btn {
  min-width: 148px;
  justify-content: center;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
  text-decoration: none;
}
.logo:hover {
  color: var(--gray-900);
}
.logo-mark {
  display: flex;
}
.logo-text {
  letter-spacing: -0.4px;
}
.logo-accent {
  color: var(--primary);
}
.logo-sm .logo-text {
  font-size: 1rem;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  transition: all 0.2s;
}
.header-link:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}
.header-site-link {
  width: auto;
  gap: 6px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
}
.header-site-link:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  padding: 100px 0 72px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--gray-50) 100%);
}

/* Decorative floating shapes */
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  filter: blur(80px);
}
.shape-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -150px;
  background: var(--primary-bg);
}
.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -80px;
  background: #fdf2f8;
}
.shape-3 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 60%;
  background: #ecfdf5;
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.12;
  color: var(--gray-900);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #8b5cf6 50%,
    #ec4899 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Search Form ───────────────────────────────────────────── */
.search-form {
  max-width: 620px;
  margin: 0 auto;
}
.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 5px 5px 5px 20px;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}
.search-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px var(--primary-ring),
    var(--shadow-md);
}
.search-icon {
  color: var(--gray-400);
  flex-shrink: 0;
}
#url-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-family: var(--font);
  padding: 12px 14px;
  color: var(--gray-800);
  background: transparent;
  min-width: 0;
}
#url-input::placeholder {
  color: var(--gray-400);
}
#analyze-btn {
  border-radius: var(--radius-full);
  padding: 11px 28px;
  font-size: 0.9rem;
}

.error-msg {
  max-width: 620px;
  margin: 16px auto 0;
  padding: 12px 20px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Feature pills */
.hero-features {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 52px;
}
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: all 0.2s;
}
.feature-pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-bg);
}
.pill-icon {
  font-size: 1rem;
}

/* ================================================================
   SEO LOADER — pipeline stepper (no card/box)
   ================================================================ */
.seo-loader {
  max-width: 620px;
  margin: 22px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: loaderFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes loaderFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Progress bar ───────────────────────────────────────────── */
.seo-loader-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.seo-loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-light) 50%,
    #10b981
  );
  border-radius: var(--radius-full);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.seo-loader-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: barShimmer 1.6s ease-in-out infinite;
}
@keyframes barShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

/* ── Status row ─────────────────────────────────────────────── */
.seo-loader-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.seo-loader-spin {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  animation: loaderSpin 0.7s linear infinite;
}
@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}
.seo-loader-msg {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  min-width: 0;
  transition: opacity 0.25s;
}
.seo-loader-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
  transition: color 0.3s;
}

/* ── Step pipeline ──────────────────────────────────────────── */
.seo-stepper {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 0 2px;
}
.seo-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.seo-step span {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transition: color 0.3s;
}
.seo-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
  position: relative;
  z-index: 1;
}
/* Active node */
.seo-step.active .seo-step-dot {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 4px var(--primary-ring);
}
.seo-step.active .seo-step-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  animation: activePulse 0.9s ease-in-out infinite;
}
@keyframes activePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.7;
  }
}
.seo-step.active span {
  color: var(--primary);
}
/* Done node — checkmark */
.seo-step.done .seo-step-dot {
  border-color: var(--success);
  background: var(--success-bg);
  box-shadow: none;
}
.seo-step.done .seo-step-dot::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2.5px solid var(--success);
  border-bottom: 2.5px solid var(--success);
  transform: rotate(-45deg) translateY(-1px);
  border-radius: 0;
  animation: none;
}
.seo-step.done span {
  color: var(--success);
}
/* Connector lines */
.seo-step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin-bottom: 27px;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}
.seo-step-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.45s ease;
}
.seo-step-line.filled::after {
  width: 100%;
}

/* ================================================================
   RESULTS SECTION
   ================================================================ */
.results-section {
  padding: 40px 0 80px;
  animation: fadeUp 0.5s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Toolbar ────────────────────────────────────────────────── */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}
.toolbar-actions {
  display: flex;
  gap: 10px;
}

/* ── Score Panel ────────────────────────────────────────────── */
.score-panel {
  display: flex;
  align-items: center;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.score-panel-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.score-ring-wrap {
  position: relative;
  flex-shrink: 0;
}
.score-circle {
  width: 140px;
  height: 140px;
  position: relative;
}
.score-circle svg {
  width: 100%;
  height: 100%;
}
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gray-900);
}
.score-grade-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: none;
}
.score-grade-badge.visible {
  display: block;
}
.score-grade-badge.grade-high {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.score-grade-badge.grade-mid {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.score-grade-badge.grade-low {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.score-meta {
}
.score-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.score-url {
  font-size: 0.85rem;
  color: var(--primary);
  word-break: break-all;
  margin-bottom: 2px;
}
.score-time {
  font-size: 0.78rem;
  color: var(--gray-400);
}

.score-panel-right {
  margin-left: auto;
}
.summary-stats {
  display: flex;
  gap: 28px;
}
.summary-stat {
  text-align: center;
}
.summary-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
}
.summary-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-top: 2px;
}
.stat-success {
  color: var(--success);
}
.stat-warning {
  color: var(--warning);
}
.stat-danger {
  color: var(--danger);
}
.stat-info {
  color: var(--info);
}

/* ── Section Cards (SERP preview etc.) ─────────────────────── */
.section-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  margin-bottom: 28px;
  overflow: hidden;
}
.section-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.section-card-icon {
  display: flex;
}
.section-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-700);
}
.section-card-body {
  padding: 20px 24px;
}

.toggle-tab {
  margin-left: auto;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-tab + .toggle-tab {
  margin-left: 6px;
}
.toggle-tab.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* SERP result styles */
.serp-result {
  max-width: 600px;
}
.serp-result.serp-mobile {
  max-width: 360px;
}
.serp-url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.serp-favicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gray-100);
  flex-shrink: 0;
}
.serp-favicon-mobile {
  width: 22px;
  height: 22px;
}
.serp-site-name {
  font-size: 0.85rem;
  color: #202124;
  font-weight: 500;
}
.serp-breadcrumbs {
  font-size: 0.75rem;
  color: #4d5156;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.serp-title {
  font-size: 1.2rem;
  color: #1a0dab;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.serp-title:hover {
  text-decoration: underline;
}
.serp-mobile .serp-title {
  font-size: 1.02rem;
}
.serp-description {
  font-size: 0.87rem;
  color: #4d5156;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.serp-mobile .serp-description {
  font-size: 0.82rem;
  -webkit-line-clamp: 4;
}

/* ── Category Score Cards ──────────────────────────────────── */
.category-scores {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.cat-score-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.cat-score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-score-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.cat-score-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gray-200);
  transition: background 0.3s;
}
.cat-score-card.score-high::after {
  background: var(--success);
}
.cat-score-card.score-mid::after {
  background: var(--warning);
}
.cat-score-card.score-low::after {
  background: var(--danger);
}
.cat-score-value {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.cat-score-card.score-high .cat-score-value {
  color: var(--success);
}
.cat-score-card.score-mid .cat-score-value {
  color: var(--warning);
}
.cat-score-card.score-low .cat-score-value {
  color: var(--danger);
}
.cat-score-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cat-score-bar {
  width: 100%;
  height: 3px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  margin-top: 10px;
  overflow: hidden;
}
.cat-score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ── Filter Tabs ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.filter-tab {
  background: #fff;
  border: 1px solid var(--gray-200);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Check Cards ───────────────────────────────────────────── */
.checks-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.category-group {
  margin-bottom: 28px;
}
.category-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-200);
}
.cat-icon {
  font-size: 1.1rem;
}
.category-group-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.check-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.15s;
}
.check-card:hover {
  box-shadow: var(--shadow-xs);
}
.check-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}
.check-status-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
}
.check-status-icon.pass {
  background: var(--success-bg);
  color: var(--success);
  border: 1.5px solid var(--success-border);
}
.check-status-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1.5px solid var(--warning-border);
}
.check-status-icon.fail {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid var(--danger-border);
}
.check-status-icon.info {
  background: var(--info-bg);
  color: var(--info);
  border: 1.5px solid var(--info-border);
}

.check-info {
  flex: 1;
  min-width: 0;
}
.check-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.check-value {
  font-size: 0.78rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.check-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.check-badge.pass {
  background: var(--success-bg);
  color: var(--success);
}
.check-badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.check-badge.fail {
  background: var(--danger-bg);
  color: var(--danger);
}
.check-badge.info {
  background: var(--info-bg);
  color: var(--info);
}

.check-expand {
  color: var(--gray-400);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.check-card.expanded .check-expand {
  transform: rotate(180deg);
}

.check-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.check-card.expanded .check-details {
  max-height: 320px;
}
.check-details-inner {
  padding: 0 18px 14px 56px;
}
.check-description {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 6px;
  font-style: italic;
}
.check-detail-text {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.6;
  word-break: break-word;
}
.check-weight {
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}

/* Priority badges */
.priority-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.priority-critical {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.priority-important {
  background: var(--warning-bg);
  color: #b45309;
  border: 1px solid var(--warning-border);
}
.priority-moderate {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid #c7d2fe;
}
.priority-minor {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}

/* ================================================================
   HOW IT WORKS
   ================================================================ */
.how-it-works {
  padding: 80px 0 100px;
  background: #fff;
  border-top: 1px solid var(--gray-200);
}
.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 8px;
}
.section-desc {
  font-size: 1rem;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 48px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}
.step-card {
  text-align: center;
  padding: 36px 28px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-brand .logo {
  color: #fff;
}
.footer-brand .logo-accent {
  color: var(--primary-light);
}
.footer-tagline {
  font-size: 0.82rem;
  color: var(--gray-300);
}
.footer-meta p {
  font-size: 0.78rem;
  color: var(--gray-300);
}
#footer-website-link {
  color: rgb(147, 163, 255);
  transition: color 0.2s;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .category-scores {
    grid-template-columns: repeat(3, 1fr);
  }
  .score-panel {
    flex-direction: column;
    text-align: center;
  }
  .score-panel-left {
    flex-direction: column;
  }
  .score-panel-right {
    margin-left: 0;
  }
  .summary-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .loading-card {
    margin: 20px 0 0;
    border-radius: var(--radius);
  }
  .loading-card-inner {
    padding: 20px;
    gap: 16px;
  }
  .loading-steps {
    gap: 6px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero {
    padding: 70px 0 50px;
  }
  .hero-features {
    margin-top: 36px;
  }
  .category-scores {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .search-input-wrapper {
    flex-wrap: wrap;
    border-radius: var(--radius);
    padding: 8px;
  }
  .search-icon {
    display: none;
  }
  #url-input {
    width: 100%;
    padding: 10px 12px;
  }
  #analyze-btn {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .check-value {
    max-width: 200px;
  }
  .check-details-inner {
    padding-left: 18px;
  }
  .filter-bar {
    gap: 6px;
  }
  .filter-tab {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  .results-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 0 36px;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .category-scores {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .cat-score-card {
    padding: 14px;
  }
  .cat-score-value {
    font-size: 1.3rem;
  }
  .summary-stats {
    gap: 18px;
    flex-wrap: wrap;
  }
  .score-circle {
    width: 120px;
    height: 120px;
  }
  .score-number {
    font-size: 2rem;
  }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .site-header,
  .site-footer,
  .search-form,
  .hero-features,
  .filter-bar,
  .results-toolbar,
  .how-it-works,
  .hero-badge {
    display: none;
  }
  .hero {
    padding: 20px 0;
  }
  .results-section {
    padding: 0;
  }
  .check-details {
    max-height: none !important;
  }
}
