:root {
  --forest: #254f39;
  --forest-dark: #173527;
  --leaf: #78ad68;
  --leaf-light: #dcebd6;
  --sky: #66aeda;
  --cream: #f7f5ef;
  --paper: #ffffff;
  --ink: #1b2a24;
  --muted: #65746d;
  --line: rgba(31, 65, 49, .14);
  --shadow: 0 24px 70px rgba(23, 53, 39, .12);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--cream); line-height: 1.5; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.stats-header { position: absolute; z-index: 10; top: 18px; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100% - 32px)); display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 12px 40px rgba(13, 34, 24, .16); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.brand-mark img { width: 42px; height: 42px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.back-link { padding: 11px 17px; border-radius: 999px; background: var(--forest); color: #fff; text-decoration: none; font-size: 14px; font-weight: 800; }

.stats-hero { position: relative; min-height: 690px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 40px; align-items: end; padding: 160px max(24px, calc((100vw - 1132px)/2)) 90px; overflow: hidden; color: #fff; background: var(--forest-dark); }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(circle at 13% 10%, rgba(120,173,104,.48), transparent 31%), radial-gradient(circle at 87% 24%, rgba(102,174,218,.30), transparent 25%), linear-gradient(135deg, rgba(23,53,39,.96), rgba(37,79,57,.88)); }
.hero-glow::before, .hero-glow::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.hero-glow::before { width: 520px; height: 520px; right: -120px; top: 80px; }
.hero-glow::after { width: 360px; height: 360px; right: -20px; top: 160px; }
.hero-copy, .hero-total { position: relative; }
.eyebrow, .section-kicker { margin: 0; color: var(--leaf); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.stats-hero h1 { max-width: 800px; margin: 14px 0 26px; font-size: clamp(56px, 8vw, 104px); line-height: .9; letter-spacing: -.065em; }
.stats-hero h1 span { color: #a7d097; }
.lead { max-width: 720px; margin: 0; color: rgba(255,255,255,.82); font-size: clamp(18px, 2vw, 23px); }
.hero-total { align-self: end; padding: 30px; border: 1px solid rgba(255,255,255,.22); border-radius: 30px; background: rgba(255,255,255,.11); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.hero-total span, .hero-total small { display: block; color: rgba(255,255,255,.72); }
.hero-total span { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-total strong { display: block; margin: 4px 0 6px; color: #fff; font-size: clamp(72px, 10vw, 126px); line-height: .95; letter-spacing: -.07em; }

.filter-wrap, .summary-grid, .activity-section, .transparency { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.filter-wrap { position: relative; z-index: 3; margin-top: -35px; display: grid; grid-template-columns: .45fr 1.55fr; gap: 14px 30px; align-items: center; padding: 26px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.filter-wrap h2 { margin: 5px 0 0; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.date-filter { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end; }
.date-filter label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.date-filter input { width: 100%; display: block; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdf9; color: var(--ink); font: inherit; }
.date-filter button { min-height: 46px; padding: 0 17px; border: 0; border-radius: 14px; background: var(--forest); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.date-filter button.secondary { background: var(--leaf-light); color: var(--forest-dark); }
.filter-status { grid-column: 2; margin: 0; color: var(--muted); font-size: 13px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 76px 0 34px; }
.summary-card { position: relative; min-height: 255px; overflow: hidden; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 18px 55px rgba(23,53,39,.07); }
.summary-card::after { content: ""; position: absolute; right: -45px; bottom: -55px; width: 160px; height: 160px; border-radius: 50%; background: var(--accent); opacity: .12; }
.summary-card .card-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--accent) 16%, white); font-size: 23px; }
.summary-card > strong { display: block; margin-top: 26px; color: var(--accent); font-size: 58px; line-height: .9; letter-spacing: -.06em; }
.summary-card h2 { margin: 14px 0 5px; font-size: 18px; line-height: 1.15; }
.summary-card p { margin: 0; color: var(--muted); font-size: 14px; }
.pet-accent { --accent: #2f6b49; }.bird-accent { --accent: #378bbd; }.wild-accent { --accent: #8a6940; }.activation-accent { --accent: #577b4d; }

.activity-section { padding: 80px 0; }
.section-heading { display: grid; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: end; margin-bottom: 30px; }
.section-heading h2, .transparency h2 { max-width: 740px; margin: 8px 0 0; color: var(--forest-dark); font-size: clamp(38px, 5vw, 64px); line-height: .95; letter-spacing: -.055em; }
.section-heading > p, .transparency > p { margin: 0; color: var(--muted); font-size: 17px; }
.chart-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.chart-grid.two-columns { grid-template-columns: 1fr 1fr; }
.chart-wide { grid-row: span 2; }
.chart-card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 16px 50px rgba(23,53,39,.07); }
.chart-title { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 24px; }
.chart-title span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.chart-title h3 { margin: 4px 0 0; font-size: 23px; line-height: 1.1; letter-spacing: -.025em; }
.legend { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }.legend-dog { background: var(--forest); }.legend-cat { background: var(--sky); }

.bars { display: grid; gap: 17px; }
.bar-row { display: grid; grid-template-columns: minmax(100px, .75fr) minmax(130px, 1.25fr) 38px; gap: 11px; align-items: center; }
.bar-label { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 13px; overflow: hidden; border-radius: 999px; background: #edf2ec; }
.bar-fill { width: 0; height: 100%; border-radius: inherit; background: var(--forest); transition: width .65s ease; }
.bar-value { text-align: right; color: var(--forest-dark); font-size: 13px; font-weight: 850; }
.grouped-bars .bar-row { grid-template-columns: 150px 1fr 42px; padding: 8px 0; }
.grouped-track { display: grid; gap: 6px; }
.grouped-track .bar-track { height: 12px; }
.grouped-track .cat-fill { background: var(--sky); }
.bird-bars .bar-fill { background: var(--sky); }
.wild-bars .bar-fill { background: #947349; }

.outcome-ring { --value: 68; width: 160px; height: 160px; display: grid; place-items: center; margin: 8px auto 18px; border-radius: 50%; background: conic-gradient(var(--leaf) calc(var(--value) * 1%), #e9efe7 0); }
.outcome-ring::before { content: ""; grid-area: 1/1; width: 116px; height: 116px; border-radius: 50%; background: #fff; }
.outcome-ring div { z-index: 1; grid-area: 1/1; text-align: center; }
.outcome-ring strong, .outcome-ring span { display: block; }.outcome-ring strong { color: var(--forest); font-size: 31px; }.outcome-ring span { color: var(--muted); font-size: 11px; font-weight: 750; }
.chart-note { margin: 0; color: var(--muted); text-align: center; font-size: 13px; }

.birds-section { width: auto; padding-inline: max(20px, calc((100vw - 1180px)/2)); background: linear-gradient(145deg, #eaf4f8, #f7f5ef); }
.feature-metrics { display: grid; grid-template-columns: repeat(2, minmax(170px, 270px)); gap: 14px; margin: 0 0 24px; }
.feature-metrics div { padding: 20px 24px; border-radius: 22px; background: rgba(255,255,255,.8); border: 1px solid rgba(55,139,189,.18); }
.feature-metrics strong, .feature-metrics span { display: block; }.feature-metrics strong { color: #2c7ba9; font-size: 40px; line-height: 1; }.feature-metrics span { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 750; }

.columns { height: 320px; display: flex; gap: 9px; align-items: end; padding-top: 16px; border-bottom: 1px solid var(--line); }
.column-item { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }
.column-value { color: #2c6f96; font-size: 11px; font-weight: 850; }
.column-bar { width: min(42px, 80%); min-height: 3px; border-radius: 10px 10px 2px 2px; background: linear-gradient(#66aeda, #2f7ca8); transition: height .65s ease; }
.column-label { min-height: 32px; color: var(--muted); font-size: 11px; font-weight: 750; text-align: center; }

.wildlife-spotlight { position: relative; min-height: 420px; overflow: hidden; padding: 0; background: var(--forest-dark); }
.wildlife-spotlight img { width: 100%; height: 100%; object-fit: cover; opacity: .68; }
.wildlife-spotlight::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(23,53,39,.12), rgba(23,53,39,.88)); }
.wild-total { position: absolute; z-index: 2; left: 26px; bottom: 24px; color: #fff; }
.wild-total span, .wild-total strong { display: block; }.wild-total span { color: rgba(255,255,255,.75); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }.wild-total strong { font-size: 86px; line-height: .9; }

.transparency { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 40px; margin-bottom: 70px; padding: 42px; border-radius: 34px; background: var(--forest); color: #fff; }
.transparency h2 { color: #fff; font-size: clamp(34px, 4.5vw, 52px); }.transparency > p { color: rgba(255,255,255,.76); }
.stats-footer { width: min(1180px, calc(100% - 40px)); display: flex; justify-content: space-between; gap: 28px; margin: 0 auto; padding: 40px 0 60px; border-top: 1px solid var(--line); }
.stats-footer div { display: flex; gap: 18px; flex-wrap: wrap; }.stats-footer span { color: var(--muted); }.stats-footer a { color: var(--muted); font-weight: 750; text-decoration: none; }

.loading .summary-card, .loading .chart-card { opacity: .62; }
.error-message { color: #8d3028 !important; }

@media (max-width: 940px) {
  .stats-hero { grid-template-columns: 1fr; min-height: 760px; }
  .hero-total { width: min(440px, 100%); }
  .filter-wrap { grid-template-columns: 1fr; }
  .filter-status { grid-column: 1; }
  .date-filter { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading, .transparency { grid-template-columns: 1fr; }
  .chart-grid, .chart-grid.two-columns { grid-template-columns: 1fr; }
  .chart-wide { grid-row: auto; }
}

@media (max-width: 620px) {
  .stats-header { top: 10px; border-radius: 24px; }
  .brand-text small { display: none; }
  .back-link { padding: 10px 13px; font-size: 12px; }
  .stats-hero { min-height: 700px; padding: 120px 20px 75px; }
  .stats-hero h1 { font-size: 54px; }
  .hero-total { padding: 24px; }.hero-total strong { font-size: 82px; }
  .filter-wrap { width: calc(100% - 24px); margin-top: -26px; padding: 22px 18px; }
  .date-filter { grid-template-columns: 1fr; }
  .summary-grid { width: calc(100% - 24px); grid-template-columns: 1fr; padding-top: 48px; }
  .summary-card { min-height: 220px; }
  .activity-section { width: calc(100% - 24px); padding: 58px 0; }
  .birds-section { width: auto; padding-inline: 12px; }
  .section-heading h2 { font-size: 40px; }
  .chart-card { padding: 20px 17px; }
  .chart-title { flex-direction: column; }
  .grouped-bars .bar-row, .bar-row { grid-template-columns: 90px 1fr 32px; gap: 8px; }
  .feature-metrics { grid-template-columns: 1fr 1fr; }.feature-metrics div { padding: 16px; }.feature-metrics strong { font-size: 33px; }
  .columns { height: 270px; gap: 4px; }.column-value { font-size: 10px; }.column-label { font-size: 9px; }
  .transparency { width: calc(100% - 24px); padding: 30px 22px; }
  .stats-footer { width: calc(100% - 24px); flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .bar-fill, .column-bar { transition: none; }
}
