@font-face {
  font-family: Manrope;
  src: url("assets/manrope.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Weather Icons";
  src: url("assets/icons.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --wine: #41121d;
  --red: #981630;
  --red-dark: #791126;
  --rose: #faeef0;
  --ink: #261b1f;
  --muted: #62565b;
  --line: #e9dfe2;
  --paper: #f9f6f5;
  --white: #fff;
  --radius: 1.2rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.4rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 600 1rem/1.55 Manrope, system-ui, sans-serif; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.14; letter-spacing: -.035em; }
a { color: var(--red-dark); text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #a52a48; outline-offset: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: .7rem; z-index: 5; padding: .6rem 1rem; background: var(--white); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  overflow: hidden;
  font: normal 400 1.25rem/1 "Weather Icons";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
}

.site-header { border-top: .32rem solid var(--red); border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--wine); text-decoration: none; line-height: 1.18; }
.brand > span { display: grid; gap: .12rem; }
.brand strong { font-size: 1.16rem; font-weight: 800; letter-spacing: -.04em; }
.brand span span { font-size: .85rem; color: var(--muted); }
.brand img { object-fit: contain; }
.header-nav { display: flex; align-items: center; gap: clamp(.9rem, 2.6vw, 2rem); }
.header-nav a { font-size: .9rem; font-weight: 800; color: var(--wine); text-decoration: none; }
.header-nav a:hover { text-decoration: underline; }
.district-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: .45rem .85rem;
  border: 1px solid #dfc7cf;
  border-radius: .55rem;
  color: var(--red-dark);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}
.district-link:hover { background: var(--rose); }

main { padding-block: 1.35rem 2.6rem; }
main:focus { outline: none; }
.alerts { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.alert-heading { display: flex; align-items: center; gap: .65rem; padding: .65rem 1rem; }
.alert-heading h2 { font-size: .96rem; letter-spacing: 0; }
.alert-heading p { color: var(--muted); font-size: .84rem; }
.alert-heading .text-link { margin-left: auto; }
.alert-icon { color: #287250; }
.alerts[data-state="loading"] .alert-icon { color: var(--muted); }
.alerts[data-state="active"], .alerts[data-state="unavailable"] { border-color: #e6c387; background: #fff9eb; }
.alerts[data-state="active"] .alert-icon, .alerts[data-state="unavailable"] .alert-icon { color: #895100; }
.alert-detail { margin-inline: 1rem; border-top: 1px solid #e6c387; padding-block: .65rem; }
.alert-detail summary { cursor: pointer; font-weight: 800; }
.alert-detail p { margin-block: .35rem; white-space: pre-line; overflow-wrap: anywhere; }
.alert-meta { color: var(--muted); font-size: .87rem; }
.text-link { font-size: .88rem; font-weight: 800; }

.announcement-widget { display: block; width: 100%; height: 75px; margin-bottom: 1rem; border: 0; background: transparent; }

.current {
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  background:
    linear-gradient(90deg, #3c101e 4%, #471321 28%, rgba(63, 13, 30, .82) 49%, rgba(67, 14, 28, .18) 100%),
    url("assets/seneca-valley.webp") center 58% / cover,
    var(--wine);
}
.current-main { min-height: 16.25rem; padding: clamp(1.25rem, 3.3vw, 2.5rem); display: grid; align-content: end; justify-items: start; gap: .75rem; }
.location p { display: flex; align-items: center; gap: .35rem; color: #ffdade; font-size: .91rem; font-weight: 800; }
.location p .icon { font-size: 1.09rem; }
h1 { font-size: clamp(2.35rem, 5.6vw, 4.35rem); letter-spacing: -.063em; }
.conditions { display: flex; gap: .65rem; align-items: center; }
.current-icon { font-size: clamp(2.25rem, 4.4vw, 3.2rem); color: #ffdc99; }
.current-temp { flex: none; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; font-weight: 800; letter-spacing: -.065em; }
.temp-unit { font-size: .54em; letter-spacing: -.03em; vertical-align: .42em; margin-left: .07em; }
.current-description { margin-left: .3rem; font-size: clamp(1.05rem, 2vw, 1.32rem); font-weight: 800; }
.current-status { color: #f9e3e8; font-size: .88rem; }
.current-footer { display: flex; align-items: center; justify-content: space-between; gap: .7rem 1.4rem; flex-wrap: wrap; padding: .85rem clamp(1.25rem, 3.3vw, 2.5rem); border-top: 1px solid #ffffff36; background: #360d19e8; }
.current-footer a { color: var(--white); font-size: .88rem; font-weight: 800; }
.current-footer a:focus-visible { outline-color: #ffdd94; }
.metrics { display: flex; align-items: center; gap: .9rem clamp(.9rem, 3.5vw, 2.75rem); flex-wrap: wrap; }
.metrics dt { display: flex; align-items: center; gap: .26rem; margin-bottom: .1rem; color: #f8dbe3; font-size: .84rem; }
.metrics dt .icon { font-size: 1rem; }
.metrics dd { font-weight: 800; }

.weather-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.1rem; margin-top: 1.15rem; align-items: stretch; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.panel-heading { padding: 1rem 1.15rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.panel-title { display: flex; align-items: center; gap: .65rem; }
.panel-title h2 { font-size: clamp(1.22rem, 2vw, 1.46rem); }
.panel-title p { color: var(--muted); font-size: .88rem; }
.heading-icon { display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: .7rem; background: var(--rose); color: var(--red-dark); }
.panel-status { min-height: 5rem; display: grid; align-items: center; margin-inline: 1.15rem; padding-bottom: 1rem; color: var(--muted); }
.panel-foot { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .86rem; padding: .7rem 1.15rem .95rem; }
.panel-foot .icon { color: #36657b; font-size: .95rem; }

.hour-controls { display: flex; gap: .4rem; }
.hour-controls button {
  display: grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--white);
  color: var(--red-dark);
  cursor: pointer;
}
.hour-controls button:not([aria-disabled="true"]):hover { background: var(--rose); }
.hour-controls button[aria-disabled="true"] { color: #71646a; background: #f7f3f4; cursor: default; }
.hour-list { display: grid; grid-auto-flow: column; grid-auto-columns: 6.6rem; gap: .4rem; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 1.15rem; padding: 0 0 .5rem; list-style: none; scrollbar-color: #cbaab5 #f8eef1; }
.hour { position: relative; display: grid; justify-items: center; align-content: start; grid-template-rows: 2.65rem 1.65rem 1.8rem minmax(2.9rem, 1fr) auto; gap: .3rem; min-height: 11.7rem; padding: .65rem .3rem; text-align: center; border: 1px solid #eee6e8; border-radius: .75rem; background: #faf7f8; scroll-snap-align: start; }
.hour:first-child { border-color: #e3c2cc; background: #fbf0f3; }
.hour-time { display: grid; align-content: center; line-height: 1.28; font-size: .9rem; font-weight: 800; }
.hour-date { color: var(--muted); font-size: .8rem; }
.weather-icon { color: #845410; font-size: 1.55rem; }
.hour-temp { font-size: 1.35rem; font-weight: 800; line-height: 1.15; }
.hour-condition { font-size: .83rem; line-height: 1.3; overflow-wrap: anywhere; }
.precip { color: #315f73; font-weight: 800; font-size: .88rem; }

.radar-figure { margin: 0 1.15rem; }
.radar-map { display: grid; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: .72rem; background: #ecf1e5; }
.radar-map img { grid-area: 1 / 1; width: 100%; height: 100%; }
.map-pin { position: absolute; z-index: 1; inset: 50% auto auto 50%; translate: -.31rem -.31rem; display: flex; align-items: center; gap: .26rem; color: #381421; font-size: .9rem; font-weight: 800; white-space: nowrap; text-shadow: -1px -1px #fff, 1px -1px #fff, -1px 1px #fff, 1px 1px #fff; }
.map-pin span { background: var(--red); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--wine); border-radius: 50%; width: .63rem; height: .63rem; }
.radar-figure figcaption { color: var(--muted); font-size: .86rem; padding-top: .45rem; }
.radar-figure:not(:has(.radar-map:not([hidden]))) figcaption { padding: .4rem 0 1rem; }
.radar-legend { justify-content: space-between; flex-wrap: wrap; padding-top: .4rem; }
.legend-scale { display: flex; align-items: center; gap: .4rem; }
.legend-colors { width: 5rem; height: .42rem; border-radius: 1rem; background: linear-gradient(90deg, #4fb8dd 0%, #27944d 32%, #e9cf19 61%, #fa8024 79%, #d32735 100%); }

#weekly { grid-column: 1 / -1; }
.week-table { margin: 0 1.15rem .75rem; }
.week-labels, .day-summary { display: grid; grid-template-columns: minmax(6rem, .95fr) minmax(0, 2fr) minmax(3.6rem, .45fr) minmax(5.6rem, .56fr) 1.15rem; align-items: center; gap: .55rem; padding: .6rem .35rem; }
.week-labels { color: var(--muted); font-size: .83rem; }
.week-labels span { white-space: nowrap; }
.day { border-top: 1px solid var(--line); }
.day-summary { position: relative; list-style: none; cursor: pointer; min-height: 3.5rem; }
.day-summary::-webkit-details-marker { display: none; }
.day-summary::marker { content: ""; }
.day-summary:hover { background: #fbf6f7; }
.day-name { font-weight: 800; }
.day-condition { display: flex; align-items: center; gap: .45rem; font-size: .93rem; min-width: 0; }
.day-condition .icon { font-size: 1.28rem; }
.day-temp { display: flex; gap: .45rem; white-space: nowrap; font-weight: 800; }
.day-low { color: var(--muted); }
.day-toggle { color: var(--red-dark); font-size: 1.12rem; }
.day[open] .day-toggle { rotate: 180deg; }
.day-desc { display: grid; gap: .45rem; padding: .25rem .5rem .9rem; color: var(--muted); font-size: .92rem; }
.day-desc strong { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); background: var(--white); color: var(--muted); }
.footer-inner { min-height: 4.25rem; font-size: .88rem; }
.footer-inner > a { font-weight: 800; }
.noscript { margin-top: 1rem; }

@media (max-width: 53rem) {
  .weather-grid { grid-template-columns: minmax(0, 1fr); }
  .current { background-position: center, 59% center; }
  #weekly { grid-column: auto; }
  .radar-figure { max-width: 38rem; }
}

@media (max-width: 36rem) {
  .header-inner { flex-wrap: wrap; gap: .5rem; padding-block: .6rem; }
  .header-nav { justify-content: space-between; width: 100%; }
  .header-nav a { display: flex; align-items: center; min-height: 2.5rem; }
  .current { background-image: linear-gradient(90deg, #3c101ef5, #49101fc9 55%, #4b192d6e), url("assets/seneca-valley.webp"); }
  .current-main { min-height: 13.25rem; }
  .current-footer { align-items: start; flex-direction: column; }
  .current-description { margin-left: 0; }
  .weather-grid { gap: .85rem; margin-top: .85rem; }
  .panel-heading { padding-inline: .75rem; }
  .panel-title { gap: .4rem; }
  .panel-heading > .text-link { max-width: 6.3rem; text-align: right; }
  .radar-figure, .hour-list, .week-table, .panel-status { margin-inline: .75rem; }
  .panel-foot { padding-inline: .75rem; }
  .week-labels, .day-summary { grid-template-columns: minmax(3rem, .72fr) minmax(0, 1.3fr) 2.9rem minmax(3.1rem, .61fr) .86rem; gap: .3rem; padding-inline: .15rem; }
  .week-labels { font-size: .78rem; }
  .day-condition { gap: .3rem; font-size: .85rem; }
  .day-condition .icon { display: none; }
  .day-name, .day-temp { font-size: .87rem; }
  .day-temp { gap: .25rem; }
  .day-toggle { font-size: .85rem; }
  .alert-heading { padding-inline: .6rem; }
  .alert-heading .text-link { max-width: 6rem; text-align: right; }
  .footer-inner { display: grid; gap: .35rem; align-content: center; padding-block: .8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hour-list { scroll-behavior: smooth; }
}
