/* BestSiteFor — minimal modern stylesheet */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef2ff;
  --success: #059669;
  --warning: #d97706;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #0f1629;
    --bg-card: #131b33;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --muted: #94a3b8;
    --border: #1e293b;
    --border-strong: #334155;
    --accent: #818cf8;
    --accent-2: #c084fc;
    --accent-soft: #1e1b4b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(11, 16, 32, 0.85); }
}
.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  max-width: 1100px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.primary-nav { display: flex; gap: 18px; flex-shrink: 0; }
.primary-nav a { color: var(--text-soft); font-size: 15px; font-weight: 500; }
.primary-nav a:hover { color: var(--accent); text-decoration: none; }

/* --- Search (header) --- */
.search {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 100;
}
.search-results[hidden] { display: none; }
.search-result {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.active {
  background: var(--accent-soft);
  text-decoration: none;
}
.search-result strong { display: block; font-size: 15px; margin-bottom: 2px; }
.search-result span { color: var(--muted); font-size: 13px; }
.search-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 14px; }

@media (max-width: 720px) {
  .header-row { flex-wrap: wrap; padding: 10px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .primary-nav { margin-left: auto; }
}

/* --- Hero --- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse at top left, rgba(79, 70, 229, 0.10), transparent 50%),
    radial-gradient(ellipse at top right, rgba(236, 72, 153, 0.08), transparent 50%);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 18px;
}
.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 0 32px;
}
.hero-meta { color: var(--muted); font-size: 14px; margin-top: 16px; }

.hero-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 560px;
}
.hero-search input {
  flex: 1;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}
.hero-search button {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-md);
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.hero-search-results { top: calc(100% + 12px); }

/* --- Sections --- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); }
.section h2 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

/* --- Category grid --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cat-card {
  position: relative;
  display: block;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  text-decoration: none;
}
.cat-card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.cat-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cat-arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--muted);
  font-size: 18px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}
.cat-card:hover .cat-arrow { opacity: 1; transform: translateX(0); color: var(--accent); }

/* --- Recent list --- */
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; }
.recent-item a { flex: 1; color: var(--text); }
.recent-item a:hover { color: var(--accent); text-decoration: none; }
.recent-item strong { display: block; font-size: 16px; margin-bottom: 4px; }
.recent-tldr { color: var(--muted); font-size: 14px; }
.recent-item time { color: var(--muted); font-size: 13px; flex-shrink: 0; }

/* --- Trust grid --- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.trust-item {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  text-align: center;
}
.trust-item strong { display: block; margin-bottom: 6px; font-size: 17px; }
.trust-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  margin: 24px 0 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* --- Article header --- */
.article-header { margin: 16px 0 28px; }
.article-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 800;
}
.article-meta { color: var(--muted); font-size: 14px; margin: 0; }
.article-meta a { color: var(--muted); text-decoration: underline; }

/* --- Quick answer (LLM-friendly) --- */
.quick-answer {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 24px;
  position: relative;
}
.qa-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.quick-answer p { margin: 0; font-size: 17px; color: var(--text); }

/* --- TL;DR --- */
.tldr {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 36px;
}
.tldr-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; }
.tldr p { margin: 0; }

/* --- Rankings table --- */
.table-wrap { overflow-x: auto; margin: 20px 0 40px; border-radius: var(--radius); border: 1px solid var(--border); }
table.rankings { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--bg-card); }
table.rankings th, table.rankings td { padding: 12px 16px; text-align: left; vertical-align: top; }
table.rankings thead { background: var(--bg-soft); }
table.rankings th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.rankings tbody tr { border-top: 1px solid var(--border); }
table.rankings td.rank { font-weight: 700; color: var(--accent); width: 40px; }
table.rankings a { color: var(--text); font-weight: 600; }
table.rankings a:hover { color: var(--accent); }

/* --- Item cards (detailed) --- */
.rankings-detailed { margin: 40px 0; }
.item-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  scroll-margin-top: 80px;
}
.item-card:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.item-rank-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.item-body h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.item-tag { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.item-verdict { margin: 0 0 16px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 16px 0; }
.pros, .cons { padding: 14px 16px; border-radius: var(--radius-sm); }
.pros { background: rgba(5, 150, 105, 0.06); }
.cons { background: rgba(217, 119, 6, 0.06); }
.pros h4, .cons h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.pros h4 { color: var(--success); }
.cons h4 { color: var(--warning); }
.pros ul, .cons ul { padding-left: 18px; margin: 0; font-size: 15px; }
.pros li, .cons li { margin-bottom: 4px; }
.item-price, .item-sources { font-size: 14px; color: var(--muted); margin: 8px 0; }
.item-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.1s, background 0.15s;
}
.item-cta:hover { background: var(--accent); text-decoration: none; transform: translateY(-1px); }

@media (max-width: 640px) {
  .item-card { grid-template-columns: 1fr; padding: 20px; }
  .item-rank-badge { width: 44px; height: 44px; font-size: 15px; border-radius: 10px; }
  .pros-cons { grid-template-columns: 1fr; }
}

/* --- Methodology --- */
.methodology-section { margin: 48px 0; padding: 24px; background: var(--bg-soft); border-radius: var(--radius); }
.methodology-list { padding-left: 22px; margin: 12px 0 0; }
.methodology-list li { margin-bottom: 8px; }

/* --- FAQ --- */
.faq-section { margin: 48px 0; }
details.faq {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
details.faq:first-of-type { border-top: 1px solid var(--border); }
details.faq summary {
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  padding-right: 24px;
  position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.15s;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 10px 0 0; color: var(--text-soft); }

/* --- Article footer --- */
.article-footer {
  margin: 56px 0 24px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
}
.article-footer p { margin: 0; }
.article-footer a { color: var(--accent); }

/* --- Category page list --- */
.page-list { list-style: none; padding: 0; margin: 32px 0; }
.page-list li {
  border-bottom: 1px solid var(--border);
}
.page-list a {
  display: block;
  padding: 18px 0;
  color: var(--text);
}
.page-list a:hover { color: var(--accent); text-decoration: none; }
.page-list strong { display: block; font-size: 17px; margin-bottom: 4px; }
.page-list span { color: var(--muted); font-size: 14px; }
.empty-state { padding: 48px; text-align: center; background: var(--bg-soft); border-radius: var(--radius); color: var(--muted); }

/* --- Static pages --- */
.static-page { padding: 32px 0 48px; }
.static-page h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.02em; margin: 16px 0 24px; }
.static-page h2 { font-size: 22px; margin: 32px 0 12px; }
.static-page p { margin: 0 0 16px; }
.static-page ul, .static-page ol { padding-left: 22px; margin: 0 0 16px; }
.static-page li { margin-bottom: 6px; }

/* --- Accessibility --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* --- TOC --- */
.toc { background: var(--bg-soft); border-radius: var(--radius); padding: 16px 22px; margin: 0 0 32px; font-size: 15px; }
.toc strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 22px; list-style: decimal; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--text-soft); }
.toc a:hover { color: var(--accent); }

/* --- Related rankings --- */
.related-section { margin: 48px 0; padding: 24px; background: var(--bg-soft); border-radius: var(--radius); }
.related-list { padding-left: 22px; margin: 12px 0 0; }
.related-list li { margin-bottom: 10px; line-height: 1.5; }
.related-list a { font-weight: 600; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 72px;
  padding: 48px 0 32px;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.site-footer p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.site-footer strong { color: var(--text); }
.site-footer h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer ul a { color: var(--text-soft); font-size: 14px; }
.site-footer ul a:hover { color: var(--accent); }
.copyright { font-size: 13px; padding-top: 16px; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
