:root {
  color-scheme: light;
  --ink: #1b1f24;
  --muted: #667085;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --line: #ddd8cd;
  --green: #287067;
  --green-dark: #174c46;
  --yellow: #f5c453;
  --blue: #6ab7d8;
  --rain: #527da8;
  --shadow: 0 20px 60px rgba(45, 39, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(40, 112, 103, 0.1), transparent 360px),
    var(--paper);
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  color: white;
  background: var(--green);
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.weather-now {
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar,
.section-heading,
.day-card__top,
.temperature-block,
.metric-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--green);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.05rem;
}

.status {
  margin: 24px 0;
  min-height: 22px;
  color: var(--muted);
  font-weight: 600;
}

.current-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.1fr);
  gap: 24px;
}

.temperature-block {
  justify-content: flex-start;
}

.temperature {
  display: flex;
  align-items: flex-start;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.9;
  font-weight: 800;
}

.temperature span:last-child {
  margin-top: 0.55rem;
  font-size: 0.28em;
}

.summary {
  margin-top: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
}

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

.metric-grid div {
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

dd {
  margin: 0.35rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.forecast-section {
  padding-top: 34px;
}

.section-heading {
  margin-bottom: 18px;
}

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

.day-card {
  display: flex;
  min-height: 370px;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.day-card__top {
  align-items: flex-start;
}

.day-card__top p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.forecast-facts {
  display: grid;
  gap: 7px;
}

.forecast-facts span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #f0ede5;
  color: #3d4751;
  font-size: 0.8rem;
  font-weight: 800;
}

.poem {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.poem strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--green-dark);
  font-size: 0.9rem;
}

.poem p {
  color: #343941;
  font-size: 0.92rem;
  line-height: 1.48;
}

.weather-icon {
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
}

.weather-icon.small {
  width: 48px;
  height: 48px;
}

.weather-icon::before,
.weather-icon::after {
  content: "";
  position: absolute;
}

.sun::before {
  inset: 16%;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 10px rgba(245, 196, 83, 0.24);
}

.cloud::before,
.rain::before,
.snow::before,
.storm::before,
.fog::before {
  width: 68%;
  height: 42%;
  left: 18%;
  top: 34%;
  border-radius: 999px;
  background: var(--blue);
}

.cloud::after,
.rain::after,
.snow::after,
.storm::after,
.fog::after {
  width: 38%;
  height: 38%;
  left: 24%;
  top: 20%;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 28px 8px 0 -4px var(--blue);
}

.rain {
  filter: drop-shadow(0 12px 0 rgba(82, 125, 168, 0.3));
}

.snow {
  filter: drop-shadow(0 12px 0 rgba(152, 190, 205, 0.55));
}

.storm::before,
.storm::after {
  background: #667085;
}

.fog::before,
.fog::after {
  background: #aeb7bd;
}

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

  .day-card {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding-top: 10px;
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .current-grid,
  .metric-grid,
  .forecast-grid {
    grid-template-columns: 1fr;
  }

  .weather-now {
    padding: 18px;
  }

  .day-card {
    min-height: 0;
  }
}
