:root {
  --base: #000080;
  --muted: #3a4a7a;
  --ring: #cfd6ff;
  --card: #f7f9ff
}

*,
*::before,
*::after {
  box-sizing: border-box
}

html {
  font-size: 16px
}

body {
  margin: 0;
  background: #fff;
  color: var(--base);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
  overflow-x: hidden
}

.wind-arrow {
  font-family: "Segoe UI Symbol", "Noto Sans Symbols", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
}

main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.25rem
}

@media(max-width:30rem) {
  main {
    padding: 1.25rem .75rem
  }
}

h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  margin: 0 0 1rem 0
}

.lead {
  font-size: 1.0625rem;
  color: var(--muted);
  margin: 0 0 1.25rem 0
}

.grid {
  display: grid;
  gap: 1rem;
  grid-auto-flow: row;
  justify-content: center;
  grid-template-columns: repeat(4, minmax(0, 20rem))
}

@media(max-width:64rem) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 20rem))
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: .75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-width: 0
}

.card.expanded {
  grid-column: span 2
}

@media(max-width:40rem) {
  .card.expanded {
    grid-column: 1/-1
  }
}

.date {
  font-weight: 600;
  margin-bottom: .5rem
}

.meta {
  font-size: .95rem;
  margin-top: .75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem .75rem
}

.meta div {
  display: flex;
  justify-content: space-between;
  min-width: 0
}

.temp {
  font-size: 1.15rem;
  font-weight: 600
}

.temp small {
  font-weight: 500;
  opacity: .8
}

.icon {
  width: clamp(2.8rem, 7vw, 3rem);
  height: auto;
  display: inline-block
}

.icon svg {
  width: 100%;
  height: auto;
  display: block
}

.segs {
  display: grid;
  gap: .5rem;
  margin: .5rem 0
}

.card .segs {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.card.expanded .segs {
  grid-template-columns: repeat(8, minmax(0, 1fr))
}

@media(max-width:48rem) {
  .card.expanded .segs {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }
}

.seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  text-align: center;
  min-width: 0
}

.seg-caption {
  font-size: .875rem;
  opacity: .95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.meta-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: .5rem 0
}

.legend-left,
.legend-right {
  display: flex;
  align-items: center;
  gap: .5rem
}

.legend-icon {
  font-size: 1rem
}

.rows-precip .seg {
  position: relative
}

.cell-with-lefticon {
  position: relative
}

.cell-with-lefticon::before {
  content: attr(data-lefticon);
  position: absolute;
  left: -1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem
}

.footer {
  margin-top: 2rem;
  font-size: .95rem
}

.note {
  font-size: .95rem
}

a {
  color: inherit;
  text-decoration-color: var(--ring)
}

img {
  max-width: 100%;
  height: auto
}

table {
  border-collapse: collapse;
  width: 100%
}

th,
td {
  padding: .5rem .625rem
}

td.num {
  text-align: right
}

td.txt {
  text-align: left
}

button {
  appearance: none;
  border: 1px solid var(--ring);
  background: #fff;
  color: var(--base);
  padding: .625rem .875rem;
  border-radius: .5rem;
  cursor: pointer;
  width: 100%
}

button:focus {
  outline: 3px solid var(--ring);
  outline-offset: 2px
}

.sky-clear {
  background: #fdfdfd
}

.sky-partly {
  background: #e9eef7
}

.sky-cloudy {
  background: #dde3ef
}

.sky-rain {
  background: #a8b3c9
}

.sky-rain-t2 {
  background: #808080;
  color: #fff
}

.sky-rain-t3 {
  background: #000;
  color: #fff
}

.sky-snow {
  background: #eef4ff
}

@media (max-width: 48rem) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
    width: 100%;
  }

  .icon {
    width: 3.2rem;
  }

}

@media (max-width: 40rem) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    grid-column: 1 / -1;
  }

}