/* UI-8: Datatable Heavy (RTings-inspired)
   Palette: dark gray #1f2937 top bar, white body, blue #3b82f6 accent
   Type: Inter (Google Fonts) for headings + body
   Layout: table-first, wide container max 1140px, comparison matrix
   Cards: tabular rows (image + name + score bar + button), not card grid
   Score: .score-bar horizontal progress bar (gray bg, blue fill) + numeric value
   CTA: blue button */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --topbar: #1f2937;
  --topbar-text: #f9fafb;
  --text: #111111;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-soft: #eff6ff;
  --table-head: #f3f4f6;
  --score-track: #e5e7eb;
  --score-fill: #3b82f6;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1140px;
  --maxw-narrow: 760px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 700; line-height: 1.25; color: var(--text); }

/* Top bar — dark gray full-width strip */
.topbar {
  background: var(--topbar);
  color: var(--topbar-text);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-brand {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--topbar-text);
  letter-spacing: -0.01em;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 18px; }
.nav-links a {
  color: var(--topbar-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.85;
}
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-links a.active { color: #ffffff; opacity: 1; border-bottom: 2px solid var(--accent); }

/* Container */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero { padding: 40px 0 28px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 34px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.02em; }
.hero .lead { font-size: 17px; color: var(--text-muted); margin: 0; }

/* Section heading */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text);
}
.section-head h2 { font-size: 22px; margin: 0; font-weight: 800; }
.section-head a { font-size: 13px; font-weight: 600; }

/* Score bar — horizontal progress bar */
.score-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-bar .score-track {
  flex: 1;
  height: 8px;
  background: var(--score-track);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar .score-fill {
  height: 100%;
  background: var(--score-fill);
  border-radius: 4px;
}
.score-bar .score-value {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 38px;
  text-align: right;
}

/* Rating stars (small) */
.rating-stars { color: var(--accent); font-size: 13px; font-weight: 600; }
.rating-stars .muted { color: var(--text-muted); }

/* Product table (category/index list — tabular rows) */
.product-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.product-table thead th {
  background: var(--table-head);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.product-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.product-table tbody tr:last-child td { border-bottom: none; }
.product-table tbody tr:hover { background: var(--surface-muted); }
.product-table .col-thumb { width: 80px; }
.product-table .product-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--surface-muted);
  border-radius: var(--radius);
}
.product-table .product-name { font-size: 15px; font-weight: 700; color: var(--text); }
.product-table .product-name a { color: var(--text); }
.product-table .product-name a:hover { color: var(--accent-dark); }
.product-table .product-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.product-table .col-score { width: 220px; }
.product-table .col-cta { width: 150px; text-align: right; }

/* Comparison matrix table (header row = product names) */
.compare-matrix {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  background: var(--surface);
}
.compare-matrix thead th {
  background: var(--table-head);
  padding: 14px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  vertical-align: bottom;
}
.compare-matrix thead .col-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.compare-matrix thead .col-product { font-size: 14px; font-weight: 700; color: var(--text); }
.compare-matrix tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.compare-matrix tbody tr:nth-child(even) td { background: var(--surface-muted); }
.compare-matrix tbody td.row-label { font-weight: 600; color: var(--text); background: var(--table-head); }
.compare-matrix tbody tr:last-child td { border-bottom: none; }

/* CTA: blue button */
.cta-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  border: 1px solid var(--accent);
}
.cta-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }

/* Article page */
.article-page { padding: 36px 0 56px; }
.article-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-header .category-tag {
  font-size: 12px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: block;
  font-weight: 700;
}
.article-header h1 { font-size: 32px; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.article-header .article-meta { font-size: 13px; color: var(--text-muted); }
.article-hero-img { width: 100%; max-height: 420px; object-fit: cover; margin: 24px 0; border-radius: var(--radius); }
.article-disclosure {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  font-size: 13px;
  margin: 24px 0;
  color: var(--text);
  border-radius: var(--radius);
}
.article-content { font-size: 16px; line-height: 1.7; }
.article-content h2 { font-size: 22px; margin: 32px 0 12px; font-weight: 800; }
.article-content h3 { font-size: 18px; margin: 26px 0 10px; }
.article-content p { margin: 0 0 18px; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 22px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 6px 0 6px 18px;
  color: var(--text-muted);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.article-content th { background: var(--table-head); font-weight: 700; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.pros-cons h3 { font-size: 15px; }
.scorecard { margin: 24px 0; }
.scorecard table { font-size: 14px; border: 1px solid var(--border); }
.scorecard td:last-child { text-align: right; font-weight: 700; }

/* Category page */
.category-page { padding: 36px 0 56px; }
.category-page h1 { font-size: 30px; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.category-page .lead { color: var(--text-muted); margin: 0 0 24px; font-size: 16px; }

/* Legal pages — data-table style TOC + content */
.legal-page { padding: 36px 0 56px; }
.legal-toc {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 28px;
}
.legal-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 12px; font-weight: 700; }
.legal-toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.legal-toc li { margin-bottom: 6px; font-size: 14px; }
.legal-toc a { color: var(--accent-dark); font-weight: 500; }
.legal-page h1 { font-size: 30px; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.legal-page h2 { font-size: 20px; margin: 32px 0 10px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.legal-page h3 { font-size: 16px; margin: 22px 0 8px; }
.legal-page p, .legal-page ul, .legal-page ol { margin: 0 0 14px; }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }
.legal-page .lead { font-size: 16px; color: var(--text-muted); }
.legal-page .contact-email { font-size: 17px; font-weight: 600; color: var(--accent-dark); }
.legal-page .disclosure-callout {
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  margin: 18px 0;
  border-left: 3px solid var(--accent);
}
.legal-revision { color: var(--text-muted); font-size: 12px; margin-top: 28px; }

/* Footer */
.site-footer {
  background: var(--topbar);
  color: var(--topbar-text);
  margin-top: 56px;
  padding: 40px 24px 24px;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: var(--maxw); margin: 0 auto 24px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--topbar-text); margin: 0 0 12px; font-weight: 700; opacity: 0.8; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--topbar-text); font-size: 13px; opacity: 0.85; }
.footer-grid a:hover { opacity: 1; }
.footer-grid .affiliate-disclosure { font-size: 12px; color: var(--topbar-text); line-height: 1.55; margin: 0; opacity: 0.75; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  color: var(--topbar-text);
  text-align: center;
  opacity: 0.75;
}

.affiliate-disclosure { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* Responsive */
@media (max-width: 900px) {
  .product-table .col-score { width: 160px; }
  .compare-matrix { font-size: 13px; }
}
@media (max-width: 640px) {
  .product-table thead { display: none; }
  .product-table, .product-table tbody, .product-table tr, .product-table td { display: block; width: 100%; }
  .product-table tbody tr { border-bottom: 2px solid var(--border); padding: 12px 0; }
  .product-table td { border: none; padding: 6px 14px; }
  .product-table .col-cta { text-align: left; }
  .product-table .col-thumb, .product-table .col-score { width: auto; }
  .compare-matrix { font-size: 12px; }
  .hero h1, .category-page h1, .article-header h1, .legal-page h1 { font-size: 24px; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .legal-toc ul { columns: 1; }
}
