:root {
  --bg: #edf7f8;
  --ink: #17313a;
  --muted: #5b747b;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --line: rgba(23, 49, 58, 0.14);
  --accent: #0d7f8f;
  --accent-dark: #075869;
  --warm: #e6a23c;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(7, 48, 62, 0.18);
  color-scheme: light;
  font-family:
    "Avenir Next",
    "Trebuchet MS",
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(13, 127, 143, 0.2), transparent 40%),
    radial-gradient(circle at 75% 14%, rgba(230, 162, 60, 0.24), transparent 28%),
    linear-gradient(180deg, #f7fbfb 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.weather-panel {
  width: min(100%, 980px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar,
.search-row,
.current-weather,
.metrics,
.forecast-grid,
.daily-list,
.daily-card {
  display: grid;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: 0.96;
}

h2 {
  font-size: 1.05rem;
}

.status-pill {
  min-width: 82px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.status-pill.loading {
  color: var(--accent-dark);
}

.search-row {
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 28px;
}

.search-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
}

.search-row input:focus {
  border-color: rgba(13, 127, 143, 0.58);
  box-shadow: 0 0 0 4px rgba(13, 127, 143, 0.12);
}

.search-row button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.search-row button:hover {
  background: var(--accent-dark);
}

.error-message {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.current-weather {
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  align-items: end;
  margin-top: 18px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 127, 143, 0.12), rgba(230, 162, 60, 0.12)),
    var(--panel-strong);
  border: 1px solid var(--line);
}

.location {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-weight: 900;
}

.updated,
.condition,
.metrics dt,
.daily-meta {
  color: var(--muted);
}

.updated {
  margin-top: 8px;
}

.temperature-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.weather-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: #f4c95d;
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-weight: 900;
}

.temperature {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 0.9;
}

.condition {
  margin-top: 6px;
  text-align: right;
  font-weight: 700;
}

.metrics {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.metrics div {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.metrics dt {
  font-size: 0.82rem;
}

.metrics dd {
  margin: 5px 0 0;
  font-size: 1.2rem;
  font-weight: 900;
}

.forecast-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.hour-card,
.daily-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hour-card {
  min-height: 110px;
  padding: 14px;
}

.hour-time,
.daily-date {
  font-weight: 900;
}

.hour-temp {
  margin-top: 13px;
  font-size: 1.5rem;
  font-weight: 900;
}

.hour-rain {
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.daily-section {
  margin-top: 24px;
}

.daily-list {
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.daily-card {
  min-height: 118px;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
}

.daily-range {
  font-size: 1.05rem;
  font-weight: 900;
}

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

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
    place-items: stretch;
  }

  .weather-panel {
    padding: 18px;
  }

  .topbar,
  .current-weather,
  .search-row {
    grid-template-columns: 1fr;
  }

  .status-pill {
    justify-self: start;
  }

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

  .condition {
    text-align: left;
  }

  .metrics,
  .forecast-grid,
  .daily-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .metrics,
  .forecast-grid,
  .daily-list {
    grid-template-columns: 1fr;
  }

  .temperature-block {
    align-items: flex-start;
    flex-direction: column;
  }
}
