/* CardCompare - Design System v3
   Dark financial editorial. Typography-first, WCAG AA compliant. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

/* ---- Theme Tokens ---- */
:root {
  --bg: #0d0d0d;
  --surface: #161618;
  --surface-hover: #1e1e21;
  --border: #2a2a2d;
  --border-light: #1f1f22;
  --text: #e4e0d8;
  --text-muted: #b0aca5;
  --text-dim: #7a7772;
  --accent: #d4a853;
  --accent-hover: #e0b963;
  --accent-bg: rgba(212, 168, 83, 0.1);
  --accent-border: rgba(212, 168, 83, 0.25);
  --green: #4ade80;
  --red: #f87171;
  --green-bg: rgba(74, 222, 128, 0.08);
  --red-bg: rgba(248, 113, 113, 0.08);
  --radius: 6px;
  --radius-lg: 10px;
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Typography Scale ---- */
h1, h2, h3, h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: 42px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
h4 { font-size: 16px; line-height: 1.4; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---- Header ---- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.site-logo span { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--text); }

/* ---- Page Subtext ---- */
.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 1.65;
}

/* ---- Verdict Paragraph ---- */
.verdict {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 72ch;
}
.verdict strong { color: var(--text); font-weight: 600; }

/* ---- Hero ---- */
.hero {
  padding: 80px 0 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 640px;
  margin-bottom: 12px;
  color: var(--text);
}

.hero p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ---- Category Grid ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 48px 0;
}

.cat-card {
  background: var(--surface);
  padding: 32px 24px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-card:hover {
  background: var(--surface-hover);
}

.cat-card .cat-icon {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.cat-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.cat-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Section Title ---- */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 56px 0 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- Top Picks ---- */
.top-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pick-card {
  background: var(--surface);
  padding: 32px;
  position: relative;
  transition: background 0.15s;
}

.pick-card:hover { background: var(--surface-hover); }

.pick-card .badge {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pick-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  padding-right: 80px;
}

.pick-card .issuer {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
}

.pick-card .features {
  list-style: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.pick-card .features li {
  padding: 5px 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pick-card .features li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.pick-card .cta {
  display: inline-block;
  background: var(--accent);
  color: #0d0d0d;
  padding: 10px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.pick-card .cta:hover { background: var(--accent-hover); }

/* ---- Comparison Table ---- */
.table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th {
  padding: 16px 18px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

.compare-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
}

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

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.compare-table td:first-child a {
  color: var(--text);
}

.compare-table td:first-child a:hover {
  color: var(--accent);
}

.compare-table tr:hover td {
  background: var(--surface-hover);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  padding: 28px 0 20px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.15s;
}

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

/* ---- Card Detail Page ---- */
.card-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 24px 0;
}

.card-detail h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-detail .meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- Info Grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}

.info-item {
  background: var(--bg);
  padding: 24px 20px;
}

.info-item .label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.07em;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.info-item .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---- Pros / Cons ---- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0;
}

.pros, .cons {
  background: var(--surface);
  padding: 28px;
}

.pros h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green);
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.cons h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--red);
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.pros ul, .cons ul {
  list-style: none;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.6;
}

.pros li {
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.pros li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.cons li {
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.cons li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

/* ---- CTA Button ---- */
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #0d0d0d;
  padding: 14px 32px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  margin-top: 16px;
  transition: background 0.15s;
  letter-spacing: -0.01em;
}

.cta-btn:hover { background: var(--accent-hover); }

.cta-btn.disabled {
  background: #333;
  color: #777;
  cursor: not-allowed;
}

/* ---- Ad Slot ---- */
.ad-slot {
  text-align: center;
  margin: 36px 0;
  padding: 40px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}

/* ---- Page Content (About / Contact / Privacy / Terms) ---- */
.page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 24px 0;
}

.page-content h2 {
  font-size: 22px;
  margin: 36px 0 14px;
}

.page-content h2:first-child { margin-top: 0; }

.page-content p {
  margin-bottom: 18px;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 72ch;
  line-height: 1.75;
}

.page-content ul {
  margin-bottom: 18px;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
}

.page-content ul li {
  margin-bottom: 6px;
}

/* ---- Editorial Intro (category pages) ---- */
.editorial-intro {
  max-width: 680px;
  margin-bottom: 32px;
}
.editorial-intro p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
  padding: 28px;
  font-size: 13px;
  margin-top: 80px;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .hero { padding: 48px 0 40px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .top-picks { grid-template-columns: 1fr; }
  .card-detail { padding: 28px; }
  .page-content { padding: 28px; }
  .site-nav { gap: 18px; }
  .card-detail h2 { font-size: 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .cat-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}

/* ---- Comparison Section ---- */
.comparison-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #2a2a2a;
}
.comparison-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #e0ddd6;
  margin-bottom: 20px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.comparison-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 20px;
  transition: border-color 0.2s;
}
.comparison-card:hover {
  border-color: #d4a853;
}
.comparison-card h4 {
  margin-bottom: 8px;
}
.comparison-card h4 a {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #d4a853;
  text-decoration: none;
}
.comparison-card h4 a:hover {
  text-decoration: underline;
}
.comparison-card p {
  font-size: 14px;
  line-height: 1.7;
  color: #b0aca5;
  margin: 0;
}

@media (max-width: 600px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}
