
/* -- Reset & base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Midnight Steel palette */
  --bg-primary:    #0F1419;
  --bg-surface:    #1A2332;
  --bg-elevated:   #243044;
  --green:         #3FE077;
  --green-dim:     #1B5E3B;
  --amber:         #F0A030;
  --amber-dark:    #C07820;
  --red:           #E5443B;
  --blue:          #4A8FE7;
  --highlight:     #FFD644;
  --text-primary:  #E7EDF4;
  --text-secondary:#8B99AB;
  --text-muted:    #8898A8;
  --border:        #2A3A4E;

  /* Legacy aliases (used by existing components) */
  --color-bg:          var(--bg-primary);
  --color-surface:     var(--bg-surface);
  --color-surface-2:   var(--bg-elevated);
  --color-border:      var(--border);
  --color-text:        var(--text-primary);
  --color-text-muted:  var(--text-secondary);
  --color-accent:      var(--amber);
  --color-accent-dark: var(--amber-dark);
  --color-link:        #6EB3FF;
  --color-link-hover:  #9CCEFF;
  --color-danger:      var(--red);
  --color-success:     var(--green);

  --font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   'Geist Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-display:'Big Shoulders Display', var(--font-sans);
  --font-serif:  'Crimson Pro', Georgia, serif;

  --radius:    8px;
  --radius-sm: 4px;
  --max-width: 780px;
  --max-width-wide: 1200px;
  /* Single source of truth for sticky offsets (table headers, nav panel, map height) */
  --nav-height: 88px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Guard against stray horizontal overflow on small screens; unlike
   overflow-x: hidden, clip does not create a scroll container, so
   position: sticky descendants (nav, table headers) keep working. */
html, body { overflow-x: clip; }

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ── Skip link (keyboard accessibility) ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--highlight);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
}

/* Light theme override for skip link contrast (WCAG AA 4.5:1) */
[data-theme='light'] .skip-link {
  color: #0F1419;
}

/* ── Focus-visible ring (keyboard navigation) ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.site-nav {
  background: rgba(15,20,25,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #2A3A4E;
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}
.site-nav__inner {
  max-width: none;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Left section — must be allowed to shrink so the hamburger never gets pushed
   off-screen on narrow viewports */
.site-nav__left {
  flex-shrink: 1;
  min-width: 0;
}

/* Logo */
.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  min-width: 0;
}
.site-nav__logo:hover { text-decoration: none; }
.site-nav__snappy { height: 56px; width: auto; flex-shrink: 0; }
.logo-stack { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; overflow: hidden; }
.logo-line1 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.04em; white-space: nowrap; }
.logo-dmv  { color: #FFD644; }
.logo-cw   { color: #E7EDF4; }
.logo-tagline { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--text-muted); }

/* Nav links — flex: 1 centers them in the nav bar on desktop */
.site-nav__links {
  flex: 1;
  list-style: none;
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

/* Hamburger — hidden on desktop, shown at ≤640px */
.nav-hamburger {
  display: none;
}
.site-nav__links li a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.site-nav__links li a:hover {
  color: #E7EDF4;
  background: var(--bg-elevated);
  text-decoration: none;
}

/* Theme toggle icon button */
.nav-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8B99AB;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.nav-toggle:hover {
  color: #E7EDF4;
}

/* OPEN MAP button */
.nav-map-btn {
  background: #1B5E3B !important;
  border: 1px solid #3FE077 !important;
  color: #3FE077 !important;
  border-radius: 6px !important;
  padding: 9px 20px !important;
}
.nav-map-btn:hover {
  background: var(--green) !important;
  color: var(--bg-primary) !important;
}
.nav-map-btn svg { flex-shrink: 0; }

/* Right section */
.site-nav__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}


/* ── Main content ────────────────────────────────────────────────────────── */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
  width: 100%;
}
.main-content--wide {
  max-width: var(--max-width-wide);
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.breadcrumbs { margin-bottom: 1.5rem; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.breadcrumbs ol li + li::before {
  content: '›';
  margin-right: 0.25rem;
  color: var(--border);
}
.breadcrumbs ol li a { color: var(--text-secondary); }
.breadcrumbs ol li a:hover { color: var(--color-link); }
.breadcrumbs ol li[aria-current="page"] { color: var(--text-primary); }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2.5rem; }
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.page-header__sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ── Hero (legacy) ───────────────────────────────────────────────────────── */
.hero { margin-bottom: 3rem; }
.hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 700px;
}
.hero__stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-mascot { width: 120px; flex-shrink: 0; }

/* ── Stats ───────────────────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  flex: 1;
}
.stat-box__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1.2;
}
.stat-box__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--amber-dark); color: var(--bg-primary); text-decoration: none; }
.btn-secondary {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--bg-elevated); border-color: var(--text-secondary); text-decoration: none; }

.btn-green {
  display: inline-block;
  background: var(--green);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-green:hover { opacity: 0.9; color: var(--bg-primary); text-decoration: none; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.home-section { margin-bottom: 3rem; }
.home-section__heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.home-section__intro {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ── Jurisdiction grid ───────────────────────────────────────────────────── */
.jurisdiction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.jurisdiction-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s;
  display: block;
}
.jurisdiction-card:hover { border-color: var(--amber); text-decoration: none; }
.jurisdiction-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.jurisdiction-card__stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── Blog index cards ────────────────────────────────────────────────────── */
.blog-index {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s;
}
.blog-card:hover { border-color: var(--amber); }
.blog-card__link { text-decoration: none; }
.blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.blog-card__link:hover .blog-card__title { color: var(--amber); }
.blog-card__date {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.blog-card__excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}
.blog-card__read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amber);
}
.blog-card__read-more:hover { color: var(--amber-dark); text-decoration: none; }

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 0;
  font-size: 1.05rem;
}

/* ── Blog pagination ─────────────────────────────────────────────────────── */
.bi-pagination {
  max-width: 720px;
  margin: 2rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.bi-pagination__link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--green);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.bi-pagination__link:hover {
  border-color: var(--green);
  background: var(--bg-elevated);
  color: var(--green);
  text-decoration: none;
}
.bi-pagination__link--disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}
.bi-pagination__link--disabled:hover {
  border-color: var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
}
.bi-pagination__current {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ── Blog post ───────────────────────────────────────────────────────────── */
.blog-post__header { margin-bottom: 2rem; }
.blog-post__title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.blog-post__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.blog-post__meta-sep { opacity: 0.5; }
.blog-post__author { font-weight: 500; }

/* ── Prose ───────────────────────────────────────────────────────────────── */
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose h1, .prose h2, .prose h3,
.prose h4, .prose h5, .prose h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}
.prose h1 { font-size: 1.75rem; }
.prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; }
.prose li { margin-bottom: 0.35rem; }
.prose blockquote {
  border-left: 3px solid var(--amber);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.prose pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.prose code { font-family: var(--font-mono); font-size: 0.88em; }
.prose pre code { color: var(--text-primary); background: none; padding: 0; }
.prose :not(pre) > code {
  background: var(--bg-elevated);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  color: #f0c674;
}
.prose a { color: var(--color-link); }
.prose a:hover { color: var(--color-link-hover); }
.prose strong { font-weight: 700; color: var(--text-primary); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Camera detail ───────────────────────────────────────────────────────── */
.camera-detail { margin-bottom: 2.5rem; }
.detail-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.detail-grid dt { font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; }
.detail-grid dd { font-size: 0.95rem; color: var(--text-primary); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin-bottom: 1.5rem; }
.camera-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.camera-table th, .camera-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.camera-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: sticky;
  top: var(--nav-height);
}
.camera-table td { color: var(--text-primary); }
.camera-table tr:hover td { background: var(--bg-surface); }
.camera-table a { font-weight: 500; }
.table-note { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem; text-align: center; }

/* ── Share bar ───────────────────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.share-bar__label { font-weight: 600; color: var(--text-secondary); margin-right: 0.25rem; }
.share-bar__link {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.share-bar__link:hover {
  background: var(--border);
  border-color: var(--text-secondary);
  text-decoration: none;
  color: var(--text-primary);
}

/* ── Related cameras ─────────────────────────────────────────────────────── */
.related-cameras {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.related-cameras__heading { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-primary); }
.related-cameras__list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.related-cameras__list a { font-size: 0.95rem; }
.related-cameras__jurisdiction { font-size: 0.82rem; color: var(--text-secondary); }

/* ── Ticket help (camera detail) ─────────────────────────────────────────── */
.ticket-help {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ticket-help__heading { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
.ticket-help__body { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; }
.ticket-help__link { font-weight: 600; color: var(--color-link); }
.ticket-help__link:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ── FAB ─────────────────────────────────────────────────────────────────── */
.snappy-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 64px;
  height: 64px;
  background: #3D3225;
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  box-shadow: 0 0 15px rgba(63, 224, 119, 0.4);
  z-index: 1000;
  transition: transform 0.2s;
}
.snappy-fab:hover { transform: scale(1.1); color: var(--green); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.site-footer__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-footer__logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer__logo .logo-dmv { color: var(--highlight); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-secondary); text-decoration: none; }
.site-footer__copy { color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* Nav collapses to the hamburger early enough that the longer
   ENFORCEMENT / LIVE TRAFFIC labels never crowd the logo. */
@media (max-width: 900px) {
  .site-nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__links li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
  }
  .nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.15s;
  }
  .nav-hamburger:hover { color: var(--text-primary); }
  .site-nav__right { margin-left: auto; }
}

@media (max-width: 640px) {
  .site-nav__inner { padding: 0 1rem; gap: 0.75rem; }
  .site-nav__snappy { height: 40px; }
  .logo-line1 { font-size: 19px; }
  .logo-tagline { display: none; }
  .page-header h1 { font-size: 1.5rem; }
  .blog-post__title { font-size: 1.5rem; }
  .hero__title { font-size: 1.75rem; }
  .site-footer__inner { flex-direction: column; text-align: center; }
  .jurisdiction-grid { grid-template-columns: 1fr; }
  .hero__stats { flex-direction: column; }
  .hero-mascot { width: 80px; }
  .hero { flex-direction: column-reverse; }
  .snappy-fab { width: 56px; height: 56px; }
}

/* ── Light theme (day mode) ────────────────────────────────────────────────
   Placed AFTER :root so these custom-property declarations win the cascade.
   ──────────────────────────────────────────────────────────────────────── */

[data-theme='light'] {
  --bg-primary:    #F5F7FA;
  --bg-surface:    #FFFFFF;
  --bg-elevated:   #E8ECF2;
  --text-primary:  #1A2332;
  --text-secondary:#4A5568;
  --text-muted:    #5A6A7A;
  --border:        #CBD5E0;
  /* Accent colors adjusted for light backgrounds */
  --green:         #2D8B4E;
  --green-dim:     rgba(45,139,78,0.1);
  --amber:         #C07820;
  --amber-dark:    #A06010;
  --red:           #C53030;
  --highlight:     #C07820;
  /* Legacy aliases */
  --color-bg:          var(--bg-primary);
  --color-surface:     var(--bg-surface);
  --color-surface-2:   var(--bg-elevated);
  --color-border:      var(--border);
  --color-text:        var(--text-primary);
  --color-text-muted:  var(--text-secondary);
  --color-link:        #2B6CB0;
  --color-link-hover:  #2C5282;
}

[data-theme='light'] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme='light'] .site-nav {
  background: rgba(245, 247, 250, 0.96);
  border-bottom: 1px solid #CBD5E0;
}

[data-theme='light'] .site-nav__links li a {
  color: #4A5568;
}

[data-theme='light'] .site-nav__links li a:hover {
  color: #1A2332;
  background: #E8ECF2;
}

[data-theme='light'] .site-nav__logo {
  color: #1A2332;
}

[data-theme='light'] .logo-dmv {
  color: #C07820;
}

[data-theme='light'] .logo-cw {
  color: #1A2332;
}

[data-theme='light'] .logo-tagline {
  color: var(--text-muted);
}

[data-theme='light'] .nav-toggle {
  color: var(--text-muted);
}

[data-theme='light'] .nav-toggle:hover {
  color: #1A2332;
}

[data-theme='light'] .nav-map-btn {
  background: #E6F4EC !important;
  border-color: #2D8B4E !important;
  color: #2D8B4E !important;
}

[data-theme='light'] .nav-map-btn:hover {
  background: #2D8B4E !important;
  color: #FFFFFF !important;
}

[data-theme='light'] .site-footer {
  background: #FFFFFF;
  border-top-color: #CBD5E0;
  color: var(--text-muted);
}

[data-theme='light'] .site-footer a {
  color: var(--text-muted);
}

[data-theme='light'] .site-footer a:hover {
  color: #4A5568;
  text-decoration: none;
}

[data-theme='light'] .site-footer__copy {
  color: var(--text-muted);
}

[data-theme='light'] .site-footer__logo {
  color: var(--text-muted);
}

[data-theme='light'] .snappy-fab {
  background: #FFFFFF;
  border-color: #2D8B4E;
  color: #2D8B4E;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

[data-theme='light'] .snappy-fab:hover {
  color: #2D8B4E;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


.cw-ad-slot {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 280px;
  margin: 2rem 0;
  padding: 16px 1rem 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.cw-ad-slot__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}
.cw-ad-slot .adsbygoogle { display: block; width: 100%; }
@media (max-width: 640px) {
  .cw-ad-slot { min-height: 250px; }
}
