:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #52645c;
  --line: rgba(23, 33, 28, 0.16);
  --surface: #ffffff;
  --surface-soft: #edf5ef;
  --leaf: #2f7656;
  --leaf-dark: #184733;
  --coral: #db5f45;
  --gold: #d89b24;
  --sky: #6ba5b8;
  --shadow: 0 18px 55px rgba(24, 71, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef4f0;
  color: var(--ink);
}

button {
  font: inherit;
}

main {
  min-height: 100vh;
}

.hero {
  min-height: 76vh;
  display: flex;
  align-items: end;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(9, 28, 20, 0.08), rgba(9, 28, 20, 0.74)),
    url("https://horel.chpc.utah.edu/data/station_cameras/wbbw_cam/wbbw_cam_current.jpg") center / cover;
  color: #fff;
}

.hero-copy {
  width: min(760px, 100%);
  padding-bottom: 22px;
}

.kicker {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 5rem;
  line-height: 0.92;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.05;
}

.condition {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 1.35rem;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: #fff;
  color: var(--leaf-dark);
  font-weight: 800;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.44);
}

#updatedAt {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.summary-band article {
  min-height: 138px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.summary-band article:last-child {
  border-right: 0;
}

.summary-band span,
.reading-card span {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.summary-band strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  line-height: 1.05;
}

.sky-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.feature-panel {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 28px;
  align-items: center;
  padding: 38px 32px;
  background: var(--surface-soft);
}

.feature-panel p:not(.kicker) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.sun-meter {
  width: 140px;
  height: 260px;
  display: flex;
  align-items: end;
  padding: 8px;
  border: 1px solid rgba(216, 155, 36, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

#sunFill {
  width: 100%;
  min-height: 8px;
  height: 12%;
  border-radius: 6px;
  background: linear-gradient(180deg, #f2ca65, var(--gold));
  transition: height 400ms ease;
}

.rain-panel {
  background: #f2f7f8;
}

.rain-lines {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(4, 18px);
  justify-content: center;
  align-items: end;
  gap: 14px;
}

.rain-lines span {
  display: block;
  min-height: 16px;
  border-radius: 8px;
  background: var(--sky);
}

.rain-lines span:nth-child(1) {
  height: 34%;
}

.rain-lines span:nth-child(2) {
  height: 70%;
}

.rain-lines span:nth-child(3) {
  height: 48%;
}

.rain-lines span:nth-child(4) {
  height: 58%;
}

.reading-list {
  padding: 48px 32px 64px;
}

.section-heading {
  max-width: 920px;
  margin: 0 auto 24px;
}

.section-heading h2 {
  color: var(--leaf-dark);
}

.readings {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reading-card {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(24, 71, 51, 0.08);
}

.reading-card strong {
  display: block;
  margin-top: 16px;
  font-size: 1.55rem;
  line-height: 1.05;
}

.reading-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.35;
}

.photo-credit {
  width: min(1120px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.photo-credit a {
  color: var(--leaf);
}

.error {
  color: #fff;
  background: rgba(219, 95, 69, 0.82);
  border-radius: 8px;
  padding: 12px 14px;
  display: inline-block;
}

@media (max-width: 860px) {
  .hero {
    min-height: 70vh;
    padding: 24px;
  }

  h1 {
    font-size: 3.7rem;
  }

  .condition {
    font-size: 1.12rem;
  }

  .summary-band,
  .sky-grid,
  .readings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel {
    grid-template-columns: 1fr;
  }

  .sun-meter,
  .rain-lines {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 560px) {
  .hero,
  .reading-list,
  .feature-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .summary-band,
  .sky-grid,
  .readings {
    grid-template-columns: 1fr;
  }

  .summary-band article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
