/* ==========================================================================
   CheapFuy 14 – modern station dashboard
   Light/dark, glass cards, live data. No external assets or fonts.
   ========================================================================== */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;

  --bg: #eef4fa;
  --bg-soft: #e6eff8;
  --surface: #ffffff;
  --surface-soft: #f4f8fc;
  --surface-glass: rgba(255, 255, 255, 0.76);
  --surface-glass-strong: rgba(255, 255, 255, 0.9);
  --text: #0c2337;
  --text-2: #3a556f;
  --muted: #6b839a;
  --line: rgba(12, 35, 55, 0.09);
  --line-strong: rgba(12, 35, 55, 0.16);

  --accent: #0b82e6;
  --accent-soft: rgba(11, 130, 230, 0.1);
  --wind: #0fa97a;
  --wind-soft: rgba(15, 169, 122, 0.14);
  --gust: #94a3b8;
  --zone-optimal: rgba(34, 197, 94, 0.42);
  --zone-optimal-strong: #16a34a;
  --zone-tolerable: rgba(250, 204, 21, 0.48);
  --zone-tolerable-strong: #eab308;
  --chart-zone-optimal: rgba(34, 197, 94, 0.3);
  --chart-zone-tolerable: rgba(250, 204, 21, 0.35);
  --wind-1: #34d399;
  --wind-2: #0ea5e9;
  --wind-3: #6366f1;
  --temp: #f07c23;
  --temp-soft: rgba(240, 124, 35, 0.12);
  --hum: #0d9bd6;
  --hum-soft: rgba(13, 155, 214, 0.12);
  --rain: #6d6cf1;
  --rain-soft: rgba(109, 108, 241, 0.12);
  --danger: #e5484d;
  --good: #12a06a;

  --topbar: #0a1d2f;
  --topbar-2: #143552;
  --sky-top: #d7eaff;
  --sky-mid: #eaf5ff;
  --sky-bottom: #f6fbff;
  --sun: #ffe9a8;
  --sun-glow: rgba(255, 226, 138, 0.55);
  --mountain-far: #b8d5ec;
  --mountain-mid: #94bcdd;
  --mountain-near: #6fa4cc;
  --gauge-plate: #ffffff;
  --gauge-core-1: #ffffff;
  --gauge-core-2: #edf6fd;
  --needle: #d400b4;

  --shadow-sm: 0 1px 2px rgba(12, 35, 55, 0.05), 0 10px 24px -18px rgba(12, 35, 55, 0.3);
  --shadow: 0 24px 60px -34px rgba(12, 35, 55, 0.4), 0 3px 10px rgba(12, 35, 55, 0.04);
  --shadow-card: 0 1px 1px rgba(12, 35, 55, 0.03), 0 12px 32px -22px rgba(12, 35, 55, 0.35);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;

  --container: 1240px;
  --topbar-h: 56px;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

[data-theme="dark"] {
  --bg: #07131f;
  --bg-soft: #0a1a29;
  --surface: #0e2233;
  --surface-soft: #12293d;
  --surface-glass: rgba(14, 34, 51, 0.72);
  --surface-glass-strong: rgba(14, 34, 51, 0.88);
  --text: #eaf3fb;
  --text-2: #b3c8da;
  --muted: #7f98ad;
  --line: rgba(234, 243, 251, 0.08);
  --line-strong: rgba(234, 243, 251, 0.16);

  --accent: #59b6ff;
  --accent-soft: rgba(89, 182, 255, 0.14);
  --wind: #2dd4a0;
  --wind-soft: rgba(45, 212, 160, 0.14);
  --zone-optimal: rgba(34, 197, 94, 0.6);
  --zone-optimal-strong: #22c55e;
  --zone-tolerable: rgba(253, 224, 71, 0.78);
  --zone-tolerable-strong: #fde047;
  --chart-zone-optimal: rgba(34, 197, 94, 0.45);
  --chart-zone-tolerable: rgba(253, 224, 71, 0.62);
  --temp: #ffa75c;
  --temp-soft: rgba(255, 167, 92, 0.13);
  --hum: #4cc3ee;
  --hum-soft: rgba(76, 195, 238, 0.13);
  --rain: #9a99ff;
  --rain-soft: rgba(154, 153, 255, 0.13);

  --topbar: #061220;
  --topbar-2: #0a2137;
  --sky-top: #081828;
  --sky-mid: #0a1d2f;
  --sky-bottom: #07131f;
  --sun: #ffe6a3;
  --sun-glow: rgba(255, 214, 120, 0.2);
  --mountain-far: #10283c;
  --mountain-mid: #0c2134;
  --mountain-near: #081a2a;
  --gauge-plate: #0d2133;
  --gauge-core-1: #12293d;
  --gauge-core-2: #0b1d2d;
  --needle: #d400b4;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 24px -18px rgba(0, 0, 0, 0.8);
  --shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.9), 0 3px 10px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.2), 0 16px 36px -26px rgba(0, 0, 0, 0.9);
}

/* ------------------------------- base ---------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[data-theme="dark"] body {
  color-scheme: dark;
}

h1, h2, h3, h4, p, ul, dl, dd, dt {
  margin: 0;
}

ul {
  list-style: none;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
  }
}

/* ------------------------------- top bar ------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(100deg, var(--topbar), var(--topbar-2));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 30px -20px rgba(0, 0, 0, 0.6);
}

.topbar__inner {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #dff0ff;
}

.brand__mark svg {
  width: 30px;
  height: 30px;
  fill: none;
}

.brand__mark svg use {
  color: inherit;
}

.brand__word {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: #f3f9ff;
  text-transform: lowercase;
}

.brand__tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: #bfe0ff;
  background: rgba(120, 190, 255, 0.12);
  border: 1px solid rgba(140, 200, 255, 0.22);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.topnav__item {
  position: relative;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(235, 245, 255, 0.64);
  border-radius: 8px;
  cursor: default;
  user-select: none;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.topnav__item:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.05);
}

.topnav__item--active {
  color: #fff;
}

.topnav__item--active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #58c9ff, #6ee7b7);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(235, 245, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  cursor: default;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.tb-chip--icon {
  width: 34px;
  justify-content: center;
  padding: 0;
}

button.tb-chip {
  cursor: pointer;
}

button.tb-chip:hover,
.tb-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.tb-chip .icon {
  width: 16px;
  height: 16px;
}

.tb-chip--lang {
  padding: 0 11px;
}

.tb-login {
  margin-left: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0a1d2f;
  background: #f2f8ff;
  cursor: default;
  user-select: none;
}

.topbar__burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  place-items: center;
  color: #eaf5ff;
  background: rgba(255, 255, 255, 0.06);
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (max-width: 980px) {
  .topnav {
    display: none;
  }
  .topbar__burger {
    display: grid;
  }
  .topbar__inner {
    gap: 14px;
  }
  .topnav.is-open {
    position: absolute;
    top: calc(var(--topbar-h) + 8px);
    left: 16px;
    right: 16px;
    z-index: 70;
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 16px;
    background: var(--topbar-2);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.65);
  }
  .topnav.is-open .topnav__item {
    padding: 12px;
  }
  .brand__tag {
    display: none;
  }
}

@media (max-width: 560px) {
  .tb-chip--lang,
  .tb-chip--icon:not(#themeToggle) {
    display: none;
  }
  .tb-login {
    padding: 7px 12px;
  }
  .topbar__inner {
    width: calc(100% - 28px);
    gap: 10px;
  }
  .brand__word {
    font-size: 17px;
  }
}

/* -------------------------------- hero --------------------------------- */

.hero {
  position: relative;
  padding: 18px 0 28px;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-bottom) 100%);
}

.hero__sun {
  position: absolute;
  top: -60px;
  right: 9%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--sun) 0%, var(--sun-glow) 38%, transparent 68%);
  filter: blur(2px);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
  /* JS publishes the offset from the static top-right anchor every second. */
  transform: translate3d(var(--sun-dx, 0px), var(--sun-dy, 0px), 0);
  transition: transform 1200ms linear, opacity 1200ms linear;
  will-change: transform, opacity;
}

/* Below the horizon the sun is fully faded; skip painting it entirely. */
.hero__sun.is-below-horizon {
  visibility: hidden;
}

.hero__glow {
  position: absolute;
  inset: auto -10% -20% 30%;
  height: 420px;
  background: radial-gradient(ellipse at 50% 100%, var(--sun-glow), transparent 65%);
  opacity: 0.45;
  z-index: 1;
}

.hero__scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: min(420px, 46vw);
  /* Paints over the sun so it rises from and sinks behind the ridge line. */
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero__sun {
    transition: none;
  }
}

.scene-far { fill: var(--mountain-far); opacity: 0.85; }
.scene-mid { fill: var(--mountain-mid); opacity: 0.9; }
.scene-near { fill: var(--mountain-near); }

.hero__inner {
  position: relative;
}

.hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  backdrop-filter: blur(10px);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--wind-soft);
}

.eyebrow__sep {
  color: var(--muted);
}

.hero__title {
  margin-top: 8px;
  font-size: clamp(26px, 2.9vw, 38px);
  line-height: 1.04;
  font-weight: 780;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.hero__site {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wind);
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--wind-soft);
  transform: translateY(-4px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
}

.hero__meta .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  backdrop-filter: blur(10px);
}

.live__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
}

.live__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--good);
  opacity: 0;
  animation: pulse 2.2s ease-out infinite;
}

.live.is-offline {
  color: var(--danger);
}

.live.is-offline .live__dot {
  background: var(--danger);
}

.live.is-offline .live__dot::after {
  border-color: var(--danger);
  animation: none;
}

.hero__updated {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-2);
  background: var(--surface-glass-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: var(--accent);
  transform: rotate(18deg);
}

.icon-btn:active {
  transform: rotate(60deg) scale(0.94);
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 900px) {
  .hero__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero__status {
    padding-bottom: 0;
  }
}

/* ------------------------------ dashboard ------------------------------ */

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.card {
  position: relative;
  background: var(--surface-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(1.15);
}

[data-theme="dark"] .card {
  background: var(--surface-glass);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__head h2 {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-2);
}

.chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}

/* wind card */

.windcard {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  background: var(--surface-glass-strong);
}

.windcard__head {
  align-items: flex-start;
  gap: 16px;
}

.windcard__heading {
  min-width: 0;
}

.windcard__head h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.windcard__sub {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.windcard__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.windcard__tools .zonelegend {
  margin: 0;
  padding: 0;
  border: 0;
  gap: 5px 12px;
  font-size: 10px;
}

.windoverview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 7px 16px;
  align-items: stretch;
}

.rosepanel {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.rosepanel .gauge {
  max-width: 220px;
}

.windcard--overview .gauge__center {
  width: 56%;
  height: 56%;
}

.windcard--overview .gauge__value {
  font-size: clamp(28px, 2.6vw, 38px);
}

.windcard--overview .gauge__unit {
  margin-top: 2px;
  font-size: 10px;
}

.windcard--overview .gauge__bft {
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 9.5px;
}

.windcard--overview .windcard__readout {
  width: 100%;
  gap: 6px;
}

.windcard--overview .windcard__gust {
  justify-content: center;
  font-size: 11.5px;
}

.windcard--overview .windcard__dir {
  padding: 7px 9px;
  column-gap: 8px;
}

.windcard--overview .dir-arrow {
  width: 32px;
  height: 32px;
}

.windcard--overview .dir-arrow svg {
  width: 16px;
  height: 16px;
}

.windcard--overview .windcard__dirtext strong {
  font-size: 15px;
}

.windcard--overview .windcard__dirsub {
  font-size: 9px;
}

.windcard__tendency {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px 0;
  font-size: 10.5px;
  color: var(--muted);
}

.windcard__tendency strong {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.windchart {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.windchart .chartcard__head {
  margin-bottom: 6px;
}

.windchart .chartcard__head h3 {
  font-size: 12px;
}

.windchart .chartcard__range {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}

.windchart .chartcard__legend {
  gap: 3px 5px;
  font-size: 9.5px;
}

.windchart .swatch {
  width: 8px;
  height: 8px;
}

.windchart .chartcard__canvas {
  flex: 0 0 auto;
  height: 138px;
  min-height: 0;
}

.windcard__main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.gauge {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  aspect-ratio: 1;
}

.gauge__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge__plate {
  fill: var(--gauge-plate);
  stroke: var(--line);
  stroke-width: 1;
  filter: drop-shadow(0 16px 30px rgba(12, 35, 55, 0.08));
}

.gauge__zone {
  stroke: none;
  transition: opacity 0.3s var(--ease);
}

.gauge__zone--optimal {
  fill: var(--zone-optimal);
}

.gauge__zone--tolerable {
  fill: var(--zone-tolerable);
}

.gauge__track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 9;
  stroke-linecap: round;
  opacity: 0.55;
}

.gauge__progress {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 804.25;
  stroke-dashoffset: 804.25;
  transition: stroke-dashoffset 1s var(--ease);
}

.gauge__tick {
  stroke: var(--muted);
  stroke-width: 1.4;
  opacity: 0.35;
}

.gauge__tick--major {
  stroke-width: 2;
  opacity: 0.6;
}

.gauge__label {
  fill: var(--text-2);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.gauge__label--cardinal {
  fill: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.gauge__needle {
  transform-box: view-box;
  transform-origin: 160px 160px;
  transition: transform 1s var(--ease);
}

.gauge__needle-scale {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1s var(--ease);
}

.gauge__needle path:first-child {
  fill: var(--needle);
}

.gauge__hub {
  fill: var(--gauge-plate);
  stroke: var(--needle);
  stroke-width: 2.5;
}

.gauge__hub-dot {
  fill: var(--needle);
}

.gauge__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 152px;
  height: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, var(--gauge-core-1) 0%, var(--gauge-core-1) 56%, transparent 73%);
  pointer-events: none;
}

.gauge__value {
  font-size: clamp(38px, 4.4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.gauge__unit {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge__bft {
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--wind);
  background: var(--wind-soft);
}

.windcard__readout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.windcard__gust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}

.windcard__gust .icon {
  color: var(--wind);
}

.windcard__gust strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.windcard__dir {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.dir-arrow {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--wind);
  box-shadow: var(--shadow-sm);
  transition: transform 1s var(--ease);
}

.dir-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.windcard__dirtext {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.windcard__dirtext strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.windcard__dirtext span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.windcard__dirsub {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.zonelegend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
}

.zonelegend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.zonelegend__item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.zonelegend__item--optimal i {
  background: var(--zone-optimal-strong);
  box-shadow: 0 0 0 3px var(--zone-optimal);
}

.zonelegend__item--tolerable i {
  background: var(--zone-tolerable-strong);
  box-shadow: 0 0 0 3px var(--zone-tolerable);
}

.zonelegend__item b {
  color: var(--text-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zonelegend__item.is-hidden {
  display: none;
}

.zonelegend.is-hidden {
  display: none;
}

.windcard__facts {
  display: grid;
  gap: 9px;
}

.windcard__facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line);
}

.windcard__facts > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.windcard__facts dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.windcard__facts dd {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  .windcard__main {
    grid-template-columns: minmax(0, 1fr);
  }
  .gauge {
    max-width: 260px;
  }
  .windcard__readout {
    gap: 10px;
  }
}

/* metrics */

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}

.metric {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-glass-strong);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.metric__head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.metric__head h3 {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.metric__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.metric__icon .icon {
  width: 14px;
  height: 14px;
}

.metric--temp .metric__icon { color: var(--temp); background: var(--temp-soft); border-color: transparent; }
.metric--hum .metric__icon { color: var(--hum); background: var(--hum-soft); border-color: transparent; }
.metric--wind .metric__icon { color: var(--wind); background: var(--wind-soft); border-color: transparent; }
.metric--today .metric__icon { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.metric--rain .metric__icon { color: var(--rain); background: var(--rain-soft); border-color: transparent; }
.metric--sensor .metric__icon { color: var(--muted); }

.metric__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: clamp(21px, 1.9vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.metric__value small {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--muted);
}

.metric__sub {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.35;
}

.metric__sub strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.metric__sub--soft {
  font-size: 10.5px;
  color: var(--muted);
}

.metric__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.metric__foot strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric__foot--row {
  justify-content: space-between;
}

.metric__foot .icon {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
}

.metric__bar {
  margin-top: auto;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.metric__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hum), #4cc3ee);
  transition: width 1s var(--ease);
}

.dotbadge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--wind-soft);
  color: var(--wind);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.dotbadge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.dotbadge.is-offline {
  background: rgba(229, 72, 77, 0.12);
  color: var(--danger);
}

.sensor__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 0;
}

.sensor__row strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .windcard__main {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
  .gauge {
    max-width: 280px;
  }
}

@media (max-width: 720px) {
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .windcard__main {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .gauge {
    max-width: 250px;
  }
  .windcard {
    padding: 18px;
  }
}

/* ------------------------------- info strip ---------------------------- */

.infostrip {
  margin-top: 20px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  background: var(--surface-glass-strong);
}

.infostrip__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.infostrip__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}

.infostrip__icon .icon {
  width: 16px;
  height: 16px;
}

.infostrip__item h3 {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.infostrip__item p {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-2);
}

@media (max-width: 1024px) {
  .infostrip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .infostrip {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

/* ------------------------------- sections ------------------------------ */

.section {
  padding: 28px 0 6px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.section__eyebrow .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.section__title {
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section__hint {
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 2px;
}

.section__hint span {
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  font-weight: 600;
}

/* ------------------------------ averages ------------------------------- */

.tablecard {
  overflow: hidden;
  background: var(--surface-glass-strong);
}

.tablecard__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  overscroll-behavior-x: contain;
}

.tablecard__scroll::-webkit-scrollbar {
  height: 8px;
}

.tablecard__scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.avgtable {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.avgtable th,
.avgtable td {
  padding: 0;
  text-align: center;
  white-space: nowrap;
}

.avgtable thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  height: 36px;
  min-width: 48px;
  padding: 0 4px;
}

.avgtable thead th.is-hour {
  color: var(--text);
}

.avgtable thead th.is-hour span {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-size: 10.5px;
}

.avgtable thead th.is-now span {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.avgtable .avgtable__corner {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 84px;
  max-width: 84px;
  text-align: left;
  padding-left: 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  color: var(--muted);
}

.avgtable tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 84px;
  max-width: 84px;
  text-align: left;
  padding: 7px 10px 7px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  font-size: 11px;
  font-weight: 650;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}

.avgtable tbody tr:last-child th,
.avgtable tbody tr:last-child td {
  border-bottom: 0;
}

.avgtable tbody td {
  height: 38px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-weight: 650;
  color: var(--text);
  background: var(--cell, transparent);
  transition: background 0.4s var(--ease), color 0.2s;
}

.avgtable tbody td.is-empty {
  color: var(--muted);
  opacity: 0.55;
}

.avgtable tbody td .dir-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avgtable tbody td .dir-cell .miniarrow {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-glass-strong);
  border: 1px solid var(--line);
  color: hsl(var(--arrow-hue, 120) 75% 42%);
  transition: color 0.3s var(--ease);
}

[data-theme="dark"] .avgtable tbody td .dir-cell .miniarrow {
  color: hsl(var(--arrow-hue, 120) 85% 60%);
}

.avgtable tbody td .dir-cell .miniarrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.8s var(--ease);
}

.dir-cell--optimal .miniarrow {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--zone-optimal);
}

.dir-cell--tolerable .miniarrow {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--zone-tolerable);
}

.chip--button {
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.chip--button:hover {
  background: var(--accent);
  color: #fff;
}

.chip--button:active {
  transform: scale(0.94);
}

.avgtable tbody td .deg {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.avgtable tbody tr:nth-child(odd) td {
  --row-tint: rgba(12, 35, 55, 0.012);
}

.avgtable tbody td {
  background-image: linear-gradient(var(--row-tint, transparent), var(--row-tint, transparent));
}

.tablecard__legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 10.5px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-item em {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.legend-scale {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}

.legend-scale b {
  display: block;
  width: 70px;
  height: 6px;
  border-radius: 999px;
}

.legend-scale[data-kind="wind"] b {
  background: linear-gradient(90deg, rgba(15, 169, 122, 0.15), rgba(15, 169, 122, 0.9));
}

.legend-scale[data-kind="temp"] b {
  background: linear-gradient(90deg, rgba(13, 155, 214, 0.55), rgba(240, 124, 35, 0.85));
}

.legend-scale[data-kind="hum"] b {
  background: linear-gradient(90deg, rgba(13, 155, 214, 0.12), rgba(13, 155, 214, 0.8));
}

.tablecard__source {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-2);
}

/* -------------------------------- charts ------------------------------- */

.rangebar {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.rangetab {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.rangetab:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.rangetab.is-active {
  color: #fff;
  background: var(--text);
}

[data-theme="dark"] .rangetab.is-active {
  color: #07131f;
  background: #eaf3fb;
}

.charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chartcard {
  padding: 13px 16px 10px;
  background: var(--surface-glass-strong);
}

.chartcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chartcard__head h3 {
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.chartcard__legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.legend-zone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.legend-zone .swatch {
  margin-left: 0;
}

.legend-zone.is-hidden {
  display: none;
}

.swatch--optimal {
  background: var(--zone-optimal-strong);
}

.swatch--tolerable {
  background: var(--zone-tolerable-strong);
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-left: 8px;
}

.swatch:first-child {
  margin-left: 0;
}

.swatch--wind { background: var(--wind); }
.swatch--gust { background: transparent; border: 1.5px dashed var(--gust); }
.swatch--dir { background: conic-gradient(#34d399, #0ea5e9, #6366f1, #f59e0b, #34d399); border-radius: 50%; }
.swatch--temp { background: var(--temp); }
.swatch--hum { background: var(--hum); }

.chartcard__canvas {
  position: relative;
  height: 152px;
}

.chartcard__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 128px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 11.5px;
  color: var(--text-2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}

.chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip .tt-time {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 5px;
}

.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.6;
}

.chart-tooltip .tt-row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.chart-tooltip .tt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.charts__note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.charts__note .icon {
  width: 14px;
  height: 14px;
}

.charts-empty {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  font-size: 12.5px;
  color: var(--muted);
  background: repeating-linear-gradient(0deg, transparent, transparent 34px, var(--line) 35px);
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .charts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------- footer ------------------------------- */

.footer {
  margin-top: 64px;
  background: linear-gradient(160deg, var(--topbar) 0%, var(--topbar-2) 100%);
  color: rgba(235, 245, 255, 0.72);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.8fr 0.9fr;
  gap: 32px;
  padding: 48px 0 38px;
}

.footer__brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.brand__mark--footer {
  width: 40px;
  height: 40px;
  flex: none;
  color: #dff0ff;
}

.brand__mark--footer svg {
  width: 40px;
  height: 40px;
}

.footer__word {
  display: block;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: #f3f9ff;
  margin-bottom: 8px;
}

.footer__brand p {
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 320px;
  color: rgba(205, 226, 243, 0.62);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  color: rgba(205, 226, 243, 0.75);
}

.footer__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2dd4a0;
}

.footer__status.is-offline i {
  background: #f87171;
}

.footer__col h4 {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(235, 245, 255, 0.95);
  margin-bottom: 14px;
}

.footer__col ul {
  display: grid;
  gap: 9px;
}

.footer__col li {
  font-size: 12.5px;
  color: rgba(205, 226, 243, 0.6);
  cursor: default;
  user-select: none;
  transition: color 0.2s;
  width: fit-content;
}

.footer__col li:hover {
  color: rgba(235, 245, 255, 0.95);
}

.footer__col .footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer__langs li {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(205, 226, 243, 0.7);
}

.footer__langs li.is-active {
  color: #66d8a8;
  background: rgba(45, 212, 160, 0.12);
  border-color: rgba(45, 212, 160, 0.3);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 20px;
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(180, 207, 230, 0.45);
}

.footer__legal {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__legal span {
  cursor: default;
}

.footer__legal span:hover {
  color: rgba(235, 245, 255, 0.8);
}

.footer__source {
  color: rgba(180, 207, 230, 0.35);
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    padding: 36px 0 28px;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
  .footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------- misc -------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 100;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-flash {
  animation: flash 0.8s var(--ease);
}

@keyframes flash {
  0% { color: var(--accent); }
  100% { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* live/status extras */
.live.is-stale {
  color: #b45309;
}

.live.is-stale .live__dot {
  background: #f59e0b;
}

.live.is-stale .live__dot::after {
  border-color: #f59e0b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.icon-btn.is-spinning .icon {
  animation: spin 0.75s linear;
}

[data-theme="dark"] .live.is-stale {
  color: #fbbf24;
}

/* subtle skeleton while the first MQTT frame arrives */
.metric__value, .gauge__value {
  transition: color 0.3s var(--ease);
}

/* ----------------------- compact wind overview ------------------------- */

@media (max-width: 1080px) {
  .windoverview {
    grid-template-columns: 186px minmax(0, 1fr);
    gap: 7px 14px;
  }
  .rosepanel .gauge {
    max-width: 176px;
  }
  .windchart .chartcard__canvas {
    height: 112px;
  }
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .windcard__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .windcard__tools {
    justify-content: flex-start;
  }
  .windoverview {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px;
  }
  .rosepanel {
    grid-column: 1;
    grid-row: auto;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    justify-content: normal;
    gap: 14px;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .rosepanel .gauge {
    max-width: 180px;
  }
  .windchart {
    grid-column: 1;
    padding-left: 0;
    border-left: 0;
  }
  .windchart + .windchart {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .windchart .chartcard__canvas {
    height: 150px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .hero {
    padding-top: 14px;
  }
  .hero__title {
    font-size: clamp(24px, 7vw, 30px);
  }
  .hero__meta {
    gap: 4px 12px;
  }
  .windcard__head h2 {
    font-size: 12px;
  }
  .windcard__tools .zonelegend__item > span {
    display: none;
  }
  .rosepanel {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
  .rosepanel .windcard__readout {
    max-width: 100%;
  }
  .windchart .chartcard__canvas {
    height: 140px;
  }
  .rangebar {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rangebar::-webkit-scrollbar {
    display: none;
  }
}
