/* =========================================================
   AIVerdict Design System
   A bespoke, high-end dark theme — no CDN framework dependency
   for maximum performance and a distinct visual identity.
   ========================================================= */

:root {
  --bg: #0b0f1a;
  --bg-elevated: #111827;
  --bg-card: #131a2b;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #e5e9f2;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --accent: #6d5efc;
  --accent-2: #22d3c9;
  --accent-warm: #ff8a5c;
  --success: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --max-w: 1280px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Sora', 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.max-w-7xl { max-width: var(--max-w); margin: 0 auto; }

/* ---------- Background texture ---------- */
body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(109,94,252,0.16), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(34,211,201,0.10), transparent 40%);
  background-attachment: fixed;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 15px;
  box-shadow: 0 4px 14px rgba(109,94,252,0.4);
}
.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link-active { color: #fff; background: rgba(109,94,252,0.15); }
.search-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  font-size: 0.85rem;
  color: #fff;
  width: 220px;
  outline: none;
  transition: all 0.15s ease;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.09); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 5rem; }
.footer-heading { color: #fff; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.9rem; }
.footer-link { color: var(--text-muted); font-size: 0.875rem; }
.footer-link:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #8b7bff);
  color: #fff; font-weight: 600; font-size: 0.9rem;
  padding: 0.7rem 1.4rem; border-radius: 10px; border: none;
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(109,94,252,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(109,94,252,0.45); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.06); color: #fff; font-weight: 600; font-size: 0.9rem;
  padding: 0.7rem 1.4rem; border-radius: 10px; border: 1px solid var(--border-strong);
  cursor: pointer; transition: all 0.2s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-outline-accent {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--accent-2); border: 1px solid rgba(34,211,201,0.4);
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  transition: all 0.15s ease;
}
.btn-outline-accent:hover { background: rgba(34,211,201,0.1); }

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(109,94,252,0.12); border: 1px solid rgba(109,94,252,0.3);
  color: var(--accent-2); font-size: 0.78rem; font-weight: 600;
  padding: 0.4rem 0.9rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  max-width: 850px; margin: 0 auto 1rem;
}
.hero .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.subtitle {
  color: var(--text-muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto 2rem;
}
.hero-search {
  max-width: 560px; margin: 0 auto; position: relative;
}
.hero-search input {
  width: 100%; padding: 1rem 1.4rem 1rem 3.2rem; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  color: #fff; font-size: 1rem; outline: none;
}
.hero-search input:focus { border-color: var(--accent); }
.hero-search i { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat-num { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: #fff; }
.hero-stat-label { color: var(--text-faint); font-size: 0.8rem; }

/* ---------- Section ---------- */
.section { padding: 3.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.section-head h2 { font-size: 1.6rem; font-weight: 800; }
.section-head p { color: var(--text-muted); font-size: 0.9rem; margin: 0.25rem 0 0; }
.section-link { color: var(--accent-2); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

/* ---------- Category chips ---------- */
.chip-row { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); transition: all 0.15s ease;
}
.chip:hover, .chip.chip-active { color: #fff; border-color: var(--accent); background: rgba(109,94,252,0.12); }
.chip i { color: var(--accent-2); font-size: 0.8rem; }

/* ---------- Cards: Tool ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; transition: all 0.2s ease; position: relative; overflow: hidden;
}
.tool-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.tool-card-top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.tool-logo {
  width: 46px; height: 46px; border-radius: 10px; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--accent-2);
  flex-shrink: 0; overflow: hidden; border: 1px solid var(--border);
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; }
.tool-card h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.tool-card .tagline { color: var(--text-muted); font-size: 0.83rem; margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 700;
  padding: 0.25rem 0.6rem; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-hands-on { background: rgba(52,211,153,0.15); color: var(--success); }
.badge-researched { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.badge-featured { background: rgba(255,138,92,0.15); color: var(--accent-warm); }
.badge-free { background: rgba(34,211,201,0.15); color: var(--accent-2); }
.rating-stars { color: #fbbf24; font-size: 0.8rem; }
.tool-card-desc { color: var(--text-muted); font-size: 0.85rem; margin: 0.8rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.price-tag { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

/* ---------- Post card ---------- */
.post-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.2s ease; }
.post-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.post-card-img { width: 100%; height: 170px; object-fit: cover; background: var(--bg-elevated); }
.post-card-body { padding: 1.3rem; }
.post-type-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-2); }
.post-card h3 { font-size: 1.05rem; margin: 0.5rem 0; }
.post-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 0.9rem; align-items: center; margin-top: 1rem; color: var(--text-faint); font-size: 0.78rem; }

/* ---------- Detail pages ---------- */
.detail-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); }
.breadcrumb { color: var(--text-faint); font-size: 0.82rem; margin-bottom: 1.2rem; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 0.4rem; }
.detail-title-row { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; }
.detail-logo { width: 76px; height: 76px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--accent-2); overflow: hidden; flex-shrink: 0; }
.detail-logo img { width: 100%; height: 100%; object-fit: cover; }
.detail-title-row h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.detail-meta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; color: var(--text-muted); font-size: 0.88rem; }

.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; padding: 3rem 0; align-items: start; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } }

.prose { color: var(--text); font-size: 1.02rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose p { margin: 0 0 1.1rem; color: #cbd5e1; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.4rem; color: #cbd5e1; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent-2); text-decoration: underline; }
.prose img { border-radius: 12px; margin: 1.2rem 0; border: 1px solid var(--border); }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1.2rem; color: var(--text-muted); font-style: italic; margin: 1.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.6rem 0.9rem; text-align: left; }
.prose th { background: var(--bg-card); color: #fff; }

.verdict-box { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 1.6rem; margin: 1.5rem 0; }
.verdict-box h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-2); margin-bottom: 0.6rem; }
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.5rem 0; }
@media (max-width: 600px) { .pros-cons-grid { grid-template-columns: 1fr; } }
.pc-box { border-radius: var(--radius); padding: 1.2rem 1.4rem; border: 1px solid var(--border); }
.pc-box.pros { background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.25); }
.pc-box.cons { background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.25); }
.pc-box h4 { font-size: 0.85rem; margin-bottom: 0.7rem; }
.pc-box.pros h4 { color: var(--success); }
.pc-box.cons h4 { color: var(--danger); }
.pc-box ul { list-style: none; padding: 0; margin: 0; }
.pc-box li { display: flex; gap: 0.5rem; font-size: 0.88rem; color: #cbd5e1; margin-bottom: 0.55rem; }
.pc-box.pros li i { color: var(--success); margin-top: 0.2rem; }
.pc-box.cons li i { color: var(--danger); margin-top: 0.2rem; }

.faq-item { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: #fff; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '\\002B'; font-size: 1.2rem; color: var(--text-faint); }
.faq-item[open] summary::after { content: '\\2212'; }
.faq-item p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.8rem; }

.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.4rem; }
.sidebar-box h4 { font-size: 0.9rem; margin-bottom: 1rem; }
.sidebar-cta { text-align: center; }
.sources-list { list-style: none; padding: 0; margin: 0; }
.sources-list li { margin-bottom: 0.6rem; font-size: 0.85rem; }
.sources-list a { color: var(--accent-2); }

/* ---------- Ad slots ---------- */
.ad-slot { background: rgba(255,255,255,0.03); border: 1px dashed var(--border-strong); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 0.75rem; min-height: 90px; margin: 1.8rem 0; }

/* ---------- Comparison table ---------- */
.compare-table-wrap { overflow-x: auto; margin: 2rem 0; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 0.9rem 1.1rem; font-size: 0.9rem; text-align: left; }
.compare-table th { background: var(--bg-card); color: #fff; }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(11,15,26,0.97); backdrop-filter: blur(10px); border-top: 1px solid var(--border-strong); z-index: 100; }

/* ---------- Simple static pages ---------- */
.static-page { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; }
.static-page h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.static-page h2 { font-size: 1.3rem; margin-top: 2rem; }
.static-page p, .static-page li { color: #cbd5e1; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; }
.pagination a, .pagination span { padding: 0.55rem 1rem; border-radius: 8px; font-size: 0.85rem; border: 1px solid var(--border); color: var(--text-muted); }
.pagination a:hover { border-color: var(--accent); color: #fff; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.2rem; color: var(--text-faint); margin-bottom: 1rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
