@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #06141e;
  --bg-deep: #041019;
  --panel: rgba(9, 27, 39, .92);
  --panel-2: #0c2130;
  --line: #263d4c;
  --line-soft: rgba(90, 122, 141, .22);
  --text: #eef4f7;
  --muted: #8da0ad;
  --accent: #ef3f37;
  --accent-dark: #b82522;
  --good: #82c95c;
  --blue: #56bce8;
  --shadow: 0 18px 50px rgba(0,0,0,.2);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eaf0f3;
  --bg-deep: #dce6eb;
  --panel: rgba(255,255,255,.94);
  --panel-2: #f4f8fa;
  --line: #cbd9df;
  --line-soft: rgba(72, 102, 119, .17);
  --text: #10232f;
  --muted: #667a86;
  --shadow: 0 18px 45px rgba(31,57,70,.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }
#site-shell { min-height: 100vh; position: relative; z-index: 1; }

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.header-inner {
  height: 82px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.brand-crest {
  width: 40px; height: 50px; object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.35));
  transition: transform .2s ease;
}
.brand-crest:hover { transform: scale(1.05); }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.brand-name { font-size: 22px; font-weight: 750; letter-spacing: .4px; line-height: 1.1; }
.brand-name b { color: var(--accent); }
.live-since { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; display: flex; align-items: center; margin-top: 2px; }
.live-since i, .live-pill i {
  display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 50%; background: #61d789; box-shadow: 0 0 10px #61d789;
}
.powered-by {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.2px;
  margin-top: 1px;
  white-space: nowrap;
}
.desktop-nav { margin-left: auto; height: 100%; display: flex; align-items: stretch; gap: 10px; }
.desktop-nav a {
  position: relative; display: flex; align-items: center; padding: 0 17px;
  color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s;
}
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.desktop-nav a.active::after {
  content: ""; position: absolute; bottom: 0; left: 17px; right: 17px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--accent);
}
.theme-toggle {
  position: relative; flex: 0 0 auto; width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center; overflow: hidden;
  color: #ffd166; border: 1px solid color-mix(in srgb, #ffd166 28%, var(--line));
  border-radius: 12px; background: color-mix(in srgb, #ffd166 9%, var(--panel-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 5px 16px rgba(0,0,0,.16);
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.theme-toggle::before {
  content: ""; position: absolute; inset: 6px; border-radius: 8px;
  background: currentColor; opacity: .08; transform: scale(.75); transition: transform .2s ease, opacity .2s ease;
}
.theme-toggle:hover {
  border-color: color-mix(in srgb, currentColor 52%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 7px 20px rgba(0,0,0,.22); transform: translateY(-1px);
}
.theme-toggle:hover::before { opacity: .13; transform: scale(1); }
.theme-toggle:active { transform: translateY(0) scale(.96); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 3px; }
.theme-icon { position: relative; z-index: 1; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease, opacity .2s ease; }
.theme-icon-moon { display: none; fill: currentColor; stroke-width: 1.4; }
html[data-theme="light"] .theme-toggle { color: #347da4; border-color: color-mix(in srgb, #347da4 30%, var(--line)); background: color-mix(in srgb, #56bce8 9%, var(--panel-2)); }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.theme-toggle:hover .theme-icon-sun { transform: rotate(18deg); }
.theme-toggle:hover .theme-icon-moon { transform: rotate(-8deg); }
.menu-toggle, .mobile-menu, .menu-backdrop { display: none; }

.page { max-width: 1440px; margin: 0 auto; padding: 26px 28px 48px; }
.dashboard-grid { display: grid; gap: 14px; }
.top-grid { grid-template-columns: minmax(420px, 1fr) minmax(430px, 1.02fr); }
.detail-grid { grid-template-columns: 1fr 1.48fr .86fr; margin-top: 14px; }
.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--panel), color-mix(in srgb, var(--panel) 90%, #12374a));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-heading {
  min-height: 43px; padding: 15px 18px 10px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
}
.card-heading h1, .card-heading h2 { margin: 0; line-height: 1.1; }
.card-heading h1 { font-size: 21px; }
.card-heading h2 { font-size: 16px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.updated { color: var(--muted); font-size: 14px; font-weight: 600; text-align: right; }
.chip, .live-pill {
  padding: 8px 13px; border-radius: 20px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700;
}
.chip.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }

/* Dynamic Full Page Weather Background */
.page-weather-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-deep);
  transition: background 1.5s ease;
}
.page-weather-sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 1.5s ease;
}
.page-weather-clouds {
  position: absolute;
  inset: -10%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
}
.page-weather-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

/* 1. SONNIG / WOLKENLOS (TAG) */
body[data-page-weather="sunny"] .page-weather-bg {
  background: linear-gradient(165deg, #0e3758 0%, #0a263e 40%, #051421 100%);
}
body[data-page-weather="sunny"] .page-weather-sky {
  opacity: 1;
  background: radial-gradient(circle at 85% -5%, rgba(255, 215, 120, 0.26) 0%, rgba(86, 188, 232, 0.15) 35%, transparent 70%);
}
html[data-theme="light"] body[data-page-weather="sunny"] .page-weather-bg {
  background: linear-gradient(165deg, #5fb4e5 0%, #87ceeb 45%, #cae8f5 100%);
}

/* 2. LEICHT BEWÖLKT / HEITER (TAG) */
body[data-page-weather="partly-cloudy"] .page-weather-bg {
  background: linear-gradient(165deg, #13344d 0%, #0e273a 45%, #071623 100%);
}
body[data-page-weather="partly-cloudy"] .page-weather-sky {
  opacity: 1;
  background: radial-gradient(circle at 80% 0%, rgba(255, 225, 160, 0.16) 0%, transparent 50%);
}
body[data-page-weather="partly-cloudy"] .page-weather-clouds {
  opacity: 0.35;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
                    radial-gradient(ellipse at 70% 35%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
  animation: cloudDrift 45s linear infinite alternate;
}
html[data-theme="light"] body[data-page-weather="partly-cloudy"] .page-weather-bg {
  background: linear-gradient(165deg, #71b2d9 0%, #9bcbe4 50%, #d8ebf5 100%);
}

/* 3. STARK BEWÖLKT / BEDECKT */
body[data-page-weather="cloudy"] .page-weather-bg {
  background: linear-gradient(165deg, #1d2b36 0%, #141f27 50%, #091016 100%);
}
body[data-page-weather="cloudy"] .page-weather-clouds {
  opacity: 0.55;
  background-image: radial-gradient(ellipse at 50% 10%, rgba(180, 200, 215, 0.18) 0%, transparent 70%),
                    radial-gradient(ellipse at 20% 40%, rgba(140, 160, 175, 0.14) 0%, transparent 60%);
  animation: cloudSlowDrift 60s ease-in-out infinite alternate;
}
html[data-theme="light"] body[data-page-weather="cloudy"] .page-weather-bg {
  background: linear-gradient(165deg, #91a4b1 0%, #b2c1cb 50%, #d9e2e7 100%);
}

/* 4. NEBEL / DUNST */
body[data-page-weather="fog"] .page-weather-bg {
  background: linear-gradient(165deg, #243540 0%, #1b2830 50%, #0e161c 100%);
}
body[data-page-weather="fog"] .page-weather-clouds {
  opacity: 0.65;
  background: radial-gradient(ellipse at 50% 50%, rgba(220, 235, 245, 0.12) 0%, transparent 80%);
  animation: fogPulse 12s ease-in-out infinite alternate;
}
html[data-theme="light"] body[data-page-weather="fog"] .page-weather-bg {
  background: linear-gradient(165deg, #a4b7c4 0%, #c4d3dc 50%, #e2eaef 100%);
}

/* 5. REGEN / SCHAUER */
body[data-page-weather="rain"] .page-weather-bg {
  background: linear-gradient(165deg, #102636 0%, #0b1a26 50%, #050e15 100%);
}
body[data-page-weather="rain"] .page-weather-fx {
  opacity: 0.38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg stroke='%23d5effb' stroke-linecap='round'%3E%3Cpath opacity='.55' stroke-width='1.2' d='M18 8l-3 16M72 34l-4 21M137 4l-3 15M165 73l-4 20M43 106l-3 17M111 132l-4 22M151 153l-3 16M84 163l-2 11'/%3E%3Cpath opacity='.3' stroke-width='.8' d='M102 17l-2 11M31 58l-2 12M124 76l-2 13M65 142l-2 10M171 118l-2 12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-position: 0 -180px;
  animation: rainField 1.05s linear infinite;
}
html[data-theme="light"] body[data-page-weather="rain"] .page-weather-bg {
  background: linear-gradient(165deg, #6c8a9e 0%, #8ea7b8 50%, #c5d5e0 100%);
}

/* 6. GEWITTER / UNWETTER */
body[data-page-weather="storm"] .page-weather-bg {
  background: linear-gradient(165deg, #1a162b 0%, #111120 50%, #06060c 100%);
}
body[data-page-weather="storm"] .page-weather-fx {
  opacity: 0.48;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='170' viewBox='0 0 160 170'%3E%3Cg stroke='%23dce7ff' stroke-linecap='round'%3E%3Cpath opacity='.65' stroke-width='1.3' d='M13 5l-4 22M59 27l-5 27M118 2l-4 23M148 64l-5 28M35 91l-4 24M94 116l-5 29M137 143l-4 22M70 151l-3 17'/%3E%3Cpath opacity='.35' stroke-width='.8' d='M89 12l-3 14M23 51l-3 16M110 68l-3 17M54 128l-3 14M153 108l-3 15'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 170px;
  background-position: 0 -170px;
  animation: rainField .78s linear infinite, stormFlash 14s ease-in-out infinite;
}

/* Niederschlag nur innerhalb der Wetterkachel zeigen, nicht hinter dem Inhalt. */
body[data-page-weather="rain"] .page-weather-fx,
body[data-page-weather="storm"] .page-weather-fx {
  opacity: 0;
  background-image: none;
  animation: none;
}

/* 7. SCHNEE / FROST */
body[data-page-weather="snow"] .page-weather-bg {
  background: linear-gradient(165deg, #1c2e3d 0%, #12202b 50%, #081117 100%);
}
body[data-page-weather="snow"] .page-weather-fx {
  opacity: 0.55;
  background-image: radial-gradient(circle, #ffffff 0 1.2px, transparent 1.8px),
                    radial-gradient(circle, #ffffff 0 1.8px, transparent 2.4px);
  background-size: 40px 40px, 65px 65px;
  background-position: 0 0, 20px 15px;
  animation: snowFall 8s linear infinite;
}

/* 8. NACHT KLAR / STERNENKLAR */
body[data-page-weather="night-clear"] .page-weather-bg {
  background: linear-gradient(165deg, #09101d 0%, #050a14 50%, #020409 100%);
}
body[data-page-weather="night-clear"] .page-weather-sky {
  opacity: 0.8;
  background-image: radial-gradient(1px 1px at 15% 15%, rgba(255,255,255,0.9) 100%, transparent),
                    radial-gradient(1px 1px at 35% 45%, rgba(255,255,255,0.7) 100%, transparent),
                    radial-gradient(1.5px 1.5px at 65% 20%, rgba(255,255,255,0.85) 100%, transparent),
                    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.6) 100%, transparent),
                    radial-gradient(1.5px 1.5px at 45% 75%, rgba(255,255,255,0.8) 100%, transparent),
                    radial-gradient(2px 2px at 75% 85%, rgba(210,230,255,0.9) 100%, transparent);
}

/* 9. NACHT BEWÖLKT */
body[data-page-weather="night-cloudy"] .page-weather-bg {
  background: linear-gradient(165deg, #0d1622 0%, #080f18 50%, #03060a 100%);
}
body[data-page-weather="night-cloudy"] .page-weather-clouds {
  opacity: 0.45;
  background-image: radial-gradient(ellipse at 40% 30%, rgba(60, 80, 110, 0.25) 0%, transparent 65%);
  animation: cloudSlowDrift 50s ease-in-out infinite alternate;
}

@keyframes cloudDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(5%, 2%, 0); }
}
@keyframes cloudSlowDrift {
  0% { transform: translate3d(-2%, 0, 0); }
  100% { transform: translate3d(3%, 1%, 0); }
}
@keyframes fogPulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.75; transform: scale(1.05); }
}
@keyframes stormFlash {
  0%, 94%, 96%, 100% { filter: brightness(1); }
  95% { filter: brightness(1.7); }
}

.current-card { position: relative; isolation: isolate; color: #fff; background: #09202e; }
.current-card > :not(.weather-bg) { position: relative; z-index: 2; }
.weather-bg { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.weather-bg::before {
  content: ""; position: absolute; z-index: 2; inset: 0;
  background:
    linear-gradient(90deg, rgba(2,14,23,.78) 0%, rgba(3,18,28,.48) 48%, rgba(3,17,27,.6) 100%),
    linear-gradient(0deg, rgba(2,13,21,.78) 0%, transparent 58%);
}
.weather-bg-layer {
  position: absolute; z-index: 1; inset: -2%; opacity: 0; background-position: center;
  background-size: cover; transform: scale(1.035); transition: opacity 1.15s ease;
  animation: weatherDrift 18s ease-in-out infinite alternate;
}
.weather-bg-layer.active { opacity: 1; }
.weather-bg-effect { position: absolute; z-index: 3; inset: 0; overflow: hidden; opacity: 0; }
.weather-bg-effect::before, .weather-bg-effect::after {
  content: ""; position: absolute; pointer-events: none;
}
.weather-rain .weather-bg-effect, .weather-storm .weather-bg-effect {
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg stroke='%23d9f1fb' stroke-linecap='round'%3E%3Cpath opacity='.62' stroke-width='1.25' d='M18 8l-3 17M72 34l-4 22M137 4l-3 16M165 73l-4 21M43 106l-3 18M111 132l-4 23M151 153l-3 17M84 163l-2 12'/%3E%3Cpath opacity='.3' stroke-width='.8' d='M102 17l-2 12M31 58l-2 13M124 76l-2 14M65 142l-2 11M171 118l-2 13'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-position: 0 -180px;
  animation: rainField 1.08s linear infinite;
}
.weather-rain .weather-bg-effect::before, .weather-storm .weather-bg-effect::before {
  inset: -220px -10% 0;
  opacity: .46;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='270' height='230' viewBox='0 0 270 230'%3E%3Cg fill='none' stroke='%23edf9ff' stroke-linecap='round'%3E%3Cpath opacity='.72' stroke-width='1.8' d='M31 12l-5 30M129 61l-6 36M233 18l-5 31M76 142l-5 30M201 172l-6 37'/%3E%3Cpath opacity='.38' stroke-width='1.1' d='M174 27l-4 24M50 91l-4 25M250 109l-4 26M145 186l-4 25'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 270px 230px;
  animation: rainNear .92s linear infinite;
}
.weather-rain .weather-bg-effect::after, .weather-storm .weather-bg-effect::after {
  display: none;
}
.weather-storm .weather-bg-effect {
  opacity: .7;
  filter: saturate(.82) brightness(1.08);
}
.weather-snow .weather-bg-effect {
  opacity: .55;
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.6px), radial-gradient(circle, #fff 0 1.5px, transparent 2px);
  background-size: 34px 34px, 53px 53px; background-position: 0 0, 17px 11px;
  animation: snowFall 9s linear infinite;
}
.current-card .eyebrow, .current-card .feels-like,
.current-card .location-line, .current-card .metric small, .current-card .metric-icon { color: rgba(235,246,251,.78); }
.current-card .updated {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.current-card { display: flex; flex-direction: column; justify-content: space-between; }
.current-card .metric-grid { margin-top: auto; margin-bottom: 0; border-top-color: rgba(255,255,255,.14); background: rgba(2,16,25,.18); backdrop-filter: blur(3px); align-items: stretch; }
.current-card .metric { border-right-color: rgba(255,255,255,.12); height: 100%; box-sizing: border-box; }
.current-card .aqi-pill { backdrop-filter: blur(8px); }
.current-card > .card-heading { padding-left: 38px; padding-right: 38px; }
@keyframes weatherDrift { to { transform: scale(1.085) translate3d(-1.2%, -.5%, 0); } }
@keyframes rainField {
  to { background-position: -12px 0; }
}
@keyframes rainNear {
  to { transform: translate3d(-12px, 230px, 0); }
}
@keyframes snowFall { to { background-position: 34px 102px, -36px 117px; } }

.current-main { min-height: 185px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 42px 0 38px; }
.hero-weather-icon {
  order: 2; flex: 0 0 auto; width: 220px; height: 172px; object-fit: contain;
  filter: drop-shadow(0 13px 20px rgba(0,0,0,.4));
}
.temperature-block { order: 1; min-width: 220px; }
.hero-temp { font-size: clamp(64px, 6vw, 92px); font-weight: 300; line-height: .95; letter-spacing: -4px; white-space: nowrap; }
.hero-temp sup { font-size: .48em; vertical-align: top; letter-spacing: 0; }
.condition { margin-top: 12px; font-size: 21px; font-weight: 500; }
.feels-like, .location-line { margin-top: 6px; color: var(--muted); font-size: 14px; }
.pin { color: var(--accent); font-size: 10px; }
.pin.large { margin-right: 6px; font-size: 16px; }
.current-status-row {
  min-height: 39px; margin: -3px 38px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px;
}
.current-status-row .location-line {
  margin: 0; display: flex; align-items: center; gap: 7px;
  color: rgba(235,246,251,.84); font-size: 14px; font-weight: 600;
}
.location-gps-icon {
  width: 17px; height: 17px; fill: none; stroke: var(--accent);
  stroke-width: 1.8; stroke-linecap: round;
}
.aqi-pill {
  width: max-content; margin: 0; padding: 7px 14px; border-radius: 18px;
  color: var(--good); border: 1px solid rgba(130,201,92,.25); background: rgba(61,105,43,.18);
  font-size: 13.5px; font-weight: 700;
}
.aqi-pill[data-level="moderate"] { color: #f2c96b; border-color: rgba(242,184,75,.3); background: rgba(110,78,24,.22); }
.aqi-pill[data-level="unhealthy"] { color: #ef8b78; border-color: rgba(239,107,69,.32); background: rgba(111,46,30,.22); }
.aqi-pill[data-level="unknown"] { color: var(--muted); border-color: var(--line); background: rgba(45,66,78,.2); }
.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-soft); }
.metric { min-height: 76px; padding: 12px 9px; display: flex; align-items: center; justify-content: center; gap: 10px; border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: 0; }
.metric-icon { color: var(--muted); font-size: 27px; }
.metric .sun-symbol { color: #f6b829; }
.metric small, .metric strong { display: block; white-space: nowrap; }
.metric small { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.metric strong { font-size: 17px; font-weight: 700; }

/* Radar Provider Full Width Header & Nav */
.radar-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--panel-2) 85%, transparent);
}
.radar-provider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.radar-provider-nav::-webkit-scrollbar {
  display: none;
}
.radar-nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.radar-nav-btn span {
  font-size: 12.5px;
  opacity: 0.85;
}
.radar-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.radar-nav-btn.active {
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(239, 63, 55, 0.35);
}
.radar-nav-sep {
  color: var(--line);
  font-size: 12px;
  font-weight: 300;
  opacity: 0.35;
  user-select: none;
}

.radar-frame { position: relative; overflow: hidden; background: #142633; }
.radar-frame iframe { width: 100%; height: 100%; display: block; border: 0 }
.compact-radar { height: 363px; }
.radar-overlay-link {
  position: absolute; z-index: 2; bottom: 14px; right: 14px;
  box-shadow: 0 5px 18px rgba(0,0,0,.36);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.full-radar { height: min(70vh, 720px); min-height: 480px; }
.radar-full-card .card-heading { align-items: center; }
.radar-alert { margin: 0 0 14px; }
.radar-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.radar-status article { min-height: 76px; padding: 13px 16px; display: flex; align-items: center; gap: 11px; }
.radar-status article > span { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #60c9ee; background: rgba(86,188,232,.1); font-size: 19px; }
.radar-status article > span.wind { color: #55d4d1; background: rgba(85,212,209,.1); }
.radar-status article > span.visibility { color: #a98bff; background: rgba(169,139,255,.1); }
.radar-status small, .radar-status strong { display: block; }
.radar-status small { color: var(--muted); font-size: 10px; }
.radar-status strong { margin-top: 3px; font-size: 15px; }
.radar-control-panel { margin-bottom: 14px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.radar-layer-tabs, .radar-map-actions { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.radar-layer-tabs button, .radar-map-actions button, .radar-map-actions a {
  flex: 0 0 auto; min-height: 34px; padding: 7px 11px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--muted); background: var(--panel-2); cursor: pointer;
  font: inherit; font-size: 10px; font-weight: 700;
}
.radar-layer-tabs button span { padding-right: 5px; color: #60c9ee; font-size: 14px; }
.radar-layer-tabs button.active { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, var(--accent), var(--accent-dark)); box-shadow: 0 4px 14px rgba(239,63,55,.24); }
.radar-layer-tabs button.active span { color: #fff; }
.radar-map-actions button:hover, .radar-map-actions a:hover { color: var(--text); border-color: var(--accent); }
.radar-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; }
.radar-workspace .radar-full-card { min-width: 0; overflow: hidden; }
.radar-workspace .full-radar { height: min(68vh, 680px); }
.radar-sidebar { padding: 15px; }
.radar-sidebar-current { padding-bottom: 14px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.radar-sidebar-current img { width: 58px; height: 58px; object-fit: contain; }
.radar-sidebar-current strong, .radar-sidebar-current small { display: block; }
.radar-sidebar-current strong { margin: 4px 0; font-size: 16px; }
.radar-sidebar-current small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.radar-next-rain { margin: 14px 0; padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(97,215,137,.2); border-radius: 10px; background: rgba(97,215,137,.06); }
.radar-next-rain.has-rain { border-color: rgba(86,188,232,.28); background: rgba(86,188,232,.08); }
.radar-next-rain > span { color: #61d789; font-size: 22px; }
.radar-next-rain.has-rain > span { color: #60c9ee; }
.radar-next-rain small, .radar-next-rain strong { display: block; }
.radar-next-rain small { color: var(--muted); font-size: 9px; }
.radar-next-rain strong { margin: 3px 0; font-size: 12px; }
.radar-facts { margin: 0; }
.radar-facts div { padding: 9px 2px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.radar-facts dt { color: var(--muted); }
.radar-facts dd { margin: 0; color: var(--text); font-weight: 700; text-align: right; }
.radar-legend { margin-top: 15px; padding: 11px; border-radius: 9px; background: var(--panel-2); }
.radar-legend b { display: block; margin-bottom: 8px; font-size: 10px; }
.radar-legend div { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.radar-legend i { width: 14px; height: 5px; display: inline-block; border-radius: 3px; background: #3aa6d8; }
.radar-legend i.medium { background: #edc83d; }
.radar-legend i.strong { background: #ee554e; }
.radar-timeline-card { margin-top: 14px; overflow: hidden; }
.radar-timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(80px, 1fr); overflow-x: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.radar-hour { min-width: 80px; padding: 10px 7px 12px; display: grid; justify-items: center; gap: 5px; border-right: 1px solid var(--line-soft); }
.radar-hour time { color: var(--muted); font-size: 10px; font-weight: 700; }
.radar-hour img { width: 35px; height: 35px; object-fit: contain; }
.radar-hour strong { font-size: 13px; }
.radar-hour > span { width: 5px; height: 34px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 4px; background: var(--line-soft); }
.radar-hour > span i { width: 100%; min-height: 2px; display: block; border-radius: 4px; background: #3aa6d8; }
.radar-hour.medium > span i { background: #edc83d; }
.radar-hour.strong > span i { background: #ee554e; }
.radar-hour.dry > span i { background: var(--muted); opacity: .35; }
.radar-hour > small { color: var(--muted); font-size: 8px; }

.hourly-card { margin-top: 14px; }
.hourly-heading-tools { display: flex; align-items: center; gap: 12px; }
.hourly-interval-toggle {
  display: inline-flex; padding: 2px; border: 1px solid var(--line);
  border-radius: 9px; background: rgba(3,18,28,.45);
}
.hourly-interval-toggle button {
  min-height: 26px; padding: 4px 10px; border: 0; border-radius: 6px;
  color: var(--muted); background: transparent; font: inherit; font-size: 10px;
  font-weight: 700; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.hourly-interval-toggle button.active {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 3px 10px rgba(239,63,55,.22);
}
.hourly-strip {
  min-height: 144px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(85px, 1fr);
  overflow-x: auto; scrollbar-width: thin; border-top: 1px solid var(--line-soft);
}
.hour-item { min-width: 85px; padding: 9px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-right: 1px solid var(--line-soft); }
.hour-item:last-child { border-right: 0; }
.hour-item.new-day { border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.hour-day { height: 12px; margin-bottom: -3px; color: var(--accent); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.hour-precip { min-height: 12px; color: var(--muted); font-size: 9px; }
.hour-item time { color: var(--muted); font-size: 12px; font-weight: 600; }
.hour-item img { width: 42px; height: 42px; object-fit: contain; }
.hour-item strong { font-size: 18px; }
.hour-meta { display: flex; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.hour-meta .rain { color: #68bde8; }

.detail-grid > .card { min-height: 250px; }
.daily-list { padding: 2px 13px 12px; }
.daily-row {
  min-height: 42px; padding: 3px 6px; display: grid;
  grid-template-columns: 62px 38px minmax(74px, 1fr) 58px 48px;
  align-items: center; gap: 7px; color: var(--muted); font-size: 11px;
  border-bottom: 1px solid var(--line-soft); border-radius: 8px;
}
.daily-row:last-child { border-bottom: 0; }
.daily-row.is-today { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.daily-row img { width: 34px; height: 34px; object-fit: contain; }
.daily-date strong, .daily-date small { display: block; }
.daily-date strong { color: var(--text); font-size: 12px; }
.daily-date small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.daily-condition {
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-height: 1.15;
}
.daily-temperatures { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.daily-temperatures strong { color: var(--text); font-size: 15px; }
.daily-temperatures small { color: var(--muted); font-size: 11px; }
.daily-rain {
  justify-self: end; min-width: 45px; padding: 4px 5px; border-radius: 7px;
  color: #75caef; background: rgba(70,162,205,.1); font-size: 10px;
  font-weight: 700; text-align: center; white-space: nowrap;
}
.sun-times { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 9px 16px 12px; border-bottom: 1px solid var(--line-soft); }
.sun-times > div { min-height: 55px; padding: 8px 10px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; align-items: center; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(4,22,33,.25); }
.sun-event-icon {
  grid-row: 1/3; width: 29px; height: 29px; display: grid; place-items: center;
  border-radius: 9px; color: #08202d; background: #f6bd39; font-size: 18px; font-weight: 900;
}
.sunset-icon { color: #edf4ff; background: linear-gradient(145deg, #f29645, #815e91); }
.sun-times small, .moon-row small { color: var(--muted); display: block; font-size: 10px; }
.sun-times strong { font-size: 15px; }
.celestial-track { position: relative; height: 112px; margin: 0 16px 5px; overflow: hidden; border-radius: 11px; background: linear-gradient(180deg, rgba(50,94,128,.08), transparent 76%); }
.celestial-track svg { position: absolute; inset: 5px 0 17px; width: 100%; height: 82px; overflow: visible; }
.celestial-track line { stroke: var(--line); stroke-width: .7; }
.celestial-path { fill: none; stroke-width: 1.8; stroke-linecap: round; }
.day-path { stroke: #f6b829; filter: drop-shadow(0 0 3px rgba(246,184,41,.22)); }
.night-path { stroke: #6d86ae; stroke-dasharray: 2 3; opacity: .45; transform: translateY(3px); }
.celestial-marker { position: absolute; z-index: 2; left: var(--track-x, 7%); top: var(--track-y, 76%); width: 27px; height: 27px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; transition: left .8s ease, top .8s ease, opacity .4s; }
.sun-marker { color: #ffd257; background: #664710; box-shadow: 0 0 16px rgba(246,184,41,.4); font-size: 17px; }
.moon-marker { color: #dbe6f5; background: #263a55; box-shadow: 0 0 13px rgba(159,184,217,.28); font-size: 18px; }
.celestial-marker.below-horizon { opacity: .3; filter: grayscale(.7); }
.track-label { position: absolute; bottom: 0; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.track-label.dawn { left: 2%; }.track-label.noon { left: 50%; transform: translateX(-50%); }.track-label.dusk { right: 1%; }
.moon-row { min-height: 78px; display: grid; grid-template-columns: 54px minmax(90px,1fr) minmax(190px,1.45fr); align-items: center; gap: 14px; padding: 12px 16px; }
.moon-disc { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 67% 42%, #faf8df 0 46%, #a9b1b3 49% 56%, #293a42 58%); box-shadow: 0 0 18px rgba(240,238,204,.18); }
.moon-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.moon-times span { padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--panel-2); }
.moon-times small, .moon-times b { display: block; }
.moon-times small { margin-bottom: 3px; color: var(--muted); font-size: 8px; }
.moon-times b { font-size: 12px; }
.celestial-details-link {
  width: calc(100% - 32px); margin: 0 16px 13px; padding: 9px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-soft); border-radius: 9px; color: var(--text);
  background: rgba(4,22,33,.28); font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.celestial-details-link:hover { border-color: var(--accent); background: rgba(239,63,55,.07); }
.celestial-details-link span { color: var(--accent); font-size: 16px; }
.celestial-details-link:disabled { opacity: .45; cursor: not-allowed; }
.astronomy-dialog {
  width: min(850px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 15px;
  color: var(--text); background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.6);
}
.astronomy-dialog::backdrop { background: rgba(0,9,15,.78); backdrop-filter: blur(5px); }
.astronomy-dialog-card { max-height: min(82vh, 760px); display: flex; flex-direction: column; }
.astronomy-dialog-heading { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.astronomy-dialog-heading h2 { margin: 3px 0 0; font-size: 20px; }
.astronomy-dialog-heading button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: var(--panel-2); font-size: 25px; cursor: pointer; }
.astronomy-details { padding: 17px 20px 22px; overflow-y: auto; }
.astronomy-details #celestial_details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.astronomy-details .celestial_body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-width: 0; padding: 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--panel-2); }
.astronomy-details table { width: 100%; border-collapse: collapse; }
.astronomy-details th { padding: 3px 5px 11px; color: var(--text); font-size: 16px; text-align: left; }
.astronomy-details td { padding: 7px 5px; border-top: 1px solid var(--line-soft); font-size: 12px; vertical-align: top; }
.astronomy-details td.label { color: var(--muted); }
.astronomy-details td.data { color: var(--text); font-weight: 600; text-align: right; }
.astronomy-details .almanac_last_updated, .astronomy-details .clear { display: none; }
.summary-temperature { padding: 5px 16px 13px; border-bottom: 1px solid var(--line-soft); }
.summary-temp-values { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px; }
.summary-temp-values > strong { color: var(--text); font-size: 20px; }
.summary-temp-values > span { padding-bottom: 2px; color: var(--muted); font-size: 10px; text-align: center; }
.temperature-range-track {
  --temperature-position: 50%; position: relative; height: 7px; margin: 27px 3px 7px;
  border-radius: 8px; background: linear-gradient(90deg, #55a9e0, #77d5bd 46%, #f2bd43 72%, #ef5247);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
}
.temperature-range-track > span {
  position: absolute; bottom: 13px; left: var(--temperature-position); color: var(--text); font-size: 10px;
  font-weight: 700; white-space: nowrap; transform: translateX(-50%);
}
.temperature-range-track i {
  position: absolute; top: 50%; left: var(--temperature-position); width: 13px; height: 13px;
  border: 2px solid #fff; border-radius: 50%; background: var(--accent);
  box-shadow: 0 2px 7px rgba(0,0,0,.45); transform: translate(-50%, -50%);
}
.summary-temp-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.summary-temp-times b { color: var(--text); font-weight: 600; }
.summary-metrics { padding: 9px 12px 3px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.summary-metric { min-height: 51px; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(4,22,33,.26); }
.summary-metric > span, .summary-metric > strong { display: block; }
.summary-metric > span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.summary-metric > strong { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.summary-metric > strong small { color: var(--muted); font-size: 10px; }
#today-pressure-range { font-size: 11px; letter-spacing: -.15px; }
.detail-link { display: block; margin: 11px 17px 15px; color: var(--accent); text-align: right; font-size: 11px; font-weight: 700; }
.location-card > p { padding: 5px 17px 12px; margin: 0; line-height: 1.55; }
.location-card > p small { color: var(--muted); padding-left: 15px; }
.location-stat { margin: 0 17px; }
.alerts-card[hidden] { display: none; }
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.alerts-card {
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  display: block;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.alerts-card.top-alert { margin: 0; }
.alerts-card.warning {
  border-color: rgba(239,63,55,.7);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}
.alert-header:hover {
  background: rgba(239, 63, 55, 0.08);
}
.alert-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.alert-icon {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.alert-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.alerts-card strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.alert-validity {
  display: inline-block;
  flex: 0 0 auto;
  width: max-content;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffb8b3;
  background: rgba(239, 63, 55, 0.22);
  border: 1px solid rgba(239, 63, 55, 0.35);
}
.alert-validity:empty { display: none; }

.alert-chevron-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(239, 63, 55, 0.12);
  transition: background-color 0.2s ease, transform 0.25s ease;
}
.alert-header:hover .alert-chevron-wrap {
  background: rgba(239, 63, 55, 0.22);
}
.alert-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.alerts-card.is-expanded .alert-chevron,
.alert-header[aria-expanded="true"] .alert-chevron {
  transform: rotate(180deg);
}

.alert-body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 10px 18px 16px 57px;
  border-top: 1px dashed rgba(239, 63, 55, 0.25);
  animation: alertBodyFade 0.2s ease-out;
}
.alert-body[hidden] {
  display: none;
}
.alerts-card small {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

@keyframes alertBodyFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.alerts-more { margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(239,63,55,.2); }
.alerts-toggle { padding: 0; border: 0; color: var(--accent); background: none; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer; }
.alerts-toggle::after { content: " ↓"; }
.alerts-toggle[aria-expanded="true"]::after { content: " ↑"; }
.alerts-list { margin-top: 9px; }
.alerts-list-item { padding: 9px 0; border-top: 1px solid var(--line-soft); }
.alerts-list-item:first-child { border-top: 0; }
.alerts-list-item summary { cursor: pointer; list-style-position: outside; }
.alerts-list-item summary span { display: inline-block; vertical-align: top; }
.alerts-list-item strong { font-size: 13px; }
.alerts-list-item small { margin-top: 2px; font-size: 11px; }
.alerts-list-item p { margin: 8px 0 1px 17px; color: var(--muted); font-size: 12px; line-height: 1.45; }

/* Light mode overrides for weather alerts */
html[data-theme="light"] .alerts-card.warning {
  border-color: rgba(239, 63, 55, 0.45);
  background: color-mix(in srgb, var(--accent) 5%, #ffffff);
  box-shadow: 0 4px 18px rgba(239, 63, 55, 0.08);
}
html[data-theme="light"] .alert-validity {
  color: #b82522;
  background: rgba(239, 63, 55, 0.12);
  border-color: rgba(239, 63, 55, 0.3);
}
html[data-theme="light"] .alert-chevron-wrap {
  color: #c02621;
  background: rgba(239, 63, 55, 0.12);
}
html[data-theme="light"] .alert-header:hover {
  background: rgba(239, 63, 55, 0.06);
}
.dashboard-charts { margin-top: 34px; padding-top: 8px; }
.dashboard-section-heading {
  margin: 0 3px 14px; display: flex; align-items: end; justify-content: space-between; gap: 15px;
}
.dashboard-section-heading h2 { margin: 4px 0 0; font-size: 25px; letter-spacing: -.5px; }
.dashboard-chart-actions { display: flex; align-items: center; gap: 4px; }
.dashboard-range { min-width: 68px; padding: 9px 14px; border-radius: 7px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.dashboard-range:hover { color: var(--text); background: var(--panel-2); }
.dashboard-range.active { color: #fff; background: var(--accent); box-shadow: 0 0 18px rgba(239,63,55,.22); }
.dashboard-all-charts { margin-left: 22px; color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 24px; padding: 15px 0; }
.dashboard-metric { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 0 28px; border-right: 1px solid var(--line); }
.dashboard-metric:last-child { border: 0; }
.dashboard-metric-icon { color: #59c8ef; font-size: 28px; line-height: 1; }
.dashboard-metric:nth-child(2) .dashboard-metric-icon { color: #ef5149; }
.dashboard-metric small, .dashboard-metric strong { display: block; }
.dashboard-metric small { color: var(--muted); font-size: 11px; }
.dashboard-metric strong { margin-top: 2px; font-size: 22px; }
.dashboard-metric em { color: var(--muted); font-size: 14px; font-style: normal; }

/* Category Navigation Switcher */
.dashboard-category-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 3px 22px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dashboard-category-nav::-webkit-scrollbar { display: none; }
.category-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.category-tab-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 30%, var(--line));
  background: color-mix(in srgb, var(--panel-2) 90%, var(--text));
}
.category-tab-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(239,63,55,.28);
}
.category-tab-btn .tab-icon { font-size: 14px; }

/* Category Blocks & Headers */
.dashboard-category-block {
  margin-bottom: 28px;
  animation: fadeInCategory 0.3s ease;
}
@keyframes fadeInCategory { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.dashboard-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 4px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.dashboard-category-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.dashboard-category-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.3px;
  color: var(--text);
}
.dashboard-category-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.dashboard-category-count {
  padding: 3px 11px;
  border-radius: 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

/* Category Grid Layouts */
.dashboard-category-grid {
  display: grid;
  gap: 16px;
}
.grid-2-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Unified Chart Card Design */
.dashboard-chart-card-unified {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dashboard-chart-card-unified:hover {
  border-color: color-mix(in srgb, var(--badge-color, var(--line)) 38%, var(--line));
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  transition: margin 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
}
.dashboard-chart-card-unified.is-collapsible .dashboard-card-header {
  cursor: pointer;
  user-select: none;
}
.dashboard-chart-card-unified.is-collapsible .dashboard-card-header:hover {
  background: color-mix(in srgb, var(--badge-color, var(--line)) 6%, transparent);
  border-radius: 10px;
}
.dashboard-chart-card-unified.is-collapsed .dashboard-card-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}

.card-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease, border-color 0.15s ease;
}
.dashboard-chart-card-unified:not(.is-collapsed) .card-chevron {
  transform: rotate(180deg);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-chart-card-unified:not(.is-collapsed) .card-chevron-wrap {
  color: var(--badge-color, var(--accent));
  border-color: color-mix(in srgb, var(--badge-color, var(--accent)) 35%, var(--line-soft));
}

.quiet-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: color-mix(in srgb, var(--badge-color, var(--line)) 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--line)) 25%, var(--line-soft));
}

.dashboard-card-collapsible-body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: cardBodyFade 0.2s ease-out;
}
.dashboard-card-collapsible-body[hidden] {
  display: none;
}
.dashboard-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dashboard-card-icon-badge {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--badge-color, #56bce8) 12%, var(--panel-2));
  color: var(--badge-color, #56bce8);
  border: 1px solid color-mix(in srgb, var(--badge-color, #56bce8) 28%, transparent);
}
.dashboard-card-title-text {
  min-width: 0;
}
.dashboard-card-title-text h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-card-title-text span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-card-kpi-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.kpi-main-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 5px 11px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--badge-color, var(--panel-2)) 10%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--line)) 28%, var(--line));
}
.kpi-main-val {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -.3px;
}
.kpi-main-label {
  font-size: 10px;
  font-weight: 650;
  color: var(--badge-color, var(--muted));
  margin-top: 1px;
}

.kpi-sub-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-pill {
  display: flex;
  flex-direction: column;
  padding: 5px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  border: 1px solid var(--line);
}
.kpi-pill small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.kpi-pill strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
  white-space: nowrap;
}
.kpi-pill span {
  color: var(--muted);
  font-size: 9px;
  margin-top: 1px;
}

.comfort-message {
  margin: 0 0 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--badge-color, var(--good));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--good)) 25%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--badge-color, var(--good)) 7%, var(--panel));
  font-size: 11px;
  font-weight: 700;
}
.comfort-message i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.lightning-c-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--badge-color, #a98bff) 7%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--badge-color, #a98bff) 22%, var(--line));
}
.lightning-c-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--badge-color, #a98bff);
  font-size: 12px;
}
.lightning-c-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.lightning-c-status span { color: var(--muted); font-weight: 500; }

.lightning-radar {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--badge-color, #a98bff) 40%, var(--line));
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 6px, color-mix(in srgb, var(--badge-color, #a98bff) 20%, transparent) 7px 8px);
  overflow: hidden;
  box-sizing: border-box;
}
.lightning-radar .radar-axis-x, .lightning-radar .radar-axis-y {
  position: absolute; background: color-mix(in srgb, var(--badge-color, #a98bff) 30%, transparent);
}
.lightning-radar .radar-axis-x { width: 100%; height: 1px; }
.lightning-radar .radar-axis-y { width: 1px; height: 100%; }
.lightning-radar .radar-sweep {
  position: absolute; inset: 2px; border-radius: 50%; border-top: 2px solid var(--badge-color, #a98bff);
  background: conic-gradient(from -20deg, color-mix(in srgb, var(--badge-color, #a98bff) 20%, transparent), transparent 25%);
  animation: lightningRadarSweep 3.8s linear infinite;
}
.lightning-radar .radar-distance-ring {
  position: absolute; width: calc(var(--distance-size) * 0.4); height: calc(var(--distance-size) * 0.4);
  border: 2px solid var(--badge-color, #a98bff); border-radius: 50%;
  box-shadow: 0 0 8px color-mix(in srgb, var(--badge-color, #a98bff) 60%, transparent);
  animation: lightningDistancePulse 1.8s ease-in-out infinite;
}
.lightning-radar > b {
  position: relative; z-index: 3; color: var(--badge-color, #a98bff); font-size: 14px;
}
@keyframes lightningRadarSweep { to { transform: rotate(360deg); } }
@keyframes lightningDistancePulse { 50% { opacity: .45; transform: scale(1.08); } }

.dashboard-chart-canvas { height: 235px; width: 100%; }
.dashboard-chart-canvas.tall { height: 265px; }

@media (max-width: 900px) {
  .grid-2-col { grid-template-columns: 1fr; }
  .dashboard-card-header { flex-wrap: wrap; }
  .dashboard-card-kpi-group { margin-left: 0; width: 100%; justify-content: space-between; }
}

.page-intro { padding: 28px 3px 24px; }
.page-intro h1 { margin: 7px 0 8px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -1.5px; }
.page-intro p { max-width: 640px; margin: 0; color: var(--muted); font-size: 16px; }
.forecast-chart-card { margin-bottom: 14px; }
.forecast-alert { margin: 0 0 14px; }
.forecast-summary { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.forecast-summary > .card { min-height: 92px; }
.forecast-summary-lead { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.forecast-summary-lead strong { margin: 5px 0 3px; font-size: 17px; line-height: 1.25; }
.forecast-summary-lead small, .forecast-summary-stat small { color: var(--muted); font-size: 10px; }
.forecast-summary-stat { padding: 16px; display: flex; align-items: center; gap: 12px; }
.forecast-summary-stat > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #68bde8; background: rgba(86,188,232,.1); font-size: 21px; }
.forecast-summary-stat.warm > span { color: #ef6b45; background: rgba(239,107,69,.1); }
.forecast-summary-stat.wind > span { color: #55d4d1; background: rgba(85,212,209,.1); }
.forecast-summary-stat strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.3; }
.forecast-horizon { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.forecast-chart-card .card-heading > div small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.temperature-chart { height: 340px; padding: 0 12px 10px; border-top: 1px solid var(--line-soft); }
.chart-grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#tempGradient); opacity: .32; }
.chart-dot { fill: var(--panel); stroke: var(--accent); stroke-width: 3; }
.chart-label { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.chart-value { fill: var(--text); font-size: 10px; text-anchor: middle; font-weight: 700; }
.unit-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.unit-toggle button { border: 0; padding: 6px 10px; color: var(--muted); background: transparent; }
.unit-toggle button.active { color: #fff; background: var(--accent); }
.daily-cards { padding: 0 14px 14px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day-card { min-width: 0; padding: 14px 10px 11px; text-align: center; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.day-card time, .day-card small { color: var(--muted); font-size: 10px; display: block; }
.day-card time b, .day-card time span { display: block; }
.day-card time b { color: var(--text); font-size: 11px; }
.day-card time span { margin-top: 2px; font-size: 9px; }
.day-card img { width: 50px; height: 50px; object-fit: contain; margin: 7px 0; }
.day-card strong { display: block; font-size: 15px; }
.day-temperature-range { position: relative; height: 4px; margin: 9px 4px 7px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.day-temperature-range i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #56bce8, #f6bd39, #ef3f37); }
.day-card .weather-text { min-height: 27px; margin-top: 4px; }
.day-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.day-details span { min-width: 0; color: var(--muted); font-size: 8px; }
.day-details b { display: block; margin: 2px 0; color: var(--text); font-size: 8px; white-space: nowrap; }
.day-details small { overflow: hidden; font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.chart-navigation.fullwidth-variant {
  position: sticky; top: 86px; z-index: 25;
  margin-bottom: 16px; padding: 0;
  border-radius: 14px; background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
}
.fullwidth-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  width: 100%; margin: 0; padding: 0;
}
.fullwidth-grid.year-grid {
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line-soft);
}
.fullwidth-grid button {
  height: 48px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); background: transparent;
  border: none; border-right: 1px solid var(--line-soft);
  cursor: pointer; font-size: 13.5px; font-weight: 600;
  border-radius: 0; transition: background .15s ease, color .15s ease;
}
.fullwidth-grid button:last-child { border-right: none; }
.fullwidth-grid button:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.fullwidth-grid button.active {
  color: #ffffff; background: var(--accent); font-weight: 700;
}
.fullwidth-grid.year-grid button.active {
  background: #10b981; color: #ffffff; font-weight: 700;
}
@media (max-width: 900px) {
  .fullwidth-grid { grid-template-columns: repeat(4, 1fr); }
  .fullwidth-grid button { border-bottom: 1px solid var(--line-soft); }
  .fullwidth-grid.year-grid { grid-template-columns: repeat(3, 1fr); }
}

.chart-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.chart-overview article { min-width: 0; min-height: 72px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.chart-overview article > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 18px; }
.chart-overview article:last-child > span { color: #61d789; background: rgba(97,215,137,.12); }
.chart-overview small, .chart-overview strong { display: block; }
.chart-overview small { color: var(--muted); font-size: 11px; }
.chart-overview strong { overflow: hidden; margin-top: 3px; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.chart-result-heading { margin: 0 3px 12px; display: flex; align-items: end; justify-content: space-between; }
.chart-result-heading h2 { margin: 3px 0 0; font-size: 22px; }
.heatmap-shell{grid-column:1/-1;padding:18px}.heatmap-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.heatmap-controls{display:flex;flex-wrap:wrap;gap:7px}.heatmap-controls button{padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--muted);background:transparent;cursor:pointer}.heatmap-controls button.active{color:#fff;border-color:var(--accent);background:var(--accent)}.heatmap-period{display:flex;align-items:center;gap:10px}.heatmap-period button{width:36px;height:36px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:var(--panel-2);cursor:pointer}.heatmap-period strong{min-width:145px;text-align:center}.heatmap-year{overflow-x:auto}.heatmap-year-grid{min-width:840px;display:grid;grid-template-columns:32px repeat(53,1fr);grid-template-rows:22px repeat(7,14px);gap:4px}.heatmap-month-name{font-size:9px;color:var(--muted)}.heatmap-weekday{font-size:9px;color:var(--muted);align-self:center}.heatmap-cell{min-width:10px;border-radius:3px;background:var(--line-soft);cursor:default}.heatmap-cell.has-data{outline:1px solid rgba(255,255,255,.04)}.heatmap-month-grid{display:grid;grid-template-columns:repeat(7,minmax(38px,1fr));gap:7px}.heatmap-month-grid .weekday{text-align:center;color:var(--muted);font-size:10px}.heatmap-month-day{min-height:74px;padding:8px;border-radius:9px;background:var(--line-soft)}.heatmap-month-day.blank{visibility:hidden}.heatmap-month-day b,.heatmap-month-day span{display:block}.heatmap-month-day span{margin-top:12px;font-size:11px;font-weight:700}.heatmap-legend{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:13px;color:var(--muted);font-size:9px}.heatmap-legend i{width:22px;height:10px;border-radius:3px}.heatmap-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:15px}.heatmap-stat{padding:12px;border:1px solid var(--line-soft);border-radius:9px;background:var(--panel-2)}.heatmap-stat small,.heatmap-stat strong{display:block}.heatmap-stat small{color:var(--muted);font-size:9px}.heatmap-stat strong{margin-top:4px;font-size:15px}@media(max-width:700px){.heatmap-toolbar{align-items:flex-start}.heatmap-stats{grid-template-columns:repeat(2,1fr)}.heatmap-month-day{min-height:58px;padding:6px}.heatmap-month-day span{margin-top:8px;font-size:9px}}
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-card.chart-card-full { grid-column: 1 / -1; }
.chart-card { min-height: 350px; padding: 8px; overflow: hidden; }
.chart-card-heading { min-height: 48px; padding: 6px 9px 7px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.chart-card-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #60c9ee; background: rgba(86,188,232,.1); font-size: 19px; }
.chart-card-heading div { min-width: 0; }
.chart-card-heading h3 { overflow: hidden; margin: 0; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.chart-card-heading small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.chart-card-live { margin-left: auto; color: #61d789; font-size: 10px; font-weight: 700; white-space: nowrap; }
.chart-container { height: 330px; }
.longterm-notice { grid-column: 1 / -1; padding: 13px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(242,184,75,.32); border-radius: 11px; color: #d8c99f; background: rgba(242,184,75,.07); font-size: 12px; line-height: 1.5; }
.longterm-notice strong { flex: 0 0 auto; color: #f2b84b; }
.longterm-records { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.longterm-record { min-height: 82px; padding: 13px 14px; display: flex; align-items: center; gap: 11px; }
.longterm-record > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(239,63,55,.1); font-size: 17px; font-weight: 800; }
.longterm-record.rain > span, .longterm-record.wind > span, .longterm-record.cold > span { color: var(--blue); background: rgba(86,188,232,.1); }
.longterm-record.dry > span { color: #f2b84b; background: rgba(242,184,75,.1); }
.longterm-record small, .longterm-record strong, .longterm-record time { display: block; }
.longterm-record small { color: var(--muted); font-size: 10px; font-weight: 700; }
.longterm-record strong { margin-top: 2px; font-size: 18px; }
.longterm-record time { margin-top: 2px; color: var(--muted); font-size: 10px; }
.longterm-chart-card { grid-column: 1 / -1; }
.longterm-chart-card .chart-container { height: 380px; }
.longterm-chart-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.longterm-chart-grid .chart-card-full { grid-column: 1 / -1; }
.longterm-table-card { grid-column: 1 / -1; }
.longterm-table-card .card-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.longterm-table-wrap { overflow-x: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.longterm-table-wrap table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; }
.longterm-table-wrap th, .longterm-table-wrap td { padding: 11px 12px; border-top: 1px solid var(--line-soft); text-align: right; }
.longterm-table-wrap thead th { color: var(--muted); background: var(--panel-2); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.longterm-table-wrap th:first-child, .longterm-table-wrap td:nth-child(2) { text-align: left; }
.longterm-table-wrap tbody th { color: var(--text); font-size: 13px; }
.longterm-table-wrap tbody td { color: var(--muted); }
.longterm-table-wrap tbody td span { padding: 4px 7px; border-radius: 6px; color: #bfe6c9; background: rgba(97,215,137,.08); font-size: 9px; font-weight: 700; }
.longterm-table-wrap tr.incomplete { background: rgba(242,184,75,.035); }
.longterm-table-wrap tr.incomplete td span { color: #f2d493; background: rgba(242,184,75,.1); }
.layout-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.layout-button {
  min-height: 35px; padding: 7px 12px; color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; background: var(--panel-2); cursor: pointer; font-size: 11px; font-weight: 700;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.layout-button:hover { border-color: var(--accent); transform: translateY(-1px); }
.layout-button[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: var(--accent); }
.layout-button.secondary { color: var(--muted); background: transparent; }
.layout-hint {
  margin: -2px 3px 12px; padding: 10px 13px; color: var(--muted); border: 1px dashed var(--line);
  border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, transparent); font-size: 11px;
  animation: layoutHintIn .25s ease both;
}
.charts-grid.customizable-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.customizable-grid .chart-card {
  position: relative; grid-column: span var(--chart-cols, 6); min-height: 0;
  transition: box-shadow .22s, border-color .22s, opacity .22s;
}
.customizable-grid .chart-container { height: var(--chart-height, 330px); transition: height .22s ease; }
.tile-drag-handle, .tile-resize-handle { display: none; }
.customizable-grid.layout-editing .chart-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 12px 36px rgba(0,0,0,.22); }
.customizable-grid.layout-editing .chart-container { pointer-events: none; }
.customizable-grid.layout-editing .tile-drag-handle {
  position: absolute; z-index: 8; top: 7px; left: 50%; width: 62px; height: 22px; display: grid;
  place-items: center; transform: translateX(-50%); color: var(--muted); border: 1px solid var(--line);
  border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 94%, transparent); cursor: grab;
  font-size: 15px; letter-spacing: 3px; touch-action: none;
}
.customizable-grid.layout-editing .tile-drag-handle:active { cursor: grabbing; }
.customizable-grid.layout-editing .tile-resize-handle {
  position: absolute; z-index: 8; right: 5px; bottom: 5px; width: 28px; height: 28px; display: block;
  border: 0; background: transparent; cursor: nwse-resize; touch-action: none;
}
.customizable-grid.layout-editing .tile-resize-handle::before {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 0 0 3px;
}
.customizable-grid .chart-card.tile-dragging { z-index: 9; opacity: .68; border-color: var(--accent); transform: scale(.985); }
.customizable-grid .chart-card.tile-resizing { z-index: 9; transition: none; border-color: var(--accent); }
.customizable-grid .chart-card.tile-resizing .chart-container { transition: none; }
@keyframes layoutHintIn { from { opacity: 0; transform: translateY(-5px); } }
.loading, .empty-state { min-height: 100px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.compact-current { margin-top: 14px; padding: 13px 18px; display: grid; grid-template-columns: 48px auto 1fr auto; align-items: center; gap: 12px; }
.compact-current img { width: 44px; height: 44px; object-fit: contain; }
.compact-current strong { font-size: 21px; }
.compact-current small { color: var(--muted); }

.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.station-hero-banner {
  grid-column: 1 / -1; overflow: hidden; padding: 0; display: flex; flex-direction: column;
}
.hero-image-wrap {
  width: 100%; height: 180px; overflow: hidden; background: #020d15; border-bottom: 1px solid var(--line-soft);
}
.hero-image-wrap img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; opacity: 0.88;
}
.hero-content { padding: 22px 26px; }
.hero-badge-group { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  background: rgba(97, 215, 137, 0.15); color: #61d789; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-subtle {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.hero-content h2 { font-size: 26px; margin: 0 0 8px; }
.hero-content p { color: var(--muted); line-height: 1.65; margin: 0; max-width: 900px; }
.station-status-bar {
  margin-bottom: 16px; padding: 16px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; border-left: 4px solid #61d789;
}
.status-indicator { display: flex; align-items: center; gap: 12px; }
.pulse-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #61d789;
  box-shadow: 0 0 0 0 rgba(97, 215, 137, 0.7); animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(97, 215, 137, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(97, 215, 137, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(97, 215, 137, 0); }
}
.status-indicator strong { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.status-indicator small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.status-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.status-pill {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); font-size: 13px;
}
.status-pill strong { color: var(--text); font-weight: 700; margin-left: 4px; }
.station-sensors-card { grid-column: 1 / -1; }
.sensor-grid {
  padding: 12px 18px 20px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.sensor-item {
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel-2);
  transition: border-color 0.2s;
}
.sensor-item:hover { border-color: var(--accent); }
.sensor-item .icon { font-size: 22px; flex: 0 0 28px; text-align: center; }
.sensor-item strong { display: block; font-size: 14px; color: var(--text); }
.sensor-item small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.facts { margin: 0; padding: 5px 18px 18px; }
.facts div { display: contents; }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { float: left; clear: left; color: var(--muted); }
.facts dd { text-align: right; }
.sensor-tags { padding: 5px 18px 18px; display: flex; flex-wrap: wrap; gap: 9px; }
.sensor-tags span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel-2); font-size: 12px; }
.legal-page { max-width: 900px; }
.prose { padding: 24px 28px; line-height: 1.7; }
.prose h2 { margin: 24px 0 5px; font-size: 19px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); }
.prose a { color: var(--accent); }
.media-tabs {
  display: flex; width: max-content; max-width: 100%; margin-bottom: 14px; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.media-tabs button {
  padding: 11px 20px; color: var(--muted); border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 700;
}
.media-tabs button.active { color: #fff; background: var(--accent); }
.media-panel { display: none; }
.media-panel.active { display: block; }
.webcam-viewer { max-width: 1180px; margin: 0 auto; }
.webcam-viewer > a { display: block; line-height: 0; }
.webcam-viewer img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #02080c; border-top: 1px solid var(--line-soft); }
.webcam-video { display: block; width: 100%; max-height: 72vh; background: #02080c; border-top: 1px solid var(--line-soft); }
.media-caption { min-height: 47px; padding: 13px 16px; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 13px; }
.webcam-live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: stretch; }
.webcam-live-layout .webcam-viewer { max-width: none; min-width: 0; margin: 0; }
.webcam-live-card { overflow: hidden; }
.webcam-image-stage { position: relative; min-height: 420px; display: grid; place-items: center; overflow: hidden; background: #02080c; }
.webcam-image-stage > img { width: 100%; max-height: 72vh; display: block; object-fit: contain; }
.webcam-weather-overlay {
  position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; padding: 11px 13px;
  display: grid; grid-template-columns: 1.25fr 1.05fr 1.5fr .9fr 1.05fr 1.05fr; gap: 10px; align-items: center;
  border: 1px solid rgba(255,255,255,.13); border-radius: 11px; color: #fff;
  background: rgba(2,15,24,.72); box-shadow: 0 9px 30px rgba(0,0,0,.32);
  backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px); transition: opacity .2s, transform .2s;
}
.webcam-weather-overlay.hidden { pointer-events: none; opacity: 0; transform: translateY(10px); }
.webcam-weather-overlay > div { min-width: 0; }
.webcam-weather-overlay small, .webcam-weather-overlay strong { display: block; }
.webcam-weather-overlay small { overflow: hidden; color: #c4d2da; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.webcam-weather-overlay strong { overflow: hidden; margin-top: 4px; font-size: 20px; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; }
.webcam-overlay-main strong { font-size: 20px; }
.webcam-image-badge { position: absolute; z-index: 2; left: 18px; bottom: 18px; padding: 14px 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: #fff; background: rgba(2,15,24,.68); box-shadow: 0 8px 25px rgba(0,0,0,.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: left; transition: opacity .2s, transform .2s; }
.webcam-image-badge.hidden { pointer-events: none; opacity: 0; }
.webcam-image-badge span, .webcam-image-badge small { display: block; }
.webcam-image-badge span { font-size: clamp(14px, 1.5vw, 20px); font-weight: 750; }
.webcam-image-badge small { margin-top: 6px; color: #d0dbe1; font-size: clamp(13px, 1.25vw, 17px); }
.webcam-image-badge small b { color: #fff; font-weight: 750; }
.webcam-tools { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-soft); }
.webcam-tool-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.webcam-tools button, .webcam-tools a, .timelapse-tools button { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--panel-2); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.webcam-tools button:hover, .webcam-tools a:hover, .timelapse-tools button:hover { color: var(--text); border-color: var(--accent); }
.webcam-tools button[aria-pressed="true"], .timelapse-tools button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.longterm-timelapse { max-width: 1180px; margin: 18px auto 0; }
.longterm-heading { margin: 0 3px 10px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.longterm-heading h2 { margin: 3px 0 0; font-size: 21px; }
.longterm-heading > small { color: var(--muted); font-size: 11px; }
.longterm-video-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.longterm-video-link { min-width: 0; padding: 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; transition: border-color .2s, transform .2s; }
.longterm-video-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.longterm-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); font-size: 14px; font-weight: 800; }
.longterm-video-link small, .longterm-video-link strong { display: block; }
.longterm-video-link small { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.longterm-video-link strong { margin-top: 4px; font-size: 15px; }
.longterm-video-link p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.longterm-video-link > b { color: var(--accent); font-size: 19px; }
.longterm-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.longterm-video-card { min-width: 0; overflow: hidden; }
.longterm-video-card .card-heading { min-height: 76px; }
.longterm-video-card .card-heading small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.longterm-video-card .card-heading h2 { margin: 0; font-size: 17px; }
.longterm-video-card .webcam-video { width: 100%; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.longterm-video-card .media-caption { font-size: 10px; }
.longterm-archive-card { margin-top: 14px; padding: 16px; }
.longterm-archive-tabs { display: flex; gap: 7px; margin-bottom: 13px; }
.longterm-archive-tabs button { width: auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.longterm-archive-tabs button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.longterm-archive-layout { display: grid; grid-template-columns: minmax(180px,.36fr) minmax(0,1fr); gap: 16px; }
.longterm-archive-list { max-height: 370px; overflow: auto; display: grid; align-content: start; gap: 6px; }
.longterm-archive-list button { padding: 10px 12px; text-align: left; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; }
.longterm-archive-list button.active { border-color: var(--accent); background: rgba(239,63,55,.1); }
.longterm-archive-layout h3 { margin: 0 0 10px; font-size: 16px; }
.longterm-archive-layout video { width: 100%; aspect-ratio: 16/9; background: #02080c; }
.longterm-download { display: inline-block; margin-top: 9px; color: var(--accent); font-size: 11px; font-weight: 700; }
@media(max-width:760px){.longterm-archive-layout{grid-template-columns:1fr}.longterm-archive-list{max-height:220px}}
.webcam-highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.webcam-highlight-card { min-width: 0; overflow: hidden; }
.webcam-highlight-card video { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: #02080c; }
.webcam-highlight-copy { padding: 15px 16px 17px; }
.webcam-highlight-copy h3 { margin: 0; font-size: 17px; }
.webcam-highlight-copy p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.webcam-highlight-meta { margin-top: 11px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.webcam-status-card { padding: 15px; }
.webcam-camera-state { padding-bottom: 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.webcam-camera-state > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #61d789; background: rgba(97,215,137,.1); }
.webcam-camera-state.stale > span { color: #ef6b45; background: rgba(239,107,69,.1); }
.webcam-camera-state small, .webcam-camera-state strong { display: block; }
.webcam-camera-state small { color: var(--muted); font-size: 12px; }
.webcam-camera-state strong { margin-top: 3px; font-size: 16px; }
.webcam-status-facts { margin: 13px 0 0; }
.webcam-status-facts div { padding: 11px 1px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.webcam-status-facts dt { color: var(--muted); }
.webcam-status-facts dd { margin: 0; font-weight: 700; text-align: right; }
.webcam-status-note { margin-top: 14px; padding: 12px; border-radius: 9px; color: var(--muted); background: var(--panel-2); font-size: 12px; line-height: 1.55; }
.webcam-day-strip-card { margin-top: 14px; overflow: hidden; }
.webcam-day-strip { padding: 10px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(125px, 1fr); gap: 8px; overflow-x: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.webcam-frame { position: relative; min-width: 125px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #02080c; cursor: pointer; }
.webcam-frame img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; opacity: .76; transition: opacity .2s, transform .2s; }
.webcam-frame span { position: absolute; left: 7px; bottom: 7px; padding: 4px 7px; border-radius: 5px; color: #fff; background: rgba(2,15,24,.8); font-size: 12px; font-weight: 800; }
.webcam-frame:hover img, .webcam-frame.selected img { opacity: 1; transform: scale(1.025); }
.webcam-frame.current, .webcam-frame.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timelapse-tools { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); }
.timelapse-tool-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.timelapse-tool-group > span.timelapse-group-label { min-width: 78px; flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.archive-overview { margin-bottom: 14px; padding: 19px 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(120deg, var(--panel), rgba(239,57,57,.08)); }
.archive-overview-icon { width: 52px; height: 52px; padding-left: 3px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--accent); box-shadow: 0 8px 24px rgba(239,57,57,.25); font-size: 19px; }
.archive-overview h2 { margin: 2px 0 4px; font-size: 21px; }
.archive-overview p { margin: 0; color: var(--muted); font-size: 13px; }
.archive-overview-count { padding-left: 22px; border-left: 1px solid var(--line); text-align: right; }
.archive-overview-count strong, .archive-overview-count span { display: block; }
.archive-overview-count strong { color: var(--accent); font-size: 28px; }
.archive-overview-count span { max-width: 150px; color: var(--muted); font-size: 12px; }
.archive-layout { display: grid; grid-template-columns: minmax(350px, .78fr) minmax(480px, 1.45fr); gap: 14px; }
.archive-calendar-card { padding: 16px 18px 18px; }
.archive-calendar-label { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.archive-calendar-label span, .archive-calendar-label small { display: block; }
.archive-calendar-label span { font-size: 16px; font-weight: 800; }
.archive-calendar-label small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.calendar-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; }
.calendar-header h2 { margin: 0; font-size: 19px; text-transform: capitalize; }
.calendar-header button {
  width: 36px; height: 36px; color: var(--text); border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); cursor: pointer; font-size: 22px;
}
.calendar-weekdays, .archive-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { padding-bottom: 9px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }
.archive-calendar-grid { min-height: 245px; }
.archive-day {
  aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); border: 0; border-radius: 9px; background: transparent; font-size: 13px;
}
button.archive-day.available { position: relative; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; font-weight: 700; }
button.archive-day.available::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
button.archive-day.available:hover, button.archive-day.selected { color: #fff; border-color: var(--accent); background: var(--accent); }
button.archive-day.selected::after { background: #fff; }
.calendar-legend { margin-top: 13px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.calendar-legend i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.archive-player-card { min-height: auto; }
.archive-player-footer { min-height: 64px; padding: 11px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line-soft); }
.archive-player-footer small, .archive-player-footer strong { display: block; }
.archive-player-footer small { color: var(--muted); font-size: 11px; }
.archive-player-footer strong { margin-top: 3px; font-size: 14px; text-transform: capitalize; }
.archive-player-footer a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-2); font-size: 12px; font-weight: 700; }
.archive-player-footer a:hover { border-color: var(--accent); }
.records-card { padding: 14px; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.records-overview {
  margin-bottom: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel);
}
.records-overview > div { display: flex; align-items: center; gap: 12px; }
.records-overview-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 11px; background: var(--accent); font-size: 22px; }
.records-overview small, .records-overview strong { display: block; }
.records-overview small { margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.records-overview strong { font-size: 15px; }
.records-overview p { max-width: 470px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.records-overview p b { color: var(--text); }
.records-dashboard { columns: 2; column-gap: 14px; }
.record-category { width: 100%; margin: 0 0 14px; display: inline-block; overflow: hidden; break-inside: avoid; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.record-category > header { min-height: 59px; padding: 11px 14px; display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.record-category > header > span { width: 37px; height: 37px; display: grid; place-items: center; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, var(--panel-2)); font-size: 19px; }
.record-category h2 { margin: 0; font-size: 16px; }
.record-category > header small { color: var(--muted); font-size: 9px; }
.record-list { padding: 0 14px 8px; }
.record-item { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.record-item:last-child { border-bottom: 0; }
.record-item h3 { margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 650; }
.record-comparison { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.record-period { min-width: 0; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel-2); }
.record-period.current-year { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--panel-2)); }
.record-period small, .record-period strong, .record-period time { display: block; }
.record-period small { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.record-period.current-year small { color: var(--accent); }
.record-period strong { color: var(--text); font-size: 15px; line-height: 1.25; }
.record-period time { min-height: 14px; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.noaa-layout { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 14px; }
.noaa-mobile-picker { display: none; }
.noaa-browser { align-self: start; }
.noaa-navigation { max-height: 650px; padding: 2px 14px 16px; overflow-y: auto; }
.noaa-year { margin-top: 9px; border-top: 1px solid var(--line-soft); }
.noaa-year:first-child { border-top: 0; }
.noaa-year-button { width: 100%; padding: 12px 3px 8px; display: flex; justify-content: space-between; color: var(--text); border: 0; background: transparent; cursor: pointer; font-weight: 750; }
.noaa-months { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; padding-bottom: 7px; }
.noaa-months button {
  padding: 7px 4px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); cursor: pointer; font-size: 10px;
}
.noaa-months button:hover, .noaa-months button.active, .noaa-year-button.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.noaa-report-card { min-width: 0; width: 100%; overflow: hidden; }
.noaa-report {
  width: 100%; min-height: 590px; max-height: 76vh; margin: 0; padding: 24px 26px 30px; overflow: auto; box-sizing: border-box;
  color: var(--text); background: #031019; border-top: 1px solid var(--line-soft);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  font: clamp(14px, 1.38vw, 20px)/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre;
}
html[data-theme="light"] .noaa-report { color: #dceaf1; background: #071722; }

.archive-page-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.archive-date-control { padding: 7px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); }
.archive-date-control button { width: 42px; height: 42px; display: grid; place-items: center; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); cursor: pointer; font-size: 24px; }
.archive-date-control button:hover { border-color: var(--accent); }
.archive-date-control label span { display: block; margin: 0 2px 3px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.archive-date-control input { min-width: 170px; padding: 7px 9px; color: var(--text); border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 750; color-scheme: dark; }
html[data-theme="light"] .archive-date-control input { color-scheme: light; }
.archive-loading, .archive-unavailable { min-height: 180px; padding: 28px; display: grid; place-items: center; }
.archive-unavailable { align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.archive-unavailable strong { color: var(--text); font-size: 18px; }
.archive-day-header { margin-bottom: 14px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, var(--panel), color-mix(in srgb, var(--accent) 7%, var(--panel))); }
.archive-day-header h2 { margin: 3px 0 4px; font-size: 25px; text-transform: capitalize; }
.archive-day-header p { margin: 0; color: var(--muted); font-size: 13px; }
.archive-day-actions { display: flex; gap: 8px; }
.archive-day-actions button { padding: 10px 13px; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); cursor: pointer; font-weight: 700; }
.archive-day-actions button:hover { border-color: var(--accent); }
.archive-summary-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.archive-stat { padding: 14px; display: flex; align-items: center; gap: 12px; }
.archive-stat > span { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); font-size: 18px; font-weight: 800; }
.archive-stat.cold > span, .archive-stat.rain > span, .archive-stat.wind > span { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--panel-2)); }
.archive-stat.solar > span, .archive-stat.uv > span { color: #f2b84b; background: color-mix(in srgb, #f2b84b 10%, var(--panel-2)); }
.archive-stat small, .archive-stat strong, .archive-stat time { display: block; }
.archive-stat small { color: var(--muted); font-size: 10px; font-weight: 700; }
.archive-stat strong { margin-top: 2px; font-size: 18px; }
.archive-stat time { margin-top: 2px; color: var(--muted); font-size: 10px; }
.archive-story { margin-bottom: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.archive-story > span { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--accent); font-size: 20px; }
.archive-story small { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.archive-story p { margin: 4px 0 0; color: var(--text); font-size: 14px; line-height: 1.55; }
.archive-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.archive-chart.wide { grid-column: 1 / -1; }
.archive-chart .card-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.archive-chart > div[id] { height: 315px; }
.archive-chart.wide > div[id] { height: 350px; }
.archive-readings-card { margin-top: 14px; }
.archive-readings-card .card-heading { align-items: center; }
.archive-readings-card .card-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.archive-readings-card button { cursor: pointer; }
.archive-table-wrap { max-height: 70vh; overflow: auto; border-top: 1px solid var(--line-soft); scrollbar-width: thin; }
.archive-readings { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; }
.archive-readings th { position: sticky; z-index: 2; top: 0; padding: 10px 12px; color: var(--muted); background: var(--panel-2); text-align: right; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.archive-readings th:first-child, .archive-readings td:first-child { position: sticky; left: 0; text-align: left; }
.archive-readings th:first-child { z-index: 3; }
.archive-readings td:first-child { z-index: 1; color: var(--text); background: var(--panel); font-weight: 700; }
.archive-readings td { padding: 9px 12px; border-top: 1px solid var(--line-soft); color: var(--muted); text-align: right; }
.archive-readings tbody tr:hover td { color: var(--text); background-color: color-mix(in srgb, var(--accent) 5%, var(--panel)); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: var(--panel-2); }
.footer-inner {
  max-width: 1440px; margin: 0 auto; min-height: 84px; padding: 22px 28px 100px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 12px;
}
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-links a {
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line-soft);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.footer-links a:hover { color: var(--text); border-color: var(--accent); background: var(--panel-2); }
.mobile-nav { display: none; }

@media (max-width: 1120px) {
  .lightning-c-overview { grid-template-columns: minmax(200px,1.2fr) minmax(130px,.7fr) minmax(130px,.65fr) minmax(160px,.75fr) 126px; gap: 9px; }
  .longterm-records { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .brand { min-width: auto; }
  .desktop-nav a { padding: 0 11px; }
  .top-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .compact-radar { height: 420px; }
  .daily-cards { grid-template-columns: repeat(4, 1fr); }
  .forecast-summary { grid-template-columns: repeat(3, 1fr); }
  .forecast-summary-lead { grid-column: 1 / -1; }
  .chart-overview { grid-template-columns: repeat(2, 1fr); }
  .radar-workspace { grid-template-columns: 1fr; }
  .radar-sidebar { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 18px; }
  .radar-facts { grid-column: 1 / -1; }
  .radar-legend { align-self: end; }
  .webcam-live-layout { grid-template-columns: 1fr; }
  .webcam-status-card { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 14px; align-items: start; }
  .webcam-status-facts, .webcam-status-note { margin: 0; }
}

@media (max-width: 900px) {
  .dashboard-chart-canvas { height: 275px; }
  .dashboard-chart-canvas.tall { height: 315px; }
  .chart-container { height: 300px; }
  .temperature-chart { height: 320px; padding: 0 4px 6px; }
  .dashboard-chart-card-unified { padding: 14px 14px 10px; border-radius: 14px; }
  .dashboard-card-header { gap: 10px; margin-bottom: 10px; padding-bottom: 8px; }
  .dashboard-card-title-group { gap: 10px; }
  .dashboard-card-icon-badge { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; }
  .dashboard-card-title-text h4 { font-size: 16px; font-weight: 750; }
  .dashboard-card-title-text span { font-size: 11px; color: var(--muted); }
  .kpi-main-val { font-size: 18px; font-weight: 800; }
  .kpi-main-label { font-size: 11px; font-weight: 650; }
  .kpi-pill { padding: 4px 9px; }
  .kpi-pill strong { font-size: 12.5px; font-weight: 750; }
  .kpi-pill small { font-size: 10px; font-weight: 650; }
  .quiet-tag { font-size: 11px; padding: 2px 8px; font-weight: 700; }
  .card-chevron-wrap { width: 32px; height: 32px; flex: 0 0 32px; }
  .dashboard-comfort-heading { align-items: stretch; flex-wrap: wrap; }
  .dashboard-comfort-heading > div:first-child { width: 100%; }
  .comfort-current, .comfort-maximum { min-width: 0; flex: 1; }
  .comfort-message { align-items: flex-start; flex-wrap: wrap; }
  .comfort-message span { width: calc(100% - 15px); margin-left: 15px; color: var(--muted); font-weight: 500; }
  .dashboard-chart-canvas.comfort-timeline { height: 275px; }
  .dashboard-wind-timeline-heading { align-items: flex-start; flex-direction: column; }
  .wind-timeline-facts { width: 100%; }
  .wind-timeline-facts > span { min-width: 0; flex: 1; }
  .wind-timeline-facts strong { white-space: normal; }
  .dashboard-chart-canvas.wind-timeline { height: 275px; }
  .lightning-c-status { padding-inline: 10px; flex-wrap: wrap; text-align: center; }
  .lightning-c-status span { width: 100%; font-size: 9px; }
  .lightning-c-overview { padding: 12px; grid-template-columns: minmax(0,1fr) 112px; gap: 9px 12px; }
  .lightning-c-title { grid-column: 1 / -1; }
  .lightning-c-title b { font-size: 15px; }
  .lightning-c-value, .lightning-c-fact { grid-column: 1; padding: 7px 0 0; border-top: 1px solid var(--line-soft); border-left: 0; }
  .lightning-c-value { grid-row: 2; }
  .lightning-c-value strong { font-size: 28px; }
  .lightning-c-fact strong { margin-top: 2px; font-size: 14px; }
  .lightning-c-overview .lightning-radar { width: 112px; height: 112px; grid-column: 2; grid-row: 2 / span 3; align-self: center; }
  .lightning-radar.lightning-radar-compact { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; flex: 0 0 44px !important; aspect-ratio: 1 / 1 !important; border-radius: 50% !important; grid-column: auto; grid-row: auto; }
  .dashboard-chart-canvas.lightning-bars { height: 140px !important; }
  .longterm-notice { align-items: flex-start; flex-direction: column; }
  .longterm-records, .longterm-chart-grid { grid-template-columns: 1fr; }
  .longterm-chart-grid .chart-card-full { grid-column: auto; }
  .longterm-chart-card .chart-container { height: 310px; }
  .archive-page-intro, .archive-day-header { align-items: stretch; flex-direction: column; }
  .archive-date-control { width: 100%; }
  .archive-date-control label { flex: 1; }
  .archive-date-control input { width: 100%; min-width: 0; }
  .archive-day-header { padding: 16px; }
  .archive-day-header h2 { font-size: 21px; }
  .archive-day-actions { display: grid; grid-template-columns: repeat(2,1fr); }
  .archive-summary-grid, .archive-chart-grid { grid-template-columns: 1fr; }
  .archive-chart.wide { grid-column: auto; }
  .archive-stat { padding: 12px; }
  .archive-story { align-items: flex-start; }
  .archive-chart > div[id], .archive-chart.wide > div[id] { height: 285px; }
  body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .alerts-card { margin-top: 12px; }
  .alert-header { padding: 12px 14px; gap: 11px; }
  .alert-icon { font-size: 24px; }
  .alert-header-info { flex-direction: column; align-items: flex-start; gap: 4px; }
  .alerts-card strong { font-size: 15px; }
  .alert-validity { font-size: 11px; padding: 2px 8px; }
  .alert-chevron-wrap { width: 28px; height: 28px; }
  .alert-body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 10px 14px 14px 14px; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .header-inner { position: relative; height: 74px; padding: 0 17px; display: flex; align-items: center; justify-content: center; }
  .brand { min-width: 0; margin: 0 auto; }
  .brand-crest { width: 30px; height: 38px; }
  .brand-name { font-size: 19px; }
  .desktop-nav { display: none !important; }
  .menu-toggle {
    position: absolute; left: 14px; top: 14px; z-index: 10; width: 46px; height: 46px; padding: 11px;
    display: flex !important; flex-direction: column; justify-content: center; gap: 5px;
    border: 1px solid var(--line); border-radius: 10px; color: var(--text);
    background: var(--panel-2); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  }
  .menu-toggle span { width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu-backdrop {
    position: fixed; z-index: 1001; inset: 0; display: block !important; pointer-events: none;
    opacity: 0; visibility: hidden; background: rgba(2, 8, 14, .85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .22s ease, visibility .22s ease;
  }
  .mobile-menu {
    position: fixed; z-index: 1002; top: 0; bottom: 0; left: 0; width: min(94vw, 430px); height: 100vh; height: 100dvh;
    display: flex !important; flex-direction: column; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 14px);
    border-right: 1px solid var(--line); background: var(--bg) !important;
    box-shadow: 20px 0 60px rgba(0,0,0,.6); transform: translateX(-105%); transition: transform .22s ease, visibility .22s ease;
    overflow-y: auto; visibility: hidden;
  }
  .menu-open { overflow: hidden; }
  .menu-open .menu-backdrop { pointer-events: auto; opacity: 1; visibility: visible; }
  .menu-open .mobile-menu { transform: translateX(0); visibility: visible; }
  .mobile-menu-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; background: var(--bg); }
  .mobile-menu-head button, .mobile-menu-head-spacer { width: 40px; height: 40px; flex: 0 0 40px; }
  .mobile-menu-head button { border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--panel-2); font-size: 28px; line-height: 1; cursor: pointer; }
  .mobile-menu-brand { display: flex; align-items: center; gap: 9px; }
  .mobile-menu-brand img { width: 28px; height: 35px; object-fit: contain; }
  .mobile-menu-brand strong { font-size: 18px; letter-spacing: .3px; }
  .mobile-menu-brand strong b { color: var(--accent); }
  .mobile-menu-weather { min-height: 96px; margin-top: 8px; padding: 13px 15px; display: grid; grid-template-columns: minmax(0,1fr) auto 72px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, var(--panel-2), color-mix(in srgb, var(--panel-2) 82%, #164864)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
  .mobile-menu-weather div { min-width: 0; display: flex; flex-direction: column; }
  .mobile-menu-weather small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-menu-weather div strong { margin-top: 2px; font-size: 18px; }
  .mobile-menu-weather div span { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
  .mobile-menu-weather > b { font-size: 31px; font-weight: 650; letter-spacing: -1px; white-space: nowrap; }
  .mobile-menu-weather img { width: 72px; height: 62px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.28)); }
  .mobile-menu-links { padding: 10px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-menu-links a { min-height: 88px; padding: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); box-shadow: 0 2px 8px rgba(0,0,0,.15); text-align: center; }
  .mobile-menu-links a span { color: var(--accent); font-size: 29px; line-height: 1; }
  .mobile-menu-links a b { font-size: 14px; }
  .mobile-menu-links a.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
  .mobile-menu-secondary { margin-top: auto; padding-top: 9px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; border-top: 1px solid var(--line); background: var(--bg); }
  .mobile-menu-secondary a { min-width: 0; padding: 8px 3px; overflow: hidden; color: var(--muted); border-radius: 8px; background: var(--panel-2); font-size: 10px; font-weight: 700; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
  .theme-toggle { position: absolute; right: 14px; top: 14px; z-index: 10; width: 46px; height: 46px; border-radius: 12px; }
  .theme-icon { width: 23px; height: 23px; }
  .page { padding: 14px 10px 30px; }
  .page-intro { padding: 16px 3px 18px; }
  .page-intro h1 { font-size: 29px; }
  .page-intro p { font-size: 13px; }
  .card { border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); }
  .top-grid, .detail-grid, .station-grid { grid-template-columns: 1fr; }
  .detail-grid > .card { min-height: 0; }
  .radar-card { display: none; }
  .radar-status { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .radar-status article { min-height: 68px; padding: 10px; }
  .radar-control-panel { align-items: stretch; flex-direction: column; }
  .radar-layer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .radar-layer-tabs button { min-width: 0; padding-inline: 6px; }
  .radar-map-actions { padding-bottom: 2px; }
  .radar-sidebar { display: block; }
  .card-heading { padding: 13px 12px 9px; }
  .current-card > .card-heading { padding-left: 12px; padding-right: 12px; }
  .current-card .eyebrow { font-size: 13px; }
  .current-card .updated { font-size: 13px; padding: 4px 10px; }
  .card-heading h1 { font-size: 20px; }
  .current-main { min-height: 165px; gap: 12px; padding: 0 10px; }
  .weather-bg-layer { background-position: 58% center; }
  .weather-bg::before { background: linear-gradient(90deg, rgba(2,14,23,.7), rgba(3,17,27,.48)), linear-gradient(0deg, rgba(2,13,21,.82), transparent 65%); }
  .hero-weather-icon { order: 1; width: 130px; height: 112px; }
  .temperature-block { order: 2; min-width: 155px; }
  .hero-temp { font-size: 58px; }
  .condition { font-size: 18px; }
  .current-card .feels-like { font-size: 15px; }
  .current-card .aqi-pill { font-size: 14px; }
  .metric-grid { grid-template-columns: repeat(6, 1fr); margin: 0 10px 10px; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
  .metric { min-width: 0; min-height: 61px; gap: 7px; border-bottom: 1px solid var(--line-soft); }
  .metric small { font-size: 12px; }
  .metric strong { font-size: 16px; white-space: nowrap; }
  .metric-icon { font-size: 21px; }
  .metric:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
  .metric:nth-child(2) { grid-column: 1 / span 3; grid-row: 2; border-bottom: 0; }
  .metric:nth-child(3) { grid-column: 3 / span 2; grid-row: 1; }
  .metric:nth-child(4) { grid-column: 5 / span 2; grid-row: 1; border-right: 0; }
  .metric:nth-child(5) { grid-column: 4 / span 3; grid-row: 2; border-right: 0; border-bottom: 0; }
  .current-status-row { margin: -2px 12px 10px; }
  .current-status-row .location-line { font-size: 14px; }
  .hourly-card { margin-top: 10px; }
  .hourly-card .card-heading { align-items: center; }
  .hourly-heading-tools { gap: 7px; }
  .hourly-heading-tools .updated { display: none; }
  .hourly-interval-toggle button { padding-inline: 8px; }
  .hourly-strip { grid-auto-columns: 86px; min-height: 154px; }
  .hour-item { min-width: 86px; padding-inline: 7px; }
  .hour-item time { font-size: 12px; }
  .hour-meta { gap: 8px; font-size: 11px; }
  .detail-grid { margin-top: 10px; }
  .daily-cards { display: flex; overflow-x: auto; }
  .day-card { min-width: 170px; }
  .forecast-summary { grid-template-columns: 1fr; gap: 8px; }
  .forecast-summary-lead { grid-column: auto; }
  .forecast-summary-stat { min-height: 70px !important; padding: 11px 14px; }
  .temperature-chart { height: 300px; padding-inline: 2px; }
  .temperature-chart .highcharts-legend-item text { font-size: 9px !important; }
  .forecast-horizon { display: none; }
  .celestial-track { height: 112px; margin-inline: 10px; }
  .sun-times { padding-inline: 11px; }
  .sun-times > div { grid-template-columns: 34px 1fr; padding-inline: 8px; }
  .celestial-details-link { width: calc(100% - 24px); margin-inline: 12px; }
  .moon-row { grid-template-columns: 48px 1fr; gap: 11px; padding: 12px; }
  .moon-disc { width: 48px; height: 48px; }
  .moon-times { grid-column: 1 / -1; }
  .astronomy-dialog { width: calc(100vw - 20px); max-height: 88vh; }
  .astronomy-dialog-card { max-height: 88vh; }
  .astronomy-dialog-heading { padding: 15px; }
  .astronomy-details { padding: 12px; }
  .astronomy-details #celestial_details { grid-template-columns: 1fr; gap: 10px; }
  .astronomy-details .celestial_body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 10px; }
  .astronomy-details td { font-size: 11px; }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-navigation { position: static; }
  .chart-overview { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
  .chart-overview article { min-height: 68px; padding: 10px; }
  .chart-overview article > span { width: 29px; height: 29px; font-size: 15px; }
  .chart-overview small { font-size: 9px; }
  .chart-overview strong { font-size: 11px; }
  .chart-card-live { display: none; }
  .chart-result-heading { align-items: flex-start; gap: 10px; }
  .layout-actions { max-width: 185px; flex-wrap: wrap; }
  .layout-actions .updated { width: 100%; text-align: right; }
  .layout-button { padding: 7px 9px; font-size: 10px; }
  .layout-hint { line-height: 1.5; }
  .charts-grid.customizable-grid { grid-template-columns: 1fr; }
  .customizable-grid .chart-card { grid-column: 1 / -1 !important; }
  .dashboard-charts { margin-top: 25px; }
  .dashboard-section-heading h2 { font-size: 20px; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-chart-actions { width: 100%; overflow-x: auto; }
  .dashboard-all-charts { margin-left: 8px; }
  .dashboard-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-metric { padding: 12px 16px; }
  .dashboard-metric:nth-child(2) { border-right: 0; }
  .dashboard-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dashboard-chart-layout { grid-template-columns: 1fr; }
  .dashboard-chart-layout > * { grid-column: 1 !important; grid-row: auto !important; }
  .dashboard-day-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
  .dashboard-day-summary h3 { grid-column: 1 / -1; }
  .dashboard-extremes { display: none; }
  .dashboard-chart-canvas { height: 250px; }
  .dashboard-chart-canvas.small { height: 220px; }
  .chart-navigation { padding: 12px 10px 2px; }
  .range-group { display: block; }
  .range-label { display: block; padding: 0 3px 7px; }
  .range-group + .range-group { margin-top: 10px; padding-top: 10px; }
  .range-tabs:not(.year-tabs) { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .range-tabs button { min-width: 0; }
  .range-tabs button b { font-size: 12px; }
  .range-tabs button small { font-size: 9px; }
  .year-tabs { padding-bottom: 10px; overflow-x: auto; }
  .chart-card { min-height: 310px; }
  .chart-container { height: 290px; }

  /* Mobile Fullscreen Radar View */
  body[data-page="radar"] .page.radar-page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  body[data-page="radar"] .radar-page .page-intro,
  body[data-page="radar"] .radar-page .radar-alert,
  body[data-page="radar"] .radar-page .radar-status,
  body[data-page="radar"] .radar-page .radar-control-panel,
  body[data-page="radar"] .radar-page .radar-sidebar,
  body[data-page="radar"] .radar-page .radar-timeline-card {
    display: none !important;
  }
  body[data-page="radar"] .radar-workspace {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 62px - 64px) !important;
    height: calc(100dvh - 62px - 64px) !important;
    min-height: 520px !important;
  }
  body[data-page="radar"] .radar-full-card {
    height: 100% !important;
    min-height: 520px !important;
    display: flex !important;
    flex-direction: column !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    background: var(--bg) !important;
  }
  body[data-page="radar"] .radar-full-card .card-heading {
    min-height: 48px !important;
    padding: 8px 10px !important;
    background: var(--panel-2) !important;
    border-bottom: 1px solid var(--line) !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
  }
  body[data-page="radar"] .radar-provider-nav {
    display: flex !important;
    overflow-x: auto !important;
    gap: 6px !important;
    width: 100% !important;
    padding-bottom: 2px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body[data-page="radar"] .radar-provider-nav::-webkit-scrollbar {
    display: none !important;
  }
  body[data-page="radar"] .radar-nav-sep {
    display: none !important;
  }
  body[data-page="radar"] .radar-nav-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    background: var(--panel) !important;
    border: 1px solid var(--line) !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
  }
  body[data-page="radar"] .radar-nav-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
  }
  body[data-page="radar"] .full-radar,
  body[data-page="radar"] .radar-frame {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 460px !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  body[data-page="radar"] #radar-iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block !important;
  }
  .compact-current { grid-template-columns: 42px auto 1fr; }
  .compact-current small { grid-column: 2/-1; }
  .station-hero { grid-column: auto; grid-template-columns: 1fr; padding: 18px; }
  .station-hero img { max-height: 130px; }
  .station-hero h2 { font-size: 21px; }
  .prose { padding: 18px; }
  .media-tabs { width: 100%; }
  .media-tabs button { flex: 1; padding: 9px 8px; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-overview { grid-template-columns: auto 1fr; }
  .archive-overview-count { grid-column: 1 / -1; padding: 12px 0 0; display: flex; align-items: baseline; gap: 8px; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .archive-overview-count span { max-width: none; }
  .records-card { padding: 0; }
  .records-overview { margin-bottom: 10px; padding: 13px; display: block; }
  .records-overview > div { margin-bottom: 10px; }
  .records-overview p { max-width: none; text-align: left; }
  .records-dashboard { columns: 1; }
  .record-category { margin-bottom: 10px; border-radius: 12px; }
  .record-category > header { position: sticky; top: 0; z-index: 2; background: var(--panel); }
  .record-list { padding: 0 11px 6px; }
  .record-item { padding: 12px 0; }
  .record-item h3 { font-size: 11px; }
  .record-period { padding: 9px; }
  .record-period strong { font-size: 14px; }
  .record-period time { font-size: 8px; }
  .noaa-layout { grid-template-columns: 1fr; }
  .noaa-browser { display: none; }
  .noaa-mobile-picker { display: block; margin-bottom: 10px; }
  .noaa-mobile-picker label { display: block; margin: 0 3px 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .noaa-mobile-picker select {
    width: 100%; min-height: 46px; padding: 0 38px 0 13px; color: var(--text);
    border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2);
    font-size: 14px;
  }
  .noaa-report-card .card-heading { flex-wrap: wrap; gap: 8px; }
  .noaa-report-card .card-heading h2 { max-width: calc(100% - 100px); }
  .noaa-report { min-height: 520px; max-height: none; padding: 16px 14px 22px; font-size: 11px; line-height: 1.5; }
  .archive-player-card { min-height: 300px; }
  .longterm-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .longterm-video-links { grid-template-columns: 1fr; }
  .longterm-video-grid { grid-template-columns: 1fr; }
  .webcam-highlight-grid { grid-template-columns: 1fr; }
  .archive-placeholder { min-height: 260px; }
  .archive-overview { padding: 15px; gap: 12px; }
  .archive-overview-icon { width: 44px; height: 44px; }
  .archive-overview h2 { font-size: 18px; }
  .archive-overview p { font-size: 12px; }
  .archive-player-footer { align-items: flex-start; flex-direction: column; }
  .webcam-viewer img, .webcam-video { max-height: 62vh; }
  .webcam-image-stage { min-height: 260px; }
  .webcam-image-stage > img { max-height: 62vh; }
  .webcam-weather-overlay { grid-template-columns: repeat(2, 1fr); left: 8px; right: 8px; bottom: 8px; padding: 9px; gap: 8px; }
  .webcam-overlay-main { grid-column: 1 / -1; }
  .webcam-weather-overlay > div:nth-child(n+5) { display: none; }
  .webcam-image-badge { left: 6px; bottom: 6px; padding: 7px 9px; border-radius: 7px; }
  .webcam-image-badge span { font-size: 11px; }
  .webcam-image-badge small { margin-top: 2px; font-size: 10px; }
  .webcam-status-card { display: block; }
  .webcam-status-facts { margin-top: 12px; }
  .webcam-day-strip { grid-auto-columns: 118px; }
  .footer-inner { padding: 22px 16px calc(92px + env(safe-area-inset-bottom)); display: block; text-align: center; line-height: 1.7; }
  .footer-links { justify-content: center; margin-top: 12px; gap: 8px; }
  .mobile-nav {
    position: fixed; z-index: 999; left: 0; right: 0; bottom: 0;
    height: calc(74px + env(safe-area-inset-bottom)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
    background: color-mix(in srgb, var(--panel) 94%, var(--bg)) !important;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.4);
  }
  .mobile-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600;
    border: 0; background: transparent; cursor: pointer; padding: 5px 2px;
    border-radius: 12px; font-family: inherit; text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease;
  }
  .mobile-nav a span {
    font-size: 24px; line-height: 1; display: inline-block;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .mobile-nav a small {
    display: block; font-size: 11px; font-weight: 650; line-height: 1.1; letter-spacing: -0.01em;
  }
  .mobile-nav a.active {
    color: var(--accent); font-weight: 750;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
  }
  .mobile-nav a.active span {
    transform: translateY(-2px) scale(1.16);
  }
}00;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-bg-layer, .weather-bg-effect,
  .weather-bg-effect::before, .weather-bg-effect::after { animation: none !important; }
  .weather-bg-layer { transition-duration: .2s; }
}

@media (max-width: 390px) {
  .hero-weather-icon { width: 106px; }
  .current-main { justify-content: space-between; }
  .temperature-block { min-width: 145px; }
  .daily-list { padding-inline: 8px; }
  .daily-row { grid-template-columns: 58px 34px minmax(65px, 1fr) 55px 46px; gap: 5px; padding-inline: 4px; font-size: 10px; }
}

.heatmap-toolbar{align-items:flex-start}
.heatmap-primary-tabs{width:100%;padding-bottom:12px;border-bottom:1px solid var(--line-soft)}
.heatmap-primary-tabs button{font-weight:750}
.heatmap-years{display:grid;gap:18px}
.heatmap-year-section{padding:14px;border:1px solid var(--line-soft);border-radius:11px;background:var(--panel-2)}
.heatmap-year-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.heatmap-year-heading h3{margin:0;font-size:18px}
.heatmap-year-heading span{color:var(--muted);font-size:10px}

@media(max-width:700px){
  .heatmap-shell{padding:12px 8px}
  .heatmap-year-section{padding:10px 5px}
  .heatmap-year{width:100%;overflow:visible}
  .heatmap-year-grid{width:100%;min-width:0;grid-template-columns:16px repeat(53,minmax(0,1fr));grid-template-rows:16px repeat(7,7px);gap:2px}
  .heatmap-cell{min-width:0;border-radius:1px}
  .heatmap-month-name{font-size:7px;line-height:1;white-space:nowrap;overflow:visible}
  .heatmap-weekday{font-size:7px;line-height:1}
  .heatmap-year-heading{margin:0 3px 8px}
  .heatmap-year-heading h3{font-size:16px}
  .heatmap-primary-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .heatmap-primary-tabs button{width:100%;padding:8px 5px;font-size:10px}
}

@media(max-width:700px){
  body[data-page="charts"] .page-intro .eyebrow{font-size:11px}
  body[data-page="charts"] .page-intro h1{font-size:27px}
  body[data-page="charts"] .page-intro p{font-size:13px;line-height:1.55}
  body[data-page="charts"] .range-label{font-size:11px}
  body[data-page="charts"] .range-tabs button b{font-size:14px}
  body[data-page="charts"] .range-tabs button small{font-size:11px}
  body[data-page="charts"] .range-tab-icon{font-size:14px}
  body[data-page="charts"] .chart-overview small{font-size:10px}
  body[data-page="charts"] .chart-overview strong{font-size:14px}
  body[data-page="charts"] .chart-result-heading .eyebrow{font-size:10px}
  body[data-page="charts"] .chart-result-heading h2{font-size:21px}
  body[data-page="charts"] .chart-card-heading h3{font-size:17px}
  body[data-page="charts"] .chart-card-heading small{font-size:11px;line-height:1.4}
  body[data-page="charts"] .chart-card-live,body[data-page="charts"] .updated{font-size:10px}
  body[data-page="charts"] .highcharts-axis-labels text,body[data-page="charts"] .highcharts-legend-item text{font-size:12px!important}
  body[data-page="charts"] .highcharts-tooltip text{font-size:12px!important}
  body[data-page="charts"] .heatmap-primary-tabs button,body[data-page="charts"] .heatmap-controls button{font-size:12px}
  body[data-page="charts"] .heatmap-year-heading h3{font-size:19px}
  body[data-page="charts"] .heatmap-year-heading span{font-size:11px}
  body[data-page="charts"] .heatmap-month-name,body[data-page="charts"] .heatmap-weekday{font-size:8px}
  body[data-page="charts"] .heatmap-legend{font-size:11px}
  body[data-page="charts"] .heatmap-stat small{font-size:10px}
  body[data-page="charts"] .heatmap-stat strong{font-size:17px}
}


/* --- AIR QUALITY STYLES --- */
/* Page Container & Grid Layout */
.air-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  color: var(--text);
  font-family: inherit;
}

/* Header Section */
.air-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.air-intro h1 {
  margin: 0 0 6px 0;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}
.air-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.air-sensor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: color-mix(in srgb, #10b981 12%, var(--panel));
  border: 1px solid color-mix(in srgb, #10b981 30%, var(--line));
  color: #10b981;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
html[data-theme="light"] .air-sensor-badge {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

/* Card Base Styling (Dark & Light Theme Compatible) */
.air-page .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* 1. Main Hero Card */
.air-hero-card {
  margin-bottom: 16px;
  padding: 24px 28px;
}
.air-hero-grid {
  display: grid;
  grid-template-columns: 0.75fr 3fr 1.6fr;
  gap: 24px;
  align-items: stretch;
}
.air-hero-col {
  display: flex;
  flex-direction: column;
}
.air-hero-pm {
  border-right: 1px solid var(--line-soft);
  padding-right: 18px;
  text-align: center;
  align-items: center;
}
.hero-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}
.pm-value-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 6px;
}
.pm-value-wrap strong {
  font-size: 96px;
  font-weight: 800;
  line-height: 0.95;
  color: #61d789;
  letter-spacing: -0.05em;
}
html[data-theme="light"] .pm-value-wrap strong {
  color: #059669;
}
.pm-unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
}
.pm-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  text-align: center;
}

/* Hero Col 2: Scale */
.air-hero-scale {
  border-right: 1px solid var(--line-soft);
  padding-right: 24px;
  padding-left: 6px;
}
.scale-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}
.scale-header p {
  margin: 3px 0 16px;
  font-size: 12px;
  color: var(--muted);
}

/* Scale Bar & Pin */
.pm-scale-container {
  position: relative;
  margin-top: 36px;
  padding-top: 10px;
}
.pm-pin-wrapper {
  position: absolute;
  top: -36px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}
.pm-pin-badge {
  background: #61d789;
  color: #071722;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border: 2px solid #ffffff;
}
.pm-pin-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #ffffff;
  margin-top: -1px;
}

.pm-scale-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  gap: 2px;
  background: var(--line-soft);
}
.seg-sehr-gut { background: #61d789; }
.seg-gut { background: #84cc16; }
.seg-maessig { background: #eab308; }
.seg-schlecht { background: #f97316; }
.seg-sehr-schlecht { background: #ef4444; }

.pm-scale-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.pm-scale-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 14px;
  text-align: center;
}
.lbl-col strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}
.lbl-col small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.col-sehr-gut strong { color: #61d789; }
.col-gut strong { color: #84cc16; }
.col-maessig strong { color: #eab308; }
.col-schlecht strong { color: #f97316; }
.col-sehr-schlecht strong { color: #ef4444; }

html[data-theme="light"] .col-sehr-gut strong { color: #059669; }
html[data-theme="light"] .col-gut strong { color: #65a30d; }

/* Hero Col 3: Status & Action Badges */
.air-hero-status {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.status-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.status-circle-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: color-mix(in srgb, #38bdf8 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, #38bdf8 30%, var(--line));
  display: grid;
  place-items: center;
  color: #38bdf8;
  flex-shrink: 0;
}
html[data-theme="light"] .status-circle-icon {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}
.status-text-wrap h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  color: #61d789;
}
html[data-theme="light"] .status-text-wrap h2 {
  color: #059669;
}
.status-text-wrap p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.status-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.action-info span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.action-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #61d789;
}
html[data-theme="light"] .action-info strong {
  color: #059669;
}

.who-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid color-mix(in srgb, #38bdf8 30%, var(--line));
  margin-top: auto;
}
.who-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.who-info small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

/* 2. Metrics Strip (5 Cards Row) */
.air-metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.metric-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-cyan {
  background: color-mix(in srgb, #38bdf8 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, #38bdf8 25%, var(--line));
  color: #38bdf8;
}
.icon-blue {
  background: color-mix(in srgb, #60a5fa 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, #60a5fa 25%, var(--line));
  color: #60a5fa;
}
.icon-green {
  background: color-mix(in srgb, #61d789 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, #61d789 25%, var(--line));
  color: #61d789;
}
.icon-trend {
  background: color-mix(in srgb, #61d789 12%, var(--panel-2));
  border: 1px solid color-mix(in srgb, #61d789 25%, var(--line));
  color: #61d789;
}

html[data-theme="light"] .icon-cyan { color: #0284c7; }
html[data-theme="light"] .icon-blue { color: #2563eb; }
html[data-theme="light"] .icon-green { color: #059669; }
html[data-theme="light"] .icon-trend { color: #059669; }

.metric-body small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.metric-body strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.metric-sub {
  display: block;
  font-size: 11px;
  color: #61d789;
  margin-top: 1px;
}
html[data-theme="light"] .metric-sub {
  color: #059669;
}

/* 3. Lower Section Grid (Chart Left, Side Stack Right) */
.air-content-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

/* Left: Chart Card */
.air-chart-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.heading-titles h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.chart-range-pills {
  display: flex;
  gap: 4px;
  background: var(--panel-2);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.pill-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pill-btn:hover {
  color: var(--text);
}
.pill-btn.active {
  background: color-mix(in srgb, #61d789 18%, var(--panel));
  color: #61d789;
  border: 1px solid color-mix(in srgb, #61d789 35%, var(--line));
}
html[data-theme="light"] .pill-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
}

.air-chart {
  height: 310px;
  width: 100%;
  flex: 1;
}

/* Insight Box */
.air-insight {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.insight-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, #61d789 15%, var(--panel));
  color: #61d789;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
html[data-theme="light"] .insight-icon-box {
  color: #059669;
}
.insight-content strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.insight-content small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Right: Side Cards Stack */
.air-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}
.air-side-card {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Card 1: AQI Explanation */
.card-aqi-explain .card-heading {
  margin-bottom: 12px;
}
.card-aqi-explain h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.card-aqi-explain small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.aqi-mini-scale-container {
  position: relative;
  margin-top: 28px;
}
.aqi-pin-wrapper {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}
.aqi-pin-badge {
  background: #61d789;
  color: #071722;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #ffffff;
}
.aqi-pin-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #ffffff;
  margin-top: -1px;
}

.aqi-mini-scale-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  background: var(--line-soft);
}
.aqi-gut { background: #61d789; }
.aqi-maessig { background: #eab308; }
.aqi-empfindlich { background: #f97316; }
.aqi-ungesund { background: #ef4444; }

.aqi-mini-scale-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
  text-align: center;
}
.aqi-lbl strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.aqi-lbl span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}

.aqi-explain-footer {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Card 2: Weather Impact */
.card-weather-impact h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.weather-impact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.impact-col {
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.impact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.impact-header small {
  font-size: 12px;
  color: var(--muted);
}
.impact-col strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.impact-sub {
  display: block;
  font-size: 10px;
  color: #61d789;
  margin-top: 3px;
}
html[data-theme="light"] .impact-sub {
  color: #059669;
}

/* Card 3: Today Peaks */
.card-today-peaks h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.peaks-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.peak-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.peak-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.peak-high {
  background: color-mix(in srgb, #f97316 15%, var(--panel));
  color: #f97316;
}
.peak-low {
  background: color-mix(in srgb, #61d789 15%, var(--panel));
  color: #61d789;
}
html[data-theme="light"] .peak-low {
  color: #059669;
}
.peak-info small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.peak-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.peak-time {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

/* 4. Bottom Info Card */
.air-bottom-info {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
}
.info-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, #38bdf8 12%, var(--panel-2));
  color: #38bdf8;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
html[data-theme="light"] .info-icon-box {
  color: #0284c7;
}
.info-text-left {
  flex: 1;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.info-text-left strong {
  color: var(--text);
}
.info-text-right {
  font-size: 11px;
  color: var(--muted);
  max-width: 310px;
  text-align: right;
}

/* Responsive Layout */
@media (max-width: 1100px) {
  .air-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .air-hero-pm, .air-hero-scale {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding-right: 0;
    padding-bottom: 20px;
  }
  .air-metrics-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .air-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .air-intro {
    flex-direction: column;
    align-items: flex-start;
  }
  .air-metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
  .weather-impact-cols, .peaks-cols {
    grid-template-columns: 1fr;
  }
  .air-bottom-info {
    flex-direction: column;
    align-items: flex-start;
  }
  .info-text-right {
    text-align: left;
    max-width: none;
  }
}


/* --- SOIL STYLES --- */
.soil-page{max-width:1440px}.soil-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:8px 2px 22px}.soil-intro h1{margin:5px 0 4px;font-size:clamp(30px,4vw,48px);letter-spacing:-.035em}.soil-intro p{margin:0;color:var(--muted);font-size:16px}.soil-demo-badge{padding:9px 14px;border:1px solid color-mix(in srgb,#61d789 35%,var(--line));border-radius:22px;background:color-mix(in srgb,#61d789 10%,var(--panel));color:#8ce4ab;font-size:11px;font-weight:750;white-space:nowrap}.soil-demo-badge i{display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:#61d789;box-shadow:0 0 10px #61d789}
.soil-zone-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.soil-zone-tabs button{min-width:0;padding:13px 17px;display:grid;grid-template-columns:36px 1fr;grid-template-rows:auto auto;text-align:left;color:var(--text);border:1px solid var(--line);border-radius:13px;background:var(--panel);cursor:pointer;transition:.2s ease}.soil-zone-tabs button:hover{border-color:#4f768c;transform:translateY(-1px)}.soil-zone-tabs button.active{border-color:#61d789;background:linear-gradient(135deg,color-mix(in srgb,#61d789 13%,var(--panel)),var(--panel));box-shadow:inset 0 0 0 1px color-mix(in srgb,#61d789 12%,transparent)}.soil-zone-tabs button>span{grid-row:1/3;font-size:25px}.soil-zone-tabs b{font-size:14px}.soil-zone-tabs small{margin-top:2px;color:var(--muted);font-size:11px}.soil-zone-tabs button.active small{color:#7fdca0}
.soil-overview{display:grid;grid-template-columns:1.6fr .9fr;gap:14px}.soil-card-top{padding:18px 20px 0;display:flex;justify-content:space-between}.soil-card-top h2{margin:4px 0 0;font-size:18px}.soil-gauge-wrap{padding:16px 22px;display:flex;align-items:center;gap:24px}.soil-gauge{--moisture:62%;width:156px;height:156px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:conic-gradient(#61d789 var(--moisture),rgba(97,215,137,.09) 0);position:relative;transition:background .35s}.soil-gauge:before{content:"";position:absolute;inset:12px;border-radius:50%;background:var(--panel-2);box-shadow:inset 0 0 25px rgba(0,0,0,.18)}.soil-gauge>div{position:relative;text-align:center}.soil-gauge strong{display:block;font-size:49px;line-height:.9;font-weight:420;letter-spacing:-3px}.soil-gauge span{color:var(--muted);font-size:10px;font-weight:750}.soil-state{display:grid;grid-template-columns:9px 1fr;gap:3px 9px}.soil-state i{width:9px;height:9px;margin-top:5px;border-radius:50%;background:#61d789;box-shadow:0 0 12px #61d789}.soil-state strong{font-size:20px}.soil-state small{grid-column:2;color:var(--muted)}.soil-depths{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line-soft);background:rgba(2,16,25,.16)}.soil-depths>div{padding:16px 18px;border-right:1px solid var(--line-soft);display:grid;grid-template-columns:27px 1fr}.soil-depths>div:last-child{border:0}.soil-depths small,.soil-depths strong,.soil-depths em{grid-column:2}.soil-depths small{color:var(--muted);font-size:10px}.soil-depths strong{margin:2px 0;font-size:18px}.soil-depths em{color:#6dcf91;font-size:10px;font-style:normal}.depth-icon{grid-row:1/4;width:17px;height:34px;margin-top:2px;border:1px solid #795b3c;border-radius:9px;background:linear-gradient(#6d9c58 0 24%,#735033 25%)}.depth-icon.deep{height:43px;background:linear-gradient(#6d9c58 0 14%,#735033 15%)}.soil-temp-icon{grid-row:1/4;font-size:19px}
.irrigation-card{padding:22px;position:relative;background:radial-gradient(circle at 100% 0,color-mix(in srgb,#61d789 14%,transparent),transparent 48%),var(--panel)}.irrigation-icon{width:48px;height:48px;margin-bottom:25px;display:grid;place-items:center;border-radius:15px;color:#082116;background:#61d789;font-size:24px;font-weight:900;box-shadow:0 8px 24px rgba(97,215,137,.2)}.irrigation-card h2{margin:5px 0 8px;font-size:26px}.irrigation-card>p{min-height:58px;margin:0;color:var(--muted);line-height:1.5}.irrigation-card[data-mode="watch"]{background:radial-gradient(circle at 100% 0,rgba(242,184,75,.14),transparent 48%),var(--panel)}.irrigation-card[data-mode="watch"] .irrigation-icon{background:#f2b84b}.irrigation-card[data-mode="dry"]{background:radial-gradient(circle at 100% 0,rgba(86,188,232,.17),transparent 48%),var(--panel)}.irrigation-card[data-mode="dry"] .irrigation-icon{background:#56bce8}.irrigation-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:17px 0}.irrigation-facts div{padding:10px;border:1px solid var(--line-soft);border-radius:9px;background:rgba(2,16,25,.2)}.irrigation-facts small{display:block;color:var(--muted);font-size:9px}.irrigation-facts strong{font-size:12px}.decision-path{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:9px;font-weight:700}.decision-path span{padding:5px 7px;border:1px solid var(--line);border-radius:12px}.decision-path span.done{color:#76d99a}.decision-path i{height:1px;flex:1;background:var(--line)}
.soil-main-grid{display:grid;grid-template-columns:1.65fr .75fr;gap:14px;margin-top:14px}.soil-history-card .card-heading{padding:18px 20px}.soil-history-card .card-heading small{display:block;margin-top:4px;color:var(--muted);font-size:10px}.soil-legend{display:flex;gap:12px;color:var(--muted);font-size:10px}.soil-legend span:before{content:"";display:inline-block;width:12px;height:3px;margin-right:5px;vertical-align:middle;border-radius:3px;background:#61d789}.soil-legend .root:before{background:#56bce8}.soil-legend .rain:before{background:#4b83af;height:7px}.soil-chart{height:320px;padding:8px 20px 0 45px;position:relative}.soil-chart svg{width:100%;height:270px;overflow:visible}.grid-lines path{fill:none;stroke:var(--line-soft);stroke-width:1;vector-effect:non-scaling-stroke}.soil-area{fill:url(#soilFill)}.soil-line{fill:none;stroke-width:3;stroke-linecap:round;vector-effect:non-scaling-stroke}.surface-line{stroke:#61d789}.root-line{stroke:#56bce8;stroke-width:2.5}.rain-bars rect{fill:#397da7;opacity:.45}.chart-now{fill:#61d789;stroke:var(--panel);stroke-width:4;vector-effect:non-scaling-stroke}.chart-y-labels{position:absolute;left:13px;top:22px;bottom:69px;display:flex;flex-direction:column;justify-content:space-between;color:var(--muted);font-size:9px}.chart-days{display:flex;justify-content:space-between;padding-left:1%;color:var(--muted);font-size:10px}.rain-impact{margin:2px 20px 20px;padding:13px 14px;display:flex;align-items:center;gap:12px;border:1px solid rgba(86,188,232,.19);border-radius:11px;background:rgba(86,188,232,.07)}.rain-impact-icon{font-size:23px}.rain-impact div{flex:1}.rain-impact strong{display:block;font-size:12px}.rain-impact small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.impact-pill{padding:6px 9px;color:#76d99a;border-radius:14px;background:rgba(97,215,137,.1);font-size:10px;font-weight:750}
.soil-side-stack{display:grid;gap:14px}.soil-profile-card .card-heading,.soil-threshold-card .card-heading{padding:17px 18px}.soil-cutaway{margin:12px 18px 18px;position:relative;border-radius:12px;overflow:hidden}.plant{height:62px;display:flex;justify-content:center;position:relative;background:linear-gradient(#0e2a39,#234735)}.plant span{font-size:39px;transform:translateY(10px)}.plant i{position:absolute;left:50%;top:48px;width:2px;height:72px;background:#bf9868;z-index:2}.soil-layer{height:72px;padding:12px 15px;position:relative;color:#f8ede2;background:#66482f;border-top:1px solid rgba(255,255,255,.08)}.soil-layer.rootsoil{background:#543923}.soil-layer.subsoil{height:55px;background:#3d2c20}.soil-layer span,.soil-layer b{position:relative;z-index:3;font-size:10px}.soil-layer b{float:right}.soil-layer div{height:5px;margin-top:11px;border-radius:4px;background:rgba(0,0,0,.25);overflow:hidden}.soil-layer div i{display:block;height:100%;border-radius:4px;background:#60bfe0}.soil-threshold-card>p{margin:3px 18px 18px;color:var(--muted);font-size:10px;line-height:1.5}.threshold-scale{display:grid;grid-template-columns:.8fr 1.4fr .8fr;margin:10px 18px}.threshold-scale div{padding:10px 7px;text-align:center;border:1px solid var(--line-soft);color:#ef7b72;background:rgba(239,63,55,.06)}.threshold-scale div:first-child{border-radius:8px 0 0 8px}.threshold-scale div:last-child{border-radius:0 8px 8px 0;color:#68bee8;background:rgba(86,188,232,.06)}.threshold-scale div.optimal{color:#78d99b;background:rgba(97,215,137,.08)}.threshold-scale span,.threshold-scale b{display:block;font-size:9px}.threshold-scale b{margin-top:3px}
.soil-value-card{margin-top:14px}.soil-value-card .card-heading{padding:18px 20px}.soil-value-grid{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line-soft)}.soil-value-grid>div{padding:20px;border-right:1px solid var(--line-soft)}.soil-value-grid>div:last-child{border:0}.soil-value-grid span{color:#61d789;font-size:11px;font-weight:800}.soil-value-grid strong{display:block;margin:9px 0 6px;font-size:14px}.soil-value-grid p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
@media(max-width:900px){.soil-overview,.soil-main-grid{grid-template-columns:1fr}.soil-value-grid{grid-template-columns:1fr 1fr}.soil-value-grid>div:nth-child(2){border-right:0}.soil-value-grid>div{border-bottom:1px solid var(--line-soft)}}
@media(max-width:600px){.soil-intro{align-items:flex-start;flex-direction:column}.soil-zone-tabs{grid-template-columns:1fr}.soil-overview{display:block}.irrigation-card{margin-top:12px}.soil-gauge-wrap{gap:14px}.soil-gauge{width:124px;height:124px}.soil-gauge strong{font-size:39px}.soil-depths{grid-template-columns:1fr}.soil-depths>div{border-right:0;border-bottom:1px solid var(--line-soft)}.soil-history-card{overflow-x:auto}.soil-chart{min-width:620px}.soil-legend{display:none}.rain-impact{min-width:580px}.soil-value-grid{grid-template-columns:1fr}.soil-value-grid>div{border-right:0}.soil-demo-badge{white-space:normal}}

/* Live soil page: more readable typography and installation cross-section. */
.soil-page .eyebrow{font-size:12px}.soil-intro p{font-size:18px;line-height:1.5}.soil-demo-badge{font-size:13px}.soil-card-top h2,.soil-page .card-heading h2{font-size:21px}.soil-card-top .updated{font-size:12px}.soil-state strong{font-size:23px}.soil-state small{font-size:13px;line-height:1.45}.soil-depths small{font-size:12px}.soil-depths strong{font-size:20px}.soil-depths em{font-size:12px}.irrigation-card>p{font-size:15px}.irrigation-facts small,.decision-path{font-size:11px}.irrigation-facts strong{font-size:14px}.soil-history-card .card-heading small,.soil-legend,.rain-impact small,.soil-threshold-card>p{font-size:12px}.rain-impact strong{font-size:14px}.threshold-scale span,.threshold-scale b{font-size:11px}
.soil-installation-card{overflow:hidden}.soil-installation-card .card-heading{padding:17px 18px}.soil-installation{height:300px;margin:0 18px 15px;position:relative;overflow:hidden;border:1px solid rgba(115,174,201,.2);border-radius:14px;background:#8ed1e8}.install-sky{height:92px;position:relative;overflow:hidden;background:linear-gradient(#63bde1,#bce9ef)}.install-sun{width:35px;height:35px;position:absolute;right:24px;top:17px;border-radius:50%;background:#ffd45d;box-shadow:0 0 25px rgba(255,212,93,.7)}.install-cloud{width:52px;height:15px;position:absolute;left:25px;top:29px;border-radius:20px;background:rgba(255,255,255,.82);box-shadow:14px -8px 0 -2px rgba(255,255,255,.82),29px 0 0 -5px rgba(255,255,255,.82)}.install-cloud.cloud-two{left:120px;top:57px;transform:scale(.65);opacity:.75}.install-grass{height:17px;position:relative;z-index:5;background:repeating-linear-gradient(72deg,#2e8b45 0 3px,#67c65f 3px 6px,#348d48 6px 9px);border-bottom:4px solid #3c7d38;box-shadow:0 -5px 12px rgba(37,105,56,.28)}.install-earth{height:191px;position:relative;background:radial-gradient(circle at 18% 24%,#8c6848 0 3px,transparent 4px),radial-gradient(circle at 72% 68%,#3d2b20 0 2px,transparent 3px),radial-gradient(circle at 42% 82%,#a37a52 0 3px,transparent 4px),linear-gradient(#755138,#4a3225)}.install-earth>small{position:absolute;left:13px;bottom:10px;color:rgba(255,244,226,.7);font-size:11px;font-weight:700}.root{width:2px;height:65px;position:absolute;top:0;background:#c6a06c;transform-origin:top}.root:after{content:"";width:2px;height:30px;position:absolute;left:0;top:30px;background:#c6a06c;transform:rotate(35deg);transform-origin:top}.root-one{left:28%;transform:rotate(-13deg)}.root-two{left:74%;height:50px;transform:rotate(16deg)}.install-sensor{position:absolute;left:47%;top:-42px;width:52px;height:155px;z-index:6}.sensor-head{width:52px;height:69px;display:grid;place-items:center;position:relative;border:2px solid #aeb8bd;border-radius:8px;background:linear-gradient(145deg,#35444b,#1c272c);box-shadow:0 7px 16px rgba(0,0,0,.3)}.sensor-head i{width:8px;height:8px;position:absolute;right:7px;top:7px;border-radius:50%;background:#61d789;box-shadow:0 0 8px #61d789}.sensor-head b{color:#eaf2f4;font-size:10px;letter-spacing:.08em}.sensor-probe{width:9px;height:87px;display:block;margin:auto;background:linear-gradient(90deg,#89979c,#d4dcde 48%,#718086);border-radius:0 0 5px 5px;box-shadow:2px 3px 5px rgba(0,0,0,.25)}.install-sensor em{position:absolute;left:64px;top:52px;width:max-content;padding:5px 8px;color:#092016;border-radius:12px;background:#61d789;font-size:12px;font-style:normal;font-weight:800;box-shadow:0 5px 14px rgba(0,0,0,.2)}.depth-measure{width:73px;height:104px;position:absolute;right:18px;top:0;color:#fff}.depth-measure span{height:100%;position:absolute;right:12px;border-left:2px solid rgba(255,255,255,.82)}.depth-measure span:before,.depth-measure span:after{content:"";width:12px;position:absolute;right:-5px;border-top:2px solid rgba(255,255,255,.82)}.depth-measure span:before{top:0}.depth-measure span:after{bottom:0}.depth-measure b{position:absolute;right:25px;top:43px;width:max-content;padding:4px 7px;border-radius:8px;background:rgba(24,34,29,.64);font-size:13px}.soil-installation-card>p{margin:0 18px 18px;color:var(--muted);font-size:13px;line-height:1.5}
.soil-depths.wh52-metrics{grid-template-columns:repeat(4,1fr)}.soil-ec-icon{grid-row:1/4;width:21px;height:21px;display:grid;place-items:center;margin-top:3px;color:#092016;border-radius:50%;background:#61d789;font-size:14px;font-weight:900}.wh52-metrics>div{padding-left:15px;padding-right:15px}.wh52-metrics strong{white-space:nowrap}.wh52-metrics em{line-height:1.35}
@media(max-width:600px){.soil-intro p{font-size:16px}.soil-state strong{font-size:20px}.soil-depths.wh52-metrics{grid-template-columns:1fr}.soil-installation{height:280px}.install-earth{height:171px}.soil-installation-card>p{font-size:12px}}

/* Bodenfeuchte redesign based on the compact dashboard reference. */
.soil-v2{max-width:1500px}.soil-v2-intro{padding:7px 2px 17px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.soil-v2-intro h1{margin:0;font-size:clamp(36px,4vw,52px);line-height:1.05;letter-spacing:-.035em}.soil-v2-intro p{margin:5px 0 0;color:var(--muted);font-size:17px}.soil-v2-live{padding:9px 14px;border:1px solid rgba(97,215,137,.36);border-radius:22px;color:var(--text);font-size:13px}.soil-v2-live i{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:#61d789;box-shadow:0 0 10px #61d789}
.soil-v2-hero{min-height:292px;display:grid;grid-template-columns:.68fr 1.45fr .88fr;align-items:stretch;overflow:hidden}.soil-v2-reading{padding:26px 16px 22px 28px}.soil-v2-location{display:flex;gap:5px;align-items:center;font-size:17px}.soil-v2-location span{color:var(--muted)}.soil-v2-location strong{color:#68dc74}.soil-v2-current{margin:15px 0 0;display:flex;align-items:flex-end}.soil-v2-current>strong{color:#66d76d;font-size:clamp(94px,9vw,126px);font-weight:650;line-height:.78;letter-spacing:-.075em;text-shadow:0 0 25px rgba(97,215,137,.15)}.soil-v2-current>b{margin:0 0 -2px 14px;font-size:48px;line-height:1}.soil-v2-reading>span{display:block;margin:17px 0 0 18px;color:var(--muted);font-size:15px}
.soil-v2-scale-wrap{padding:69px 26px 15px;position:relative;align-self:center}.soil-v2-marker{width:0;position:absolute;top:29px;z-index:2;transform:translateX(-50%);transition:left .4s}.soil-v2-marker b{display:block;width:max-content;padding:8px 11px;transform:translateX(-50%);color:#092016;border-radius:10px;background:#75df77;font-size:17px}.soil-v2-marker i{display:block;width:2px;height:27px;margin:auto;background:#75df77}.soil-v2-scale{height:18px;display:grid;grid-template-columns:20fr 40fr 40fr;overflow:hidden;border-radius:7px}.soil-v2-scale span{display:block}.soil-v2-scale .dry{background:#ff5d42}.soil-v2-scale .optimal{background:#69ce69}.soil-v2-scale .wet{background:#3daaf2}.soil-v2-scale-labels{display:grid;grid-template-columns:20fr 40fr 40fr;margin-top:10px;text-align:center}.soil-v2-scale-labels div{display:grid;gap:3px}.soil-v2-scale-labels b{font-size:16px}.soil-v2-scale-labels span{color:var(--muted);font-size:14px}.soil-v2-scale-labels div:nth-child(1) b{color:#ff694f}.soil-v2-scale-labels div:nth-child(2) b{color:#68dd72}.soil-v2-scale-labels div:nth-child(3) b{color:#49b6ff}.soil-v2-note{margin-top:32px;padding:10px 13px;display:flex;gap:9px;border:1px solid var(--line);border-radius:10px;color:#b8c8d0;font-size:12px}
.soil-v2-advice{padding:23px 28px;border-left:1px solid var(--line);display:grid;grid-template-columns:90px 1fr;align-content:center;background:radial-gradient(circle at 30% 25%,rgba(54,165,243,.12),transparent 42%)}.soil-v2-drop{width:84px;height:102px;grid-row:1/3;display:grid;place-items:center;position:relative;font-size:66px;filter:drop-shadow(0 6px 10px rgba(0,0,0,.22))}.soil-v2-drop span{position:absolute;font-size:25px}.soil-v2-advice h2{margin:0;color:#74df77;font-size:30px;line-height:1.06}.soil-v2-advice p{margin:8px 0;color:var(--muted);font-size:14px;line-height:1.45}.soil-v2-watering{grid-column:1/3;margin-top:16px;padding:15px 20px;display:flex;align-items:center;gap:20px;border:1px solid var(--line);border-radius:12px;background:rgba(3,19,29,.25)}.soil-v2-watering>span{font-size:35px}.soil-v2-watering small,.soil-v2-watering strong{display:block}.soil-v2-watering small{color:var(--muted);font-size:13px}.soil-v2-watering strong{margin-top:2px;font-size:23px}
.soil-v2-metrics{margin-top:13px;display:grid;grid-template-columns:repeat(5,1fr);gap:13px}.soil-v2-metrics article{min-height:104px;padding:13px 15px;display:flex;align-items:center;gap:13px}.metric-orb{width:55px;height:55px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;font-size:27px}.metric-orb.green{color:#9bf28f;background:rgba(85,173,81,.28)}.metric-orb.orange{color:#ff754c;background:rgba(183,75,40,.28)}.metric-orb.violet{color:#83a5ff;background:rgba(73,72,172,.3)}.metric-orb.blue{color:#4db9ff;background:rgba(36,126,190,.25)}.metric-orb.cyan{color:#9df0ed;background:rgba(38,138,139,.3)}.soil-v2-metrics small,.soil-v2-metrics strong,.soil-v2-metrics em{display:block}.soil-v2-metrics small{color:var(--muted);font-size:12px}.soil-v2-metrics strong{margin:3px 0;font-size:20px;white-space:nowrap}.soil-v2-metrics em{color:#69d877;font-size:11px;font-style:normal;line-height:1.25}
.soil-v2-content{margin-top:13px;display:grid;grid-template-columns:minmax(0,3.8fr) minmax(260px,.95fr);gap:13px}.soil-v2-chart-card{min-height:510px;padding:0 18px 14px}.soil-v2-chart-head{height:58px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line-soft)}.soil-v2-chart-head>div:first-child{display:flex;align-items:center;gap:22px}.soil-v2-chart-head h2{margin:0;font-size:19px}.soil-v2-chart-head span,.soil-v2-range-chip{padding:6px 18px;border:1px solid #61d789;border-radius:10px;color:#dff7e3;background:rgba(97,215,137,.1);font-size:12px}.soil-v2-chart{height:430px}.soil-v2-side{display:grid;gap:13px}.soil-v2-explain{overflow:hidden}.soil-v2-explain>h2,.soil-v2-install-card>h2{margin:0;padding:12px 15px;font-size:16px}.soil-v2-explain>div{padding:10px 12px;display:grid;grid-template-columns:10px 64px 1fr;align-items:center;gap:8px;border-top:1px solid var(--line-soft)}.soil-v2-explain i{width:8px;height:8px;border-radius:50%}.soil-v2-explain i.dry{background:#ff6349}.soil-v2-explain i.optimal{background:#69d875}.soil-v2-explain i.wet{background:#3babf5}.soil-v2-explain b{font-size:11px}.soil-v2-explain b small{display:block;color:var(--muted)}.soil-v2-explain>div>span{color:var(--muted);font-size:10px;line-height:1.35}.soil-v2-explain section{padding:10px 15px;border-top:1px solid var(--line-soft)}.soil-v2-explain section b{font-size:12px}.soil-v2-explain section p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.4}.soil-v2-install-card{padding-bottom:12px}.soil-v2-install-card .soil-installation{height:205px;margin:0 10px 9px}.soil-v2-install-card .install-sky{height:62px}.soil-v2-install-card .install-earth{height:126px}.soil-v2-install-card .install-sensor{top:-35px;transform:scale(.72);transform-origin:top}.soil-v2-install-card .depth-measure{height:86px;right:8px}.soil-v2-install-card>p{margin:0 13px;color:var(--muted);font-size:10px}.soil-v2-footer-note{margin-top:13px;padding:12px 18px;display:flex;align-items:center;gap:13px;border:1px solid var(--line);border-radius:10px}.soil-v2-footer-note>div{flex:1}.soil-v2-footer-note b,.soil-v2-footer-note span{display:block}.soil-v2-footer-note b{font-size:13px}.soil-v2-footer-note span,.soil-v2-footer-note small{color:var(--muted);font-size:10px}
@media(max-width:1100px){.soil-v2-hero{grid-template-columns:.7fr 1.3fr}.soil-v2-advice{grid-column:1/3;border-top:1px solid var(--line);border-left:0}.soil-v2-metrics{grid-template-columns:repeat(3,1fr)}.soil-v2-content{grid-template-columns:1fr}.soil-v2-side{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.soil-v2-intro{align-items:flex-start;flex-direction:column}.soil-v2-intro p{font-size:15px}.soil-v2-hero{display:block}.soil-v2-reading{padding-bottom:10px}.soil-v2-scale-wrap{padding:67px 20px 20px}.soil-v2-advice{border-top:1px solid var(--line)}.soil-v2-metrics{grid-template-columns:1fr}.soil-v2-metrics article{min-height:88px}.soil-v2-content{display:block}.soil-v2-chart-card{margin-bottom:13px;overflow-x:auto}.soil-v2-chart-head,.soil-v2-chart{min-width:650px}.soil-v2-side{display:grid;grid-template-columns:1fr}.soil-v2-footer-note{align-items:flex-start}.soil-v2-footer-note small{white-space:nowrap}}

.soil-v2-drop{font-size:0}.soil-v2-drop i{width:62px;height:62px;display:block;transform:rotate(45deg);border:2px solid #8bdcff;border-radius:65% 12% 65% 65%;background:linear-gradient(135deg,#2f91f3,#83d7ff)}.soil-v2-drop span{width:18px;height:29px;left:35px;top:46px;border-radius:100% 0 100% 0;background:#67c94e;transform:rotate(-26deg);box-shadow:13px 5px 0 -2px #4eaf3f}.soil-v2-watering>svg{width:45px;height:38px;overflow:visible;fill:#62d06c;stroke:#62d06c;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}

.soil-v2-hero{position:relative;padding-bottom:58px}.soil-v2-reading{padding-left:34px}.soil-v2-current>strong{font-size:clamp(125px,11vw,168px)}.soil-v2-current>b{font-size:55px}.soil-v2-reading>span{margin-top:22px;font-size:17px}.soil-v2-note{position:absolute;left:28px;right:calc(29.2% + 26px);bottom:15px;margin:0;padding:12px 15px;font-size:14px}.soil-v2-chart-head{height:66px}.soil-v2-chart-head>h2{margin:0;white-space:nowrap;font-size:19px}.soil-v2-chart-controls{display:flex;align-items:center;justify-content:flex-end;gap:22px}.soil-v2-tabs{display:flex;overflow:hidden;border:1px solid var(--line);border-radius:10px}.soil-v2-tabs button{min-width:76px;padding:7px 13px;color:var(--muted);border:0;border-right:1px solid var(--line);background:transparent;font:inherit;font-size:12px;cursor:pointer}.soil-v2-tabs button:last-child{border-right:0}.soil-v2-tabs button.active{color:#effbf1;background:rgba(97,215,137,.16);box-shadow:inset 0 0 0 1px #61d789}.soil-v2-tabs button:hover{color:var(--text)}
@media(max-width:1100px){.soil-v2-hero{padding-bottom:0}.soil-v2-note{grid-column:1/3;position:static;margin:12px 25px}.soil-v2-chart-head{height:auto;min-height:82px;align-items:flex-start;padding:12px 0;gap:12px;flex-direction:column}.soil-v2-chart-controls{width:100%;justify-content:space-between}}
@media(max-width:700px){.soil-v2-current>strong{font-size:126px}.soil-v2-current>b{font-size:48px}.soil-v2-chart-controls{align-items:flex-start;flex-direction:column;gap:8px}.soil-v2-tabs button{min-width:72px}}
