/* ===== Base & Typography ===== */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-accent: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --gold: #b45309;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05);
  --maxw: 880px;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
article { padding: 28px 0 64px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.brand span { color: var(--brand); }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--brand-dark); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ===== Hero / H1 ===== */
h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2; letter-spacing: -.02em; font-weight: 800;
  margin: 8px 0 6px;
}
.lede { font-size: 18px; color: var(--muted); margin: 0 0 18px; }
.updated-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); background: var(--bg-accent); padding: 4px 12px; border-radius: 999px; font-weight: 600; }

/* ===== Quick Answer ===== */
.quick-answer {
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px 22px; margin: 22px 0 30px;
}
.quick-answer h2 { margin: 0 0 10px; font-size: 19px; color: var(--brand-dark); }
.quick-answer ol { margin: 0; padding-left: 20px; }
.quick-answer li { margin: 4px 0; }
.quick-answer li strong { color: var(--ink); }

/* ===== Headings ===== */
h2 {
  font-size: clamp(22px, 3vw, 27px);
  font-weight: 700; letter-spacing: -.01em;
  margin: 40px 0 14px; color: var(--ink);
  border-bottom: 2px solid var(--line); padding-bottom: 8px;
}
h3 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; color: var(--ink); }
h4 { font-size: 17px; font-weight: 700; margin: 18px 0 8px; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin: 5px 0; }

/* ===== Methodology ===== */
.methodology { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 22px 0; }
.criteria-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 640px) { .criteria-grid { grid-template-columns: 1fr; } }
.criteria-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.criteria-card h4 { margin: 0 0 4px; color: var(--brand-dark); }
.criteria-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* ===== Service Card ===== */
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px; margin: 22px 0;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
}
.service.top-pick { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffbeb 0%, #ffffff 120px); }
.rank-badge {
  position: absolute; top: -12px; left: 22px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .02em;
}
.top-pick .rank-badge { background: var(--gold); }
.service-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service-head h3 { margin: 0; }
.service-rating { font-size: 15px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.service-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin: 6px 0 12px; }
.service-meta strong { color: var(--ink-soft); }
.pros { list-style: none; padding: 0; margin: 8px 0; }
.pros li { position: relative; padding-left: 26px; margin: 6px 0; }
.pros li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.cons { list-style: none; padding: 0; margin: 8px 0; }
.cons li { position: relative; padding-left: 26px; margin: 6px 0; color: var(--muted); }
.cons li::before { content: "✕"; position: absolute; left: 0; top: 0; color: var(--red); font-weight: 800; }

/* ===== CTA Block ===== */
.cta {
  display: block; text-align: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #fff; border-radius: var(--radius);
  padding: 18px 24px; margin: 18px 0;
  font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 20px rgba(37,99,235,.3);
  transition: transform .15s ease;
}
.cta:hover { transform: translateY(-1px); text-decoration: none; }
.cta small { display: block; font-weight: 500; font-size: 13px; opacity: .9; margin-top: 4px; }
.cta-banner {
  background: #0f172a; color: #fff;
  border-radius: var(--radius); padding: 24px;
  margin: 26px 0; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
}
.cta-banner p { margin: 0; color: #cbd5e1; font-size: 15px; }
.cta-banner .cta { margin: 0; background: var(--brand); box-shadow: none; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th { background: var(--bg-accent); text-align: left; padding: 12px 14px; font-weight: 700; color: var(--ink-soft); border-bottom: 2px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--bg-soft); }

/* ===== Checklist ===== */
.checklist {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 20px 22px; margin: 22px 0;
}
.checklist ul { list-style: none; padding: 0; margin: 8px 0 0; }
.checklist li { position: relative; padding-left: 28px; margin: 7px 0; }
.checklist li::before { content: "☑"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ===== Tip / Mistake boxes ===== */
.tip, .mistake, .expert {
  border-radius: var(--radius); padding: 16px 20px; margin: 18px 0; border-left: 4px solid;
}
.tip { background: var(--brand-soft); border-color: var(--brand); }
.mistake { background: #fef2f2; border-color: var(--red); }
.expert { background: #fffbeb; border-color: var(--gold); }
.tip strong, .mistake strong, .expert strong { display: block; margin-bottom: 4px; font-size: 15px; }
.tip strong { color: var(--brand-dark); }
.mistake strong { color: var(--red); }
.expert strong { color: var(--gold); }

/* ===== FAQ ===== */
.faq { margin: 30px 0; }
.faq details {
  border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px; margin: 10px 0; background: #fff;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--ink); list-style: none; position: relative; padding-left: 24px; }
.faq summary::before { content: "+"; position: absolute; left: 0; color: var(--brand); font-weight: 800; font-size: 18px; }
.faq details[open] summary::before { content: "–"; }
.faq details p { color: var(--ink-soft); margin: 0 0 12px; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { font-size: 14px; color: var(--muted); margin: 16px 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li::after { content: "›"; margin-left: 6px; color: var(--line); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--muted); }

/* ===== Footer ===== */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 36px 0; margin-top: 40px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--muted); font-size: 15px; }
.footer-disclosure { font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }

/* ===== Legal pages ===== */
.legal h1 { margin-top: 24px; }
.legal h2 { margin-top: 32px; }
.legal p, .legal li { color: var(--ink-soft); }
