/* ============================================================
   Carbon Strategists — Custom Theme
   Palette: Black, Green (#428861), White, Brown (#8c7d5e)
   ============================================================ */

:root {
  --black: #0a0a0a;
  --black-2: #121212;
  --black-3: #1a1a1a;
  --green: #428861;
  --green-dark: #2f6348;
  --green-darker: #1f4230;
  --green-light: #d2eec1;
  --green-mid: #99c380;
  --brown: #8c7d5e;
  --brown-light: #c7b48f;
  --white: #ffffff;
  --gray-100: #f4f4f2;
  --gray-300: #e5e5e0;
  --gray-400: #d1d1d1;
  --gray-500: #9ca3af;
  --gray-700: #4b5563;
  --font-head: "Montserrat", system-ui, -apple-system, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-mid); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green-light); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .6em; color: var(--white); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
strong { color: var(--white); }
::selection { background: var(--green); color: var(--white); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); color: var(--white); transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline:hover { border-color: var(--green-light); color: var(--green-light); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 46px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 18px; }
.menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.menu-item { position: relative; }
.menu-link {
  display: block; padding: 10px 13px; color: var(--white); font-family: var(--font-head);
  font-weight: 600; font-size: .9rem; letter-spacing: .01em; border-radius: 8px;
  white-space: nowrap;
}
.menu-link:hover { color: var(--green-light); }
.caret { font-size: .7em; opacity: .7; margin-left: 2px; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: var(--black-2); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); box-shadow: var(--shadow);
  list-style: none; margin: 8px 0 0; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .18s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li a {
  display: block; padding: 11px 14px; color: var(--gray-400); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem;
}
.dropdown li a:hover { background: rgba(66,136,97,.18); color: var(--green-light); }
.dropdown-item { position: relative; }
.has-submenu > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub-dropdown {
  position: absolute; top: 0; left: 100%; min-width: 240px;
  background: var(--black-2); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); box-shadow: var(--shadow);
  list-style: none; margin: 0 0 0 8px; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateX(-8px);
  transition: all .18s ease;
}
.has-submenu:hover .sub-dropdown, .has-submenu:focus-within .sub-dropdown {
  opacity: 1; visibility: visible; transform: translateX(0);
}
.nav-cta { padding: 10px 22px; }
.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; transition: all .25s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 82vh; display: flex; align-items: center;
  background-size: cover; background-position: center; background-color: var(--black-2);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.72) 45%, rgba(31,66,48,.55) 100%);
}
.hero-content { position: relative; padding-top: 80px; padding-bottom: 80px; max-width: 780px; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green-light);
  background: rgba(66,136,97,.2); border: 1px solid rgba(153,195,128,.35);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { margin-bottom: 18px; }
.hero-sub { font-size: 1.2rem; color: var(--gray-400); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative; background-size: cover; background-position: center;
  padding: 96px 0 72px; background-color: var(--black-2);
}
.page-hero .hero-overlay {
  background: linear-gradient(100deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.7) 55%, rgba(31,66,48,.5) 100%);
}
.page-hero-content { position: relative; max-width: 820px; }
.page-hero-plain {
  background: linear-gradient(135deg, var(--green-darker) 0%, var(--black-2) 70%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.page-hero h1 { margin-bottom: 10px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--black-2); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--gray-400); font-size: 1.08rem; margin: 0; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; margin-top: 8px; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--black-3); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius); padding: 30px 28px; color: var(--white);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
a.card:hover { transform: translateY(-5px); border-color: rgba(153,195,128,.45); box-shadow: var(--shadow); color: var(--white); }
.card.static { border-top: 3px solid var(--green); }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(66,136,97,.18); color: var(--green-light);
}
.card-icon .icon { width: 28px; height: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray-400); font-size: .97rem; margin-bottom: 16px; flex: 1; }
.card-link { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--green-light); }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-darker) 100%); border-block: 1px solid rgba(255,255,255,.08); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.stat { text-align: center; padding: 8px; }
.stat-value { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--white); }
.stat-label { display: block; font-size: .92rem; color: var(--green-light); margin-top: 4px; }

/* ---------- Two column ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.two-col-text { display: flex; flex-direction: column; gap: 14px; }
.tile {
  background: var(--black-3); border-left: 4px solid var(--green);
  padding: 16px 20px; border-radius: 8px; color: var(--gray-400); font-size: .98rem;
}
.tile strong { display: block; color: var(--white); margin-bottom: 2px; }

/* ---------- Pillars ---------- */
.pillar { margin-bottom: 56px; }
.pillar:last-child { margin-bottom: 0; }
.pillar-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.12rem; font-weight: 700; color: var(--green-light);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.pillar-title::before { content: ""; flex: 0 0 6px; width: 6px; height: 28px; background: var(--green); border-radius: 3px; }
.pillar-sub { color: var(--gray-400); max-width: 760px; margin-bottom: 26px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: var(--black-3); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius); padding: 26px 22px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: var(--white); font-family: var(--font-head); font-weight: 800;
  margin-bottom: 14px;
}
.step h4 { margin-bottom: 6px; }
.step p { color: var(--gray-400); font-size: .94rem; margin: 0; }
.center-note { text-align: center; color: var(--gray-400); margin-top: 28px; }

/* ---------- Prose (article body) ---------- */
.prose { max-width: 860px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose a { text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 24px 0; }
.prose .card-grid, .prose .two-col, .prose .steps, .prose .stats-grid { margin: 28px 0; }
.prose .card p, .prose .tile, .prose .step p { color: var(--gray-400); }

.callout {
  background: rgba(66,136,97,.14); border: 1px solid rgba(153,195,128,.35);
  border-left: 4px solid var(--green); border-radius: 10px; padding: 22px 26px; margin: 28px 0;
}
.callout h4 { margin-bottom: 8px; color: var(--green-light); }
.callout p { margin: 0; color: var(--gray-300); }
.callout.brown { background: rgba(140,125,94,.14); border-color: rgba(199,180,143,.35); border-left-color: var(--brown); }
.callout.brown h4 { color: var(--brown-light); }

/* ---------- Tables ---------- */
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .97rem; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.prose th { background: var(--black-3); color: var(--green-light); font-family: var(--font-head); }
.prose tr:hover td { background: rgba(255,255,255,.03); }

/* ---------- Leader cards ---------- */
.leader-card { background: var(--black-3); border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius); padding: 18px; text-align: center; }
.leader-card img { border-radius: 10px; margin-bottom: 14px; width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top; }
.leader-card h3 { margin-bottom: 2px; }
.leader-card .role { color: var(--green-light); font-family: var(--font-head); font-weight: 600; font-size: .9rem; margin: 0; }
.leader { display: grid; grid-template-columns: 220px 1fr; gap: 32px; margin-bottom: 40px; align-items: start; }
.leader img { border-radius: var(--radius); width: 220px; aspect-ratio: 3/4; object-fit: cover; object-position: top; }
.leader .role { color: var(--green-light); font-family: var(--font-head); font-weight: 600; margin-bottom: 8px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 56px; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: 8px; }
.cta-inner p { color: var(--green-light); margin: 0; }
.cta-band .btn-green { background: var(--white); color: var(--green-darker); }
.cta-band .btn-green:hover { background: var(--green-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-2); border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { color: var(--gray-500); font-size: .94rem; }
.footer-col h4 { color: var(--green-light); margin-bottom: 14px; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--gray-400); font-size: .95rem; }
.footer-col ul a:hover { color: var(--green-light); }
.footer-contact p { color: var(--gray-400); font-size: .95rem; line-height: 1.9; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding: 20px 0; }
.footer-bottom p { margin: 0; color: var(--gray-500); font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .card-grid.three, .card-grid.two { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hamburger { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black-2); border-bottom: 1px solid rgba(255,255,255,.1);
    flex-direction: column; align-items: stretch; padding: 16px 24px 24px; gap: 0;
    /* The menu is taller than a phone viewport. Cap it and let it scroll,
       otherwise the CTA sits below the fold and cannot be reached. */
    max-height: calc(100vh - 74px);
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; width: 100%; }
  .menu-link { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; margin: 0; padding: 0 0 4px 12px; min-width: 0;
  }
  .dropdown li a { padding: 9px 6px; }
  .dropdown-item { position: static; }
  .sub-dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; margin: 0; padding: 0 0 4px 16px; min-width: 0;
  }
  .sub-dropdown li a { padding: 9px 6px; }
  .nav-cta { margin-top: 14px; }
  .menu-link { font-size: .95rem; }
  .dropdown .menu-link, .sub-dropdown .menu-link { font-size: .9rem; }
  .hero { min-height: 70vh; }
  .leader { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .card-grid.four { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Theme toggle button
   ============================================================ */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; padding: 0;
  border: 1px solid rgba(255,255,255,.25); background: transparent;
  color: #ffffff; cursor: pointer; transition: all .2s ease; flex: 0 0 auto;
}
.theme-toggle:hover { border-color: var(--green-light); color: var(--green-light); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }

html[data-theme="light"] .theme-toggle { border-color: rgba(0,0,0,.3); color: #1a1a1a; }
html[data-theme="light"] .theme-toggle:hover { border-color: var(--green); color: var(--green-dark); }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Logo swap for light mode */
.logo-dark, .footer-brand .logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: none; }
html[data-theme="light"] .logo-dark { display: block; }

/* ============================================================
   Light theme overrides (html[data-theme="light"])
   ============================================================ */
html[data-theme="light"] body { background: #ffffff; color: #1a1a1a; }
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5 { color: #14211a; }
html[data-theme="light"] strong { color: #101010; }
html[data-theme="light"] a { color: #2f6348; }
html[data-theme="light"] a:hover { color: #1f4230; }

/* Header & nav */
html[data-theme="light"] .site-header {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
html[data-theme="light"] .menu-link { color: #1a1a1a; }
html[data-theme="light"] .menu-link:hover { color: #2f6348; }
html[data-theme="light"] .hamburger span { background: #1a1a1a; }
html[data-theme="light"] .dropdown,
html[data-theme="light"] .sub-dropdown {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
html[data-theme="light"] .dropdown li a { color: #3a3a3a; }
html[data-theme="light"] .dropdown li a:hover { background: rgba(66,136,97,.12); color: #1f4230; }

/* Buttons */
html[data-theme="light"] .btn-outline { border-color: rgba(0,0,0,.35); color: #1a1a1a; }
html[data-theme="light"] .btn-outline:hover { border-color: var(--green-dark); color: var(--green-dark); }

/* Hero / page hero */
html[data-theme="light"] .hero,
html[data-theme="light"] .page-hero { background-color: #eef2ee; }
html[data-theme="light"] .hero-overlay,
html[data-theme="light"] .page-hero .hero-overlay {
  background: linear-gradient(100deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 50%, rgba(31,66,48,.35) 100%);
}
html[data-theme="light"] .page-hero-plain {
  background: linear-gradient(135deg, #e7f0ea 0%, #ffffff 70%);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
html[data-theme="light"] .hero h1,
html[data-theme="light"] .page-hero h1 { color: #14211a; }
html[data-theme="light"] .hero-sub { color: #374151; }
html[data-theme="light"] .eyebrow {
  color: #1f4230;
  background: rgba(66,136,97,.12);
  border-color: rgba(66,136,97,.3);
}

/* Sections */
html[data-theme="light"] .section-alt { background: #f3f6f3; }
html[data-theme="light"] .section-head h2 { color: #14211a; }
html[data-theme="light"] .section-head p { color: #4b5563; }

/* Cards */
html[data-theme="light"] .card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.1);
  color: #1a1a1a;
}
html[data-theme="light"] a.card:hover {
  border-color: rgba(66,136,97,.5);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  color: #1a1a1a;
}
html[data-theme="light"] .card.static { border-top: 3px solid #428861; }
html[data-theme="light"] .card-icon { background: rgba(66,136,97,.14); color: #2f6348; }
html[data-theme="light"] .card h3 { color: #14211a; }
html[data-theme="light"] .card p { color: #4b5563; }
html[data-theme="light"] .card-link { color: #2f6348; }

/* Tiles & pillars */
html[data-theme="light"] .tile {
  background: #ffffff;
  border-left: 4px solid #428861;
  color: #4b5563;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
html[data-theme="light"] .tile strong { color: #14211a; }
html[data-theme="light"] .pillar-title { color: #2f6348; }
html[data-theme="light"] .pillar-sub { color: #4b5563; }

/* Steps */
html[data-theme="light"] .step {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.1);
}
html[data-theme="light"] .step h4 { color: #14211a; }
html[data-theme="light"] .step p { color: #4b5563; }
html[data-theme="light"] .center-note { color: #4b5563; }
html[data-theme="light"] .two-col-img img { box-shadow: 0 10px 30px rgba(0,0,0,.12); }

/* Prose */
html[data-theme="light"] .prose .card p,
html[data-theme="light"] .prose .tile,
html[data-theme="light"] .prose .step p { color: #4b5563; }

/* Callouts */
html[data-theme="light"] .callout {
  background: rgba(66,136,97,.08);
  border-color: rgba(66,136,97,.35);
  border-left-color: #428861;
}
html[data-theme="light"] .callout h4 { color: #2f6348; }
html[data-theme="light"] .callout p { color: #374151; }
html[data-theme="light"] .callout.brown {
  background: rgba(140,125,94,.12);
  border-color: rgba(140,125,94,.4);
  border-left-color: #8c7d5e;
}
html[data-theme="light"] .callout.brown h4 { color: #6f5f3d; }

/* Tables */
html[data-theme="light"] .prose table { color: #1a1a1a; }
html[data-theme="light"] .prose th { background: #eef2ee; color: #2f6348; }
html[data-theme="light"] .prose th,
html[data-theme="light"] .prose td { border-bottom: 1px solid rgba(0,0,0,.12); }
html[data-theme="light"] .prose tr:hover td { background: rgba(0,0,0,.03); }

/* Leader cards */
html[data-theme="light"] .leader-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.1);
}
html[data-theme="light"] .leader-card .role,
html[data-theme="light"] .leader .role { color: #2f6348; }

/* Footer */
html[data-theme="light"] .site-footer {
  background: #f3f6f3;
  border-top: 1px solid rgba(0,0,0,.08);
}
html[data-theme="light"] .footer-brand p { color: #6b7280; }
html[data-theme="light"] .footer-col h4 { color: #2f6348; }
html[data-theme="light"] .footer-col ul a { color: #4b5563; }
html[data-theme="light"] .footer-col ul a:hover { color: #1f4230; }
html[data-theme="light"] .footer-contact p { color: #4b5563; }
html[data-theme="light"] .footer-bottom { border-top: 1px solid rgba(0,0,0,.06); }
html[data-theme="light"] .footer-bottom p { color: #6b7280; }

/* Mobile nav (light) */
@media (max-width: 768px) {
  html[data-theme="light"] .main-nav {
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }
  html[data-theme="light"] .menu-link { border-bottom: 1px solid rgba(0,0,0,.08); }
}

/* ============================================================
   Jurisdictions — Where We Work
   ============================================================ */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
}
html[data-theme="light"] .table-scroll { border-color: rgba(0,0,0,.12); }

table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 760px;
}
table.matrix th, table.matrix td {
  text-align: left;
  vertical-align: top;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
html[data-theme="light"] table.matrix th,
html[data-theme="light"] table.matrix td { border-bottom-color: rgba(0,0,0,.1); }
table.matrix thead th {
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--green-mid);
  background: rgba(66,136,97,.12);
  white-space: nowrap;
}
html[data-theme="light"] table.matrix thead th { color: var(--green-dark); }
table.matrix tbody th { font-family: var(--font-head); font-weight: 700; min-width: 132px; }
table.matrix tbody td:first-child { min-width: 132px; }
table.matrix tbody tr:hover { background: rgba(255,255,255,.03); }
html[data-theme="light"] table.matrix tbody tr:hover { background: rgba(0,0,0,.025); }
table.matrix tbody tr:last-child th, table.matrix tbody tr:last-child td { border-bottom: 0; }
table.matrix-agency { min-width: 0; }

.matrix-detail { display: block; font-size: .8rem; color: var(--gray-500); margin-top: .2rem; line-height: 1.45; }
html[data-theme="light"] .matrix-detail { color: #6b7280; }
.matrix-rel { display: block; font-family: var(--font-body); font-weight: 400; font-size: .76rem; color: var(--gray-500); margin-top: .2rem; }
html[data-theme="light"] .matrix-rel { color: #6b7280; }
.matrix-date { white-space: nowrap; font-size: .78rem; color: var(--gray-500); }
html[data-theme="light"] .matrix-date { color: #6b7280; }
.matrix-note { font-size: .85rem; color: var(--gray-500); max-width: 70ch; }
html[data-theme="light"] .matrix-note { color: #6b7280; }

/* Status tags */
.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .16em .55em;
  border-radius: 4px;
  margin-right: .4rem;
  vertical-align: .08em;
  white-space: nowrap;
}
.tag-green { background: rgba(153,195,128,.18); color: var(--green-light); border: 1px solid rgba(153,195,128,.45); }
html[data-theme="light"] .tag-green { background: rgba(47,99,72,.1); color: #1f4230; border-color: rgba(47,99,72,.35); }
.tag-gray { background: rgba(255,255,255,.07); color: var(--gray-400); border: 1px solid rgba(255,255,255,.18); }
html[data-theme="light"] .tag-gray { background: rgba(0,0,0,.05); color: #4b5563; border-color: rgba(0,0,0,.16); }
.tag-amber { background: rgba(199,180,143,.16); color: var(--brown-light); border: 1px solid rgba(199,180,143,.45); }
html[data-theme="light"] .tag-amber { background: rgba(140,125,94,.12); color: #6b5c3a; border-color: rgba(140,125,94,.4); }

/* Caveat box */
.caveat {
  border-left: 3px solid var(--brown);
  background: rgba(140,125,94,.1);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.8rem 0;
  font-size: .9rem;
}
.caveat p:last-child { margin-bottom: 0; }
.caveat-title {
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: .4rem;
}
html[data-theme="light"] .caveat { background: rgba(140,125,94,.09); }
html[data-theme="light"] .caveat-title { color: #6b5c3a; }

/* Jurisdiction blocks on state pages */
.jur-block {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.3rem;
  margin-bottom: 1.8rem;
}
html[data-theme="light"] .jur-block { border-top-color: rgba(0,0,0,.1); }
.jur-block h3 { margin-bottom: .5rem; }
.jur-lead { margin-bottom: .6rem; }
.jur-src { font-size: .78rem; color: var(--gray-500); word-break: break-word; }
.jur-src a { color: var(--gray-500); text-decoration: underline; }
html[data-theme="light"] .jur-src { color: #6b7280; }
html[data-theme="light"] .jur-src a { color: #6b7280; }
.jur-nav { margin-top: 2.5rem; font-size: .9rem; }

/* Incentive list */
.inc-list { margin: 1.5rem 0; }
.inc-item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: .9rem;
}
html[data-theme="light"] .inc-item { background: #f7f9f7; border-color: rgba(0,0,0,.1); }
.inc-item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.inc-item p { font-size: .92rem; margin-bottom: .5rem; }
.inc-item p:last-child { margin-bottom: 0; }

/* Audience grid */
.aud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.aud-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
html[data-theme="light"] .aud-card { background: #fff; border-color: rgba(0,0,0,.1); }
.aud-card h3 { font-size: 1rem; margin-bottom: .4rem; color: var(--green-mid); }
html[data-theme="light"] .aud-card h3 { color: var(--green-dark); }
.aud-card p { font-size: .9rem; margin-bottom: 0; color: var(--gray-400); }
html[data-theme="light"] .aud-card p { color: #4b5563; }

/* State cards */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.state-card {
  display: block;
  position: relative;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.1rem;
  transition: transform .2s ease, border-color .2s ease;
}
html[data-theme="light"] .state-card { background: #fff; border-color: rgba(0,0,0,.1); }
.state-card:hover { transform: translateY(-3px); border-color: var(--green); }
.state-abbr {
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--green-mid);
  display: block;
  margin-bottom: .3rem;
}
html[data-theme="light"] .state-abbr { color: var(--green-dark); }
.state-card h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.state-card p { font-size: .85rem; color: var(--gray-500); margin-bottom: .8rem; }
html[data-theme="light"] .state-card p { color: #6b7280; }
.state-more { font-size: .82rem; font-weight: 700; color: var(--green-mid); }
html[data-theme="light"] .state-more { color: var(--green-dark); }

/* ============================================================
   Contrast corrections
   ============================================================ */
/* Green buttons: white on --green was 4.26:1. Darken the fill to reach AA. */
.btn.btn-green { background: var(--green-dark); color: #ffffff; }
.btn.btn-green:hover { background: var(--green-darker); color: #ffffff; }

/* Light theme: the stats band keeps its dark green gradient, so keep the type white
   explicitly rather than inheriting a dark body colour, and lift the label. */
html[data-theme="light"] .stats { background: linear-gradient(135deg, #2f6348 0%, #1f4230 100%); }
html[data-theme="light"] .stat-value { color: #ffffff; }
html[data-theme="light"] .stat-label { color: #d2eec1; }

/* Muted footer / strapline text was 4.44:1 on the light background. */
html[data-theme="light"] .footer-tagline,
html[data-theme="light"] .footer-copy,
html[data-theme="light"] .footer-brand p { color: #4b5563; }
/* Footer bottom text: #6b7280 on #f3f6f3 measured 4.44:1, just under AA. */
html[data-theme="light"] .footer-bottom p { color: #4b5563; }
html[data-theme="dark"] .footer-bottom p,
.footer-bottom p { color: #9ca3af; }

/* Mobile hint for the horizontally scrollable jurisdiction matrix */
.matrix-hint { display: none; }
@media (max-width: 768px) {
  .matrix-hint { display: block; font-size: .82rem; color: var(--gray-500); margin: 0 0 .5rem; }
  html[data-theme="light"] .matrix-hint { color: #6b7280; }
}
