/* ── ToolScout Design System ── */

:root {
  /* Brand palette */
  --c-indigo: #6366F1;
  --c-indigo-dark: #4F46E5;
  --c-indigo-light: #818CF8;
  --c-violet: #8B5CF6;
  --c-blue: #3B82F6;
  --c-emerald: #10B981;
  --c-amber: #F59E0B;
  --c-rose: #F43F5E;
  --c-cyan: #06B6D4;

  /* Category colors */
  --cat-comparisons: #F59E0B;
  --cat-best-of: #3B82F6;
  --cat-tutorials: #10B981;
  --cat-alternatives: #8B5CF6;

  /* Surface */
  --bg: #0F172A;
  --bg-2: #1E293B;
  --bg-3: #334155;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-card-hover: rgba(51, 65, 85, 0.7);
  --text: #F1F5F9;
  --text-2: #CBD5E1;
  --text-muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.15);
  --border-hover: rgba(148, 163, 184, 0.3);

  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 780px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

/* Background gradient mesh */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 70% 50% at 80% 10%, rgba(139, 92, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 50% 90%, rgba(16, 185, 129, 0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--c-indigo-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--c-indigo); text-decoration: none; }

/* ── Nav ── */
nav {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-indigo-light);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo svg { width: 28px; height: 28px; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--text); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--c-indigo-light);
  background: rgba(99, 102, 241, 0.1);
  text-decoration: none;
}

/* ── Layout ── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 56px;
  position: relative;
  z-index: 1;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--c-indigo-light);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero .badge .dot {
  width: 8px; height: 8px;
  background: var(--c-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-emerald);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
  line-height: 1.15;
  background: linear-gradient(135deg, #F1F5F9 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}
.hero .stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero .stat-item {
  text-align: center;
}
.hero .stat-num {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--c-indigo-light), var(--c-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Category Nav ── */
.cat-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.cat-nav-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-nav-item svg { width: 18px; height: 18px; }

/* ── Section Title ── */
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Article Grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

/* ── Card ── */
.card {
  display: block;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-accent, var(--c-indigo));
  opacity: 0.8;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  text-decoration: none;
}
.card .cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.card .cat-icon { width: 20px; height: 20px; flex-shrink: 0; }
.card .cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--card-accent, var(--c-indigo-light));
}
.card h3 {
  font-size: 18px;
  margin: 0 0 10px;
  line-height: 1.4;
  color: var(--text);
  font-weight: 700;
}
.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.card .date {
  color: var(--text-muted);
  font-size: 13px;
}
.card .read-time {
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Article Page ── */
.article-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}
.article-body .article-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.article-body h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.2;
  color: var(--text);
}
.article-body .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.article-body .meta .cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cat-color, var(--c-indigo-light));
  background: color-mix(in srgb, var(--cat-color, var(--c-indigo)) 15%, transparent);
}
.article-body .meta .cat-badge svg { width: 14px; height: 14px; }
.article-body .meta .dot { color: var(--text-muted); }
.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 44px 0 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-body h2 .h2-icon { width: 24px; height: 24px; flex-shrink: 0; }
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}
.article-body p { margin-bottom: 20px; color: var(--text-2); }
.article-body ul, .article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}
.article-body li { margin-bottom: 8px; color: var(--text-2); }
.article-body ul li::marker { color: var(--c-indigo-light); }
.article-body ol li::marker { color: var(--c-indigo-light); font-weight: 700; }

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-body th {
  background: rgba(99, 102, 241, 0.12);
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-body td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}
.article-body tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}
.article-body tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.3);
}

/* Blockquote → Info box */
.article-body blockquote {
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--c-indigo);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  margin: 24px 0;
  font-style: normal;
}

/* Code */
.article-body code {
  background: rgba(99, 102, 241, 0.15);
  color: var(--c-indigo-light);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 14px;
  font-family: 'SF Mono', 'Fira Code', Monaco, monospace;
}
.article-body strong { font-weight: 700; color: var(--text); }
.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 36px 0;
}

/* Tags */
.tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--c-indigo-light);
  margin: 2px;
  font-weight: 500;
}

/* ── Rating Card (for tool reviews) ── */
.rating-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin: 20px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.rating-card .score-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.rating-card .score-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Pros/Cons Box ── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.pros-box, .cons-box {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.pros-box {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}
.cons-box {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
}
.pros-box h4, .cons-box h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pros-box h4 { color: var(--c-emerald); }
.cons-box h4 { color: var(--c-rose); }
.pros-box ul, .cons-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pros-box li, .cons-box li {
  font-size: 14px;
  margin-bottom: 6px;
  padding-left: 20px;
  position: relative;
  color: var(--text-2);
}
.pros-box li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--c-emerald);
  font-weight: 700;
}
.cons-box li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--c-rose);
  font-weight: 700;
}

/* ── CTA Box ── */
.cta-box {
  margin: 36px 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius);
  text-align: center;
}
.cta-box h3 {
  margin: 0 0 8px;
  color: var(--text);
}
.cta-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 16px;
}
.cta-box .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--c-indigo), var(--c-violet));
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}
.cta-box .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  color: #fff;
}

/* ── Page Content ── */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 1;
}
.page-content h1 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}
.page-content h2 {
  font-size: 22px;
  margin: 32px 0 12px;
  color: var(--text);
}
.page-content p { margin-bottom: 16px; color: var(--text-2); }
.page-content ul { padding-left: 24px; margin-bottom: 16px; }
.page-content li { color: var(--text-2); margin-bottom: 6px; }

/* ── Footer ── */
footer {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 36px 0;
  position: relative;
  z-index: 1;
}
footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer p { color: var(--text-muted); font-size: 14px; }
footer .footer-links a {
  color: var(--text-muted);
  margin-left: 20px;
  font-size: 14px;
  transition: color 0.2s;
}
footer .footer-links a:hover { color: var(--c-indigo-light); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 8px; font-size: 13px; }
  .hero h1 { font-size: 30px; }
  .hero { padding: 56px 24px 40px; }
  .hero .stats { gap: 24px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-body h1 { font-size: 26px; }
  .pros-cons { grid-template-columns: 1fr; }
  footer .footer-inner { flex-direction: column; text-align: center; }
}

/* ── SVG Illustration containers ── */
.illustration {
  margin: 32px 0;
  text-align: center;
}
.illustration svg { max-width: 100%; height: auto; }
.illustration .caption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}
