/* Shared design system — accent colors are set per site in :root */
:root {
  --ink: #14202e;
  --ink-2: #3d4b5c;
  --muted: #6b7889;
  --line: #e2e6ec;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --soft: #f2efe8;
  --accent: #165c4b;        /* primary */
  --accent-ink: #ffffff;
  --accent-soft: #e3f0ec;
  --highlight: #a8742a;     /* secondary */
  --radius: 14px;
  --max: 1120px;
  --read: 720px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 250, 247, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 700 13px/1 var(--sans);
}
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 640px) {
  .site-header .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav { width: 100%; overflow-x: auto; }
  .nav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
}

/* Hero */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); background:
  radial-gradient(1200px 400px at 85% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--highlight); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.015em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(36px, 5.5vw, 56px); margin: 0 0 18px; font-weight: 600; max-width: 18ch; }
h2 { font-size: clamp(27px, 3.4vw, 34px); margin: 64px 0 16px; font-weight: 600; scroll-margin-top: 90px; }
h3 { font-size: 22px; margin: 32px 0 10px; font-weight: 600; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 60ch; margin: 0 0 28px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.meta strong { color: var(--ink-2); font-weight: 600; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }

/* Key facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.fact b { display: block; font: 600 30px/1.1 var(--serif); color: var(--accent); margin-bottom: 6px; }
.fact span { font-size: 14px; color: var(--ink-2); line-height: 1.45; display: block; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Article layout with sticky TOC */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 40px 20px 80px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.toc p { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; line-height: 1.4; }
.toc a:hover, .toc a.active { color: var(--accent); border-left-color: var(--accent); }
.prose { max-width: var(--read); }
.prose > h2:first-child { margin-top: 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 0; } .toc { display: none; } }

/* Components */
.callout { border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.callout p { margin: 0; color: var(--ink); }
.callout.warn { background: #fdf4e6; border-color: #f0d6a8; }
.callout-title { font-weight: 700; margin-bottom: 4px !important; }

.steps { counter-reset: s; list-style: none; padding: 0 !important; margin: 24px 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 56px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line); }
.steps b { display: block; color: var(--ink); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin-top: 0; font-size: 19px; }
.card p { margin: 0; font-size: 15.5px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.card.good { border-top: 4px solid #2f7d5b; }
.card.bad { border-top: 4px solid #b4513a; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--soft); color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--ink); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); padding: 14px 32px 14px 0; position: relative; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--accent); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; }

/* Calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin: 28px 0; box-shadow: 0 1px 2px rgba(20,32,46,.04), 0 8px 24px rgba(20,32,46,.05); }
.calc h3 { margin-top: 0; }
.calc .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 640px) { .calc .fields { grid-template-columns: 1fr; } .calc { padding: 20px; } }
.calc label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.calc .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.calc input, .calc select { width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border: 1px solid #cfd5dd; border-radius: 10px; background: #fff; color: var(--ink); }
.calc input:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.check input { width: 18px; height: 18px; }
.results { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .results { grid-template-columns: 1fr; } }
.result { background: var(--soft); border-radius: 12px; padding: 16px; }
.result span { display: block; font-size: 13px; color: var(--muted); }
.result b { font: 600 26px/1.2 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.result.primary { background: var(--accent); }
.result.primary span { color: rgba(255,255,255,.8); }
.result.primary b { color: #fff; }
.calc .breakdown { margin-top: 16px; font-size: 14px; color: var(--muted); }
.calc .breakdown table { font-size: 14px; }

/* Price cards */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; }
.price.featured { border: 2px solid var(--accent); }
.price h3 { margin: 0 0 4px; font-size: 20px; }
.price .amount { font: 600 34px/1.15 var(--serif); color: var(--accent); margin: 12px 0 2px; }
.price .unit { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.price ul { list-style: none; padding: 0; margin: 0; font-size: 15px; color: var(--ink-2); }
.price li { padding: 7px 0 7px 24px; position: relative; border-top: 1px solid var(--line); }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Reviewer box */
.reviewer { display: flex; gap: 16px; align-items: flex-start; border: 1px dashed #cfd5dd; border-radius: var(--radius); padding: 18px 20px; margin: 40px 0 0; background: var(--surface); }
.reviewer .avatar { flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); font-weight: 700; }
.reviewer p { margin: 0; font-size: 14.5px; }

/* CTA band */
.cta { background: var(--accent); color: #fff; border-radius: 20px; padding: 40px; margin: 64px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta h2 { color: #fff; margin: 0 0 8px; font-size: 28px; }
.cta p { color: rgba(255,255,255,.85) !important; margin: 0; }
.cta .btn { background: #fff; color: var(--accent); }
@media (max-width: 700px) { .cta { grid-template-columns: 1fr; padding: 28px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 13.5px; color: var(--muted); background: var(--soft); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclaimer { border-top: 1px solid var(--line); padding-top: 20px; line-height: 1.6; }

.sources { font-size: 14px; }
.sources li { margin: 4px 0; }
.small { font-size: 14px; color: var(--muted); }
.page-hero { padding: 56px 0 40px; }
