/* main.css -- Rescue Our Planet
   Design tokens are injected as CSS custom properties via site_tokens_css(). */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-top: calc(var(--header-height, 72px) + var(--utility-bar-height, 36px));
    background: var(--color-bg, #fff);
    color: var(--color-text, #1a1a1a);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 1rem;
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: var(--font-display, system-ui, sans-serif);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.6em;
}

a { color: var(--color-accent, #3f7d32); text-decoration: none; }
a:hover { color: var(--color-accent-strong, #2f5f26); }
img { max-width: 100%; height: auto; display: block; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.page-wrapper { max-width: var(--content-width, 1200px); margin: 0 auto; padding: 2.5rem 1.5rem; }
.page-wrapper--tight { padding: 0.75rem 1.5rem; max-width: var(--content-width, 1200px); margin: 0 auto; }
.page-wrapper--narrow { max-width: 780px; }

.text-muted { color: var(--color-text-muted, #5b6b63); }

.tag {
    display: inline-block; padding: 0.3rem 0.75rem; border-radius: 999px;
    background: var(--color-panel-soft, #f4f8f5); color: var(--color-accent-strong, #2f5f26);
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}
.tag--featured { background: var(--color-accent, #3f7d32); color: #fff; }

.btn {
    display: inline-block; padding: 0.7rem 1.4rem; border-radius: var(--radius-small, 6px);
    font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--color-accent, #3f7d32); color: #fff; }
.btn--primary:hover { background: var(--color-accent-strong, #2f5f26); color: #fff; }
.btn--outline { border-color: var(--color-accent, #3f7d32); color: var(--color-accent, #3f7d32); background: transparent; }
.btn--outline:hover { background: var(--color-panel-soft, #f4f8f5); }
.btn--large { padding: 0.9rem 1.75rem; font-size: 1rem; }

/* ── Utility bar ───────────────────────────────────────────────────────────── */

.utility-bar {
    height: var(--utility-bar-height, 36px);
    background: var(--color-surface-strong, #0e2e1e);
    color: var(--color-text-on-dark-muted, #b9ccc0);
    font-size: 0.78rem;
}
.utility-bar__inner {
    max-width: var(--content-width, 1200px); margin: 0 auto; padding: 0 1.5rem; height: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.utility-bar__social { list-style: none; display: flex; gap: 0.85rem; margin: 0; padding: 0; }
.utility-bar__social a { color: var(--color-text-on-dark-muted, #b9ccc0); display: flex; }
.utility-bar__social a:hover { color: #fff; }
.utility-bar__links { display: flex; align-items: center; gap: 1.25rem; }
.utility-bar__links a { color: var(--color-text-on-dark-muted, #b9ccc0); }
.utility-bar__links a:hover { color: #fff; }
.utility-bar__search { background: none; border: none; color: var(--color-text-on-dark-muted, #b9ccc0); cursor: pointer; display: flex; padding: 0; }
.utility-bar__search:hover { color: #fff; }

/* ── Header ────────────────────────────────────────────────────────────────── */

.site-header-group { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }

.site-header {
    height: var(--header-height, 72px);
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.site-header__inner {
    max-width: var(--content-width, 1200px); margin: 0 auto; padding: 0 1.5rem; height: 100%;
    display: flex; align-items: center; gap: 2rem;
}

.site-logo a { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--color-text, #1a1a1a); }
.site-logo__icon { font-size: 1.9rem; line-height: 1; }
.site-logo__text-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.site-logo__text { font-family: var(--font-display, system-ui, sans-serif); font-weight: 500; font-size: 1.05rem; letter-spacing: -0.01em; text-transform: uppercase; }
.site-logo__tagline { font-size: 0.7rem; color: var(--color-accent, #3f7d32); font-weight: 500; }

/* ── Navigation ────────────────────────────────────────────────────────────── */

.site-nav { margin-left: auto; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; align-items: center; }
.site-nav__list > li > a {
    color: var(--color-text, #1a1a1a); text-decoration: none; font-size: 0.82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; transition: color 0.15s;
    display: flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0;
}
.site-nav__list > li > a:hover,
.site-nav__list > li > a[aria-current="page"] { color: var(--color-accent, #3f7d32); }

.site-nav__item--has-dropdown { position: relative; }

.nav-chevron { display: inline-block; width: 0; height: 0; margin-left: 2px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 5px solid currentColor; opacity: 0.7; transition: transform 0.15s; }
.site-nav__item--has-dropdown:hover .nav-chevron,
.site-nav__item--has-dropdown:focus-within .nav-chevron { transform: rotate(180deg); }

/* Dropdown: flush against the trigger (top:100%, no gap) so hover/focus never
   crosses a dead zone before reaching the panel -- fixes the recurring
   "dropdown loses focus" bug from past builds. */
.nav-dropdown {
    display: none; position: absolute; top: 100%; left: 0; padding-top: 0.6rem;
    min-width: 240px; list-style: none; margin: 0; z-index: 200;
}
.nav-dropdown::before { content: ''; display: block; }
.site-nav__item--has-dropdown:hover .nav-dropdown,
.site-nav__item--has-dropdown:focus-within .nav-dropdown { display: block; }

.nav-dropdown {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-small, 6px);
    box-shadow: var(--shadow-card, 0 4px 16px rgba(0,0,0,0.08));
    padding: 0.5rem 0;
}
.nav-dropdown li a {
    display: block; padding: 0.55rem 1.1rem; white-space: nowrap; font-size: 0.85rem;
    color: var(--color-text, #1a1a1a); text-transform: none; letter-spacing: normal; font-weight: 400;
}
.nav-dropdown li a:hover { background: var(--color-panel-soft, #f4f8f5); color: var(--color-accent, #3f7d32); }

/* Hamburger + MENU label */
.nav-hamburger {
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; background: none; border: none; cursor: pointer; padding: 0.25rem; margin-left: auto; width: 44px;
}
.nav-hamburger span:not(.nav-hamburger__label) { display: block; width: 22px; height: 2px; background: var(--color-text, #1a1a1a); border-radius: 2px; }
.nav-hamburger__label { margin-top: 2px; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--color-text, #1a1a1a); }

/* ── Breadcrumbs ───────────────────────────────────────────────────────────── */

.breadcrumbs { border-bottom: 1px solid var(--color-border, #e5e7eb); background: var(--color-panel-soft, #f4f8f5); }
.breadcrumbs__list { list-style: none; margin: 0; padding: 0.6rem 0; display: flex; gap: 0.4rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--color-text-muted, #5b6b63); }
.breadcrumbs__item + .breadcrumbs__item::before { content: '/'; margin-right: 0.4rem; }
.breadcrumbs__item.is-current { color: var(--color-text, #1a1a1a); }

/* ── Layout ────────────────────────────────────────────────────────────────── */

.content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.content-main { min-width: 0; }
.content-sidebar { position: sticky; top: calc(var(--header-height,72px) + var(--utility-bar-height,36px) + 1.5rem); }

/* ── Card grids ────────────────────────────────────────────────────────────── */

.card-grid { display: grid; gap: 1.5rem; }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.story-card { display: flex; flex-direction: column; border-radius: var(--radius-medium, 10px); overflow: hidden; border: 1px solid var(--color-border, #e5e7eb); }
.story-card__media {
    display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--card-accent, var(--color-accent)) 0%, var(--color-surface-strong, #0e2e1e) 100%);
    display: flex; align-items: center; justify-content: center;
}
.story-card__media-icon { font-size: 2.2rem; }
.story-card__body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.story-card__eyebrow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.story-card__body h3 { font-size: 1.05rem; margin: 0.1rem 0; font-weight: 500; }
.story-card__body h3 a { color: var(--color-text, #1a1a1a); }
.story-card__body p { font-size: 0.88rem; color: var(--color-text-muted, #5b6b63); margin: 0; }
.story-card__body time { font-size: 0.78rem; color: var(--color-text-muted, #5b6b63); }

.directory-card {
    display: block; padding: 1.25rem; border: 1px solid var(--color-border, #e5e7eb); border-radius: var(--radius-medium, 10px);
    color: var(--color-text, #1a1a1a); transition: box-shadow 0.15s, border-color 0.15s;
}
.directory-card:hover { box-shadow: var(--shadow-card); border-color: var(--color-accent, #3f7d32); }
.directory-card h3 { font-size: 1.05rem; margin: 0.4rem 0 0.4rem; }
.directory-card p { font-size: 0.88rem; color: var(--color-text-muted, #5b6b63); margin: 0 0 0.5rem; }
.directory-card__count { font-size: 0.78rem; color: var(--color-accent, #3f7d32); font-weight: 600; }

/* ── Article list rows ─────────────────────────────────────────────────────── */

.article-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.article-list__row { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; align-items: center; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border, #e5e7eb); }
.article-list__row:last-child { border-bottom: none; }
.article-list__row--compact { grid-template-columns: 1fr auto; }
.article-list__media {
    width: 88px; height: 66px; border-radius: var(--radius-small, 6px);
    background: linear-gradient(135deg, var(--card-accent, var(--color-accent)) 0%, var(--color-surface-strong, #0e2e1e) 100%);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.article-list__body h3 { font-size: 1rem; margin: 0.2rem 0; font-weight: 500; }
.article-list__body h3 a { color: var(--color-text, #1a1a1a); }
.article-list__body p { font-size: 0.85rem; color: var(--color-text-muted, #5b6b63); margin: 0; }
.article-list__row > time { font-size: 0.78rem; color: var(--color-text-muted, #5b6b63); white-space: nowrap; }

.home-section__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.home-section__view-all { font-size: 0.85rem; font-weight: 600; }

/* ── Homepage hero ─────────────────────────────────────────────────────────── */

.home-hero { position: relative; max-width: var(--content-width, 1200px); margin: 0 auto; padding: 1.5rem 1.5rem 0; }
.home-hero__media {
    position: relative; border-radius: var(--radius-large, 16px); overflow: hidden; min-height: 460px;
    background: linear-gradient(135deg, var(--hero-accent, var(--color-accent)) 0%, var(--color-surface-strong, #0e2e1e) 65%, #051b10 100%);
    display: flex; align-items: flex-end; padding: 3rem;
}
.home-hero__content { max-width: 640px; color: #fff; }
.home-hero__content h1 { color: #fff; font-size: 2.6rem; margin: 0 0 0.75rem; }
.home-hero__subhead { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-bottom: 1.5rem; max-width: 520px; }

.home-hero__topics {
    position: absolute; top: 3.5rem; right: 3rem; width: 280px;
    background: rgba(14,46,30,0.94); border-radius: var(--radius-medium, 10px); padding: 1.25rem;
    color: var(--color-text-on-dark, #f4f8f5);
}
.home-hero__topics-heading { display: flex; justify-content: space-between; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 0.6rem; margin-bottom: 0.5rem; }
.home-hero__topics-heading a { color: var(--color-text-on-dark, #f4f8f5); }
.home-hero__topics ul { list-style: none; margin: 0; padding: 0; }
.home-hero__topics li a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.25rem; color: var(--color-text-on-dark-muted, #b9ccc0); font-size: 0.88rem; border-radius: var(--radius-small, 6px); }
.home-hero__topics li a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.home-hero__topic-icon { font-size: 1rem; }

.home-section { padding-top: 3rem; }
.home-section__row { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.home-featured__sidebar { }

/* ── Stats bar ─────────────────────────────────────────────────────────────── */

.home-stats { background: var(--color-surface-strong, #0e2e1e); color: var(--color-text-on-dark, #f4f8f5); margin-top: 3rem; padding: 2.5rem 0; }
.home-stats h2 { color: #fff; text-align: center; margin-bottom: 1.75rem; font-size: 1.5rem; }
.home-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.home-stats__item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.home-stats__icon { font-size: 1.5rem; }
.home-stats__value { font-family: var(--font-display); font-size: 2rem; font-weight: 300; color: var(--color-accent-light, #7ab648); }
.home-stats__label { font-size: 0.85rem; color: var(--color-text-on-dark-muted, #b9ccc0); }

/* ── Sidebar blocks ────────────────────────────────────────────────────────── */

.sidebar-block { background: var(--color-panel-soft, #f4f8f5); border: 1px solid var(--color-border, #e5e7eb); border-radius: var(--radius-medium, 10px); padding: 1.25rem; margin-bottom: 1.25rem; font-size: 0.9rem; }
.sidebar-block__title { font-weight: 700; margin-bottom: 0.75rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text, #1a1a1a); }
.sidebar-block__text { font-size: 0.88rem; color: var(--color-text-muted, #5b6b63); margin: 0 0 0.75rem; }
.sidebar-block__privacy { font-size: 0.75rem; color: var(--color-text-muted, #5b6b63); margin: 0.5rem 0 0; }

.ways-to-help-list { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.ways-to-help-list a { display: flex; flex-direction: column; gap: 0.15rem; }
.ways-to-help-list__label { font-weight: 600; color: var(--color-text, #1a1a1a); font-size: 0.9rem; }
.ways-to-help-list__desc { font-size: 0.8rem; color: var(--color-text-muted, #5b6b63); }
.cta-btn { display: inline-block; margin-top: 0.5rem; padding: 0.55rem 1rem; background: var(--color-accent, #3f7d32); color: #fff; text-decoration: none; border-radius: var(--radius-small, 6px); font-size: 0.85rem; font-weight: 600; }

.sidebar-newsletter-form, .footer-newsletter-form { display: flex; gap: 0.5rem; }
.sidebar-newsletter-form input[type="email"], .footer-newsletter-form input[type="email"] {
    flex: 1; padding: 0.6rem 0.75rem; border: 1px solid var(--color-border, #e5e7eb); border-radius: var(--radius-small, 6px); font-size: 0.85rem;
}
.sidebar-newsletter-form button, .footer-newsletter-form button {
    padding: 0.6rem 1rem; background: var(--color-accent, #3f7d32); color: #fff; border: none; border-radius: var(--radius-small, 6px); font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; }

.ranked-list { list-style: none; margin: 0; padding: 0; counter-reset: none; display: flex; flex-direction: column; gap: 0.85rem; }
.ranked-list__item { display: flex; align-items: flex-start; gap: 0.7rem; }
.ranked-list__rank {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--color-accent, #3f7d32); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
}
.ranked-list__link { display: flex; flex-direction: column; gap: 0.15rem; }
.ranked-list__title { font-size: 0.85rem; font-weight: 500; color: var(--color-text, #1a1a1a); }
.ranked-list__date { font-size: 0.75rem; color: var(--color-text-muted, #5b6b63); }

.mini-bio { text-align: left; }
.mini-bio__badge { font-size: 1.75rem; }
.mini-bio__name { font-weight: 600; margin: 0.4rem 0 0.5rem; }
.mini-bio__body { font-size: 0.85rem; color: var(--color-text-muted, #5b6b63); margin: 0 0 0.6rem; }
.mini-bio__cta { font-size: 0.85rem; font-weight: 600; }

/* ── Category / page hero ─────────────────────────────────────────────────── */

.page-hero, .category-hero { max-width: var(--content-width, 1200px); margin: 0 auto; padding: 2.5rem 1.5rem 0.5rem; }
.category-hero__icon { font-size: 2.2rem; display: block; margin-bottom: 0.5rem; }
.category-hero { border-bottom: 4px solid var(--card-accent, var(--color-accent)); padding-bottom: 2rem; }

/* ── Article page ──────────────────────────────────────────────────────────── */

.article__header h1 { font-size: 2rem; margin: 0.3rem 0 0.75rem; }
.article__meta { font-size: 0.85rem; color: var(--color-text-muted, #5b6b63); display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.article__media {
    aspect-ratio: 21 / 9; border-radius: var(--radius-large, 16px); margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--card-accent, var(--color-accent)) 0%, var(--color-surface-strong, #0e2e1e) 100%);
    display: flex; align-items: center; justify-content: center;
}
.article__media-icon { font-size: 3rem; }
.article__excerpt { font-size: 1.1rem; color: var(--color-text-muted, #5b6b63); margin-bottom: 1.5rem; }
.article__body.prose p { margin: 0 0 1.1rem; }
.article__related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border, #e5e7eb); }

/* ── Prose ─────────────────────────────────────────────────────────────────── */

.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose p { margin: 0 0 1.1rem; }
.prose__intro { font-size: 1.1rem; color: var(--color-text-muted, #5b6b63); }
.prose ul { padding-left: 1.25rem; }
.prose__featured-categories { margin-top: 2rem; }

/* ── Organization profile ──────────────────────────────────────────────────── */

.org-profile__badge { font-size: 2rem; }
.org-profile__header h1 { margin: 0.4rem 0 0.2rem; }
.org-profile__focus { color: var(--color-text-muted, #5b6b63); margin: 0 0 1rem; }
.org-profile__actions { display: flex; gap: 0.75rem; margin: 1.25rem 0 2rem; }
.fact-list { margin: 0; }
.fact-list__row { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--color-border, #e5e7eb); }
.fact-list__row dt { font-weight: 600; font-size: 0.85rem; color: var(--color-text-muted, #5b6b63); }
.fact-list__row dd { margin: 0; font-size: 0.9rem; }

.partner-spotlight-panel {
    margin-top: 2.5rem; padding: 2rem; border-radius: var(--radius-large, 16px);
    background: var(--color-surface-strong, #0e2e1e); color: var(--color-text-on-dark, #f4f8f5);
}
.partner-spotlight-panel h2 { color: #fff; }
.partner-spotlight-panel p { color: var(--color-text-on-dark-muted, #b9ccc0); }
.directory-cta { margin-top: 2rem; }

/* ── Glossary ──────────────────────────────────────────────────────────────── */

.glossary-jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.glossary-jump a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--color-border, #e5e7eb); font-size: 0.8rem; font-weight: 600; }
.glossary-letter-group h2 { border-bottom: 1px solid var(--color-border, #e5e7eb); padding-bottom: 0.3rem; }
.glossary-entry-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.glossary-entry { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border, #e5e7eb); }
.glossary-entry a { font-weight: 600; font-size: 1rem; }
.glossary-entry p { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--color-text-muted, #5b6b63); }
.glossary-entry-list--compact .glossary-entry { padding: 0.4rem 0; }
.glossary-term__short-def { font-size: 1.1rem; color: var(--color-text-muted, #5b6b63); border-left: 3px solid var(--color-accent, #3f7d32); padding-left: 1rem; margin-bottom: 1.5rem; }
.glossary-term__related { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border, #e5e7eb); }

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq-accordion { margin-top: 1.5rem; }
.faq-accordion__item { border-bottom: 1px solid var(--color-border, #e5e7eb); padding: 1rem 0; }
.faq-accordion__item summary { font-weight: 600; cursor: pointer; font-size: 1.02rem; }
.faq-accordion__item p { margin: 0.75rem 0 0; color: var(--color-text-muted, #5b6b63); }

/* ── Contact / forms ───────────────────────────────────────────────────────── */

.contact-hero, .contact-info-section, .contact-form-section { margin-bottom: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 0.3rem; max-width: 560px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; margin-top: 0.75rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    padding: 0.65rem 0.8rem; border: 1px solid var(--color-border, #e5e7eb); border-radius: var(--radius-small, 6px); font-family: inherit; font-size: 0.92rem;
}
.contact-form button { margin-top: 1.25rem; align-self: flex-start; }
.form-success { padding: 1rem 1.25rem; background: var(--color-panel-soft, #f4f8f5); border-radius: var(--radius-medium, 10px); color: var(--color-accent-strong, #2f5f26); font-weight: 600; }

/* ── Library ───────────────────────────────────────────────────────────────── */

.library__section { margin-bottom: 3rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer { background: var(--color-surface-strong, #0e2e1e); color: var(--color-text-on-dark, #f4f8f5); padding: 3.5rem 0 1.5rem; margin-top: 4rem; }
.site-footer__inner { max-width: var(--content-width, 1200px); margin: 0 auto; padding: 0 1.5rem; }
.site-footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer__brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; margin-bottom: 0.5rem; text-transform: uppercase; }
.site-footer__tagline { margin: 0 0 0.75rem; color: var(--color-accent-light, #7ab648); font-size: 0.85rem; }
.site-footer__blurb { font-size: 0.85rem; color: var(--color-text-on-dark-muted, #b9ccc0); margin: 0 0 1rem; }
.site-footer__social { list-style: none; display: flex; gap: 0.75rem; margin: 0; padding: 0; }
.site-footer__social a { color: var(--color-text-on-dark-muted, #b9ccc0); font-size: 0.8rem; }
.site-footer__social a:hover { color: #fff; }
.site-footer__col-heading { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-on-dark-muted, #b9ccc0); margin-bottom: 0.85rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer__links a { color: var(--color-text-on-dark, #f4f8f5); font-size: 0.86rem; }
.site-footer__links a:hover { color: var(--color-accent-light, #7ab648); }
.site-footer__newsletter-text { font-size: 0.85rem; color: var(--color-text-on-dark-muted, #b9ccc0); margin-bottom: 0.85rem; }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.25rem; font-size: 0.78rem; color: var(--color-text-on-dark-muted, #b9ccc0);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.site-footer__bottom-links { display: flex; gap: 1rem; }
.site-footer__bottom-links a { color: var(--color-text-on-dark-muted, #b9ccc0); }
.site-footer__bottom-links a:hover { color: #fff; }

/* ── Error page ────────────────────────────────────────────────────────────── */

.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 6rem; font-weight: 200; margin: 0 0 0.5rem; color: var(--color-text-muted, #5b6b63); }
.error-page p { font-size: 1.1rem; margin-bottom: 2rem; }

/* ── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .home-section__row { grid-template-columns: 1fr; }
    .content-layout { grid-template-columns: 1fr; }
    .content-sidebar { position: static; }
    .home-stats__grid { grid-template-columns: repeat(2, 1fr); }
    .home-hero__topics { position: static; width: auto; margin-top: 1.5rem; }
    .home-hero__media { padding: 2rem; align-items: flex-start; min-height: auto; padding-bottom: 12rem; }
    .site-footer__top { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .utility-bar__links a:not(:last-of-type) { display: none; }

    .nav-hamburger { display: flex; }

    .site-nav {
        display: none; position: fixed; top: calc(var(--header-height,72px) + var(--utility-bar-height,36px)); left: 0; right: 0; bottom: 0;
        background: var(--color-surface, #fff); overflow-y: auto; padding: 1.5rem; z-index: 150;
    }
    .site-nav.is-open { display: block; }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__list > li { border-bottom: 1px solid var(--color-border, #e5e7eb); }
    .site-nav__list > li > a { padding: 0.9rem 0; justify-content: space-between; }

    .nav-dropdown { position: static; box-shadow: none; border: none; padding: 0 0 0.5rem 1rem; display: none; }
    .site-nav__item--has-dropdown:hover .nav-dropdown { display: none; }
    .site-nav.is-open .nav-dropdown { display: block; }

    .card-grid--4, .card-grid--3 { grid-template-columns: 1fr; }
    .home-hero__content h1 { font-size: 1.9rem; }
    .article-list__row { grid-template-columns: 1fr; }
    .article-list__media { display: none; }
    .article-list__row > time { order: -1; }

    /* Mobile footer: single column, all text/links 2x size */
    .site-footer__top { grid-template-columns: 1fr; gap: 2.25rem; }
    .site-footer__brand-name { font-size: 1.6rem; }
    .site-footer__tagline, .site-footer__blurb, .site-footer__newsletter-text { font-size: 1.1rem; }
    .site-footer__col-heading { font-size: 1.05rem; }
    .site-footer__links a { font-size: 1.2rem; }
    .site-footer__social a { font-size: 1.05rem; }
    .site-footer__bottom { flex-direction: column; font-size: 1rem; }
    .footer-newsletter-form { flex-direction: column; }
    .footer-newsletter-form input, .footer-newsletter-form button { font-size: 1.05rem; padding: 0.75rem 1rem; }
}
