:root {
  color-scheme: light;
  --bg: #eef3f1;
  --sky-a: rgba(13, 124, 102, 0.18);
  --sky-b: rgba(214, 124, 34, 0.16);
  --sky-c: transparent;
  --ink: #18201d;
  --muted: #65736e;
  --panel: rgba(248, 250, 248, 0.92);
  --card: #ffffff;
  --line: #d8e1dd;
  --accent: #0d7c66;
  --accent-strong: #064f43;
  --warm: #d67c22;
  --shadow: 0 18px 48px rgba(29, 46, 40, 0.12);
  --value-bg: rgba(255, 255, 255, 0.9);
  --value-border: rgba(13, 124, 102, 0.14);
  --temp-glow: rgba(255, 255, 255, 0.7);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 12%, var(--sky-a), transparent 34%),
    radial-gradient(circle at 88% 8%, var(--sky-b), transparent 32%),
    linear-gradient(160deg, var(--sky-c), transparent 48%),
    var(--bg);
  color: var(--ink);
  transition: background 600ms ease;
}

body[data-weather="clear"] {
  --bg: #eaf6f0;
  --sky-a: rgba(114, 191, 243, 0.52);
  --sky-b: rgba(255, 214, 105, 0.46);
  --sky-c: rgba(255, 245, 202, 0.4);
  --ink: #102337;
  --muted: #426678;
  --panel: rgba(245, 251, 255, 0.9);
  --card: #ffffff;
  --line: rgba(75, 152, 204, 0.24);
  --accent: #177eb8;
  --accent-strong: #07557f;
  --warm: #d28a17;
  --shadow: 0 18px 50px rgba(23, 126, 184, 0.16);
  --value-border: rgba(23, 126, 184, 0.2);
  --temp-glow: rgba(255, 236, 164, 0.9);
}

body[data-weather="clouds"] {
  --bg: #edf2f3;
  --sky-a: rgba(97, 119, 128, 0.38);
  --sky-b: rgba(225, 232, 232, 0.88);
  --sky-c: rgba(126, 146, 150, 0.24);
  --ink: #182126;
  --muted: #596a70;
  --panel: rgba(248, 250, 250, 0.92);
  --card: #ffffff;
  --line: rgba(103, 122, 128, 0.24);
  --accent: #5a747e;
  --accent-strong: #334b54;
  --warm: #b4823d;
  --shadow: 0 18px 48px rgba(65, 82, 88, 0.17);
  --value-border: rgba(90, 116, 126, 0.22);
  --temp-glow: rgba(255, 255, 255, 0.82);
}

body[data-weather="rain"] {
  --bg: #e6eeef;
  --sky-a: rgba(52, 75, 90, 0.44);
  --sky-b: rgba(82, 126, 143, 0.34);
  --sky-c: rgba(33, 52, 65, 0.28);
  --ink: #14242c;
  --muted: #526a74;
  --panel: rgba(241, 247, 248, 0.92);
  --card: #fbfefe;
  --line: rgba(58, 91, 105, 0.26);
  --accent: #236f85;
  --accent-strong: #174b5b;
  --warm: #b78b4a;
  --shadow: 0 20px 52px rgba(35, 71, 84, 0.18);
  --value-border: rgba(35, 111, 133, 0.24);
  --temp-glow: rgba(213, 234, 239, 0.85);
}

body[data-weather="storm"] {
  --bg: #e7ebec;
  --sky-a: rgba(39, 45, 58, 0.44);
  --sky-b: rgba(219, 178, 72, 0.32);
  --sky-c: rgba(35, 40, 52, 0.34);
  --ink: #151a21;
  --muted: #58606d;
  --panel: rgba(244, 246, 248, 0.93);
  --card: #ffffff;
  --line: rgba(82, 88, 103, 0.28);
  --accent: #5a6375;
  --accent-strong: #303747;
  --warm: #c18b14;
  --shadow: 0 22px 58px rgba(28, 34, 48, 0.2);
  --value-border: rgba(90, 99, 117, 0.26);
  --temp-glow: rgba(245, 214, 130, 0.72);
}

body[data-weather="snow"] {
  --bg: #f3f7f7;
  --sky-a: rgba(167, 213, 229, 0.44);
  --sky-b: rgba(255, 255, 255, 0.92);
  --sky-c: rgba(207, 226, 234, 0.38);
  --ink: #172a34;
  --muted: #5c7180;
  --panel: rgba(253, 255, 255, 0.93);
  --card: #ffffff;
  --line: rgba(126, 174, 191, 0.26);
  --accent: #5c9bb4;
  --accent-strong: #346d84;
  --warm: #9c8d65;
  --shadow: 0 18px 48px rgba(77, 129, 147, 0.14);
  --value-border: rgba(92, 155, 180, 0.22);
  --temp-glow: rgba(255, 255, 255, 0.94);
}

body[data-weather="mist"] {
  --bg: #eef2ef;
  --sky-a: rgba(169, 184, 177, 0.58);
  --sky-b: rgba(232, 238, 234, 0.92);
  --sky-c: rgba(138, 153, 146, 0.25);
  --ink: #1a2723;
  --muted: #62716c;
  --panel: rgba(249, 251, 249, 0.92);
  --card: #ffffff;
  --line: rgba(126, 144, 136, 0.24);
  --accent: #6a8378;
  --accent-strong: #40584d;
  --warm: #b48b54;
  --shadow: 0 18px 46px rgba(83, 99, 92, 0.15);
  --value-border: rgba(106, 131, 120, 0.22);
  --temp-glow: rgba(255, 255, 255, 0.82);
}

body[data-weather="night"] {
  --bg: #e8edf1;
  --sky-a: rgba(34, 58, 98, 0.44);
  --sky-b: rgba(151, 171, 210, 0.28);
  --sky-c: rgba(22, 35, 60, 0.3);
  --ink: #111b2b;
  --muted: #596b84;
  --panel: rgba(244, 248, 252, 0.92);
  --card: #ffffff;
  --line: rgba(71, 99, 142, 0.24);
  --accent: #496fa8;
  --accent-strong: #294a78;
  --warm: #c4a04e;
  --shadow: 0 20px 54px rgba(39, 62, 100, 0.18);
  --value-border: rgba(73, 111, 168, 0.22);
  --temp-glow: rgba(205, 222, 255, 0.74);
}

.shell {
  width: min(1440px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 16px 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
}

.current-panel,
.forecast-band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.current-panel {
  min-height: 0;
  padding: clamp(20px, 2.4vw, 34px);
  display: flex;
  flex-direction: column;
}

.forecast-band {
  min-height: 0;
  padding: 16px;
}

.hourly-panel {
  display: flex;
  flex-direction: column;
}

.daily-panel {
  grid-column: 1 / -1;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-weather {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding: 18px 0;
}

.hero-weather img {
  width: 112px;
  height: 112px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.temp {
  font-size: clamp(5.8rem, 10vw, 10.5rem);
  font-weight: 850;
  line-height: 0.86;
  color: var(--ink);
  text-shadow: 0 10px 30px var(--temp-glow);
}

.summary {
  color: var(--muted);
  font-size: 1.08rem;
  text-transform: capitalize;
}

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

.metrics div,
.hour-card,
.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--value-bg), transparent 160%),
    var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.metrics div {
  min-height: 76px;
  padding: 12px;
  border-color: var(--value-border);
}

.metrics span,
.section-head span,
.day-card span,
.hour-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 1.22rem;
  color: var(--accent-strong);
}

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

.hour-card {
  min-height: 0;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-color: var(--value-border);
}

.hour-card img {
  width: 50px;
  height: 50px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.hour-card strong,
.day-temp {
  display: block;
  font-size: 1.14rem;
  color: var(--accent-strong);
}

.daily {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.day-card {
  min-height: 122px;
  padding: 12px;
  border-color: var(--value-border);
}

.day-card strong {
  color: var(--accent-strong);
}

.day-card .day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-card img {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.day-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  text-transform: capitalize;
}

@media (max-height: 760px) and (min-width: 900px) {
  .shell {
    padding: 10px 0;
    gap: 10px;
  }

  .current-panel,
  .forecast-band {
    padding: 12px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .hero-weather {
    padding: 8px 0;
  }

  .temp {
    font-size: 7rem;
  }

  .metrics div {
    min-height: 64px;
    padding: 9px;
  }

  .hour-card img {
    width: 40px;
    height: 40px;
  }

  .day-card {
    min-height: 98px;
    padding: 9px;
  }

  .day-card img {
    width: 42px;
    height: 42px;
  }

  .day-summary {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    min-height: 100vh;
  }

  .shell {
    width: min(100% - 20px, 760px);
    min-height: auto;
    padding: 10px 0;
    display: block;
  }

  .current-panel,
  .forecast-band {
    padding: 18px;
  }

  .forecast-band {
    margin-top: 12px;
  }

  .hero-weather {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .hero-weather img {
    width: 80px;
    height: 80px;
  }

  .metrics,
  .daily {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hourly {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }
}
