/* Theme tokens (Graphite & Emerald): every colour on the page comes from this block */
:root {
  --dark: #111827;          /* header, hero, dark sections, footer */
  --dark-2: #1f2937;        /* cards on dark sections */
  --accent: #047857;        /* buttons, links, bars */
  --accent-dark: #065f46;
  --accent-rgb: 4, 120, 87;
  --accent-soft: #e6f4ee;   /* callouts, icon chips */
  --accent-tint: #f3faf7;   /* highlighted table row, hover */
  --accent-border: #bfe3d3;
  --highlight: #6ee7b7;     /* accent text on dark backgrounds */
  --on-dark: #f3f4f6;
  --on-dark-muted: #c3c8d0;
  --ink: #1f2937;
  --muted: #5b6472;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--dark); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 18px; }
h3 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0 0 16px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--dark); color: var(--on-dark-muted); }
.section.dark h2, .section.dark h3 { color: var(--white); }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero .eyebrow, .section.dark .eyebrow { color: var(--highlight); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.narrow { max-width: 820px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 0.9rem; color: var(--white);
}
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--on-dark-muted); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--white);
  font-size: 1.6rem; cursor: pointer; padding: 4px 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.28); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }

/* Hero */
.hero {
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(var(--accent-rgb), 0.28), transparent 62%),
    var(--dark);
  color: var(--on-dark-muted);
  padding: 110px 0 96px;
}
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 900px; margin: 0 0 22px; }
.hero h1 span { color: var(--highlight); }
.hero p.lead { color: var(--on-dark-muted); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 34px; }
.pill {
  font-size: 0.82rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--on-dark);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.note {
  margin-top: 40px; padding: 16px 20px;
  border-left: 3px solid var(--highlight);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 10px 10px 0;
  font-size: 0.92rem; max-width: 820px;
}
.note strong { color: var(--white); }

/* Callouts */
.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0 0;
}
.callout strong { color: var(--dark); }

/* Answer split */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.answer-card {
  background: var(--dark); color: var(--on-dark-muted);
  border-top: 4px solid var(--highlight);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow);
}
.answer-card h3 { color: var(--white); }
.answer-card .rank { font-size: 3rem; font-weight: 800; color: var(--highlight); line-height: 1; }
.answer-card a.btn { margin-top: 10px; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); margin-top: 28px; }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--dark); color: var(--white); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--accent-tint); }
td.num { font-weight: 800; color: var(--accent); width: 70px; }
tr.featured td { background: var(--accent-tint); }
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); color: var(--white);
  padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}

/* Framework + calculator */
.framework { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 28px; align-items: start; }
.weights { list-style: none; margin: 0; padding: 0; }
.weights li { margin-bottom: 14px; }
.weights .row { display: flex; justify-content: space-between; font-weight: 600; color: var(--dark); font-size: 0.95rem; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.calc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.calc h3 { margin-bottom: 4px; }
.calc small { color: var(--muted); display: block; margin-bottom: 16px; }
.calc-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.calc-row select {
  font: inherit; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--dark);
}
.calc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.calc-total output { font-size: 2.4rem; font-weight: 800; color: var(--accent); }

/* Provider cards */
.providers { display: grid; gap: 22px; margin-top: 32px; }
.provider {
  display: grid; grid-template-columns: 64px 1fr; gap: 22px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.provider.featured { border: 2px solid var(--accent); box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.12); }
.provider .num {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 1.4rem;
}
.provider.featured .num { background: var(--accent); color: var(--white); }
.provider p:last-child { margin-bottom: 0; }
.validate { font-size: 0.95rem; background: var(--bg-alt); border-radius: 10px; padding: 12px 16px; }

/* Card grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 14px;
}
.card p { font-size: 0.95rem; margin: 0; }
.section.dark .card { background: var(--dark-2); border-color: rgba(255, 255, 255, 0.08); }
.section.dark .card:hover { border-color: var(--highlight); }
.section.dark .card p { color: var(--on-dark-muted); }
.section.dark .card .icon { background: rgba(255, 255, 255, 0.08); color: var(--highlight); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 32px 0 0; position: relative; counter-reset: step; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 60px; margin-bottom: 26px; }
.timeline li::before {
  content: counter(step); counter-increment: step;
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: grid; place-items: center; font-weight: 800;
}
.timeline h3 { margin-bottom: 4px; font-size: 1.08rem; }
.timeline p { margin: 0; font-size: 0.96rem; }

/* Lists */
.checks, .warnings { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.checks li, .warnings li {
  position: relative; padding: 14px 18px 14px 50px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
}
.checks li::before, .warnings li::before {
  position: absolute; left: 16px; top: 13px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 800;
}
.checks li::before { content: "\2713"; background: var(--accent); color: var(--white); }
.warnings li::before { content: "!"; background: var(--dark); color: var(--white); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 22px;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 700; color: var(--dark);
  padding: 16px 30px 16px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 12px;
  font-size: 1.5rem; color: var(--accent); font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; }

/* CTA */
.cta {
  background: var(--dark);
  border-top: 4px solid var(--accent);
  color: var(--on-dark-muted); border-radius: 16px; padding: 56px;
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
}
.cta h2 { color: var(--white); }
.cta .btn { background: var(--accent); color: var(--white); }
.cta .btn:hover { background: var(--accent-dark); }

/* Sources + footer */
.sources { columns: 2; padding-left: 18px; margin: 18px 0 0; }
.sources li { margin-bottom: 8px; break-inside: avoid; }
.site-footer { background: var(--dark); color: var(--on-dark-muted); opacity: 0.95; padding: 36px 0; font-size: 0.88rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--on-dark); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 960px) {
  .split, .framework, .two-col, .cta { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 24px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .grid-3 { grid-template-columns: 1fr; }
  .provider { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .cta { padding: 34px 24px; }
  .sources { columns: 1; }
  th, td { padding: 12px 14px; }
}
