:root {
  --brand: #3B82F6;
  --brand-dark: #2563EB;
  --brand-light: #EFF6FF;
  --accent: #10B981;
  --black: #111827;
  --dark: #1F2937;
  --mid: #6B7280;
  --light-gray: #F9FAFB;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --bg: #FFFFFF;
  --serif: 'Georgia', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --gold: #F59E0B;
  --purple: #8B5CF6;
  --rose: #F43F5E;
  --teal: #14B8A6;
  --orange: #F97316;
  --sky: #0EA5E9;
}
[data-theme="dark"] {
  --black: #F9FAFB;
  --dark: #E5E7EB;
  --mid: #9CA3AF;
  --light-gray: #1F2937;
  --border: #374151;
  --white: #111827;
  --bg: #111827;
  --brand-light: #1E293B;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--dark);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.skip-link {
  position: absolute; top: -100px; left: 16px; background: var(--brand);
  color: #fff; padding: 8px 16px; z-index: 200; border-radius: 0 0 4px 4px;
  font-size: .85rem; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* Layout */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Masthead ── */
.masthead {
  border-bottom: 3px solid var(--brand);
  background: var(--white);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(59,130,246,.08);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 56px;
}
.masthead-brand { display: flex; align-items: baseline; gap: 8px; }
.masthead-logo {
  font-family: var(--sans); font-weight: 900; font-size: 1.5rem;
  color: var(--black); text-decoration: none; letter-spacing: -.03em;
}
.masthead-logo:hover { text-decoration: none; }
.masthead-logo span { color: var(--brand); }
.masthead-tagline {
  font-size: .7rem; font-weight: 600; color: var(--mid);
  letter-spacing: .04em; text-transform: uppercase;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--mid); font-size: .85rem; font-weight: 600;
  padding: 6px 12px; border-radius: 4px; transition: color .15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--black); text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--mid);
  width: 32px; height: 32px; border-radius: 6px; font-size: 1rem;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--dark); color: var(--dark); }

/* ── Hero ── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 20px 40px; text-align: center;
  background: linear-gradient(180deg, var(--brand-light) 0%, var(--white) 100%);
}
.hero-kicker {
  font-size: .8rem; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700; color: var(--black); line-height: 1.15;
  max-width: 780px; margin: 0 auto 16px; letter-spacing: -.02em;
}
.hero .lede {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--mid); max-width: 620px; margin: 0 auto;
  line-height: 1.6;
}

/* ── Article meta ── */
.article-meta {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  font-size: .85rem; color: var(--mid); flex-wrap: wrap;
}
.article-meta strong { color: var(--dark); }

/* ── Kicker ── */
.kicker {
  font-size: .8rem; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 2px solid var(--brand); display: inline-block;
}

/* ── Content sections ── */
.article-body { padding: 32px 0; }
.article-body h2 {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  color: var(--black); margin: 40px 0 16px; line-height: 1.3;
}
.article-body h3 {
  font-family: var(--sans); font-size: 1.2rem; font-weight: 700;
  color: var(--black); margin: 32px 0 12px; line-height: 1.3;
}
.article-body p {
  font-size: 1rem; line-height: 1.8; color: var(--dark);
  margin-bottom: 16px;
}
.article-body ul, .article-body ol {
  padding-left: 24px; margin-bottom: 16px;
}
.article-body li {
  font-size: .95rem; line-height: 1.7; color: var(--dark);
  margin-bottom: 8px;
}
.article-body em { font-style: italic; }
.article-body blockquote {
  border-left: 3px solid var(--brand); padding: 16px 20px;
  margin: 20px 0; background: var(--brand-light);
  font-style: italic; color: var(--dark);
}

/* ── Entry card ── */
.entry-card {
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  padding: 28px 24px; margin: 24px 0; background: var(--white);
  transition: box-shadow .15s;
}
.entry-card:hover { box-shadow: 0 4px 16px rgba(59,130,246,.1); }
.entry-card.rank-1 { border-left-color: #F59E0B; background: linear-gradient(90deg, rgba(245,158,11,.04) 0%, var(--white) 8%); }
.entry-card.rank-2 { border-left-color: #9CA3AF; }
.entry-card.rank-3 { border-left-color: #B45309; }
.entry-card:nth-child(4) { border-left-color: var(--purple); }
.entry-card:nth-child(5) { border-left-color: var(--teal); }
.entry-card:nth-child(6) { border-left-color: var(--rose); }
.entry-card:nth-child(7) { border-left-color: var(--orange); }
.entry-card:nth-child(8) { border-left-color: var(--sky); }
.entry-card:nth-child(9) { border-left-color: var(--accent); }
.entry-card:nth-child(10) { border-left-color: var(--purple); }
.entry-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800;
  font-size: .85rem; margin-right: 12px; flex-shrink: 0;
}
.entry-card.rank-1 .entry-rank { background: #F59E0B; }
.entry-card.rank-2 .entry-rank { background: #9CA3AF; }
.entry-card.rank-3 .entry-rank { background: #B45309; }
.entry-header { display: flex; align-items: center; margin-bottom: 4px; }
.entry-header h3 { margin: 0; font-size: 1.25rem; }
.entry-tagline {
  font-size: .85rem; color: var(--mid); font-style: italic;
  margin-bottom: 12px; padding-left: 44px;
}
.entry-nugget {
  font-size: .95rem; font-weight: 500; color: var(--dark);
  line-height: 1.7; margin-bottom: 16px;
  padding: 12px 16px; background: var(--light-gray);
  border-radius: 4px;
}
.entry-details {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .8rem;
}
.entry-detail {
  display: flex; flex-direction: column; gap: 2px;
}
.entry-detail-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mid); font-size: .7rem;
}
.entry-detail-value { color: var(--dark); font-weight: 500; }
.entry-services {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.entry-service-tag {
  font-size: .72rem; font-weight: 600; padding: 3px 8px;
  background: var(--brand-light); color: var(--brand-dark);
  border-radius: 3px; text-transform: uppercase; letter-spacing: .03em;
}

/* ── Comparison table ── */
.comparison-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .85rem; }
.comparison-table th {
  background: var(--brand); color: #fff; text-align: left;
  padding: 10px 14px; font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.comparison-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--dark);
}
.comparison-table tr:nth-child(even) { background: var(--light-gray); }
.comparison-table tr:hover { background: var(--brand-light); }
.comparison-table tr td:first-child { font-weight: 800; color: var(--brand); }

/* ── FAQ ── */
.faq-section { margin: 40px 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  font-weight: 700; color: var(--black); padding: 16px 0;
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; font-size: 1rem;
}
.faq-question:hover { color: var(--brand); }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--brand); font-weight: 400; }
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer {
  display: none; padding: 0 0 16px; font-size: .95rem;
  line-height: 1.7; color: var(--dark);
}
.faq-item.open .faq-answer { display: block; }

/* ── Author bio ── */
.author-box {
  display: flex; gap: 16px; padding: 24px;
  border: 1px solid var(--border); background: var(--light-gray);
  margin: 40px 0; border-radius: 4px;
}
.author-box .author-info { flex: 1; }
.author-box .author-name {
  font-weight: 700; color: var(--black); font-size: 1rem; margin-bottom: 4px;
}
.author-box .author-role {
  font-size: .8rem; color: var(--mid); margin-bottom: 8px;
}
.author-box .author-bio-text {
  font-size: .9rem; line-height: 1.6; color: var(--dark);
}

/* ── Homepage cards ── */
.listicle-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; margin: 32px 0;
}
.listicle-card {
  border: 1px solid var(--border); border-top: 4px solid var(--brand);
  padding: 28px 24px; background: var(--white);
  transition: box-shadow .15s, transform .15s;
}
.listicle-card:nth-child(2) { border-top-color: var(--purple); }
.listicle-card:nth-child(3) { border-top-color: var(--teal); }
.listicle-card:hover { box-shadow: 0 4px 16px rgba(59,130,246,.12); transform: translateY(-2px); }
.listicle-card h3 {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  color: var(--black); margin-bottom: 8px; line-height: 1.3;
}
.listicle-card p {
  font-size: .9rem; line-height: 1.6; color: var(--mid); margin-bottom: 16px;
}
.listicle-card .card-cta {
  font-size: .82rem; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── Footer ── */
.site-footer {
  border-top: 3px solid var(--brand);
  padding: 32px 20px;
  background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
  text-align: center; font-size: .85rem; color: var(--mid);
}
.site-footer strong { color: var(--dark); }
.site-footer .tagline { margin: 4px 0; }
.site-footer .disclaimer { margin-top: 12px; font-size: .75rem; }
.site-footer a { color: var(--brand); }

/* ── Disclosure bar ── */
.disclosure {
  background: var(--brand-light); border: 1px solid var(--border);
  padding: 12px 16px; margin: 20px 0; border-radius: 4px;
  font-size: .82rem; color: var(--mid); line-height: 1.5;
}
.disclosure strong { color: var(--dark); }

/* ── TOC ── */
.toc {
  background: var(--light-gray); border: 1px solid var(--border);
  padding: 20px 24px; margin: 24px 0; border-radius: 4px;
}
.toc-title {
  font-weight: 700; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--mid); margin-bottom: 12px;
}
.toc ol { padding-left: 20px; margin: 0; }
.toc li {
  font-size: .9rem; line-height: 1.8; color: var(--brand);
}
.toc a { font-weight: 500; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .masthead-tagline { display: none; }
  .nav-links a { font-size: .75rem; padding: 4px 8px; }
  .entry-card { padding: 20px 16px; }
  .entry-details { flex-direction: column; }
  .comparison-table { font-size: .75rem; }
  .comparison-table th, .comparison-table td { padding: 8px 10px; }
  .author-box { flex-direction: column; }
  .listicle-grid { grid-template-columns: 1fr; }
}
