:root {
  --color-green: #059669; /* Emerald 600 */
  --color-orange: #d97706; /* Amber 600 */
  --color-red: #dc2626; /* Red 600 */
  --color-bg-green: rgba(5, 150, 105, 0.1);
  --color-bg-orange: rgba(217, 119, 6, 0.1);
  --color-bg-red: rgba(220, 38, 38, 0.1);
  
  --color-bg: #f8fafc; /* Slate 50 */
  --color-surface: #ffffff; /* White */
  --color-surface-hover: #f1f5f9; /* Slate 100 */
  --color-border: #e2e8f0; /* Slate 200 */
  
  --color-text: #0f172a; /* Slate 900 */
  --color-text-secondary: #64748b; /* Slate 500 */
  --color-white: #ffffff;
  --color-blue: #2563eb; /* Blue 600 */
  --color-primary: #2563eb; /* Primary Brand Blue */
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Header (Glassmorphism) */
.app-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
  user-select: none;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  background: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 10px 14px;
  }
  .header-status-indicator {
    font-size: 11px;
    padding: 4px 10px;
    gap: 6px;
  }
  .app-header h1 {
    font-size: 17px;
  }
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: none;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-white);
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.app-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  background: linear-gradient(90deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero & Grid Background */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 700px;
  overflow: hidden;
  z-index: -1;
  background: var(--color-bg);
}

.glow-blob {
  position: absolute;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
  border-radius: 50%;
}

.grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, transparent 100%);
}

/* Hero Search Section - Instant LCP Render */
.hero-search {
  text-align: center;
  padding: 60px 16px 40px;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--color-blue);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(30px, 6.5vw, 64px);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.text-gradient {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(14px, 2.5vw, 18px);
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.search-bar {
  display: flex;
  gap: 12px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .hero-search {
    padding: 30px 12px 24px;
  }
  .search-bar {
    flex-direction: column;
    gap: 10px;
  }
  .search-bar input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
  }
  .search-bar button {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }
  #singleCrawlDepth {
    width: 100% !important;
    height: 48px;
    margin: 0 !important;
  }
}

.search-bar input {
  flex: 1;
  padding: 18px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-bar input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.search-bar input::placeholder {
  color: var(--color-text-secondary);
}

.search-bar button {
  background: linear-gradient(135deg, var(--color-blue), #1d4ed8);
  color: var(--color-white);
  border: none;
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.search-bar button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.search-bar button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* Test Selector Chips */
.test-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.test-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.test-chip:hover {
  border-color: var(--color-blue);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.test-chip.active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#crawlDepth {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

#crawlDepth:focus {
  border-color: var(--color-blue);
}

/* Main Container */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Multi-Tool Full-Width Container (Expanded Width for Data Tables & Iframes) */
.container.multi-tool-view,
.multi-tool-view {
  max-width: min(98vw, 1780px) !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 20px 40px !important;
}

/* Loader */
.loader-container {
  text-align: center;
  padding: 80px 0;
  color: var(--color-text-secondary);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-blue);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

/* Button Spinners & Perfectly Centered Inline Loaders */
.spinner.small,
#ieBtnLoader {
  width: 16px !important;
  height: 16px !important;
  border: 2px solid rgba(255, 255, 255, 0.35) !important;
  border-top-color: #ffffff !important;
  border-radius: 50% !important;
  margin: 0 !important;
  display: inline-block;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  animation: spin 0.8s linear infinite !important;
}

#ieBtnLoader.hidden,
.spinner.small.hidden,
.spinner.hidden {
  display: none !important;
}

#ieBtnStart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

#ieBtnStart #ieBtnLabel {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

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

.hidden {
  display: none !important;
}

.results-container {
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dual Speed Test Grid */
.dual-speed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.speed-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.speed-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.speed-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.speed-panel-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.speed-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* Gauge */
.performance-section {
  text-align: center;
  margin-bottom: 20px;
}

.gauge-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.score-gauge {
  position: relative;
  width: 220px;
  height: 120px;
  margin-bottom: 16px;
}

.half-circle {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.half-circle path {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.half-circle .bg {
  stroke: var(--color-border);
}

.half-circle .meter {
  stroke: var(--color-green);
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s;
}

.score-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 56px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-green);
}

.gauge-container span {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Metrics */
.crux-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 500;
}
.crux-banner.good { background: var(--color-bg-green); color: var(--color-green); }
.crux-banner.average { background: var(--color-bg-orange); color: var(--color-orange); }
.crux-banner.poor { background: var(--color-bg-red); color: var(--color-red); }

.cat-scores {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.cat-badge {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.cat-badge span {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-heading);
}
.cat-badge.good span { color: var(--color-green); }
.cat-badge.average span { color: var(--color-orange); }
.cat-badge.poor span { color: var(--color-red); }

.mini-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.mini-metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 13px;
}

.mini-label {
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 32px;
}

.mini-value { font-weight: 600; font-family: var(--font-heading); }
.mini-value.good { color: var(--color-green); }
.mini-value.average { color: var(--color-orange); }
.mini-value.poor { color: var(--color-red); }

.metric-icon {
  border-radius: 50%;
}
.status-good { background-color: var(--color-green); }
.status-average { background-color: var(--color-orange); border-radius: 2px; }
.status-poor {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid var(--color-red);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.speed-opps {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.mini-opp {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.mini-opp:last-child { border-bottom: none; }
.mini-opp .metric-icon { margin-top: 6px; }

/* Sections */
.diagnose-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
  margin-top: 40px;
  box-shadow: var(--shadow-md);
}

.diagnose-section h2, .diagnose-section h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Crawler UI */
.crawler-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.crawler-badge {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.crawler-badge.blue { background: rgba(37, 99, 235, 0.1); color: var(--color-blue); border: 1px solid rgba(37, 99, 235, 0.2); }
.crawler-badge.yellow { background: rgba(217, 119, 6, 0.1); color: var(--color-orange); border: 1px solid rgba(217, 119, 6, 0.2); }
.crawler-badge.red { background: rgba(220, 38, 38, 0.1); color: var(--color-red); border: 1px solid rgba(220, 38, 38, 0.2); }

.crawler-status-indicator {
  margin-left: auto;
  font-weight: 600;
  color: var(--color-blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.crawler-table-wrapper {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  width: 100%;
  max-width: 100%;
}

.deadlink-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
}

.deadlink-table th {
  background: var(--color-bg);
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.deadlink-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
  word-break: break-all;
  vertical-align: middle;
}

.deadlink-table tr:hover {
  background: var(--color-surface-hover);
}

.err-status {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--color-red);
  color: white;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.crawler-empty {
  padding: 40px;
  text-align: center;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* WAVE-Style UI */
/* WAVE-Style UI & Interactive Accessibility Dashboard */
.wave-box {
  background: var(--color-surface);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.wave-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.wave-item {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  padding: 18px 16px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wave-item:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-md); 
  border-color: #94a3b8;
}

.wave-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.wave-item.active {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-md);
  background: #f8fafc;
}

.wave-item span.wave-count {
  display: block;
  font-size: 30px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 4px;
  line-height: 1.1;
}

.wave-item .wave-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.wave-item .wave-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.red span.wave-count { color: var(--color-red); }
.orange span.wave-count { color: var(--color-orange); }
.green span.wave-count { color: var(--color-green); }
.blue span.wave-count { color: var(--color-blue); }
.purple span.wave-count { color: #9333ea; }

.aim-score {
  margin-top: 28px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.aim-score-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.aim-score h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.aim-compliance-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aim-pill-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.aim-pill-amber { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.aim-pill-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

.progress-bar {
  height: 14px;
  background: #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  border-radius: 14px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Diagnostic Details Section */
.a11y-explorer-container {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.a11y-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  background: var(--color-surface);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.a11y-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.a11y-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.a11y-filter-pill:hover {
  border-color: #94a3b8;
  color: var(--color-text);
  background: #ffffff;
}

.a11y-filter-pill.active {
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.a11y-filter-pill.active span {
  color: #ffffff !important;
}

.a11y-filter-pill .pill-badge {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}
.a11y-filter-pill.active .pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.a11y-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.a11y-search-input {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  min-width: 240px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.a11y-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.a11y-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}
.a11y-action-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Violation Card */
.a11y-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.a11y-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.a11y-card-header {
  padding: 16px 20px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
}
.a11y-card.open .a11y-card-header {
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
}

.a11y-card-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.a11y-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.a11y-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
}
.a11y-badge-critical { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.a11y-badge-serious { background: #ffedd5; color: #ea580c; border: 1px solid #fed7aa; }
.a11y-badge-moderate { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.a11y-badge-minor { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.a11y-badge-pass { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.a11y-badge-review { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }

.a11y-wcag-tag {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.a11y-card-body {
  padding: 20px;
  display: none;
}
.a11y-card.open .a11y-card-body {
  display: block;
}

.a11y-callout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .a11y-callout-grid { grid-template-columns: 1fr; }
}

.a11y-callout {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.a11y-callout-why {
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  color: #0369a1;
}
.a11y-callout-how {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  color: #15803d;
}
.a11y-callout h5 {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.a11y-nodes-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin: 16px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-node-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.a11y-node-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #0f172a;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  word-break: break-all;
  margin-bottom: 8px;
}

.a11y-node-copy-btn {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.a11y-node-copy-btn:hover { background: #dbeafe; }

.a11y-node-html {
  background: #1e293b;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 8px;
}

.a11y-node-summary {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  padding-left: 4px;
}

/* Heading Tree Outline */
.a11y-heading-tree {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.a11y-heading-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.a11y-heading-item:last-child { border-bottom: none; }

.a11y-heading-tag {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.a11y-tag-h1 { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.a11y-tag-h2 { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.a11y-tag-h3 { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.a11y-tag-h4 { background: #ecfccb; color: #4d7c0f; border: 1px solid #d9f99d; }
.a11y-tag-h5, .a11y-tag-h6 { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.a11y-alert-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* W3C Validator */
.w3c-summary {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.w3c-box {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

.w3c-error { background: rgba(220, 38, 38, 0.1); color: var(--color-red); border: 1px solid rgba(220, 38, 38, 0.2); }
.w3c-warning { background: rgba(217, 119, 6, 0.1); color: var(--color-orange); border: 1px solid rgba(217, 119, 6, 0.2); }
.w3c-total { background: rgba(37, 99, 235, 0.1); color: var(--color-blue); border: 1px solid rgba(37, 99, 235, 0.2); }

.w3c-card {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 20px;
  margin: 16px 0;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
  box-shadow: var(--shadow-sm);
}

.w3c-item-error { border-left-color: var(--color-red); }
.w3c-item-warning { border-left-color: var(--color-orange); }

/* W3C Validator & Accordion */
.accordion-section {
  padding: 0 !important;
  overflow: hidden;
}

.accordion-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.accordion-header:hover {
  background: var(--color-surface-hover);
}

.accordion-icon {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: transform 0.3s ease;
}

.accordion-content {
  padding: 0 32px 32px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s;
}

.accordion-section.open .accordion-content {
  max-height: 2000px; /* Large enough for content */
  padding: 0 32px 32px;
}

.accordion-section.open .accordion-icon {
  transform: rotate(180deg);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.w3c-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.w3c-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.w3c-filter-label:hover {
  transform: translateY(-1px);
  border-color: var(--color-blue);
}

.w3c-filter-label.active {
  background: var(--color-surface);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
  color: var(--color-blue);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.blue { background: var(--color-blue); }
.dot.red { background: var(--color-red); }
.dot.orange { background: var(--color-orange); }

.w3c-issues-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.w3c-card.hidden {
  display: none;
}
.w3c-card h4 {
  margin-bottom: 12px;
  font-size: 16px;
}

.w3c-card pre {
  background: var(--color-bg);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin-top: 12px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.show-errors-only .w3c-item-info { display: none !important; }

@media (max-width: 768px) {
  .dual-speed-grid { grid-template-columns: 1fr; }
  .wave-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-search h2 { font-size: 28px; }
  .diagnose-section { padding: 24px; }
}

@media (max-width: 600px) {
  .search-bar { flex-direction: column; }
  .wave-grid { grid-template-columns: 1fr; }
}

/* App Footer */
.app-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 20px;
  margin-top: 80px;
  background: var(--color-bg);
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copyright {
  color: var(--color-text-secondary);
  font-size: 14px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL DASHBOARD TABS BAR
   ═══════════════════════════════════════════════════════════════ */
.dashboard-tabs-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  position: sticky;
  top: 61px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.tabs-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dashboard-tabs-bar {
    top: 49px;
    padding: 0;
  }
  .nav-tab {
    padding: 10px 12px;
    font-size: 12px;
  }
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  flex: 1 1 0;
  min-width: max-content;
  white-space: nowrap;
  box-sizing: border-box;
  text-align: center;
}

.nav-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.nav-tab.active {
  color: var(--color-blue);
  border-bottom-color: var(--color-blue);
  background: rgba(37, 99, 235, 0.03);
}

.tab-badge-new {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.tab-tool-view {
  padding-bottom: 80px;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY TESTING 2 STYLES
   ═══════════════════════════════════════════════════════════════ */
.a11y2-main-view {
  padding-bottom: 80px;
}

.a11y2-badge {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

.a11y2-url-tips {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
}

/* Loader Card */
.a11y2-loader-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px;
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.spinner.large {
  width: 48px;
  height: 48px;
  border-width: 4px;
  margin: 0 auto 20px;
}

.loading-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.progress-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.progress-step.active {
  background: #eff6ff;
  color: #1e40af;
  font-weight: 600;
}

.progress-step.done {
  color: #059669;
}

.progress-step .step-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
}

/* Error Banner */
.a11y2-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 700px;
  margin: 30px auto;
}

.a11y2-error-banner .error-icon {
  font-size: 28px;
}

.a11y2-error-banner h4 {
  color: #991b1b;
  margin-bottom: 4px;
}

.a11y2-error-banner p {
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 12px;
}

.btn-retry {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Action Bar */
.a11y2-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.meta-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.url-pill {
  background: #f1f5f9;
  color: #0f172a;
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.date-pill {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.btn-report-download {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  transition: all 0.2s;
}

.btn-report-download:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Notice Banner */
.a11y2-notice-banner {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.a11y2-notice-banner .notice-icon {
  font-size: 18px;
  margin-top: 1px;
}

.a11y2-notice-banner .notice-text {
  font-size: 13px;
  color: #1e40af;
  line-height: 1.5;
}

/* Hero Metrics */
.a11y2-hero-metrics {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .a11y2-hero-metrics {
    grid-template-columns: 1fr;
  }
}

.a11y2-score-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.a11y2-score-card h3 {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.score-circle-container {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 16px;
}

.score-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 10;
}

.score-circle-meter {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.score-circle-meter[data-theme="green"] { stroke: #059669; }
.score-circle-meter[data-theme="amber"] { stroke: #d97706; }
.score-circle-meter[data-theme="red"] { stroke: #dc2626; }

.score-number-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.score-number {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
}

.score-number[data-theme="green"] { color: #059669; }
.score-number[data-theme="amber"] { color: #d97706; }
.score-number[data-theme="red"] { color: #dc2626; }

.score-max {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.compliance-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #f1f5f9; color: #475569; }

/* Counter Cards Grid */
.a11y2-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-card .card-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.metric-card .card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-card .card-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  margin: 4px 0 2px;
}

.metric-card .card-sub {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.card-total .card-value { color: #2563eb; }
.card-passed .card-value { color: #059669; }
.card-failed .card-value { color: #dc2626; }
.card-warnings .card-value { color: #d97706; }
.card-manual .card-value { color: #7c3aed; }

/* Category Filter Pills */
.a11y2-categories-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.a11y2-categories-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.category-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.category-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.category-pill.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.count-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
}

.category-pill.active .count-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.count-badge.fail {
  background: #fee2e2;
  color: #991b1b;
}

.count-badge.pass {
  background: #d1fae5;
  color: #065f46;
}

/* Filter Toolbar */
.a11y2-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.filter-group select {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.search-group input {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 200px;
}

@media (max-width: 640px) {
  .a11y2-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-controls {
    flex-direction: column;
    width: 100%;
  }
  .filter-group {
    justify-content: space-between;
    width: 100%;
  }
  .filter-group select {
    flex: 1;
  }
  .search-group {
    width: 100%;
  }
  .search-group input {
    width: 100%;
    min-width: unset;
  }
}

.search-group input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Results Table */
.a11y2-table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
  width: 100%;
  max-width: 100%;
}

.a11y2-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.a11y2-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.a11y2-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.a11y2-table tr:hover {
  background: #f8fafc;
}

.table-issue-name {
  font-weight: 600;
  color: #0f172a;
}

.table-category-tag {
  color: #64748b;
  font-size: 11px;
}

.table-desc {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475569;
}

.element-code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-tag-fail { background: #fee2e2; color: #991b1b; }
.status-tag-pass { background: #d1fae5; color: #065f46; }
.status-tag-manual { background: #fef3c7; color: #92400e; }
.status-tag-warning { background: #fed7aa; color: #9a3412; }

.sev-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.sev-critical { background: #dc2626; color: #ffffff; }
.sev-serious { background: #ea580c; color: #ffffff; }
.sev-moderate { background: #f59e0b; color: #ffffff; }
.sev-minor { background: #94a3b8; color: #ffffff; }

.wcag-level-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 2px;
}

.disability-pill {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-block;
}

.btn-inspect-issue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-inspect-issue:hover {
  background: #2563eb;
  color: #ffffff;
}

.a11y2-empty-table {
  padding: 40px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* Manual Section */
.a11y2-manual-section {
  background: #fffdf5;
  border: 1px solid #fef08a;
  border-radius: 16px;
  padding: 28px;
  margin-top: 30px;
}

.manual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.manual-header h3 {
  color: #854d0e;
  font-size: 18px;
}

.manual-tag {
  background: #fef9c3;
  color: #a16207;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid #fde047;
}

.manual-intro {
  font-size: 13px;
  color: #713f12;
  margin-bottom: 20px;
}

.manual-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.manual-check-card {
  background: #ffffff;
  border: 1px solid #fef08a;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.manual-check-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.manual-check-card h5 {
  font-size: 14px;
  color: #0f172a;
  margin: 0;
}

.manual-wcag-badge {
  font-size: 10px;
  font-weight: 700;
  color: #854d0e;
  background: #fef9c3;
  padding: 2px 6px;
  border-radius: 4px;
}

.manual-check-card .card-desc {
  font-size: 12px;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.4;
}

.manual-check-card .card-method {
  background: #f8fafc;
  border-left: 3px solid #f59e0b;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 10px;
}

.manual-check-card .card-meta {
  font-size: 11px;
  color: #94a3b8;
}

/* Modal Drawer */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-title-wrapper h3 {
  font-size: 18px;
  color: #0f172a;
  margin-bottom: 6px;
}

.modal-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-section label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-section p {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

.why-it-matters-box {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  color: #1e3a8a !important;
}

.modal-grid-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
}

.modal-grid-meta div label {
  margin-bottom: 2px;
}

.modal-grid-meta div span {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.btn-copy-code {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.code-selector {
  display: block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  color: #0f172a;
  word-break: break-all;
}

.modal-section pre {
  background: #0f172a;
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}

.modal-section pre code {
  color: #f8fafc;
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

.remediation-box {
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #14532d;
  line-height: 1.5;
}

.link-help {
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.link-help:hover {
  text-decoration: underline;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

/* ─── ACCESSIBLE FOCUS-VISIBLE & KEYBOARD NAVIGATION ─── */
:focus-visible {
  outline: 3px solid #6366f1 !important;
  outline-offset: 2px !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
.test-chip:focus-visible,
.nav-tab:focus-visible,
.category-pill:focus-visible,
.accordion-header:focus-visible,
.w3c-filter-label:focus-visible,
.btn-inspect-issue:focus-visible,
.modal-close-btn:focus-visible,
.btn-copy-code:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid #6366f1 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25) !important;
}

.test-chip:focus-visible {
  border-color: #6366f1 !important;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 🛡️ SECURITY HEADERS STYLES (SECURITYHEADERS.COM / SCOTT HELME)  */
/* ═══════════════════════════════════════════════════════════════ */

.sec-headers-main-view {
  display: block;
  padding-bottom: 80px;
}

.sec-headers-hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
  padding: 60px 16px 20px;
  position: relative;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sec-options-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 14px;
}

.sec-option-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
}

.sec-option-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* Loader Card */
.sec-loader-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  max-width: 600px;
  margin: 20px auto 40px;
  box-shadow: var(--shadow-md);
}

.sec-loader-card .spinner.large {
  width: 48px;
  height: 48px;
  border-width: 4px;
  margin: 0 auto 18px;
}

.sec-loader-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.sec-loading-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* Error Banner */
.sec-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 720px;
  margin: 20px auto;
}

.sec-error-banner .error-icon {
  font-size: 26px;
}

.sec-error-banner h4 {
  margin: 0 0 6px 0;
  color: #991b1b;
  font-size: 16px;
  font-weight: 700;
}

.sec-error-banner p {
  margin: 0 0 12px 0;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

/* Results Container & Action Bar */
.sec-results-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}

.sec-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Security Panels */
.sec-panel {
  background: var(--color-surface);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.sec-panel-header {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sec-panel-header-missing {
  background: #fee2e2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
}

.sec-panel-header-raw {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-copy-raw-headers {
  background: #ffffff;
  color: #1e40af;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-raw-headers:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.sec-panel-body {
  padding: 24px;
}

.sec-panel-body-table {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

.sec-panel-intro {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* Summary Flex Layout */
.sec-summary-flex {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .sec-summary-flex {
    flex-direction: column;
    align-items: center;
  }
}

.sec-grade-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}

.sec-grade-badge {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  font-size: 64px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  font-family: var(--font-heading);
}

.sec-grade-badge.grade-aplus { background: #16a34a; color: #ffffff; }
.sec-grade-badge.grade-a { background: #22c55e; color: #ffffff; }
.sec-grade-badge.grade-b { background: #facc15; color: #1e293b; }
.sec-grade-badge.grade-c { background: #f97316; color: #ffffff; }
.sec-grade-badge.grade-d { background: #ea580c; color: #ffffff; }
.sec-grade-badge.grade-e { background: #ef4444; color: #ffffff; }
.sec-grade-badge.grade-f { background: #dc2626; color: #ffffff; }
.sec-grade-badge.grade-r { background: #6b7280; color: #ffffff; }

.sec-grade-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-top: 10px;
}

.sec-meta-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.sec-meta-row {
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 12px;
}

@media (max-width: 600px) {
  .sec-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .sec-meta-lbl {
    width: auto;
    font-size: 12px;
  }
  .sec-action-bar,
  .a11y2-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .sec-action-bar .action-buttons,
  .a11y2-action-bar .action-buttons {
    width: 100%;
  }
  .btn-report-download {
    width: 100%;
    justify-content: center;
  }
}

.sec-meta-lbl {
  width: 100px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.sec-site-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.sec-site-link:hover {
  text-decoration: underline;
}

.sec-ip-val,
.sec-time-val {
  font-family: monospace;
  color: var(--color-text);
  font-weight: 500;
}

.sec-meta-headers-row {
  align-items: flex-start;
}

.sec-summary-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.sec-badge-pill {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  display: inline-block;
  letter-spacing: 0.02em;
}

.sec-badge-pill.pass { background: #16a34a; }
.sec-badge-pill.fail { background: #dc2626; }
.sec-badge-pill.warning { background: #f97316; }

/* Advanced Promo Box */
.sec-advanced-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.sec-advanced-content p {
  margin: 0;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.btn-try-now {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-try-now:hover {
  background: #1d4ed8;
}

/* Missing Headers Panel */
.sec-missing-card {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  border-radius: 0 6px 6px 0;
}

.sec-missing-card:last-child {
  margin-bottom: 0;
}

.sec-missing-title {
  color: #dc2626;
  font-weight: 700;
  font-size: 14px;
  font-family: monospace;
  margin-bottom: 4px;
}

.sec-missing-desc {
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.sec-all-present-msg {
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
  margin: 0;
}

/* Raw Headers Table */
.sec-raw-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

.sec-raw-table thead th {
  background: #f8fafc;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.sec-raw-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.sec-raw-table tbody tr:last-child {
  border-bottom: none;
}

.sec-raw-table tbody tr:hover {
  background: #f8fafc;
}

.sec-raw-table td {
  padding: 10px 16px;
  font-size: 12px;
  vertical-align: top;
  line-height: 1.5;
}

.sec-raw-key {
  font-family: monospace;
  font-weight: 700;
  word-break: break-all;
}

.sec-raw-key.security {
  color: #15803d; /* Green for security headers */
}

.sec-raw-key.disclosure {
  color: #2563eb; /* Blue for disclosure headers */
}

.sec-raw-key.standard {
  color: #334155; /* Neutral dark for standard headers */
}

.sec-raw-val {
  font-family: monospace;
  color: #0f172a;
  word-break: break-all;
}

/* Upcoming Headers */
.sec-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sec-upcoming-item {
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.sec-upcoming-name {
  font-weight: 700;
  font-family: monospace;
  color: #0f172a;
  font-size: 13px;
  margin-bottom: 4px;
}

.sec-upcoming-desc {
  font-size: 12px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}

/* Additional Information */
.sec-additional-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sec-info-card {
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 4px solid #22c55e;
  border-radius: 0 6px 6px 0;
}

.sec-info-card.disclosure {
  border-left-color: #3b82f6;
}

.sec-info-title {
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 4px;
}

.sec-info-text {
  font-size: 13px;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   TECHNICAL SEO VIEW & SERP PREVIEW STYLES
   ═══════════════════════════════════════════════════════════════ */
.serp-preview-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  font-family: Arial, sans-serif;
  max-width: 650px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.serp-url {
  font-size: 13px;
  color: #202124;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-title {
  font-size: 19px;
  color: #1a0dab;
  line-height: 1.3;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.serp-title:hover {
  text-decoration: underline;
}

.serp-snippet {
  font-size: 14px;
  color: #4d5156;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.headings-tree-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.heading-tree-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  padding: 5px 8px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.heading-tree-item:hover {
  background: var(--color-surface-hover);
}

.heading-tag-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
  flex-shrink: 0;
}

.heading-tag-badge.h1 { background: #2563eb; }
.heading-tag-badge.h2 { background: #4f46e5; }
.heading-tag-badge.h3 { background: #0891b2; }
.heading-tag-badge.h4 { background: #64748b; }
.heading-tag-badge.h5 { background: #94a3b8; }
.heading-tag-badge.h6 { background: #cbd5e1; color: #334155; }

.heading-tree-text {
  color: var(--color-text);
  font-weight: 500;
  word-break: break-word;
}

.seo-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #fee2e2;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
}

.seo-issue-item.warning {
  border-color: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.seo-issue-item.low {
  border-color: #e0f2fe;
  border-left: 4px solid #0284c7;
}

.seo-pass-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #10b981;
  border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════
   DETAILED SEO EXTENSION SUB-TABS & VISUAL SIGNAL INSPECTOR
   ═══════════════════════════════════════════════════════════════════ */
.seo-subtabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--color-border);
  padding: 0 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.seo-subtab-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  top: 2px;
}

.seo-subtab-btn:hover {
  color: var(--color-primary);
  background: var(--color-bg);
}

.seo-subtab-btn:focus {
  outline: none;
}

.seo-subtab-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.seo-subtab-btn.active {
  color: var(--color-primary);
  background: #ffffff;
  border-color: #2563eb;
  border-bottom: 2px solid #ffffff;
  z-index: 2;
  box-shadow: 0 -2px 8px rgba(37, 99, 235, 0.08);
}

.detailed-seo-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.detailed-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #94a3b8;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
}

.seo-field-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-start;
}

.seo-field-row:last-child {
  border-bottom: none;
}

.seo-field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seo-field-label .field-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.seo-field-len {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
}

.seo-field-len.warning {
  color: #f59e0b;
}

.seo-field-len.danger {
  color: #ef4444;
}

.seo-field-content {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  word-break: break-word;
}

.seo-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.seo-link:hover {
  text-decoration: underline;
}

.seo-summary-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.seo-summary-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.seo-summary-grid-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}

.seo-summary-grid-table td {
  padding: 12px 14px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.seo-summary-grid-table th:last-child,
.seo-summary-grid-table td:last-child {
  border-right: none;
}

.seo-summary-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}

.seo-footer-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.seo-footer-link:hover {
  text-decoration: underline;
}

.seo-summary-card-footer .sep {
  color: #cbd5e1;
  margin: 0 8px;
}

/* Detailed Code Lists (ALL LINKS, ALL METAS, ALL SCRIPTS, XFN) */
.seo-code-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.seo-code-item {
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  word-break: break-all;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.seo-code-key {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.seo-code-val {
  color: #2563eb;
}

.seo-code-val.text-val {
  color: #334155;
}

.seo-extension-citation {
  margin-top: 24px;
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px dashed #e2e8f0;
  padding-top: 12px;
}

/* Links Tab (Screenshot 4) */
.links-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.links-metric-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lm-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.lm-val {
  font-size: 38px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.lm-val.text-danger {
  color: #dc2626;
}

.seo-detailed-links-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 6px;
}

.seo-link-card {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seo-link-href {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}

.seo-link-href:hover {
  text-decoration: underline;
}

.seo-link-title-line {
  font-size: 12px;
  color: #475569;
}

.seo-link-title-line .missing-slash {
  color: #dc2626;
  font-weight: 700;
}

.seo-link-occurrence {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

/* Social Tab (Screenshot 5) */
.social-fields-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-field-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.social-field-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.social-field-key {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
}

.social-field-val {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
}

.social-img-preview-box {
  width: 96px;
  height: 96px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.social-img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-img-url-text {
  font-size: 12px;
  color: #2563eb;
  word-break: break-all;
}

/* Tools Tab */
.seo-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.seo-tool-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.seo-tool-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.seo-tool-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seo-tool-icon {
  font-size: 20px;
}

.seo-tool-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.seo-tool-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Image Extractor UI Specific Styles */
.ie-format-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ie-format-pill {
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.ie-format-pill:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.ie-format-pill strong {
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.ie-filter-btn {
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.ie-filter-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.ie-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#ieBtnStart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

#ieBtnLabel {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* SEO KNOWLEDGE BASE, FEATURE PILLARS, HOW-IT-WORKS & FAQ STYLING   */
/* ═══════════════════════════════════════════════════════════════════ */
.seo-knowledge-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.seo-section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 8px;
}

.seo-section-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.seo-feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.seo-feature-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-lg);
}

.seo-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: #eff6ff;
  color: var(--color-primary);
}

.seo-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.seo-card-desc {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.seo-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.seo-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

/* Steps Grid */
.seo-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.seo-step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
  position: relative;
}

.seo-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0;
  transition: all 0.2s ease;
  overflow: hidden;
}

.faq-item[open] {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.faq-question {
  padding: 18px 24px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 0.9rem;
  color: var(--color-primary);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px 24px;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

/* Trust Badges Strip */
.seo-trust-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 20px;
}

.trust-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  padding: 6px 16px;
}






