/* ============================================
   Blog + statistics post components
   Extends assets/global.css (article-hero, article-layout,
   article-toc, blog-grid and blog-card live there).
   Tokens map to the site's own variables.
   ============================================ */
:root {
  --sb-dark: var(--navy);
  --sb-primary: var(--navy-soft);
  --sb-primary-2: var(--navy-deep);
  --sb-highlight: var(--gold);
  --sb-positive: var(--success);
  --sb-text: var(--ink);
  --sb-muted: var(--muted);
  --sb-on-dark: var(--white);
  --sb-surface: var(--white);
  --sb-border: var(--line);
  --sb-radius: 18px;
  --sb-shadow: var(--shadow-soft);
}

/* Blog hub */
.blog-hub-intro { max-width: 760px; }
.blog-card-image img { aspect-ratio: 1200 / 1180; height: 240px; object-position: top; }
.blog-card .article-meta { margin-bottom: 10px; }
.blog-card .text-link { display: inline-block; margin-top: 8px; font-weight: 800; color: var(--accent-text); }

/* Article body prose */
.article-hero .lead { max-width: 820px; color: var(--muted); }
.stats-article { min-width: 0; }
.stats-article > p, .stats-article section > p, .stats-article li { color: var(--ink); font-size: 17px; line-height: 1.75; }
.stats-article section { margin-top: 56px; }
.stats-article section:first-of-type { margin-top: 36px; }
.stats-article h2 { margin-bottom: 18px; font-size: clamp(28px, 4vw, 38px); }
.stats-article h3 { margin: 28px 0 12px; font-size: 22px; }
.stats-article p a, .stats-article li a, .data-table td a { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.stats-article ul.plain { padding-left: 22px; }
.stats-article figure { margin: 30px 0; }
.stats-article figure img { height: auto; border: 1px solid var(--line); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); }
.stats-article figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.price-note { margin: 22px 0; padding: 18px 22px; color: var(--navy); background: var(--soft); border-left: 4px solid var(--accent-text); border-radius: 0 14px 14px 0; font-size: 15px; line-height: 1.6; }

/* Hero stats */
.stats-hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 34px 0 0; }
.stats-hero-card { padding: 22px 16px; text-align: center; color: var(--sb-on-dark); background: linear-gradient(135deg, var(--sb-dark), var(--sb-primary-2)); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); }
.stats-hero-card__number { margin-bottom: 8px; color: var(--sb-highlight); font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.stats-hero-card__label { color: #cfe4f4; font-size: 14px; font-weight: 600; line-height: 1.4; }

/* Key takeaways */
.key-takeaways { margin: 36px 0 0; padding: 30px; background: var(--white); border: 2px solid var(--sb-border); border-radius: var(--sb-radius); }
.key-takeaways__label { margin-bottom: 14px; padding-bottom: 12px; color: var(--sb-dark); border-bottom: 2px solid var(--sb-border); font-size: 22px; font-weight: 800; }
.key-takeaways__list { margin: 0; padding: 0; list-style: none; counter-reset: takeaway; }
.key-takeaways__list li { position: relative; padding: 11px 0 11px 38px; border-bottom: 1px solid var(--sb-border); font-size: 16px !important; line-height: 1.6; }
.key-takeaways__list li:last-child { border-bottom: 0; }
.key-takeaways__list li::before { position: absolute; top: 13px; left: 0; display: flex; width: 24px; height: 24px; align-items: center; justify-content: center; color: var(--white); background: var(--sb-dark); border-radius: 50%; content: counter(takeaway); counter-increment: takeaway; font-size: 12px; font-weight: 800; }

/* Data tables */
.data-table-wrapper { margin: 26px 0; overflow-x: auto; background: var(--white); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.data-table caption { padding: 16px 20px 0; color: var(--navy); font-size: 16px; font-weight: 800; text-align: left; }
.data-table th { padding: 14px 18px; color: var(--white); background: var(--navy); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 13px 18px; vertical-align: top; border-top: 1px solid var(--sb-border); }
.data-table tbody tr:nth-child(even) td { background: var(--paper); }
.data-table td strong { color: var(--navy); white-space: nowrap; }
.data-table .is-local td { background: #fff7e0 !important; }

/* Stat callout */
.stat-callout { margin: 34px 0; padding: 32px 28px; text-align: center; color: var(--sb-on-dark); background: linear-gradient(135deg, var(--sb-dark), var(--sb-primary-2)); border-radius: var(--sb-radius); }
.stat-callout__number { margin-bottom: 10px; color: var(--sb-highlight); font-size: clamp(38px, 6vw, 60px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-callout__text { max-width: 600px; margin: 0 auto 10px; color: #e4f0f8; font-size: 18px; line-height: 1.6; }
.stat-callout__source { color: #a9c6da; font-size: 14px; font-style: italic; }

/* Horizontal range / bar chart */
.css-bar-chart { margin: 30px 0; padding: 26px; background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); }
.css-bar-chart__title { margin-bottom: 18px; color: var(--sb-dark); font-size: 18px; font-weight: 800; text-align: center; }
.css-bar-chart__item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 10px; }
.css-bar-chart__label { color: var(--sb-dark); font-size: 14px; font-weight: 700; text-align: right; }
.css-bar-chart__bar-bg { position: relative; height: 32px; overflow: hidden; background: var(--soft); border-radius: 8px; }
.css-bar-chart__bar { display: flex; height: 100%; min-width: 64px; align-items: center; justify-content: flex-end; padding-right: 10px; background: linear-gradient(90deg, var(--sb-primary), var(--sb-dark)); border-radius: 8px; }
.css-bar-chart__bar.is-local { background: linear-gradient(90deg, #ffc93a, #e09a00); }
.css-bar-chart__bar.is-local .css-bar-chart__value { color: var(--navy-deep); }
.css-bar-chart__value { color: var(--white); font-size: 13px; font-weight: 800; white-space: nowrap; }
.css-bar-chart__note { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }

/* Comparison cards */
.compare-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0; }
.compare-card { padding: 24px 20px; text-align: center; background: var(--white); border: 2px solid var(--sb-border); border-radius: var(--sb-radius); }
.compare-card.is-featured { border-color: var(--navy); box-shadow: var(--sb-shadow); }
.compare-card__tag { display: inline-block; margin-bottom: 8px; color: var(--accent-text); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.compare-card__value { color: var(--navy); font-size: 30px; font-weight: 800; line-height: 1.1; }
.compare-card__label { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* Timeline */
.css-timeline { margin: 30px 0; padding: 26px; background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); }
.css-timeline__title { margin-bottom: 8px; color: var(--sb-dark); font-size: 18px; font-weight: 800; text-align: center; }
.css-timeline__track { display: flex; gap: 8px; justify-content: space-between; overflow-x: auto; padding: 18px 0 8px; border-bottom: 3px solid var(--sb-primary); }
.css-timeline__point { display: flex; min-width: 56px; flex: 1; flex-direction: column; align-items: center; }
.css-timeline__value { color: var(--sb-primary); font-size: 18px; font-weight: 800; }
.css-timeline__year { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }

/* Methodology */
.methodology { margin-top: 56px; padding: 30px; background: var(--white); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); }
.methodology h2 { font-size: clamp(24px, 3vw, 30px); }
.methodology p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.methodology__sources { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 26px; }
.methodology__sources li { padding: 5px 0; break-inside: avoid; font-size: 14px !important; line-height: 1.5 !important; }
.methodology__sources a { color: var(--accent-text); font-weight: 700; }

/* FAQ inside the article */
.stats-article .accordion { margin-top: 18px; }

/* TOC tweaks */
.blog-post .article-toc { max-height: calc(100vh - 110px); overflow-y: auto; }
.article-toc .stats-toc__title { margin-bottom: 12px; color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.article-toc .btn { width: 100%; margin-top: 18px; justify-content: center; }

@media (max-width: 1020px) {
  .stats-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .compare-cards { grid-template-columns: 1fr; }
  .methodology__sources { columns: 1; }
}
@media (max-width: 580px) {
  .stats-hero-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats-hero-card { padding: 18px 10px; }
  .key-takeaways, .methodology { padding: 22px 18px; }
  .css-bar-chart { padding: 18px 14px; }
  .css-bar-chart__item { grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
  .css-bar-chart__label { font-size: 12px; }
  .stats-article > p, .stats-article section > p, .stats-article li { font-size: 16px; }
}

/* Seasonal pest pressure matrix (heat map table) */
.pest-matrix { min-width: 760px; font-size: 13px; }
.pest-matrix th, .pest-matrix td { padding: 9px 6px; text-align: center; }
.pest-matrix th:first-child, .pest-matrix td:first-child { min-width: 150px; padding-left: 14px; text-align: left; }
.pest-matrix td.lv0 { color: var(--muted); background: var(--white) !important; }
.pest-matrix td.lv1 { color: var(--navy); background: #e7f4ff !important; }
.pest-matrix td.lv2 { color: var(--white); background: var(--navy-soft) !important; font-weight: 800; }
.pest-matrix td.lv3 { color: var(--navy-deep); background: var(--gold) !important; font-weight: 800; }
.pest-matrix tr.climate-row td { color: var(--navy); background: var(--paper) !important; font-weight: 700; }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -12px 0 26px; color: var(--muted); font-size: 13px; }
.matrix-legend i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--line); border-radius: 3px; }
