:root {
  color-scheme: light;
  --page: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #1f2937;
  --muted: #667085;
  --line: #d9e0ea;
  --blue: #2f80ed;
  --blue-dark: #1554a3;
  --green: #20a464;
  --cyan: #0f9fbd;
  --amber: #f59e0b;
  --red: #e14d42;
  --shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  display: flex;
  width: min(1240px, calc(100% - 28px));
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.brand,
.section-label,
p,
h1,
h2 {
  margin: 0;
}

.brand,
.section-label {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar__meta span,
.live-dot {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.topbar__meta span:first-child,
.live-dot {
  border-color: rgba(32, 164, 100, 0.24);
  background: rgba(32, 164, 100, 0.1);
  color: #157347;
}

.shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.overview {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.current-card,
.tile,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.current-card {
  min-height: 286px;
  overflow: hidden;
}

.current-card__head,
.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.current-card__body {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 26px 18px 24px;
}

.temperature {
  display: flex;
  align-items: flex-start;
  min-width: 190px;
  color: var(--blue-dark);
}

.temperature span {
  font-size: clamp(4.2rem, 9vw, 6.8rem);
  font-weight: 850;
  line-height: 0.82;
  letter-spacing: 0;
}

.temperature small {
  margin-top: 7px;
  font-size: 1.55rem;
  font-weight: 850;
}

.summary {
  max-width: 34rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  font-weight: 720;
  line-height: 1.4;
}

.current-card__footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.current-card__footer div {
  padding: 16px 18px;
}

.current-card__footer div + div {
  border-left: 1px solid var(--line);
}

.current-card__footer span,
.tile__label,
dt,
.panel__header > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.current-card__footer strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

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

.tile {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 18px;
}

.tile::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: var(--blue);
}

.tile--green::before {
  background: var(--green);
}

.tile--cyan::before {
  background: var(--cyan);
}

.tile--amber::before {
  background: var(--amber);
}

.tile strong {
  display: block;
  margin-top: 26px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.panel {
  min-height: 286px;
  overflow: hidden;
}

.panel--wide {
  grid-column: span 2;
}

.panel__header h2 {
  margin-top: 4px;
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel__header > span {
  text-align: right;
}

canvas {
  display: block;
  width: calc(100% - 28px);
  height: 218px;
  margin: 14px;
}

.wind-compass {
  position: relative;
  display: grid;
  width: min(178px, calc(100% - 36px));
  aspect-ratio: 1;
  margin: 18px auto;
  place-items: center;
  border: 1px solid #c8d6e8;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 31%, transparent 32%),
    conic-gradient(from 0deg, rgba(47, 128, 237, 0.1), rgba(32, 164, 100, 0.1), rgba(245, 158, 11, 0.1), rgba(47, 128, 237, 0.1));
}

.wind-compass span {
  position: absolute;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.wind-compass span:nth-of-type(1) { top: 10px; }
.wind-compass span:nth-of-type(2) { right: 12px; }
.wind-compass span:nth-of-type(3) { bottom: 10px; }
.wind-compass span:nth-of-type(4) { left: 12px; }

.wind-compass__needle {
  width: 5px;
  height: 42%;
  transform-origin: 50% 92%;
  border-radius: 99px;
  background: linear-gradient(var(--red) 0 58%, var(--ink) 59%);
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.details--stacked {
  grid-template-columns: 1fr;
}

.details div {
  min-height: 70px;
  padding: 13px 16px;
  background: var(--panel-soft);
}

.details div + div {
  border-left: 1px solid var(--line);
}

.details--stacked div + div {
  border-top: 1px solid var(--line);
  border-left: 0;
}

dd {
  margin: 6px 0 0;
  font-size: 1.12rem;
  font-weight: 850;
}

.pressure,
.solar-readout {
  padding: 22px 18px;
}

.pressure strong,
.solar-readout strong {
  display: block;
  color: var(--blue-dark);
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1;
}

.pressure__bar {
  overflow: hidden;
  height: 12px;
  margin: 22px 0 16px;
  border-radius: 999px;
  background: #e8edf4;
}

.pressure__bar span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
}

.note {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.45;
}

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

  .current-card,
  .panel--wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .topbar__meta {
    justify-content: flex-start;
  }

  .shell {
    width: min(100% - 20px, 1240px);
    padding-top: 10px;
  }

  .overview,
  .quick-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .current-card,
  .panel--wide {
    grid-column: auto;
  }

  .current-card__body {
    grid-template-columns: 1fr;
  }

  .temperature {
    min-width: 0;
  }
}
