/* ============================================
   seoscore.tools — Design System
   Light + Dark Mode / Indigo Accent
   ============================================ */

/* --- CSS Variables --- */
:root,
[data-theme="light"] {
  --bg: #FAFBFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-input: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --accent: #4F46E5;
  --accent-light: #EEF2FF;
  --accent-hover: #4338CA;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --border: #E5E7EB;
  --ring-bg: #F3F4F6;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-glow: 0 0 30px rgba(79,70,229,0.15);
  --gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
  --gradient-text: linear-gradient(135deg, #4F46E5, #06B6D4);
}

[data-theme="dark"] {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #273549;
  --bg-input: #1E293B;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent: #818CF8;
  --accent-light: #1E1B4B;
  --accent-hover: #A5B4FC;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --border: #334155;
  --ring-bg: #1E293B;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(129,140,248,0.2);
  --gradient: linear-gradient(135deg, #818CF8, #A78BFA);
  --gradient-text: linear-gradient(135deg, #818CF8, #22D3EE);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: background 0.3s ease;
}

[data-theme="light"] .header { background: rgba(250,251,252,0.85); }
[data-theme="dark"] .header { background: rgba(15,23,42,0.85); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.logo-text { letter-spacing: -0.3px; }
.logo-dot { color: var(--accent); }
.logo-icon { color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  color: var(--accent);
  font-weight: 600;
}

/* --- Language Switcher --- */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
  min-width: 130px;
}
.lang-dropdown.open { display: block; }

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.lang-option:hover { background: var(--bg-card-hover); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }

/* --- Theme Toggle --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="light"] .moon { display: none; }
[data-theme="dark"] .sun { display: none; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* --- Scan Form --- */
.scan-form {
  max-width: 600px;
  margin: 0 auto;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.input-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.scan-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  padding: 12px;
  font-family: inherit;
}
.scan-input::placeholder { color: var(--text-muted); }

.scan-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.scan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.4);
}
.scan-btn:active { transform: translateY(0); }
.scan-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Scan Counter */
.scan-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
}
.scan-counter strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.trust-sep { opacity: 0.4; }

/* --- Scan Progress --- */
.scan-progress-section { padding: 20px 0 40px; }

.scan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.scan-animation {
  display: flex;
  align-items: center;
  gap: 32px;
}

.scan-ring-container {
  position: relative;
  flex-shrink: 0;
}

.scan-ring-progress {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.5s ease;
  filter: drop-shadow(0 0 6px var(--accent));
}

.scan-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.scan-details { flex: 1; }

.scan-status {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.scan-checks { display: flex; flex-direction: column; gap: 10px; }

.scan-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.scan-check-item.active { color: var(--accent); font-weight: 500; }
.scan-check-item.done { color: var(--success); }

.check-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s;
}

.scan-check-item.active .check-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 1.5s infinite;
}

.scan-check-item.done .check-dot { background: var(--success); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* --- Results --- */
.results-section { padding: 20px 0 60px; }

.scores-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.overall-card { background: var(--gradient); color: white; border: none; }
.overall-card .score-label { opacity: 0.85; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.overall-card .score-value { color: white; }
.overall-card .score-ring circle:first-child { stroke: rgba(255,255,255,0.2); }
.overall-card .score-ring-fill { stroke: white !important; }
.overall-card .score-grade {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 1px;
}
.overall-card .score-comparison {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

.score-ring-wrap {
  position: relative;
  display: inline-block;
  margin: 8px 0;
}

.score-ring-fill {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.score-value-sm { font-size: 24px; }

.score-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
.seo-badge { background: rgba(16,185,129,0.12); color: var(--success); }
.aeo-badge { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.geo-badge { background: rgba(245,158,11,0.12); color: var(--warning); }

[data-theme="dark"] .seo-badge { background: rgba(52,211,153,0.15); }
[data-theme="dark"] .aeo-badge { background: rgba(167,139,250,0.15); }
[data-theme="dark"] .geo-badge { background: rgba(251,191,36,0.15); }

.score-card-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.score-card-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Score Legend --- */
.score-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-excellent .legend-dot { background: var(--success); }
.legend-good .legend-dot { background: #34D399; }
.legend-fair .legend-dot { background: var(--warning); }
.legend-poor .legend-dot { background: #F97316; }
.legend-bad .legend-dot { background: var(--danger); }

/* --- Tooltip --- */
.tooltip-trigger {
  position: relative;
  cursor: help;
}

.tooltip-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-secondary);
  white-space: normal;
  width: 220px;
  text-align: left;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  line-height: 1.5;
}

.tooltip-trigger:hover .tooltip-popup,
.tooltip-trigger:focus .tooltip-popup {
  display: block;
}

/* --- Detail Tabs --- */
.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; padding: 20px; }
.tab-content.active { display: block; }

.checks-list { display: flex; flex-direction: column; gap: 8px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.15s;
  animation: fadeInUp 0.3s ease both;
}
.check-row:hover { background: var(--bg-card-hover); }

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}
.check-pass { background: rgba(16,185,129,0.12); color: var(--success); }
.check-fail { background: rgba(239,68,68,0.12); color: var(--danger); }
.check-warn { background: rgba(245,158,11,0.12); color: var(--warning); }

.check-label { flex: 1; }
.check-fix {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  font-family: inherit;
}
.check-fix:hover { background: var(--accent); color: white; text-decoration: none; }

.check-tip {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

a.check-fix {
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-light), rgba(79,70,229,0.08));
  border: 1px solid rgba(79,70,229,0.15);
}
a.check-fix:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- CTA Card --- */
.cta-card {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
}

.cta-icon { margin-bottom: 12px; }

.cta-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-text {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cta-feat {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cta-feat::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(16,185,129,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%2310B981' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8l2 2 4-4' stroke='%2310B981' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.cta-buttons { display: flex; justify-content: center; gap: 12px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.4);
  color: white;
}

.btn-secondary {
  background: var(--accent-light);
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: white; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.btn-ghost:hover { color: var(--accent); }

.export-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.export-bar .btn svg {
  flex-shrink: 0;
}

/* --- How It Works --- */
.how-section { padding: 80px 0; }

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  margin: -24px auto 32px;
  max-width: 600px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient);
  color: white;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Features --- */
.features-section {
  padding: 0 0 80px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.seo-icon { background: rgba(16,185,129,0.12); color: var(--success); }
.aeo-icon { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.geo-icon { background: rgba(245,158,11,0.12); color: var(--warning); }

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Content Sections (generic) --- */
.content-section {
  padding: 60px 0;
}

.content-section + .content-section {
  padding-top: 0;
}

/* --- Definition Cards --- */
.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.definition-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.definition-card .definition-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.definition-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.definition-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.score-table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
}

.score-table th,
.compare-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg-card-hover);
}

.score-table td,
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.score-table tr:last-child td,
.compare-table tr:last-child td {
  border-bottom: none;
}

.score-table tr:hover td,
.compare-table tr:hover td {
  background: var(--bg-card-hover);
}

.highlight-col {
  background: rgba(79,70,229,0.05);
  font-weight: 600;
  color: var(--accent);
}

[data-theme="dark"] .highlight-col {
  background: rgba(129,140,248,0.08);
}

.score-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.score-excellent { background: rgba(16,185,129,0.12); color: var(--success); }
.score-good { background: rgba(52,211,153,0.12); color: #059669; }
.score-fair { background: rgba(245,158,11,0.12); color: var(--warning); }
.score-poor { background: rgba(249,115,22,0.12); color: #EA580C; }
.score-bad { background: rgba(239,68,68,0.12); color: var(--danger); }

[data-theme="dark"] .score-good { color: #34D399; }
[data-theme="dark"] .score-poor { color: #FB923C; }

/* --- Statistics --- */
.stats-section {
  padding: 60px 0;
  background: var(--bg-card-hover);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 24px 16px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 500;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.testimonial-stars {
  color: #FBBF24;
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonial-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.testimonial-role {
  font-size: 12px;
  color: var(--text-muted);
}

.testimonial-role::before {
  content: '—';
  margin-right: 4px;
}

/* --- FAQ --- */
.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-card);
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  gap: 12px;
}

.faq-question:hover { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Takeaways --- */
.takeaways-grid {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.takeaway-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.takeaway-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.takeaway-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.takeaway-item strong {
  color: var(--text);
}

/* --- History --- */
.history-section { padding: 0 0 60px; }

.history-table-wrap { overflow-x: auto; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.history-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.history-table tr:last-child td { border-bottom: none; }

.history-url {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  cursor: pointer;
}

.history-score {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
}

.history-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}
.history-btn:hover { background: var(--accent); color: white; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-built { opacity: 0.7; }

/* --- Privacy Page --- */
.privacy-page {
  padding: 80px 0 60px;
  max-width: 760px;
  margin: 0 auto;
}

.privacy-page h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.privacy-page .privacy-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.privacy-page h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.privacy-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.privacy-page ul {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

/* --- Site Type Badge --- */
.site-type-container {
  text-align: center;
  margin-bottom: 16px;
}

.site-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(79,70,229,0.15);
}

.site-type-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- N/A Checks --- */
.check-row.check-na {
  opacity: 0.45;
}

.check-na-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.na-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  user-select: none;
  transition: color 0.2s;
}

.na-section-header:hover {
  color: var(--text-secondary);
}

.na-section-header svg {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.na-section-header.open svg {
  transform: rotate(180deg);
}

.na-section-content {
  display: none;
}

.na-section-content.open {
  display: block;
}

/* --- Utility --- */
.hidden { display: none !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .scores-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .overall-card { grid-column: 1 / -1; }

  .steps-grid,
  .features-grid,
  .definition-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .scan-animation {
    flex-direction: column;
    text-align: center;
  }

  .hero { padding: 50px 0 40px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }

  .scan-btn-icon { display: none; }
  .scan-btn { padding: 12px 18px; }

  .nav-link { display: none; }

  .cta-features { flex-direction: column; align-items: center; gap: 8px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer-copy { flex-direction: column; align-items: center; }

  .tab { font-size: 13px; padding: 12px 8px; }

  .compare-table { font-size: 12px; }
  .compare-table th,
  .compare-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .scores-grid { grid-template-columns: 1fr; }
  .input-wrapper { flex-direction: column; padding: 8px; gap: 8px; }
  .input-icon { display: none; }
  .scan-btn { width: 100%; justify-content: center; }
  .trust-row { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: 1fr; }
  .score-legend { font-size: 11px; gap: 8px; }
}
