:root {
  --bg: #f4f7f3;
  --panel: #ffffff;
  --panel-2: #edf2ed;
  --accent: #286b4f;
  --accent-2: #b76228;
  --text: #19251d;
  --text-secondary: #4a5d50;
  --muted: #526257;
  --border: rgba(25, 37, 29, 0.12);
  --logo-height: 72px;
  --logo-height-sm: 56px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "DM Sans", "Space Grotesk", sans-serif;
  background: linear-gradient(180deg, #eaf1eb 0, #f4f7f3 360px, #f4f7f3 100%);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.01em;
}

header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-center {
  display: flex;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f7f7f7;
}

.nav-link:hover {
  background: #f1f1f1;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.brand-logo {
  height: var(--logo-height);
  width: auto;
  max-width: 280px;
  display: block;
}

.brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.page-brand-logo {
  height: var(--logo-height);
  width: auto;
  display: block;
}

.footer-logo img {
  height: var(--logo-height-sm);
  width: auto;
  max-width: 240px;
  display: block;
}

.page-header-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.heading-icon {
  padding-left: 38px;
  background-image: url('./images/Flyground%202%20Without%20Background.png');
  background-repeat: no-repeat;
  background-size: 26px 26px;
  background-position: left center;
}

.tabs {
  display: flex;
  gap: 3px;
  background: #e8eee8;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(25, 37, 29, 0.1);
}

@media (max-width: 1100px) {
  nav {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .nav-center {
    justify-content: flex-start;
  }

  .nav-right {
    justify-content: space-between;
    width: 100%;
  }

  .search-bar {
    flex: 1 1 320px;
    min-width: 240px;
  }
}

@media (max-width: 720px) {
  .nav-right {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .search-bar {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    flex-wrap: nowrap;
  }

  .search-input {
    min-width: 0;
    flex: 1 1 auto;
  }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  padding: 6px 8px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.search-mode {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-mode:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.18);
}

.search-mode:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 10px;
  min-width: 220px;
  font: inherit;
}

.search-input:focus { outline: none; }

.search-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.5), rgba(240, 179, 92, 0.4));
  color: #0b1c25;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-btn:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.search-btn:focus-visible { outline: 2px solid var(--accent); }

.tab {
  border: none;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .tabs {
    flex-wrap: wrap;
    width: 100%;
  }

  .tab {
    flex: 1 1 0;
    padding: 8px 6px;
    font-size: 0.9rem;
  }
}

.tab:focus-visible { outline: 2px solid var(--accent); }

.tab.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(25, 37, 29, 0.16);
}

.tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

main { padding: 28px 20px 48px; }

.section {
  display: none;
}

.section.active {
  display: block;
  animation: section-arrive 0.24s ease-out both;
}

@keyframes section-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(25, 37, 29, 0.055);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}


.panel:hover {
  border-color: rgba(40, 107, 79, 0.24);
  box-shadow: 0 10px 28px rgba(25, 37, 29, 0.075);
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 26%);
  align-items: center;
  gap: 8px 28px;
  border-top: 3px solid var(--accent);
}

.home-intro-copy {
  grid-column: 1;
}

.home-intro-copy h1 {
  max-width: 760px;
  margin-top: 14px;
  font-size: 2.45rem;
  line-height: 1.12;
}

.home-intro-mark {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 100%;
  max-width: 250px;
  max-height: 140px;
  object-fit: contain;
}

.home-intro > .cards-3 {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .home-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .home-intro-copy,
  .home-intro-mark,
  .home-intro > .cards-3 {
    grid-column: 1;
  }

  .home-intro-mark {
    grid-row: auto;
    justify-self: start;
    max-width: 210px;
    max-height: 110px;
  }

  .home-intro-copy h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; }
 h1 { font-size: 2.1rem; }
 h2 { font-size: 1.5rem; }
 h3 { font-size: 1.15rem; }

p { margin: 0 0 14px; color: var(--muted); line-height: 1.6; }

.grid {
  display: grid;
  gap: 16px;
}

.cards-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: #f7f7f7;
}

.stat strong { display: block; font-size: 1.4rem; margin-bottom: 6px; color: var(--text); }

#weather-stat {
  background: linear-gradient(135deg, rgba(111, 224, 183, 0.15), rgba(240, 193, 92, 0.1));
  border-color: rgba(111, 224, 183, 0.4);
}

#weather-stat strong {
  color: #f0c15c;
  font-size: 1.6rem;
}

.weather-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.weather-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: #f0f0f0;
  color: var(--text);
  border: 1px solid var(--border);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6be29e;
  font-weight: 700;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #6be29e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(107, 226, 158, 0.7); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(107, 226, 158, 0); }
}

.list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.list-item {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: border 0.2s ease, transform 0.2s ease;
}

.list-item:hover { border-color: rgba(86, 211, 161, 0.4); transform: translateY(-2px); }

.tag { color: var(--accent-2); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Climate Dashboard Styles */
.climate-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

/* ============================================
   VITAL SIGNS CAROUSEL
   ============================================ */

.vital-signs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.last-updated {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  background: rgba(107, 226, 158, 0.1);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.show-all-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.show-all-link:hover {
  color: #7ae3a5;
  transform: translateX(4px);
}

.show-all-link svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  transition: fill 0.3s ease;
}

.show-all-link svg circle {
  fill: var(--accent);
}

.show-all-link svg path {
  fill: var(--bg-dark);
}

.show-all-link:hover svg circle {
  fill: #7ae3a5;
}

.vital-signs-carousel {
  position: relative;
  margin: 32px 0;
  padding: 0;
  isolation: isolate;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: 16px;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 20px;
}

.vital-sign-slide {
  min-width: calc(33.333% - 14px);
  flex-shrink: 0;
  background: linear-gradient(135deg, #ffffff, #f5f5f5);
  backdrop-filter: none;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
  transition: all 0.4s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.vital-sign-slide:hover {
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  backdrop-filter: none;
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.slide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.slide-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.3px;
  opacity: 1;
}

.slide-value-wrapper {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.trend-arrow {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.trend-arrow.up {
  color: #ff6b6b;
}

.trend-arrow.down {
  color: #4ecdc4;
  transform: rotate(180deg);
  display: inline-block;
}

.slide-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(29, 138, 90, 0.2);
}

.slide-units {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 2.5;
  opacity: 0.9;
}

.slide-description {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  opacity: 0.95;
}

.carousel-btn {
  display: none !important;
}

.carousel-btn:hover {
  background: linear-gradient(135deg, rgba(107, 226, 158, 0.3), rgba(86, 211, 161, 0.25));
  backdrop-filter: none;
  border-color: #6BE29E;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 6px 18px rgba(107, 226, 158, 0.5), 0 0 20px rgba(107, 226, 158, 0.3);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-btn {
  left: 0;
  pointer-events: auto !important;
}

.next-btn {
  right: 0;
  pointer-events: auto !important;
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(107, 226, 158, 0.3);
  border: 1px solid rgba(107, 226, 158, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: rgba(107, 226, 158, 0.5);
  transform: scale(1.2);
}

.dot.active {
  background: var(--accent);
  border-color: var(--accent);
  width: 24px;
  border-radius: 5px;
}

@media (max-width: 1024px) {
  .vital-sign-slide {
    min-width: calc(50% - 10px);
  }
}

@media (max-width: 640px) {
  .vital-sign-slide {
    min-width: 100%;
  }
  
  .vital-signs-carousel {
    padding: 0 40px;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}

.climate-stat-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(86, 211, 161, 0.15), rgba(240, 179, 92, 0.1));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(107, 226, 158, 0.3);
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.climate-stat-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(86, 211, 161, 0.22), rgba(240, 179, 92, 0.15));
  backdrop-filter: blur(22px);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(107, 226, 158, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.trend-indicator {
  font-size: 1.2rem;
  font-weight: bold;
}

.trend-indicator.up {
  color: #f05c5c;
}

.trend-indicator.down {
  color: var(--accent);
}

.trend-text {
  color: var(--text-secondary);
}

.stat-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Chart Wrapper */
.chart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.chart-info {
  cursor: help;
}

.info-tooltip {
  font-size: 1.2rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.info-tooltip:hover {
  opacity: 1;
}

.chart-footer {
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
}

.chart-explanation {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.green-action-planner {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(111, 224, 183, 0.09), rgba(240, 193, 92, 0.08));
}

.green-action-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.green-action-heading h3 {
  margin: 10px 0 0;
  font-size: 1.35rem;
}

.green-action-intro {
  margin: 14px 0 18px;
  color: var(--muted);
}

.green-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.green-action-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.green-action-option:hover {
  border-color: rgba(40, 107, 79, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(25, 37, 29, 0.06);
}

.green-action-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(111, 224, 183, 0.13);
  box-shadow: inset 0 0 0 1px rgba(111, 224, 183, 0.25);
}

.green-action-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.action-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f7f7f7;
  font-size: 1.35rem;
  flex: 0 0 auto;
}

.action-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.action-copy strong {
  color: var(--text);
  line-height: 1.25;
}

.action-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.green-action-summary {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.green-action-summary strong {
  font-size: 1.35rem;
  color: var(--accent);
}

.impact-progress {
  height: 8px;
  margin: 12px 0 8px;
  border-radius: 999px;
  background: #edf0ec;
  overflow: hidden;
}

.impact-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f0c15c);
  transition: width 0.35s ease;
}

.green-action-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Insights Grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.insight-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.insight-card:hover {
  background: #f1f1f1;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.insight-icon {
  font-size: 2rem;
  line-height: 1;
}

.insight-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px 0;
}

.insight-content p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

footer { 
  padding: 48px 20px 24px;
  margin-top: 48px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-logo img {
  height: var(--logo-height);
  width: auto;
  display: block;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.footer-section h4 {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1rem;
}

.footer-section p {
  color: var(--muted);
  line-height: 1.6;
}

.footer-section a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--accent);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(86, 211, 161, 0.1);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: rgba(86, 211, 161, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }

.muted { color: var(--muted); }

.rss-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
}

.rss-item {
  padding: 20px;
  border-left: 5px solid var(--accent);
  background: linear-gradient(135deg, rgba(86, 211, 161, 0.05) 0%, rgba(240, 179, 92, 0.03) 100%);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(86, 211, 161, 0.15);
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.rss-item:hover {
  background: linear-gradient(135deg, rgba(86, 211, 161, 0.12) 0%, rgba(240, 179, 92, 0.08) 100%);
  border-left-color: var(--accent-2);
  border-color: rgba(240, 179, 92, 0.25);
  transform: translateX(4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.rss-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rss-item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.rss-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.2), rgba(240, 179, 92, 0.2));
  border: 1px solid rgba(86, 211, 161, 0.4);
  border-radius: 20px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.rss-item-meta {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.rss-item-source {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: rgba(86, 211, 161, 0.15);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
}

.rss-item-date {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.rss-item-description {
  margin: 12px 0 14px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.rss-item-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.2), rgba(240, 179, 92, 0.15));
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(86, 211, 161, 0.25);
  transition: all 0.2s ease;
}

.rss-item-link:hover {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.35), rgba(240, 179, 92, 0.25));
  border-color: rgba(86, 211, 161, 0.5);
  text-decoration: none;
  transform: translateX(2px);
}

.rss-item-link .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.rss-item-link:hover .arrow {
  transform: translateX(2px);
}

.archive-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.archive-toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.archive-toolbar-top {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(86, 211, 161, 0.05), rgba(240, 179, 92, 0.03));
}

.archive-toolbar-actions {
  justify-content: space-between;
}

.archive-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.archive-search-field {
  flex: 1 1 320px;
}

.archive-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.archive-field .search-input,
.archive-field .search-mode {
  width: 100%;
}

.archive-field .search-mode {
  min-height: 46px;
}

@media (max-width: 720px) {
  .archive-toolbar-actions {
    align-items: flex-start;
  }

  .archive-field {
    min-width: 100%;
  }
}

/* Environmental Trivia Section */
.trivia-panel {
  position: relative;
  overflow: hidden;
  /* Thinking background - animated gradient */
  background: linear-gradient(270deg, #f7f7f7, #ffffff, #f0f0f0, #ffffff, #f7f7f7);
  background-size: 800% 800%;
  animation: thinking 15s ease infinite;
  border: 1px solid var(--border);
}

.trivia-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 1;
    pointer-events: none;
}

@keyframes thinking {
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

.trivia-content {
    position: relative;
    z-index: 2;
    padding-top: 10px;
}

.trivia-question {
    font-size: 1.4rem;
  color: var(--text);
    margin-bottom: 20px;
    min-height: 3.2rem;
}

.trivia-answer {
    margin-bottom: 20px;
    padding: 14px;
  background: #f7f7f7;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
  color: var(--text);
    animation: slideDown .3s ease-out;
}

.answer-label {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-right: 8px;
}

.trivia-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(107, 226, 158, 0.5);
    background: rgba(107, 226, 158, 0.1);
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(107, 226, 158, 0.2);
    transform: translateY(-1px);
}

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    color: var(--text);
    background: rgba(255,255,255,0.1);
    transform: rotate(180deg);
}

.btn-refresh.spinning {
    animation: spin 1s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Search backdrop */
.search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  animation: fadeIn 0.3s ease;
}

.search-backdrop[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Search results */
.search-panel {
  position: fixed;
  top: 80px;
  left: 20px;
  right: 20px;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(7, 21, 15, 0.98);
  border: 1px solid rgba(107, 226, 158, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 20px;
  animation: slideDown 0.3s ease;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-panel[hidden] {
  display: none !important;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(107, 226, 158, 0.3);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 226, 158, 0.5);
}

.search-hit {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f7f7f7;
  transition: border 0.2s ease, transform 0.2s ease;
}

.search-hit:hover {
  border-color: rgba(86, 211, 161, 0.4);
  transform: translateY(-1px);
}

.search-hit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.search-hit-title { 
  color: var(--text); 
  margin: 0; 
  font-weight: 700;
  flex: 1;
}

.search-hit-section {
  display: inline-flex;
  padding: 3px 10px;
  background: rgba(86, 211, 161, 0.15);
  border: 1px solid rgba(86, 211, 161, 0.3);
  border-radius: 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.search-hit-snippet { margin: 0; color: var(--muted); line-height: 1.5; }

.search-hit-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.search-hit-link .arrow { transition: transform 0.2s ease; }
.search-hit-link:hover .arrow { transform: translateX(2px); }

/* Media cards for home engagement */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 14px;
}

.media-card {
  display: grid;
  grid-template-rows: 140px auto;
  background: #f7f7f7;
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.25s ease;
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.16);
  background: #f1f1f1;
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.highlight-hit {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transition: outline 0.4s ease;
}

.media-thumb {
  background-size: cover;
  background-position: center;
}

.media-content {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.media-badge {
  background: rgba(86, 211, 161, 0.18);
  border: 1px solid rgba(86, 211, 161, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.media-type { color: var(--muted); }

.media-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  padding: 6px 0;
}

.media-link .arrow { transition: transform 0.2s ease; }

.media-link:hover .arrow { transform: translateX(2px); }

/* Admin story panel */
.admin-story-summary {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 12px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-story-body {
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.admin-story-body.collapsed {
  max-height: 72px;
  overflow: hidden;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.admin-story-body.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff);
}

#admin-story-toggle {
  margin-top: 10px;
}

.admin-story-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-top: 12px;
}

.admin-story-link .arrow { transition: transform 0.2s ease; }
.admin-story-link:hover .arrow { transform: translateX(2px); }

/* Chart container */
.chart-container {
  position: relative;
  margin-top: 20px;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

canvas {
  max-width: 100%;
  height: 300px !important;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: block;
}

/* Suggestion form */
.suggestion-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.required {
  color: #f0c15c;
}

.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(86, 211, 161, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 20px rgba(107, 226, 158, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-submit {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.4), rgba(240, 179, 92, 0.4));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(107, 226, 158, 0.6);
  border-radius: 10px;
  padding: 14px 24px;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 25px rgba(107, 226, 158, 0.15);
}

.form-submit:hover {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.6), rgba(240, 179, 92, 0.6));
  backdrop-filter: blur(20px);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(107, 226, 158, 0.25);
  box-shadow: 0 8px 24px rgba(107, 226, 158, 0.3);
}

.form-submit:active {
  transform: translateY(0);
}

.form-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.form-message.success {
  background: rgba(107, 226, 158, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.form-message.error {
  background: rgba(240, 92, 92, 0.15);
  border: 1px solid #f05c5c;
  color: #f05c5c;
}

/* Supporter onboarding */
.supporter-onboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.supporter-panel {
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.supporter-panel h3 {
  margin-top: 0;
}

.supporter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.supporter-directory {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.supporter-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  display: grid;
  gap: 6px;
}

.supporter-card h4 {
  margin: 0;
  font-size: 1rem;
}

.supporter-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.supporter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supporter-tags span {
  background: rgba(29, 138, 90, 0.12);
  border: 1px solid rgba(29, 138, 90, 0.2);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.supporter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.supporter-contact {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.supporter-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.supporter-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.supporter-updates-panel {
  display: none;
}

.supporter-updates-panel.is-visible {
  display: block;
}

.supporter-post-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f7f7f7;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.supporter-post-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.supporter-post-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(29, 138, 90, 0.12);
  border: 1px solid rgba(29, 138, 90, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  width: fit-content;
}

.supporter-post-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.supporter-post-link:hover {
  text-decoration: underline;
}

.admin-message-card {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

/* Location Selector Styles */
.location-selector {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 249, 247, 0.9));
  border: 1px solid rgba(29, 138, 90, 0.18);
  border-radius: 16px;
  padding: 22px;
  margin-top: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.location-selector::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(107, 226, 158, 0.16), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(240, 179, 92, 0.18), transparent 40%);
  pointer-events: none;
}

.location-selector > * {
  position: relative;
  z-index: 1;
}

.city-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.location-selector .form-input {
  background: #ffffff;
  border-color: rgba(29, 138, 90, 0.25);
  box-shadow: 0 8px 18px rgba(29, 138, 90, 0.08);
}

.location-selector .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 138, 90, 0.18), 0 10px 24px rgba(29, 138, 90, 0.18);
}

.input-wrapper .form-input {
  flex: 1;
  padding-right: 50px;
}

.input-wrapper .icon-btn {
  position: absolute;
  right: 4px;
  width: 40px;
  height: 40px;
  margin: 0;
}

.city-input-group .form-input {
  flex: 1;
}

.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.35), rgba(240, 179, 92, 0.35));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(107, 226, 158, 0.5);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.location-selector .btn-primary {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.55), rgba(240, 179, 92, 0.45));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(29, 138, 90, 0.2);
}

.location-selector .btn-primary:hover {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.75), rgba(240, 179, 92, 0.65));
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(29, 138, 90, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.55), rgba(240, 179, 92, 0.55));
  backdrop-filter: blur(20px);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(107, 226, 158, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-danger {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(200, 0, 0, 0.4);
  background: rgba(200, 0, 0, 0.08);
  color: #7a0c0c;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(200, 0, 0, 0.12);
  border-color: rgba(200, 0, 0, 0.6);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.suggestions-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.suggestion-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  background: #f7f7f7;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.suggestion-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}

.suggestion-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.suggestion-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.suggestion-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.suggestion-actions .btn-danger {
  padding: 8px 14px;
  border-radius: 10px;
}

/* Admin login */
.admin-login-page {
  min-height: 100vh;
  padding: 32px 20px 48px;
  background:
    radial-gradient(circle at 18% 20%, rgba(29, 138, 90, 0.14), transparent 40%),
    radial-gradient(circle at 75% 15%, rgba(185, 130, 20, 0.18), transparent 35%),
    linear-gradient(140deg, #f6fbf9 0%, #ffffff 45%, #f4f7fb 100%);
  position: relative;
}

.home-button {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  z-index: 100;
}

.home-button:hover {
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.admin-login-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  gap: 28px;
  box-shadow: 0 30px 80px rgba(20, 40, 30, 0.12);
}

.admin-login-left {
  padding: 12px;
}

.admin-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(29, 138, 90, 0.12);
  color: #0e5a3a;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-login-left h1 {
  font-size: 2.4rem;
  margin: 18px 0 10px;
}

.admin-login-logo {
  margin-bottom: 12px;
}

.admin-login-logo img {
  height: var(--logo-height);
  width: auto;
  display: block;
}

.admin-login-left p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.admin-login-stats {
  display: grid;
  gap: 10px;
}

.stat-pill {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  font-weight: 600;
  color: #10261a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.admin-login-right {
  display: flex;
  align-items: center;
}

.admin-login-card {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  animation: riseIn 0.5s ease;
}

.admin-login-card h2 {
  margin-bottom: 6px;
}

.admin-login-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-login-form label {
  font-weight: 600;
  color: var(--text);
}

.admin-login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f7f7f7;
}

.admin-login-input input {
  border: none;
  background: transparent;
  font: inherit;
  width: 100%;
  color: var(--text);
}

.admin-login-input input:focus {
  outline: none;
}

.admin-login-lock {
  font-size: 1.1rem;
}

.admin-login-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1d8a5a, #2bb379);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(29, 138, 90, 0.25);
}

.admin-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(29, 138, 90, 0.3);
}

.admin-login-error {
  color: #7a0c0c;
  font-weight: 600;
}

.admin-login-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.page-footer-simple {
  text-align: center;
  padding: 20px 16px 28px;
  color: var(--muted);
}

.page-footer-icon {
  height: var(--logo-height);
  width: auto;
  display: inline-block;
  margin-bottom: 6px;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
  }

  .admin-login-right {
    align-items: stretch;
  }
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.25), rgba(240, 179, 92, 0.25));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(107, 226, 158, 0.4);
  border-radius: 8px;
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.location-selector .icon-btn {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(29, 138, 90, 0.18);
}

.icon-btn:hover {
  background: linear-gradient(120deg, rgba(86, 211, 161, 0.4), rgba(240, 179, 92, 0.3));
  backdrop-filter: blur(20px);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 226, 158, 0.3);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.quick-cities {
  margin-top: 16px;
}

.quick-cities-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
}

.location-selector .quick-cities-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
}

.city-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.location-selector .city-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.location-selector .city-btn:hover {
  background: rgba(107, 226, 158, 0.2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.city-btn:hover {
  background: rgba(107, 226, 158, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.city-btn:active {
  transform: translateY(0);
}

.location-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.location-message.success {
  background: rgba(107, 226, 158, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.location-message.error {
  background: rgba(240, 92, 92, 0.15);
  border: 1px solid #f05c5c;
  color: #f05c5c;
}

/* Search highlighting */
.search-highlight,
mark.search-highlight {
  background: linear-gradient(120deg, rgba(240, 193, 92, 0.6), rgba(240, 179, 92, 0.5));
  color: #0b1c25;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(240, 193, 92, 0.4);
  animation: highlightPulse 0.5s ease;
}

@keyframes highlightPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Web search results */
.web-search-results {
  padding: 20px;
  text-align: center;
}

.web-search-results p {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.web-search-results strong {
  color: var(--accent);
}

.search-engine-links {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.search-engine-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(13, 36, 24, 0.6), rgba(16, 48, 33, 0.4));
  border: 1px solid rgba(86, 211, 161, 0.3);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-engine-link:hover {
  background: linear-gradient(135deg, rgba(86, 211, 161, 0.2), rgba(16, 48, 33, 0.6));
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(86, 211, 161, 0.2);
}

.search-engine-link .engine-icon {
  font-size: 1.2rem;
}

.search-engine-link .arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.search-engine-link:hover .arrow {
  transform: translate(2px, -2px);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

@media (max-width: 720px) {
  :root { --logo-height: var(--logo-height-sm); }
  nav { flex-direction: column; align-items: flex-start; }
  .tabs { width: 100%; }
  .tab { flex: 1; text-align: center; }
  h1 { font-size: 1.65rem; }
  
  .city-input-group {
    flex-direction: column;
  }
  
  .btn-primary {
    width: 100%;
  }
}


/* Dashboard Layout */
.environment-pulse {
  border-top: 3px solid var(--accent);
}

.environment-pulse-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.environment-pulse-heading h2 {
  margin-bottom: 6px;
}

.environment-pulse-heading p {
  margin-bottom: 0;
}

.environment-data-note,
.environment-updated {
  color: var(--muted);
  font-size: 0.8rem;
}

.environment-data-note {
  white-space: nowrap;
  padding-top: 5px;
}

.environment-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.environment-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.environment-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.environment-card-heading h3 {
  margin-bottom: 0;
}

.environment-source {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.air-quality-score {
  display: grid;
  min-width: 68px;
  padding: 8px;
  border: 1px solid rgba(40, 107, 79, 0.22);
  border-radius: 8px;
  background: rgba(40, 107, 79, 0.09);
  text-align: center;
}

.air-quality-score strong {
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1.2;
}

.air-quality-score span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.air-quality-score[data-aqi-band="moderate"] {
  background: rgba(210, 156, 49, 0.14);
  border-color: rgba(210, 156, 49, 0.34);
}

.air-quality-score[data-aqi-band="sensitive"],
.air-quality-score[data-aqi-band="unhealthy"] {
  background: rgba(183, 98, 40, 0.13);
  border-color: rgba(183, 98, 40, 0.34);
}

.air-quality-score[data-aqi-band="very-unhealthy"],
.air-quality-score[data-aqi-band="hazardous"] {
  background: rgba(159, 58, 61, 0.12);
  border-color: rgba(159, 58, 61, 0.32);
}

.environment-summary {
  min-height: 2.8em;
  margin: 14px 0;
}

.air-quality-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.air-quality-metrics > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 6px;
  background: var(--panel);
}

.air-quality-metrics span,
.air-quality-metrics small {
  color: var(--muted);
  font-size: 0.74rem;
}

.air-quality-metrics strong {
  color: var(--text);
  font-size: 1rem;
}

.environment-updated {
  margin: 12px 0 0;
}

.environment-events {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.environment-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.environment-event:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.environment-event-category {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.environment-event h4 {
  grid-column: 1;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
}

.environment-event-date {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.environment-event a {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.environment-attribution {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .environment-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .environment-pulse-heading {
    flex-direction: column;
    gap: 6px;
  }

  .environment-data-note {
    white-space: normal;
  }

  .green-action-grid {
    grid-template-columns: 1fr;
  }

  .green-action-heading {
    align-items: flex-start;
  }
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .wrap {
    padding: 16px 16px 0;
  }

  .brand-logo {
    height: var(--logo-height);
  }

  .media-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .chart-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 820px) {
  nav {
    flex-direction: column;
    align-items: stretch;
  }

  .tabs,
  .search-bar {
    width: 100%;
  }

  .tabs {
    justify-content: space-between;
  }

  .search-bar {
    flex-wrap: nowrap;
  }

  .search-input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
  }

  .nav-link {
    align-self: flex-start;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-logo {
    height: var(--logo-height);
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .rss-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rss-item-badge {
    align-self: flex-start;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  canvas {
    height: 240px !important;
  }

  .footer-logo img {
    height: var(--logo-height);
  }
}

@media (max-width: 520px) {
  .tabs {
    flex-wrap: wrap;
  }

  .tab {
    flex: 1 1 100px;
  }

  .btn-primary {
    width: 100%;
  }

  .search-btn {
    width: auto;
    flex: 0 0 auto;
  }

  .city-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .city-btn {
    width: 100%;
  }
}

