@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&family=Merriweather:wght@700;900&display=swap');

:root {
  --bg: #ffffff;
  --bg-alt: #f5f3ef;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e0ddd8;
  --border-light: #ece9e4;
  --accent: #b91c1c;
  --accent-hover: #991b1b;
  --accent-subtle: #fef2f2;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --star: #d97706;
  --green: #15803d;
  --green-bg: #f0fdf4;
  --yellow: #a16207;
  --yellow-bg: #fefce8;
  --code-bg: #f4f4f5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.08);
  --radius-sm: 4px;
  --radius: 6px;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: 'Merriweather', Georgia, serif; color: var(--text); line-height: 1.3; }
h1 { font-size: 2rem; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 700; }

.container {
  width: min(100% - clamp(32px, 5vw, 80px), 780px);
  margin-inline: auto;
}
.container-wide {
  width: min(100% - clamp(32px, 5vw, 80px), 1240px);
  margin-inline: auto;
}
/* Prevent long text / table cells from forcing any layout wider than its viewport */
.article-body, .guide-card, .product-pick { min-width: 0; overflow-wrap: break-word; }

/* ===== HEADER ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg);
}
.header-inner {
  width: min(100% - clamp(32px, 5vw, 80px), 1240px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand { flex: 0 0 auto; }
.brand {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand span { color: var(--accent); }
.header-nav { display: flex; gap: 20px; align-items: center; }
.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.header-nav a:hover { color: var(--text); }

/* ===== HERO ===== */
.hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border-light);
}
.hero p.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero h1 { margin-bottom: 12px; }
.hero p.lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}
.hero-meta {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== NAV BAR ===== */
.top-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.85rem;
}
.top-bar-inner {
  width: min(100% - clamp(32px, 5vw, 80px), 1240px);
  margin-inline: auto;
  display: flex;
  gap: clamp(4px, 1vw, 16px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.top-bar-inner::-webkit-scrollbar { display: none; }
.top-bar a {
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
}
.top-bar a:hover { background: var(--border-light); color: var(--text); }

/* ===== ARTICLE BODY ===== */
.article-body { padding: 32px 0 64px; }
.article-body p { margin: 16px 0; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin: 6px 0; }
.article-body strong { font-weight: 600; }

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 16px 0 0;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); }

/* ===== PRODUCT PICKS ===== */
.product-pick {
  margin: 28px 0;
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.product-pick h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.product-pick .byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.product-pick .price-tag {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 3px;
}
.product-pick .award-tag {
  display: inline-block;
  background: var(--yellow-bg);
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 3px;
}
.product-pick p { margin: 8px 0; font-size: 0.95rem; }
.product-pick .verdict { font-size: 0.9rem; color: var(--text-secondary); }
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
}
.cta-button:hover { background: var(--accent-hover); }

/* ===== COMPARISON TABLE ===== */
.comparison-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  margin: 0;
  font-size: clamp(0.78rem, 1.8vw, 0.88rem);
}
.comparison-table th {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.comparison-table td {
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  vertical-align: top;
}
.comparison-table tr:nth-child(even) td { background: var(--bg-alt); }
.winner-cell { background: var(--green-bg) !important; font-weight: 600; }

/* ===== STARS ===== */
.stars { color: var(--star); font-size: 0.9rem; letter-spacing: 1px; }

/* ===== BUYING GUIDE SECTION ===== */
.guide-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.guide-section h2 { margin-top: 0; }
.guide-grid {
  display: grid;
  /* Each card expands fluidly; cards only move to a new row when needed. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin-top: 20px;
}
.guide-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 24px);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}
.guide-card:hover { border-color: var(--accent); }
.guide-card .card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}
.guide-card h3 { font-size: 1rem; margin-bottom: 6px; }
.guide-card p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

/* ===== NEWSLETTER ===== */
.newsletter {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.newsletter h3 { font-size: 1.1rem; margin-bottom: 4px; }
.newsletter p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  flex: 1;
  max-width: 280px;
}
.newsletter button {
  padding: 10px 20px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.newsletter button:hover { background: #333; }

/* ===== DISCLOSURE ===== */
.disclosure {
  margin: 48px 0 0;
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.disclosure strong { color: var(--text-secondary); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 24px;
  margin-top: 48px;
}
.footer-grid {
  width: min(100% - clamp(32px, 5vw, 80px), 1240px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.footer-grid p { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.footer-links strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}
.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.footer-links a:hover { color: var(--text); }
.copyright {
  width: min(100% - clamp(32px, 5vw, 80px), 1240px);
  margin-inline: auto;
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-light);
  font-size: clamp(0.72rem, 2vw, 0.8rem);
  color: var(--text-muted);
}

/* ===== ARTICLE ===== */
.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.byline-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 12px;
}
.byline-author strong { color: var(--text); }

/* ===== AD PLACEHOLDER ===== */
.ad-placeholder {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-nav a:not(:first-child):not(:last-child) { display: none; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-nav { gap: 12px; }
  .newsletter { padding: 28px 0; }
  .newsletter form { flex-direction: column; }
  .newsletter input { max-width: 100%; }
  .hero { padding: 24px 0 16px; }
  .guide-section { padding: 32px 0; }
  .product-pick { padding: clamp(16px, 4vw, 24px); }
}
@media (min-width: 901px) {
  /* On medium+ screens give article tables room to breathe */
  .article-body { overflow-x: visible; }
}
