﻿:root {
  --bg: #eef6f0;
  --bg-accent: #dceee2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-dark: #12392d;
  --text: #18352d;
  --muted: #5f766d;
  --line: rgba(24, 53, 45, 0.12);
  --shadow: 0 24px 60px rgba(13, 46, 36, 0.12);
  --shadow-soft: 0 16px 30px rgba(13, 46, 36, 0.08);
  --primary: #1d7a5a;
  --primary-dark: #145a42;
  --primary-soft: rgba(29, 122, 90, 0.12);
  --warning: #ea3323;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(77, 169, 123, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(28, 122, 90, 0.18), transparent 24%),
    linear-gradient(180deg, #f7fbf8 0%, var(--bg) 45%, #e6f1eb 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Roboto Condensed", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(40px);
}

body::before {
  width: 280px;
  height: 280px;
  top: 90px;
  right: -40px;
  background: rgba(69, 148, 113, 0.18);
}

body::after {
  width: 320px;
  height: 320px;
  bottom: 80px;
  left: -80px;
  background: rgba(242, 169, 59, 0.12);
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.mobile-topbar {
  display: none;
}

.mobile-map-intro {
  display: none;
}

.hero-panel,
.dashboard-frame,
.modal-content {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 240, 0.78)),
    linear-gradient(120deg, rgba(31, 119, 90, 0.08), transparent 55%);
  box-shadow: var(--shadow);
}


.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-brand img {
  width: clamp(78px, 8vw, 112px);
  height: auto;
  display: block;
}

.eyebrow,
.panel-kicker,
.meta-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(18, 57, 45, 0.07);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.panel-heading h2,
.sidebar-header h2,
.modal-header h3,
.legend-box h3 {
  margin: 0;
  font-family: "Roboto Condensed", sans-serif;
}

.hero-copy h1 {
  max-width: 13ch;
  font-size: clamp(2.2rem, 3.5vw, 4.2rem);
  line-height: 0.97;
}

.hero-copy p,
.panel-heading p,
.sidebar-header p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.65;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.meta-card,
.brand-badge {
  min-height: 126px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(238, 246, 240, 0.88));
  box-shadow: var(--shadow-soft);
}

.meta-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meta-card strong {
  font-size: 1.1rem;
  line-height: 1.35;
}


.main-container {
  margin-top: 24px;
}

.info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(233, 245, 237, 0.82)),
    linear-gradient(135deg, rgba(29, 122, 90, 0.05), transparent 65%);
  box-shadow: var(--shadow-soft);
}

.info-strip-copy {
  display: grid;
  gap: 8px;
}

.info-strip-copy h2 {
  margin: 0;
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1.1;
}

.info-strip-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.info-chip {
  border: 1px solid rgba(24, 53, 45, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 246, 240, 0.9));
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(13, 46, 36, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.info-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 122, 90, 0.22);
  box-shadow: 0 10px 18px rgba(13, 46, 36, 0.1);
}

.info-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10020;
  padding: 20px;
  background: rgba(10, 26, 20, 0.34);
}

.info-modal.open {
  display: grid;
  place-items: center;
}

.info-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 241, 0.94)),
    linear-gradient(135deg, rgba(29, 122, 90, 0.07), transparent 60%);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
}

.info-modal-card h3 {
  margin: 14px 0 16px;
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  line-height: 1.02;
}

.info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.info-modal-body {
  display: grid;
  gap: 14px;
  color: var(--text);
  line-height: 1.7;
}

.info-modal-body p {
  margin: 0;
}

.info-modal-body strong {
  color: var(--primary-dark);
}

.ai-chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1c8b67, #2ea37b);
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(19, 60, 48, 0.24);
  animation: aiPulse 4.8s ease-in-out infinite;
}

.ai-chat-toggle-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.88rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

@keyframes aiPulse {
  0%,
  82%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 14px 28px rgba(19, 60, 48, 0.24);
  }

  88% {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 34px rgba(19, 60, 48, 0.3);
  }

  94% {
    transform: translateY(0) scale(1);
    box-shadow: 0 14px 28px rgba(19, 60, 48, 0.24);
  }
}

.ai-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 10021;
  width: min(380px, calc(100vw - 24px));
  display: none;
}

.ai-chat-panel.open {
  display: block;
}

.ai-chat-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 242, 0.97));
  border: 1px solid rgba(24, 53, 45, 0.08);
  box-shadow: 0 24px 48px rgba(13, 46, 36, 0.18);
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px;
}

.ai-chat-header h3 {
  margin: 8px 0 0;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.3rem;
  line-height: 1.06;
}

.ai-chat-close {
  position: static;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(24, 53, 45, 0.08);
  border: 1px solid rgba(24, 53, 45, 0.08);
  box-shadow: 0 6px 14px rgba(13, 46, 36, 0.08);
}

.ai-chat-body {
  padding: 0 18px 18px;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 53, 45, 0.08);
}

.ai-chat-input {
  min-width: 0;
  border: 1px solid rgba(24, 53, 45, 0.1);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ai-chat-input:focus {
  outline: none;
  border-color: rgba(29, 122, 90, 0.34);
  box-shadow: 0 0 0 4px rgba(29, 122, 90, 0.12);
}

.ai-chat-send {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), #2e9b75);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(29, 122, 90, 0.18);
}

.ai-chat-messages {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.ai-message {
  max-width: 92%;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.ai-message-user {
  justify-self: end;
  background: linear-gradient(135deg, var(--primary), #2e9b75);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.ai-message-assistant {
  justify-self: start;
  background: rgba(24, 53, 45, 0.07);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.dashboard-frame {
  padding: 22px;
  border-radius: calc(var(--radius-xl) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 247, 242, 0.7));
  box-shadow: var(--shadow);
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.map-panel,
.sensor-sidebar {
  min-width: 0;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(24, 53, 45, 0.08);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.map-panel {
  padding: 20px;
}

.panel-heading,
.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading h2,
.sidebar-header h2 {
  margin-top: 12px;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  line-height: 1.05;
}

.map-stage {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 4px);
  border: 1px solid rgba(24, 53, 45, 0.12);
  background: linear-gradient(180deg, rgba(205, 232, 216, 0.35), rgba(255, 255, 255, 0.5));
}

.mobile-map-controls,
.mobile-sidebar-tabs,
.mobile-param-modal,
.mobile-panel-modal {
  display: none;
}

#map {
  width: 100%;
  height: 74vh;
  min-height: 620px;
}

.sensor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  max-height: calc(74vh + 98px);
  overflow: auto;
}

#lastUpdated {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(24, 53, 45, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.pollutant-toggle,
.modal-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pollutant-toggle {
  padding: 6px;
  border-radius: 22px;
  border: 1px solid rgba(24, 53, 45, 0.08);
  background: linear-gradient(180deg, rgba(221, 238, 228, 0.9), rgba(236, 246, 240, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.toggle-btn,
.modal-toggle-btn,
.graph-btn,
.reset-map-btn,
.close {
  font: inherit;
}

.toggle-btn,
.modal-toggle-btn {
  padding: 10px 14px;
  border: 1px solid rgba(24, 53, 45, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pollutant-toggle .toggle-btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 245, 0.9));
  box-shadow: 0 6px 12px rgba(13, 46, 36, 0.06);
  font-weight: 800;
}

.toggle-btn:hover,
.modal-toggle-btn:hover,
.graph-btn:hover,
.reset-map-btn:hover,
.close:hover {
  transform: translateY(-1px);
}

.toggle-btn.active,
.modal-toggle-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #2e9b75);
  color: #fff;
  box-shadow: 0 10px 18px rgba(29, 122, 90, 0.24);
}

.sensor-grid {
  display: grid;
  gap: 14px;
}

.sensor {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 53, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 244, 0.86)),
    linear-gradient(140deg, rgba(29, 122, 90, 0.05), transparent 65%);
  box-shadow: 0 14px 26px rgba(13, 46, 36, 0.06);
}

.sensor-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.label {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
}

.sensor-tag {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(29, 122, 90, 0.1);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sensor-tag-clarity {
  background: rgba(242, 169, 59, 0.18);
  color: #9b5d08;
}

.value {
  margin: 16px 0 12px;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
}

.value.inactive {
  color: var(--warning) !important;
}

.graph-btn {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: #133c30;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 22px rgba(19, 60, 48, 0.22);
}

.graph-btn:hover {

.desktop-averages {
  margin: 0 0 8px;
}

.desktop-averages[hidden] {
  display: none !important;
}

.desktop-averages .mobile-averages-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.desktop-averages .mobile-average-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.desktop-averages .mobile-average-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 52px;
  padding: 9px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 240, 0.92));
  border: 1px solid rgba(24, 53, 45, 0.08);
  box-shadow: 0 6px 12px rgba(13, 46, 36, 0.05);
}

.desktop-averages .mobile-average-chip.is-empty {
  opacity: 0.72;
}

.desktop-averages .mobile-average-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.desktop-averages .mobile-average-value {
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.sensor-grid > .sensor > .graph-btn {
  display: none;
}

  background: #0f3127;
}

.legend {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 53, 45, 0.08);
  background: linear-gradient(180deg, rgba(18, 57, 45, 0.06), rgba(255, 255, 255, 0.88));
}

.mobile-sidebar-panel {
  display: block;
}

.legend-box {
  display: block;
}

.legend-box h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.legend-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.legend-box li {
  position: relative;
  min-height: 28px;
  padding-left: 38px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.legend-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(24, 53, 45, 0.08);
}

.box-good::before {
  background-color: #377e22;
}

.box-moderate::before {
  background-color: #ffff54;
}

.box-sensitive::before {
  background-color: #f2a93b;
}

.box-unhealthy::before {
  background-color: #ea3323;
}

.box-very-unhealthy::before {
  background-color: #75147c;
}

.box-hazardous::before {
  background-color: #75140c;
}

.pm-label div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.pm-text-above div {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(19, 60, 48, 0.72);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.leaflet-popup-content {
  font-size: 0.9rem;
}

.low-zoom-labels-hidden .pm-text-above {
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

.reset-map-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), #2e9b75);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 24px rgba(29, 122, 90, 0.24);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reset-map-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.sensor .value,
.pm-label {
  transition: opacity 0.3s ease;
  opacity: 1;
}

.sensor .value.fade-out,
.pm-label.fade-out {
  opacity: 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
  padding: 28px 16px;
  background: rgba(8, 22, 17, 0.58);
}

.modal-content {
  position: relative;
  width: min(960px, 100%);
  margin: 32px auto;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 241, 0.9)),
    linear-gradient(135deg, rgba(29, 122, 90, 0.08), transparent 55%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.modal-header {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.modal-header h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(24, 53, 45, 0.08);
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}

#graphAverage {
  margin: 20px 0 16px;
  color: var(--text);
}

.image-scroll-wrapper {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(24, 53, 45, 0.08);
  background: linear-gradient(180deg, rgba(220, 238, 226, 0.45), rgba(255, 255, 255, 0.92));
  padding: 16px;
}

#graphImage {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  margin: 0 auto;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(13, 46, 36, 0.14);
}

#copyright {
  margin-top: 20px;
  padding: 0 6px;
  color: var(--muted);
  text-align: center;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 16ch;
  }

  .info-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .info-strip-actions {
    justify-content: flex-start;
  }

  #map {
    min-height: 520px;
    height: 62vh;
  }

  .sensor-sidebar {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 8px;
    z-index: 10030;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 241, 0.9)),
      linear-gradient(135deg, rgba(29, 122, 90, 0.06), transparent 65%);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-topbar-brand img {
    width: 44px;
    height: auto;
    flex-shrink: 0;
  }

  .mobile-topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(18, 57, 45, 0.07);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-topbar-langs {
    position: relative;
  }

  .mobile-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(24, 53, 45, 0.08);
    border-radius: 999px;
    min-height: 38px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(13, 46, 36, 0.08);
  }

  .mobile-lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(24, 53, 45, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 28px rgba(13, 46, 36, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .mobile-lang-menu.open {
    display: grid;
    gap: 4px;
  }

  .mobile-lang-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    min-height: 38px;
    padding: 8px 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
  }

  .mobile-lang-btn:disabled {
    opacity: 0.58;
    cursor: default;
  }

  .mobile-lang-btn.active,
  .mobile-lang-btn:hover {
    background: rgba(29, 122, 90, 0.08);
  }

  .flag-icon {
    display: block;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(24, 53, 45, 0.12);
    object-fit: cover;
  }

  .flag-romani {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0b6cc4 0 50%, #2f8f2f 50% 100%);
  }

  .flag-romani::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid #c61f1f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .hero-panel {
    display: none;
  }

  .mobile-map-intro {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 241, 0.9)),
      linear-gradient(135deg, rgba(29, 122, 90, 0.06), transparent 65%);
    box-shadow: var(--shadow-soft);
  }

  .mobile-map-intro h2 {
    margin: 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 1.02rem;
    line-height: 1.08;
  }

  .hero-panel,
  .info-strip,
  .dashboard-frame,
  .map-panel,
  .sensor-sidebar,
  .modal-content {
    padding: 14px;
    border-radius: 20px;
  }

  .panel-heading,
  .sidebar-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hero-meta {
    display: none;
  }

  .hero-panel {
    gap: 6px;
    padding: 12px;
  }

  .info-strip {
    margin-bottom: 12px;
    padding: 14px;
    background:
      linear-gradient(135deg, rgba(255, 251, 244, 0.92), rgba(240, 248, 242, 0.9)),
      linear-gradient(135deg, rgba(242, 169, 59, 0.06), transparent 68%);
  }

  .info-strip-copy h2 {
    font-size: 0.96rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  .info-strip-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .info-chip {
    width: 100%;
    text-align: center;
    min-height: 44px;
    padding: 8px 8px;
    font-size: 0.76rem;
    line-height: 1.15;
    white-space: normal;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 245, 0.92));
  }

  .eyebrow,
  .panel-kicker,
  .meta-label {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  #map {
    height: 62vh;
    min-height: 410px;
  }

  .hero-copy p {
    display: none;
  }

  .hero-copy {
    gap: 8px;
  }

  .hero-brand img {
    width: 46px;
  }

  .hero-topline {
    gap: 8px;
    align-items: center;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 1.04rem;
    line-height: 1.04;
  }

  .map-panel {
    padding: 8px;
  }

  .panel-heading {
    margin-bottom: 8px;
  }

  .panel-heading p {
    display: none;
  }

  .panel-heading h2 {
    margin-top: 6px;
    font-size: 1.18rem;
    line-height: 1.02;
  }

  .mobile-map-controls {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin-bottom: 10px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(221, 238, 228, 0.9), rgba(236, 246, 240, 0.92));
    border: 1px solid rgba(24, 53, 45, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .mobile-action-btn {
    flex: 1;
    border: 1px solid rgba(24, 53, 45, 0.08);
    border-radius: 999px;
    padding: 10px 11px;
    background: linear-gradient(135deg, var(--primary), #2e9b75);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow:
      0 8px 16px rgba(29, 122, 90, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .mobile-action-btn-secondary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 246, 240, 0.88));
    color: var(--text);
    box-shadow:
      0 6px 12px rgba(13, 46, 36, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(24, 53, 45, 0.08);
  }

  .sensor-sidebar {
    display: none;
  }

  .pollutant-toggle {
    display: none;
  }

  .sensor-grid {
    gap: 12px;
  }

  .sensor {
    padding: 14px;
  }

  .graph-btn {
    padding: 11px 12px;
  }

  .mobile-param-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(7, 18, 14, 0.56);
    padding: 8px 8px 0;
    align-items: flex-end;
  }

  .mobile-param-modal.open {
    display: flex;
  }

  .mobile-panel-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 26, 20, 0.2);
    padding: 8px 8px 0;
    align-items: flex-end;
  }

  .mobile-panel-modal.open {
    display: flex;
  }

  .mobile-param-sheet {
    width: 100%;
    max-height: 86vh;
    min-height: 76vh;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 246, 240, 0.96));
    padding: 18px;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.16);
  }

  .mobile-panel-sheet {
    width: 100%;
    max-height: 80vh;
    min-height: 70vh;
    overflow: auto;
    border-radius: 24px 24px 0 0;
    background: #f8fcf9;
    padding: 18px;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.14);
  }

  .mobile-panel-sheet::before {
    content: "";
    display: block;
    width: 54px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(24, 53, 45, 0.16);
  }

  .mobile-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .mobile-panel-header h3 {
    margin: 10px 0 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .mobile-panel-close {
    position: static;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(24, 53, 45, 0.08);
    border: 1px solid rgba(24, 53, 45, 0.08);
  }

  .mobile-panel-meta {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(24, 53, 45, 0.05);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
  }

  .mobile-sensor-param-toggle {
    display: inline-flex;
    gap: 6px;
    margin: 0 0 14px;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(24, 53, 45, 0.08);
    background: linear-gradient(180deg, rgba(221, 238, 228, 0.88), rgba(238, 246, 240, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  }

  .mobile-sensor-param-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(24, 53, 45, 0.08);
    border-radius: 12px;
    min-width: 72px;
    min-height: 36px;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 245, 0.9));
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 6px 12px rgba(13, 46, 36, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  }

  .mobile-sensor-param-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #2e9b75);
    color: #fff;
    box-shadow: 0 10px 18px rgba(29, 122, 90, 0.2);
  }


  .mobile-sensor-grid {
    display: grid;
    gap: 8px;
  }

  .mobile-sensor-grid .sensor {
    position: relative;
    padding: 9px 10px 9px 12px;
    border-radius: 16px;
    border: 1px solid rgba(24, 53, 45, 0.1);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 244, 0.96)),
      linear-gradient(135deg, rgba(29, 122, 90, 0.04), transparent 60%);
    box-shadow: 0 10px 18px rgba(13, 46, 36, 0.05);
  }

  .mobile-sensor-grid .sensor::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2e9b75, #133c30);
  }

  .mobile-sensor-grid .sensor-top {
    gap: 8px;
  }

  .mobile-sensor-grid .label {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  .mobile-sensor-grid .sensor-tag {
    padding: 3px 7px;
    font-size: 0.6rem;
  }

  .mobile-sensor-grid .value {
    margin: 8px 0 7px;
    font-size: 0.94rem;
    line-height: 1.05;
  }

  .mobile-averages {
    margin: 0 0 2px;
  }

  .mobile-averages[hidden] {
    display: none !important;
  }

  .mobile-averages-title {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-average-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .mobile-average-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 44px;
    padding: 7px 9px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 240, 0.92));
    border: 1px solid rgba(24, 53, 45, 0.08);
    box-shadow: 0 6px 12px rgba(13, 46, 36, 0.05);
  }

  .mobile-average-chip.is-empty {
    opacity: 0.72;
  }

  .mobile-average-label {
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-average-value {
    margin-top: 3px;
    color: var(--primary-dark);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }

  .mobile-sensor-grid .graph-btn-mobile {
    display: none;
  }

  .mobile-legend-content {
    padding: 14px;
  }

  .mobile-param-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mobile-param-header h3 {
    margin: 10px 0 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .mobile-param-close {
    position: static;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(24, 53, 45, 0.08);
    border: 1px solid rgba(24, 53, 45, 0.08);
  }

  .mobile-param-options {
    display: grid;
    gap: 10px;
  }

  .mobile-param-option {
    width: 100%;
    border: 1px solid rgba(24, 53, 45, 0.08);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    text-align: left;
  }

  .mobile-param-option.active {
    background: linear-gradient(135deg, var(--primary), #2e9b75);
    color: #fff;
    border-color: transparent;
  }

  body.mobile-sheet-active {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
    overscroll-behavior: none;
  }

  .modal {
    padding: 16px 10px;
  }

  .modal-content {
    margin: 18px auto;
    padding-top: 54px;
  }

  .info-modal {
    padding: 12px;
  }

  .info-modal-card {
    width: 100%;
    max-height: 86vh;
    padding: 20px;
    border-radius: 24px;
  }

  .reset-map-btn {
    right: 12px;
    bottom: 12px;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .ai-chat-toggle {
    right: 12px;
    bottom: 12px;
    padding: 12px 15px;
  }

  .ai-chat-panel {
    inset: 0;
    width: auto;
    align-items: flex-end;
    padding:
      calc(env(safe-area-inset-top, 0px) + 92px)
      8px
      calc(env(safe-area-inset-bottom, 0px) + 8px);
    background: rgba(10, 26, 20, 0.18);
  }

  .ai-chat-panel.open {
    display: flex;
  }

  .ai-chat-card {
    border-radius: 24px 24px 0 0;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 108px);
    min-height: min(64vh, 560px);
    overflow: auto;
  }

  .ai-chat-card::before {
    content: "";
    display: block;
    width: 54px;
    height: 5px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: rgba(24, 53, 45, 0.16);
  }

  .ai-chat-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(248, 252, 249, 0.98), rgba(248, 252, 249, 0.92));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .ai-chat-messages {
    min-height: 180px;
    max-height: 240px;
  }
}

@media (max-width: 520px) {
  .mobile-map-intro h2 {
    font-size: 0.94rem;
    line-height: 1.06;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 0.96rem;
    line-height: 1.06;
  }

  .modal-toggle-btn {
    width: calc(50% - 5px);
    justify-content: center;
  }

  .sensor-top {
    flex-direction: column;
  }

  .value {
    font-size: 1.55rem;
  }

  .legend-box li {
    font-size: 0.9rem;
  }

  #map {
    height: 58vh;
    min-height: 390px;
  }

  .sensor-sidebar {
    display: none;
  }

  .mobile-panel-sheet {
    max-height: 76vh;
    min-height: 66vh;
  }

  .hero-brand img {
    width: 42px;
  }

  .info-strip-copy h2 {
    font-size: 0.88rem;
  }

  .panel-heading h2 {
    font-size: 1.06rem;
  }

  .ai-chat-toggle {
    gap: 8px;
    padding: 11px 13px;
    font-size: 0.82rem;
  }

  .ai-chat-toggle-badge {
    width: 24px;
    height: 24px;
    font-size: 0.74rem;
  }

  .ai-chat-header h3 {
    font-size: 1.16rem;
  }

  .ai-chat-close {
    width: 48px;
    height: 48px;
    background: rgba(24, 53, 45, 0.1);
  }

  .ai-chat-panel {
    padding:
      calc(env(safe-area-inset-top, 0px) + 86px)
      6px
      calc(env(safe-area-inset-bottom, 0px) + 6px);
  }

  .ai-chat-card {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 96px);
    min-height: 60vh;
  }

  .ai-chat-form {
    grid-template-columns: 1fr;
  }

  .ai-chat-send {
    width: 100%;
  }
}





@media (min-width: 1200px) {
  .page-shell {
    width: min(1660px, calc(100% - 54px));
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1.62fr) minmax(280px, 0.62fr);
    gap: 18px;
    padding: 22px;
  }

  .hero-brand img {
    width: clamp(56px, 4vw, 78px);
  }

  .hero-topline {
    gap: 10px;
  }

  .hero-copy {
    gap: 10px;
  }

  .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(1.55rem, 2.1vw, 2.8rem);
    line-height: 0.98;
  }

  .hero-copy p {
    max-width: 42ch;
    font-size: 0.86rem;
  }

  .hero-meta {
    gap: 12px;
  }

  .meta-card,
  .brand-badge {
    min-height: 92px;
    padding: 14px;
  }

  .meta-card strong {
    font-size: 0.88rem;
    line-height: 1.2;
  }

}
@media (min-width: 1200px) {
  .main-container {
    margin-top: 18px;
  }

  .info-strip {
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
  }

  .info-strip-copy h2 {
    font-size: clamp(1rem, 1.35vw, 1.28rem);
  }

  .info-chip {
    padding: 10px 18px;
    font-size: 0.96rem;
  }

  .dashboard-frame {
    padding: 16px;
  }

  .dashboard-main {
    grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.74fr);
    gap: 16px;
  }

  .map-panel,
  .sensor-sidebar {
    border-radius: 20px;
  }

  .map-panel {
    padding: 14px;
  }

  .sensor-sidebar {
    gap: 14px;
    padding: 14px;
    max-height: calc(62vh + 64px);
  }

  .panel-heading,
  .sidebar-header {
    gap: 12px;
    margin-bottom: 14px;
  }

  .panel-heading h2,
  .sidebar-header h2 {
    font-size: clamp(1.16rem, 1.5vw, 1.6rem);
    line-height: 1;
  }

  .panel-heading p,
  .sidebar-header p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  #lastUpdated {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .pollutant-toggle {
    gap: 8px;
    padding: 5px;
    border-radius: 18px;
  }

  .pollutant-toggle .toggle-btn {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 13px;
  }

  #map {
    height: 60vh;
    min-height: 470px;
  }

  .sensor-grid {
    gap: 10px;
  }

  .sensor {
    padding: 12px;
    border-radius: 18px;
  }

  .label {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .sensor-tag {
    padding: 5px 8px;
    font-size: 0.64rem;
  }

  .value {
    margin: 10px 0 8px;
    font-size: clamp(1.06rem, 1.45vw, 1.36rem);
  }

  .desktop-averages {
    margin: 0 0 4px;
  }

  .desktop-averages .mobile-averages-title {
    margin-bottom: 7px;
    font-size: 0.64rem;
  }

  .desktop-averages .mobile-average-list {
    gap: 6px;
  }

  .desktop-averages .mobile-average-chip {
    min-height: 46px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .desktop-averages .mobile-average-label {
    font-size: 0.56rem;
  }

  .desktop-averages .mobile-average-value {
    font-size: 0.72rem;
  }
}
@media (min-width: 1200px) {
  .page-shell {
    width: min(1760px, calc(100% - 72px));
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 24px;
    padding: 32px;
    border-radius: 22px;
    min-height: clamp(220px, 26vh, 340px);
    align-items: stretch;
  }

  .hero-brand img {
    width: clamp(52px, 3.5vw, 72px);
  }

  .eyebrow,
  .panel-kicker,
  .meta-label {
    padding: 6px 11px;
    font-size: 0.72rem;
  }

  .hero-copy {
    gap: 14px;
    justify-content: center;
  }

  .hero-copy h1 {
    max-width: 13ch;
    font-size: clamp(1.6rem, 2.2vw, 3rem);
    line-height: 0.96;
  }

  .hero-copy p {
    max-width: 42ch;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hero-meta {
    gap: 12px;
    align-self: stretch;
    grid-template-rows: 1fr 1fr;
    align-content: stretch;
  }

  .meta-card {
    min-height: 0;
    padding: 16px 18px;
    border-radius: 18px;
    flex: 1;
  }

  .meta-card strong {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .main-container {
    margin-top: 12px;
  }

  .info-strip {
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .info-strip-copy {
    gap: 4px;
  }

  .info-strip-copy h2 {
    font-size: clamp(0.86rem, 1vw, 1.02rem);
    line-height: 1.02;
  }

  .info-chip {
    padding: 10px 18px;
    font-size: 0.96rem;
  }

  .dashboard-frame {
    padding: 12px;
    border-radius: 22px;
  }

  .dashboard-main {
    grid-template-columns: minmax(0, 1.62fr) minmax(260px, 0.6fr);
    gap: 12px;
  }

  .map-panel,
  .sensor-sidebar {
    border-radius: 18px;
  }

  .map-panel,
  .sensor-sidebar {
    padding: 12px;
  }

  .panel-heading,
  .sidebar-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .panel-heading h2,
  .sidebar-header h2 {
    font-size: clamp(0.98rem, 1.1vw, 1.28rem);
    line-height: 0.98;
  }

  .panel-heading p,
  .sidebar-header p {
    font-size: 0.74rem;
    line-height: 1.32;
  }

  #lastUpdated {
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
  }

  .pollutant-toggle {
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
  }

  .pollutant-toggle .toggle-btn {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.72rem;
    border-radius: 11px;
  }

  #map {
    height: 48vh;
    min-height: 340px;
  }

  .reset-map-btn {
    right: 12px;
    bottom: 12px;
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .sensor-sidebar {
    gap: 10px;
    max-height: calc(48vh + 48px);
  }

  .sensor-grid {
    gap: 8px;
  }

  .sensor {
    padding: 10px;
    border-radius: 14px;
  }

  .label {
    font-size: 0.74rem;
    line-height: 1.16;
  }

  .sensor-tag {
    padding: 4px 6px;
    font-size: 0.56rem;
  }

  .value {
    margin: 8px 0 6px;
    font-size: clamp(0.92rem, 1.05vw, 1.12rem);
    line-height: 1;
  }

  .desktop-averages .mobile-averages-title {
    margin-bottom: 5px;
    font-size: 0.56rem;
  }

  .desktop-averages .mobile-average-list {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
    gap: 6px;
  }

  .desktop-averages .mobile-average-chip {
    min-height: 52px;
    padding: 7px 8px;
    border-radius: 11px;
    justify-content: flex-start;
  }

  .desktop-averages .mobile-average-label {
    font-size: 0.54rem;
    line-height: 1.05;
  }

  .desktop-averages .mobile-average-value {
    margin-top: 5px;
    font-size: 0.72rem;
    line-height: 1.1;
    word-break: break-word;
  }

  .ai-chat-toggle {
    transform: scale(0.9);
    transform-origin: bottom right;
  }
}
@media (min-width: 1200px) {
  .hero-panel {
    align-items: start;
  }

  .hero-copy {
    justify-content: flex-start;
    padding-top: 4px;
  }

  .hero-topline {
    align-items: center;
    gap: 14px;
    margin-bottom: 2px;
  }

  .hero-brand {
    width: 56px;
    justify-content: center;
  }

  .hero-brand img {
    display: block;
    margin: 0 auto;
  }

  .eyebrow {
    align-self: center;
  }

  .hero-copy h1 {
    margin-top: 2px;
  }

  .hero-copy p {
    max-width: 34ch;
  }

  .hero-meta {
    align-self: start;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .meta-card {
    align-items: flex-start;
  }

  .meta-card .meta-label {
    margin-bottom: auto;
  }

}
@media (min-width: 1200px) {
  .hero-panel {
    grid-template-columns: minmax(0, 2.05fr) minmax(250px, 0.55fr);
  }

  .hero-copy {
    max-width: none;
  }

  .hero-copy h1 {
    max-width: 16ch;
    width: 100%;
  }

  .hero-copy p {
    max-width: 46ch;
  }
}
@media (min-width: 1200px) {
  .hero-panel {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    column-gap: 28px;
  }

  .hero-copy {
    display: grid;
    align-content: start;
    justify-items: start;
  }

  .hero-copy h1 {
    max-width: 13.5ch;
  }

  .hero-copy p {
    max-width: 36ch;
  }

  .hero-meta {
    width: 100%;
    max-width: 430px;
    justify-self: end;
  }
}