/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Design System — Noir & Amber */
:root {
  --text: #1C1917;
  --text-secondary: #78716C;
  --bg: #FAFAF9;
  --surface: #FFFBEB;
  --accent: #D97706;
  --accent-hover: #B45309;
  --border: #E7E5E4;
  --max-width: 720px;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-header .logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-right: auto;
  letter-spacing: -0.01em;
}

.logo-dupe {
  font-weight: 400;
}

.logo-scented {
  font-weight: 400;
  color: var(--accent);
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Article */
.article h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.article .article-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.article h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.article h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.article h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.article p {
  margin-bottom: 1.25rem;
}

/* WCAG AA fix: use Deep Amber for inline text links */
.article a {
  color: #B45309;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article a:hover {
  color: var(--accent-hover);
}

.article strong {
  font-weight: 600;
}

.article em {
  color: var(--text-secondary);
}

.article ul, .article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article li {
  margin-bottom: 0.35rem;
}

/* Quick Answer / TL;DR Box */
.quick-answer {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.quick-answer strong:first-child {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Product Card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

/* Rank Badge */
.rank-badge {
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* Quick Facts */
.quick-facts {
  margin: 0.75rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.quick-facts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}

.quick-facts dt {
  font-weight: 600;
  color: var(--text-secondary);
}

.quick-facts dd {
  margin: 0;
}

/* Pros/Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.pros-cons .pros h4,
.pros-cons .cons h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.pros h4 { color: #15803D; }
.cons h4 { color: #B45309; }

.pros-cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.pros-cons li {
  margin-bottom: 0.25rem;
  padding-left: 1.25rem;
  position: relative;
}

.pros li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: #15803D;
  font-weight: 600;
}

.cons li::before {
  content: "\2212";
  position: absolute;
  left: 0;
  color: #B45309;
  font-weight: 600;
}

/* CTA Button */
.cta-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
  margin-top: 0.5rem;
}

.article .cta-primary,
.cta-primary {
  color: #fff;
  text-decoration: none;
}

.cta-primary:hover,
.article .cta-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.comparison-table th {
  background: var(--surface);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.85rem;
}

.comparison-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* Legacy markdown tables */
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  overflow-x: auto;
  display: block;
}

.article thead { display: table-header-group; }
.article tbody { display: table-row-group; }
.article tr {
  display: table-row;
  border-bottom: 1px solid var(--border);
}

.article th, .article td {
  display: table-cell;
  padding: 0.6rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.article th {
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

/* Homepage */
.homepage-hero {
  margin-bottom: 2rem;
}

.homepage-hero h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.homepage-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Article list (home page) */
.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  background: var(--surface);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
}

.article-list li:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-list a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.3;
}

.article-list a:hover {
  color: var(--accent);
}

.article-list .meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 3rem;
}

.site-footer p + p {
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .article h1, .homepage-hero h1 { font-size: 1.6rem; }
  .article h2 { font-size: 1.2rem; }
  .pros-cons { grid-template-columns: 1fr; }
  .site-header .logo { font-size: 1.15rem; }
}
