.forecast-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.75rem var(--page-gutter) 2rem;
  container: forecast-page / inline-size;
}

.place-picker-section + .place-picker-section,
.place-picker-idle > :has(.place-picker-section) + * > .place-picker-section {
  border-top: 1px solid var(--rule-soft);
  margin-top: 0.45rem;
  padding-top: 0.3rem;
}

.place-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem 0.25rem;
}

.place-picker-kicker {
  margin: 0;
}

.place-picker-action,
.place-picker-action-form {
  margin: 0;
  flex: none;
}

.place-picker-action {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.place-picker-action:hover:not(:disabled) {
  text-decoration: none;
}

.place-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.place-picker-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.place-picker-row + .place-picker-row {
  border-top: 1px solid var(--color-hairline);
}

.place-picker-link {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 0.5rem 0.875rem;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.place-picker-link:hover,
.place-picker-results button:hover,
.place-picker-results button[aria-selected="true"] {
  background: var(--color-wash);
  color: var(--color-ink);
}

.place-picker-row-actions {
  display: flex;
  align-items: center;
  flex: none;
  padding-right: 0.35rem;
}

.place-picker-empty {
  margin: 0;
  padding: 0.5rem 0.875rem 0.75rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.place-picker-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.place-picker-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 0;
  border-radius: 0;
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.place-picker-results li + li button {
  border-top: 1px solid var(--color-hairline);
}

.forecast-place-dismiss {
  display: flex;
  margin: 0;
}

.forecast-place-dismiss-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  line-height: 0;
  cursor: pointer;
}

.forecast-place-dismiss-button:hover,
.forecast-place-dismiss-button:focus-visible {
  color: var(--color-ink);
  background: transparent;
}

.forecast-place-dismiss-button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.forecast-place-dismiss-button svg {
  width: 0.65rem;
  height: 0.65rem;
  display: block;
}

.forecast-place-tools {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: none;
  margin-left: auto;
}

.forecast-search-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 0;
}

.forecast-search-form {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.place-suggestions {
  position: absolute;
  z-index: 3;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  width: auto;
  margin: 0;
  padding: 0.25rem 0;
  max-height: min(24rem, 70vh);
  overflow: auto;
}

.forecast-search-field {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.forecast-search-clear {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.2rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--color-muted);
  line-height: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.forecast-search-clear[hidden] {
  display: none;
}

.forecast-search-clear:hover,
.forecast-search-clear:focus-visible {
  color: var(--color-ink);
  background: transparent;
}

.forecast-search-clear:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.forecast-search-clear svg {
  width: 0.7rem;
  height: 0.7rem;
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.forecast-place-tools.is-stretch {
  margin-left: 0;
  width: 100%;
}

.forecast-place-tools.is-stretch .forecast-search-form {
  flex: 1;
  min-width: 0;
}

.forecast-place-tools.is-stretch .forecast-search-field,
.forecast-place-tools.is-stretch input.forecast-search-input {
  width: auto;
  flex: 1;
  min-width: 0;
}

.place-size {
  width: 2.5rem;
  height: 1.15rem;
  flex: none;
  color: var(--color-ink);
}

/* 1rem keeps iPhone from zooming the page when this field is focused. */
input.forecast-search-input {
  width: 13rem;
  padding: 0.5rem 1.75rem 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.25;
}

/* Keep the custom clear button; hide the browser's built-in search cancel. */
input.forecast-search-input::-webkit-search-decoration,
input.forecast-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.forecast-search-button,
.forecast-locate-button {
  flex: none;
  padding: 0.5rem 0.625rem;
}

.forecast-search-button svg,
.forecast-locate-button svg {
  width: 1.125rem;
  height: 1.125rem;
}

.forecast-locate-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.forecast-locate-button.is-locating:disabled {
  opacity: 1;
  cursor: progress;
}

.forecast-locate-button.is-locating svg {
  animation: forecast-locate-spin 3s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .forecast-locate-button.is-locating svg {
    animation: none;
  }
}

@keyframes forecast-locate-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fill the search row without widening it, so the warning wraps inside the card. */
.forecast-locate-status {
  width: 0;
  min-width: 100%;
  margin: 0.35rem 0 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.35;
}

.forecast-locate-status:empty {
  display: none;
}

.location-matches {
  margin-top: 1.5rem;
}

.location-matches h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.location-matches ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

.location-matches li + li {
  border-top: 1px solid var(--color-hairline);
}

.location-matches a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.875rem;
  text-decoration: none;
}

.location-matches a:hover {
  background: var(--color-wash);
}

/* Alerts */

.weather-alerts {
  margin-top: 2rem;
}

.weather-alerts h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.weather-alerts-empty {
  margin: 0;
  color: var(--color-muted);
}

.weather-alerts-scroll {
  max-height: 12rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.weather-alert {
  margin-bottom: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-left: 4px solid #94a3b8;
  border-radius: 0.5rem;
}

.weather-alert-minor {
  border-left-color: #eab308;
}

.weather-alert-moderate {
  border-left-color: #f97316;
}

.weather-alert-severe,
.weather-alert-extreme {
  border-left-color: #dc2626;
}

.weather-alert-expired {
  opacity: 0.65;
}

.weather-alert summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.weather-alert-event {
  font-weight: 600;
}

.weather-alert-status {
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--alert-pill-bg);
  color: var(--alert-pill-ink);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-alert-active .weather-alert-status {
  background: var(--alert-pill-active-bg);
  color: var(--alert-pill-active-ink);
}

.weather-alert-upcoming .weather-alert-status {
  background: var(--alert-pill-upcoming-bg);
  color: var(--alert-pill-upcoming-ink);
}

.weather-alert-window {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.weather-alert-body {
  padding: 0 1rem 1rem;
}

.weather-alert-headline {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

/* NWS alert text is pre-wrapped with meaningful line breaks. */
.weather-alert-text {
  margin: 0 0 0.75rem;
  white-space: pre-line;
  color: var(--color-prose);
}

.weather-alert-source {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Forecast */

.forecast-results {
  margin-top: 1rem;
}

.forecast-location-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
}

.forecast-location-heading > .forecast-place-tools {
  grid-column: 2;
  grid-row: 1;
}

.forecast-location-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-column: 1 / -1;
  min-width: 0;
  text-align: left;
}

.forecast-location-name {
  display: flex;
  align-items: center;
  position: relative;
  grid-column: 1;
  grid-row: 1;
  gap: 0.35rem 0.6rem;
  min-width: 0;
  max-width: 100%;
}

.forecast-location-switcher {
  position: relative;
  min-width: 0;
}

.forecast-location-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.forecast-location-switch span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-location-caret {
  width: 0.7rem;
  height: 0.45rem;
  flex: none;
  color: var(--color-muted);
}

.forecast-location-switch[aria-expanded="true"] .forecast-location-caret {
  transform: rotate(180deg);
}

.forecast-location-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 0.25rem);
  left: 0;
  width: max-content;
  min-width: 12rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 8rem);
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.forecast-location-menu-item {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}

.forecast-location-menu-item:hover {
  background: var(--color-wash);
  color: var(--color-ink);
}

@media (max-width: 56rem) {
  .forecast-location-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .forecast-location-heading > .forecast-place-tools {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: max-content;
    max-width: 100%;
    margin: 0 0 0.65rem 0;
  }

  .forecast-location-heading input.forecast-search-input {
    width: 16rem;
  }

  .forecast-location-name {
    grid-row: 2;
  }
}

@media (max-width: 40rem) {
  .forecast-location-heading > .forecast-place-tools {
    width: 100%;
    max-width: 100%;
  }

  .forecast-location-heading .forecast-search-form,
  .forecast-location-heading .forecast-search-field {
    flex: 1;
    min-width: 0;
  }

  .forecast-location-heading input.forecast-search-input {
    width: 100%;
  }
}

.forecast-location-heading h2 {
  margin: 0;
  min-width: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.forecast-photo-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 2px;
  margin: 0;
  padding: 0.15rem;
  border-radius: 0.25rem;
  color: var(--color-ink);
  line-height: 0;
  text-decoration: none;
}

.forecast-photo-button:hover,
.forecast-photo-button:focus-visible {
  background: transparent;
}

.forecast-photo-button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.forecast-photo-button svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

#forecast-add-slot {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 2px;
}

.forecast-add-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  line-height: 0;
}

.forecast-add-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.forecast-add-button:hover {
  background: transparent;
}

.forecast-add-button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.forecast-add-button {
  margin: 0;
  padding: 0.15rem;
  color: #e25822;
  line-height: 0;
}

.forecast-add-button svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.forecast-add-button svg path {
  fill: transparent;
  transition: fill 0.15s ease;
}

.forecast-add-button:hover,
.forecast-add-button:focus-visible {
  color: #e25822;
  background: transparent;
}

.forecast-add-button:hover svg path,
.forecast-add-button:focus-visible svg path {
  fill: #ffb347;
}

.forecast-add-saved {
  display: inline-flex;
  color: #15803d;
}

.forecast-add-saved[data-controller="saved-place"] {
  animation: forecast-add-confirm 0.9s ease forwards;
}

.forecast-add-saved svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

@keyframes forecast-add-confirm {
  0% { opacity: 0; transform: scale(0.7); }
  18% { opacity: 1; transform: scale(1); }
  62% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .forecast-add-saved[data-controller="saved-place"] {
    animation: none;
  }
}

.forecast-freshness {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--color-muted);
  text-align: left;
}

.forecast-meta .forecast-place {
  margin: 0.15rem 0 0;
  color: var(--color-prose);
  text-align: left;
}

/* Right now and the sun card pair up only when each card still fits three
   stat columns of "NNW 45 mph". The full 48rem desktop page pairs them. */
.forecast-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  align-items: stretch;
  gap: 1rem;
  margin-top: 0;
}

.forecast-summary > turbo-frame {
  display: flex;
  min-width: 0;
}

.forecast-summary > turbo-frame > .tile {
  flex: 1 1 auto;
  width: 100%;
}

/* Beside Right now, the sun card is as tall as that card less its station
   caution (--caution-space, set by conditions-caution), so the caution
   does not stretch the chart. Start alignment and a min-height let the
   card keep its own height when that is taller, without growing the row.
   Stacked, the row is the card's own, so this adds nothing. */
.forecast-sky {
  position: relative;
  display: flex;
  align-self: start;
  min-width: 0;
  min-height: calc(100% - var(--caution-space, 0px));
}

.forecast-sky > .forecast-sun {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Extra height goes to the daylight chart, which is drawn to stretch. */
.forecast-sun > .forecast-daylight-chart {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.forecast-sky.is-horoscope > .forecast-sun > * {
  visibility: hidden;
}

/* Inset by the sun tile border so chips line up with the AQI chip, which
   sits inside .forecast-conditions and is already past that 1px edge. */
.forecast-sky > turbo-frame#forecast-horoscope,
.forecast-sky > .forecast-horoscope-guest {
  position: absolute;
  inset: 1px;
  pointer-events: none;
}

.forecast-sky:has(#forecast-horoscope) > .forecast-sun > .kicker {
  margin-right: 12.5rem;
}

.forecast-sky:has(.forecast-horoscope-guest) > .forecast-sun > .kicker {
  margin-right: 9.5rem;
}

/* When the two cards stack (under two 21rem columns plus the gap), the
   sun card would load first and split Right now from Today. Unwrap the
   summary row so the cards share one column, then move the sun card
   below the map. Wide enough to pair, it stays beside Right now. */
@container forecast-page (width < 43rem) {
  .forecast-results {
    display: flex;
    flex-direction: column;
  }

  .forecast-summary {
    display: contents;
  }

  .forecast-sky {
    order: 1;
    align-self: stretch;
    min-height: 0;
    margin-top: 1.5rem;
  }

  .forecast-results > turbo-frame#forecast-radar-tile ~ * {
    order: 2;
  }
}

.forecast-sun .kicker {
  margin-bottom: 0.5rem;
}

.forecast-sun > .kicker {
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.forecast-sun-times {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem 0.5rem;
  margin: 0;
}

.forecast-sun-times dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.forecast-sun-times dd {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.forecast-sun-end {
  text-align: right;
}

@media (max-width: 40rem) {
  .forecast-sun-times dd {
    font-size: 0.75rem;
  }
}

.forecast-daylight-chart {
  position: relative;
  margin-top: 0.4rem;
}

.forecast-daylight-noon {
  position: absolute;
  top: var(--horizon, 50%);
  transform: translate(-50%, 0.2rem);
  padding: 0 0.2rem;
  background: var(--color-surface);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #b45309;
  white-space: nowrap;
}

.forecast-daylight {
  display: block;
  flex: 1 0 6rem;
  width: 100%;
  height: 6rem;
  min-height: 6rem;
  overflow: hidden;
}

.forecast-daylight-length {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.forecast-daylight-change {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--color-muted);
}

.forecast-daylight-arrow {
  width: 0.55rem;
  height: 0.55rem;
}

.forecast-daylight-change.is-shorter .forecast-daylight-arrow {
  transform: rotate(180deg);
}

.forecast-daylight-fill {
  fill: #fcd34d;
  fill-opacity: 0.55;
}

.forecast-daylight-night {
  fill: #64748b;
  fill-opacity: 0.1;
}

[data-theme="dark"] .forecast-daylight-night {
  fill-opacity: 0.35;
}

.forecast-daylight-moon-fill {
  fill: #e2e8f0;
  fill-opacity: 0.45;
}

.forecast-daylight-horizon {
  stroke: #64748b;
  stroke-width: 1;
}

.forecast-daylight-curve,
.forecast-daylight-moon {
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.forecast-daylight-curve {
  stroke: #d97706;
  stroke-width: 1.75;
}

.forecast-daylight-moon {
  stroke: var(--color-border);
  stroke-width: 1.25;
}

.forecast-daylight-line {
  stroke: #94a3b8;
  stroke-width: 1;
}

.forecast-daylight-line.is-sunrise,
.forecast-daylight-line.is-sunset {
  stroke: #eab308;
  stroke-width: 1.5;
}

.forecast-daylight-line.is-dawn,
.forecast-daylight-line.is-dusk {
  stroke: #ea580c;
  stroke-width: 1.35;
}

.forecast-daylight-line.is-noon {
  stroke: #d97706;
  stroke-width: 1.5;
}

.forecast-daylight-line.is-moonrise {
  stroke: #64748b;
  stroke-width: 1.25;
}

.forecast-daylight-line.is-now {
  stroke: var(--color-accent);
  stroke-width: 2;
}

.forecast-sun > * + .forecast-moon {
  margin-top: 0;
  padding-top: calc(1.3rem - 0.875rem);
}

.forecast-moon-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forecast-moon-symbol {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  display: block;
  color: var(--color-ink);
}

.forecast-moon-phase {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.forecast-moon-rise {
  margin: 0 0 0 auto;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.forecast-moon-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.forecast-moon-tick {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.forecast-moon-tick svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.forecast-moon-tick.is-new svg,
.forecast-moon-tick.is-full svg {
  width: 1.25rem;
  height: 1.25rem;
}

.forecast-moon-tick-label {
  margin-top: 0.1rem;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-muted);
  white-space: nowrap;
}

.forecast-conditions-main {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* The drawing sits inside a square with spare margin. Match the reading
   beside it so the square does not make the summary row taller than the sun card. */
.forecast-conditions-main .weather-icon:not(.is-dual) svg,
.forecast-conditions-main .weather-icon-fallback {
  width: 3.5rem;
  height: 3.5rem;
}

.forecast-conditions-reading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
}

.forecast-conditions-temp {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
}

.forecast-feels-like {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.forecast-feels-like.is-hot {
  color: #dc2626;
}

.forecast-feels-like.is-cold {
  color: var(--color-accent);
}

.forecast-conditions-text {
  margin: 0.125rem 0 0;
  color: var(--color-prose);
}

.forecast-conditions-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* The station lookup can take a few seconds. The dots step out so the tile
   reads as still working, then the frame replaces this line. The air-quality
   chip is not here yet, so the heading can use the full width. */
.forecast-conditions[aria-busy="true"] > .kicker {
  margin-right: 0;
}

.forecast-loading-ellipsis span {
  opacity: 0;
  animation: forecast-loading-ellipsis 1.2s infinite;
}

.forecast-loading-ellipsis span:nth-child(2) {
  animation-name: forecast-loading-ellipsis-2;
}

.forecast-loading-ellipsis span:nth-child(3) {
  animation-name: forecast-loading-ellipsis-3;
}

@media (prefers-reduced-motion: reduce) {
  .forecast-loading-ellipsis span {
    opacity: 1;
    animation: none;
  }
}

@keyframes forecast-loading-ellipsis {
  0%, 24% { opacity: 0; }
  25%, 100% { opacity: 1; }
}

@keyframes forecast-loading-ellipsis-2 {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

@keyframes forecast-loading-ellipsis-3 {
  0%, 74% { opacity: 0; }
  75%, 100% { opacity: 1; }
}

/* A side note on the card, not a page message: small type, tight box. */
.forecast-conditions-caution {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.forecast-conditions-caution .flash-dismiss {
  width: 2rem;
  height: 2rem;
  margin: -0.45rem -0.5rem -0.45rem 0;
}

.forecast-conditions-caution .flash-dismiss svg {
  width: 0.75rem;
  height: 0.75rem;
}

.forecast-conditions-meta {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-muted);
}

.forecast-horoscope-open,
.forecast-horoscope-close,
.forecast-horoscope-panel {
  pointer-events: auto;
}

.forecast-horoscope-open,
.forecast-horoscope-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

.forecast-horoscope-open[hidden],
.forecast-horoscope-close[hidden],
.forecast-horoscope-panel[hidden] {
  display: none;
}

.forecast-horoscope-chip,
.forecast-aqi-chip {
  gap: 0.4rem;
  box-sizing: border-box;
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  width: max-content;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.forecast-horoscope-chip .forecast-horoscope-symbol,
.forecast-sky-mark {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  display: block;
}

.forecast-horoscope-panel {
  position: absolute;
  inset: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
}

.forecast-horoscope-panel > .kicker {
  display: flex;
  align-items: center;
  min-height: 2rem;
  margin: 0 8.5rem 0.75rem 0;
}

.forecast-horoscope-sign {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.forecast-horoscope-symbol {
  width: 2.25rem;
  height: 2.25rem;
}

.forecast-horoscope-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 0.35rem;
}

.forecast-horoscope-section {
  margin-top: 0.75rem;
}

.forecast-horoscope-section .kicker {
  margin: 0;
}

.forecast-horoscope-section p,
.forecast-horoscope-empty {
  margin: 0.25rem 0 0;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.forecast-horoscope-credit {
  flex: none;
  margin: auto 0 0;
  padding-top: 0.5rem;
  background: var(--color-surface);
  font-size: 0.75rem;
  color: var(--color-muted);
}

.forecast-board {
  margin-top: 1.5rem;
}

.forecast-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.forecast-board-header .kicker {
  margin: 0;
}

turbo-frame#forecast-hourly {
  display: block;
  min-width: 0;
}

/* The placeholder reserves the hour column, so the 7-day card below does not
   jump when the hours arrive. The loaded chart does not use this. */
.forecast-hourly-pending {
  min-height: 12.4375rem;
}

.forecast-hourly {
  margin-top: 1.5rem;
  min-width: 0;
}

.forecast-hourly-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.forecast-hourly-scroll {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 0;
  --hour-wind-gap: 0.2rem;
  --hour-wind-size: 0.85rem;
  --hour-wind-pad: 0.5rem;
  --hour-compass-size: 1.75rem;
}

.forecast-hourly-chart {
  flex: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

/* Safari sizes a flex item to the scrollport, then lets the hours paint
   over the next day and the More button. The track stays as wide as the hours. */
.forecast-hourly-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
}

.forecast-hourly-track > turbo-frame {
  display: contents;
}

.forecast-day {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  flex: none;
  min-width: max-content;
}

.forecast-day + .forecast-day {
  margin-left: 0.25rem;
  padding-left: 0.25rem;
  border-left: 1px solid var(--color-hairline);
}

.forecast-day-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 calc(2.25rem + 4px);
  margin: 0;
  background: var(--color-surface);
  box-shadow: -2px 0 0 var(--color-surface), 2px 0 0 var(--color-surface);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.forecast-day-label.is-holiday {
  flex-direction: column;
  gap: 0.25rem;
  padding-block: 0.35rem;
  letter-spacing: 0.06em;
}

.forecast-day-label.is-holiday .forecast-day-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.forecast-day-label .holiday-pumpkin {
  width: 1.05rem;
  height: 1.05rem;
}

.forecast-day-hours {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: stretch;
  flex: none;
  gap: 0.2rem;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forecast-hour {
  display: flex;
  flex: 0 0 3.75rem;
  min-width: 3.75rem;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1px 1px var(--hour-wind-pad, 1px);
  border-radius: 0.45rem;
  background: var(--hour-day);
  color: var(--hour-ink);
}

.forecast-hour.is-night {
  background: var(--hour-night);
  color: var(--color-ink);
}

.forecast-hour.is-advisory {
  box-shadow: inset 0 0 0 1px #eab308;
}

.forecast-hour.is-warning {
  box-shadow: inset 0 0 0 1px #dc2626;
}

.forecast-hour time {
  font-size: 0.75rem;
  color: inherit;
}

.forecast-hourly .weather-icon svg,
.forecast-hourly .weather-icon-fallback {
  width: 2.25rem;
  height: 2.25rem;
}

.forecast-hourly .weather-icon.is-dual svg {
  width: 1.75rem;
  height: 1.75rem;
}

.forecast-hour-temp {
  font-size: 0.875rem;
  font-weight: 600;
}

.forecast-hour-feels {
  color: var(--color-accent);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.forecast-hour-feels.is-hot {
  color: #dc2626;
}

/* Chance of precipitation, inside the icon's cloud, colored by type like
   the Outlook chart's bars. Sized in the icon's 64-unit box. The cloud is
   white in both themes, so these keep the light theme's strong colors. */
.weather-icon-chance {
  fill: #2563eb;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.weather-icon-chance.is-snow { fill: #7c3aed; }
.weather-icon-chance.is-ice { fill: #0891b2; }

.forecast-hourly-wind-unit {
  flex: none;
  align-self: end;
  margin: 0 0 var(--hour-wind-pad);
  color: var(--color-muted);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.forecast-hourly-compass {
  position: absolute;
  left: 0.8rem;
  bottom: calc(var(--hour-wind-pad) + (var(--hour-wind-size) - var(--hour-compass-size)) / 2);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hour-compass-size);
  height: var(--hour-compass-size);
  color: var(--color-muted);
}

.forecast-hourly-compass svg {
  width: var(--hour-compass-size);
  height: var(--hour-compass-size);
}

.forecast-hourly-compass text {
  fill: currentColor;
}

.forecast-hour-wind {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  height: var(--hour-wind-size);
  margin-top: var(--hour-wind-gap);
  color: inherit;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
}

.forecast-hour-wind-mark {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
  transform: rotate(calc(var(--wind) * 1deg));
}

.forecast-hour-plot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  width: auto;
  height: 5.5rem;
  margin: auto 2px 0;
  border-bottom: 1px solid var(--color-hairline);
  --hour-dew: #9ca3af;
  --hour-dew-word: #4b5563;
  --hour-bar-width: 1.45rem;
  /* Stay inside the bar, on a whole pixel, so every dash is the same weight. */
  --dew-line: round(nearest, min(var(--dew), calc(var(--bar) - 0.25rem)), 1px);
}

.forecast-hour-dew-mark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--dew-line);
  display: flex;
  align-items: stretch;
  gap: 1px;
  width: var(--hour-bar-width);
  height: 1px;
  margin-inline: auto;
}

.forecast-hour-dew-mark::before,
.forecast-hour-dew-mark::after {
  content: "";
  flex: 1 0 0;
  background: var(--hour-dew);
}

.forecast-hour-dew-word {
  align-self: center;
  flex: none;
  color: var(--hour-dew-word);
  font-size: 0.375rem;
  font-weight: 600;
  line-height: 1;
}

.forecast-hour-dew-value {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--dew-line) - 0.85rem);
  margin-inline: auto;
  text-align: center;
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1;
  /* Dark in both themes. The ink token turns light, and this edge disappears. */
  text-shadow: 0 0 2px #1f2937, 0 0 2px #1f2937;
}

.forecast-hour-bar {
  display: block;
  width: var(--hour-bar-width);
  height: var(--bar);
  border-radius: 0.3rem 0.3rem 0.1rem 0.1rem;
}

.forecast-hourly-more {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  flex: none;
  align-self: end;
  width: 1.75rem;
  height: 9.5rem;
  margin: 0 0.15rem calc(var(--hour-wind-gap) + var(--hour-wind-size) + var(--hour-wind-pad)) 0.35rem;
  padding: 0;
  line-height: 1;
  letter-spacing: 0.04em;
}

.forecast-period-rows,
.forecast-period-row,
.forecast-period {
  min-width: 0;
}

.forecast-period-rows {
  display: grid;
  gap: 1rem;
  margin-top: 0;
}

.forecast-period-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 32rem) {
  .forecast-period-row {
    grid-template-columns: 1fr 1fr;
  }

  .forecast-period-row .forecast-period-night {
    grid-column: 2;
  }
}

.forecast-period {
  border-color: var(--color-wash);
}

.forecast-period-night {
  background: var(--color-page);
  border-color: var(--color-line);
}

.weather-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
}

.weather-icon svg,
.weather-icon-fallback {
  width: 4rem;
  height: 4rem;
  display: block;
}

.weather-icon.is-dual svg {
  width: 3rem;
  height: 3rem;
}

.forecast-period-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.forecast-period-header > div {
  min-width: 0;
}

.forecast-period-header h3 {
  margin: 0;
}

.forecast-period-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.forecast-period-name > span {
  min-width: 0;
}

.forecast-period-kicker {
  margin: 0.1rem 0 0;
  font-size: 0.6875rem;
}

.forecast-period-holiday {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0;
  color: var(--color-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.holiday-pumpkins {
  display: inline-flex;
  align-items: flex-end;
  flex: none;
}

.holiday-pumpkin {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.holiday-pumpkin.is-small {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0 0 0.04rem -0.35rem;
}

.holiday-ghost {
  width: 1.7rem;
  height: 1.5rem;
  display: block;
}

.holiday-ballot {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}

.forecast-day-label .holiday-ballot {
  width: 1.45rem;
  height: 1.45rem;
}

.admin-holiday-day {
  height: 8.5rem;
}

.forecast-short {
  margin: 0.25rem 0 0;
  color: var(--color-prose);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.forecast-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 0.5rem;
}

.forecast-details > div {
  min-width: 6rem;
}

.forecast-period-stats {
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.forecast-period-stats > div {
  flex: 0 0 auto;
  min-width: 0;
}

.forecast-period-stats > div:last-child {
  flex: 1 1 7rem;
  min-width: min-content;
}

.forecast-period-stats dd {
  white-space: nowrap;
}

.forecast-period-temp {
  font-size: 1.5rem;
  line-height: 1.1;
}

/* Equal thirds. "NNW 45 mph" and "Precip (3 hr)" are the widest
   readings and both fit a third of the narrowest card. */
.forecast-conditions-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* The reports button's own line: right edge, just under the stats.
   Pressure follows with no gap; its label is on the left, clear of it. */
.forecast-conditions-reports {
  --reports-control-height: calc(0.8125rem * 1.2 + 0.6rem + 2px);
  margin-top: 0.5rem;
}

.forecast-conditions .forecast-conditions-stats + .forecast-details {
  margin-top: 1rem;
}

.forecast-conditions .forecast-conditions-reports + .forecast-details {
  margin-top: 0;
}

.forecast-conditions-stats > .forecast-details-col {
  min-width: 0;
}

.forecast-details-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.forecast-details-col dd {
  white-space: nowrap;
}

.forecast-details-col dd:has(span + span) {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  white-space: normal;
}

.forecast-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.forecast-details dd {
  margin: 0.125rem 0 0;
  font-weight: 600;
}

.forecast-details-pressure {
  flex: 1 1 100%;
  min-width: 12rem;
}

.forecast-pressure-meter {
  min-width: 7rem;
  padding-top: 0.55rem;
}

.forecast-pressure-track {
  position: relative;
  display: block;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--scale-low), var(--scale-mid) 50%, var(--scale-high));
}

.forecast-pressure-marker {
  position: absolute;
  top: 50%;
  left: var(--pressure);
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0 0 1px var(--color-border);
  transform: translate(-50%, -50%);
}

.forecast-pressure-marker.is-steady {
  width: 0.3rem;
  height: 1rem;
  border-radius: 999px;
}

.forecast-pressure-marker.is-rising,
.forecast-pressure-marker.is-falling,
.forecast-pressure-marker.is-rising-fast,
.forecast-pressure-marker.is-falling-fast,
.forecast-pressure-marker.is-rising-very-fast,
.forecast-pressure-marker.is-falling-very-fast {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--color-ink);
}

.forecast-pressure-marker.is-rising,
.forecast-pressure-marker.is-falling {
  width: calc(1.45rem * 12 / 22);
  height: 1.45rem;
}

.forecast-pressure-marker.is-rising-fast,
.forecast-pressure-marker.is-falling-fast {
  width: calc(1.45rem * 17.76 / 22);
  height: 1.45rem;
}

.forecast-pressure-marker.is-rising-very-fast,
.forecast-pressure-marker.is-falling-very-fast {
  width: calc(1.45rem * 23.52 / 22);
  height: 1.45rem;
}

.forecast-pressure-marker.is-rising-very-fast {
  color: var(--scale-low);
}

.forecast-pressure-marker.is-falling-very-fast {
  color: var(--scale-high);
}

.forecast-pressure-marker svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.forecast-pressure-hit {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  appearance: none;
}

.forecast-pressure-hit::before {
  content: "";
  position: absolute;
  inset: -0.45rem;
}

.forecast-pressure-hit:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.forecast-pressure-popover[hidden] {
  display: none;
}

.forecast-pressure-popover {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--color-tooltip);
  color: var(--color-on-tooltip);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.3;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
}

.forecast-pressure-popover.is-start {
  left: 0;
  transform: none;
}

.forecast-pressure-popover.is-end {
  right: 0;
  left: auto;
  transform: none;
}

.forecast-pressure-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.55rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.forecast-aqi-scale {
  margin: 0;
  padding-inline: 0.4rem;
}

.forecast-aqi-scale.forecast-pressure-meter {
  padding-top: 0;
}

.forecast-aqi-scale .forecast-pressure-track {
  background: var(--aqi-scale);
}

.forecast-aqi-scale .forecast-pressure-ends {
  margin-top: 0.2rem;
}

.forecast-aqi-scale .forecast-pressure-marker {
  background: #0f172a;
  border-color: #fff;
}

.forecast-detailed {
  margin: 0;
  color: var(--color-prose);
}

.forecast-attribution {
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-align: center;
}

@media (max-width: 40rem) {
  .forecast-attribution-part {
    display: block;
  }
}

turbo-frame#forecast-accumulation {
  display: block;
}

.forecast-board > turbo-frame#forecast-accumulation:has(.forecast-accumulation-line) {
  margin: -0.25rem 0 0.85rem;
}

.forecast-results > turbo-frame#forecast-accumulation:has(.forecast-accumulation-line) {
  margin-top: 1.5rem;
}

.forecast-accumulation-line {
  margin: 0;
  color: var(--color-prose);
}

.forecast-radar-tile {
  margin-top: 1.5rem;
  padding-top: 0.35rem;
  container: forecast-tile / inline-size;
}

.forecast-radar-tile > .forecast-board-header {
  min-height: 1.75rem;
  margin-bottom: 0.3rem;
}

/* Same vertical size as the AQI chip. */
.forecast-radar-tile .map-open {
  box-sizing: border-box;
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
  padding: 0 1rem;
  font-size: 1rem;
  line-height: 1;
}

.forecast-radar-tile:has(.forecast-radar-stage) {
  padding-bottom: 0;
  overflow: hidden;
}

.forecast-board-footer {
  margin-top: 0.25rem;
  padding-bottom: 0.4rem;
}

.forecast-board-footer:not(:has(:is(span, button):not([hidden]))) {
  display: none;
}

.forecast-board-footer .map-credit {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.forecast-board-footer .map-photo-pause-note,
.forecast-board-footer [data-photo-live] {
  margin-right: 0.35rem;
}

.forecast-board-footer [data-photo-live][hidden] {
  display: none;
}

.forecast-board-footer .map-photo-pause-note {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.forecast-board-footer .map-photo-pause {
  margin-left: 0;
}

.forecast-radar-empty {
  margin: 0;
  color: var(--color-muted);
}

.forecast-radar-stage {
  position: relative;
  aspect-ratio: 3 / 2;
  margin-inline: calc(-1 * var(--tile-pad));
  overflow: hidden;
  background: var(--map-ocean);
}

/* The stage is wider than this tile by the card padding. A narrow tile is
   nearly square so the layer rail fits. */
@container forecast-tile (width < 38rem) {
  .forecast-radar-stage {
    aspect-ratio: 6 / 6.5;
  }
}

.forecast-radar-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.forecast-radar-tile .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--map-ocean);
  font-family: inherit;
  pointer-events: none;
}

.forecast-radar-tile .leaflet-photos-pane,
.forecast-radar-tile .map-photo-pin {
  pointer-events: auto;
}

/* A mouse can drag the tile. A finger still scrolls the page, and a tap
   lands on the forecast so the amount under that point can open. */
@media (pointer: fine) {
  .forecast-radar-tile .leaflet-container {
    pointer-events: auto;
  }
}

@media (pointer: coarse) {
  .forecast-radar-tile .leaflet-container {
    pointer-events: auto;
    touch-action: pan-y;
  }
}

.forecast-conditions {
  position: relative;
  display: flex;
  flex-direction: column;
}

.forecast-conditions > .kicker {
  display: flex;
  align-items: center;
  min-height: 2rem;
  margin: 0 8.5rem 0.35rem 0;
}

.forecast-conditions > [data-aqi-tile-target="weather"] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.forecast-conditions.is-aqi > [data-aqi-tile-target="weather"] {
  visibility: hidden;
}

.forecast-conditions > turbo-frame#forecast-aqi {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.forecast-aqi-open,
.forecast-aqi-close,
.forecast-aqi-panel {
  pointer-events: auto;
}

.forecast-aqi-open,
.forecast-aqi-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.forecast-aqi-panel {
  position: absolute;
  top: 3.75rem;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.875rem;
}

.forecast-aqi-open[hidden],
.forecast-aqi-close[hidden],
.forecast-aqi-panel[hidden] {
  display: none;
}

.forecast-aqi-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--aqi-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #0f172a 25%, transparent);
  flex: none;
}

.forecast-aqi-chip .weather-icon,
.forecast-aqi-chip .weather-icon svg,
.forecast-aqi-chip .weather-icon-fallback {
  width: 1.15rem;
  height: 1.15rem;
}

.forecast-aqi-reading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: none;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.35rem;
}

.forecast-aqi-category {
  font-weight: 600;
}

.forecast-aqi-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.forecast-aqi-source {
  color: var(--color-muted);
  font-weight: 400;
}

.forecast-aqi-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 0.35rem;
}

.forecast-aqi-body > .kicker {
  margin-top: 1rem;
  margin-bottom: 0.125rem;
}

.forecast-aqi-pollutants {
  list-style: none;
  margin: 0;
  padding: 0;
}

.forecast-aqi-pollutants li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
}

.forecast-aqi-pollutants li span:last-child {
  flex: none;
  font-weight: 600;
}

.forecast-aqi-pollutants li + li {
  margin-top: 0.2rem;
}

.forecast-aqi-panel > .forecast-conditions-meta {
  flex: none;
  margin-top: auto;
  padding-top: 0.5rem;
  background: var(--color-surface);
}

@media (max-width: 40rem) {
  .forecast-page {
    padding-bottom: 0.5rem;
  }

  .forecast-attribution {
    margin-top: 1.25rem;
  }

  .forecast-page .forecast-location-heading {
    padding-right: calc(var(--app-bar-clearance) - var(--page-gutter));
  }

  /* These cards sit in .page-bleed, which already runs them to the screen
     edge. This only drops the card chrome. */
  .forecast-page .tile {
    border: 0;
    border-radius: 0;
  }

  /* No border to inset past here, so the horoscope chip keeps the AQI
     chip's right edge. */
  .forecast-sky > turbo-frame#forecast-horoscope,
  .forecast-sky > .forecast-horoscope-guest {
    inset: 0;
  }

  .forecast-page .forecast-board {
    padding-left: 0;
    padding-right: 0;
  }

  .forecast-page .forecast-board > .forecast-board-header,
  .forecast-page .forecast-board > turbo-frame#forecast-accumulation {
    padding-left: var(--tile-pad);
    padding-right: var(--tile-pad);
  }

  .forecast-page .forecast-period {
    border: 0;
    border-radius: 0;
    box-shadow: inset 0 1px 0 var(--color-line);
  }

  .forecast-hour {
    flex-basis: 2.65rem;
    min-width: 2.65rem;
  }

  .forecast-hour-plot {
    --hour-bar-width: 1.1rem;
  }

  .forecast-day,
  .forecast-day-hours {
    gap: 0.1rem;
  }

  .forecast-period-header {
    width: 100%;
  }

  .forecast-period-header > div,
  .forecast-detailed {
    text-align: left;
  }

  .forecast-period-header > div {
    flex: 1 1 auto;
  }

  .forecast-period-night .weather-icon {
    order: 1;
  }
}

.forecast-conditions.is-reports > .kicker,
.forecast-conditions:has([data-reports-open]) > .kicker {
  visibility: hidden;
}

.forecast-conditions.is-reports > [data-reports-tile-target="weather"],
.forecast-conditions:has([data-reports-open]) > [data-reports-tile-target="weather"] {
  visibility: hidden;
  pointer-events: none;
}

.forecast-conditions.is-reports > turbo-frame#forecast-aqi,
.forecast-conditions:has([data-reports-open]) > turbo-frame#forecast-aqi {
  visibility: hidden;
  pointer-events: none;
}

/* The check lives under precip, inside the weather block.
   Opening the list hides that block, then shows this frame again. The :has
   form names only the frame, which its children inherit from: with a
   " *" after it, adding any element anywhere on the page restyled the
   whole page, about 13 ms each with a mascot theme on. */
.forecast-conditions.is-reports #forecast-reports,
.forecast-conditions.is-reports #forecast-reports *,
.forecast-conditions:has([data-reports-open]) #forecast-reports {
  visibility: visible;
}

.forecast-precip {
  --reports-control-height: calc(0.8125rem * 1.2 + 0.6rem + 2px);
  /* One precip dt/dd (same size as Wind or Humidity) plus the reports
     control, so the empty state keeps the same footprint as a reading. */
  --precip-line-height: calc(0.75rem * 1.5 + 0.125rem + 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  overflow: visible;
}

.forecast-precip:has(.forecast-reports-slot) {
  justify-content: flex-end;
  min-height: calc(var(--precip-line-height) + 0.15rem + var(--reports-control-height));
}

.forecast-conditions .forecast-details {
  margin-bottom: 0;
}

/* The button is in the first paint, and this keeps that line while the
   label updates and while the list covers the card. */
.forecast-reports-slot {
  min-height: var(--reports-control-height);
}

/* The button ends at the card's right edge, lined up with the AQI chip
   above it and the horoscope chip on the sun card. With no observation it
   sits under the empty-state line in .forecast-precip; flex-end keeps it
   from spilling past the card there. */
.forecast-reports-slot,
.forecast-reports-slot > turbo-frame {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  overflow: visible;
}

.forecast-details-col:has(.forecast-precip),
.forecast-conditions-stats {
  overflow: visible;
}

/* The button stays one line under the precip value. Label wording crossfades
   in place so the button chrome never blinks. */
.forecast-reports-check,
.forecast-reports-open {
  flex: 0 0 auto;
  margin-inline-start: auto;
  width: max-content;
  max-width: none;
  box-sizing: border-box;
  height: var(--reports-control-height);
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
}

.forecast-reports-check-face {
  display: inline-grid;
  width: 100%;
  justify-items: center;
  align-items: center;
}

.forecast-reports-check-label {
  grid-area: 1 / 1;
  transition: opacity 0.28s ease;
}

.forecast-reports-check-label.is-current {
  opacity: 1;
}

.forecast-reports-check-label.is-next,
.forecast-reports-check-label.is-leaving {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .forecast-reports-check-label {
    transition: none;
  }
}

/* Open-control busy state can tighten padding. The check control keeps a
   locked width through checking / no reports / check local reports, so leave it. */
.forecast-reports-open[aria-busy="true"] {
  gap: 0;
  padding-inline: 0.28rem;
  overflow: hidden;
}

.forecast-reports-check[aria-busy="true"] {
  overflow: hidden;
}

.forecast-reports-toolbar,
.forecast-reports-panel {
  pointer-events: auto;
}

.forecast-reports-toolbar {
  --reports-control-height: calc(0.8125rem * 1.2 + 0.6rem + 2px);
  position: absolute;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.forecast-reports-sort {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.forecast-reports-toolbar .button {
  box-sizing: border-box;
  height: var(--reports-control-height);
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
}

.forecast-reports-close {
  flex: none;
  margin-left: auto;
}

.forecast-reports-panel {
  position: absolute;
  top: 3.75rem;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  font-size: 0.875rem;
  background: var(--color-surface);
}

.forecast-reports-open[hidden],
.forecast-reports-toolbar[hidden],
.forecast-reports-panel[hidden] {
  display: none;
}

.forecast-reports-credit {
  flex: none;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-muted);
}

.forecast-reports-list {
  list-style: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.forecast-reports-list > li {
  min-width: 0;
}

.forecast-reports-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 0.35rem 0.45rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: var(--color-ink);
}

.forecast-reports-item:visited {
  color: var(--color-ink);
}

/* Under an hour is bold. Past five hours the row goes grey. */
.forecast-reports-item.is-fresh,
.forecast-reports-item.is-fresh .forecast-reports-amount,
.forecast-reports-item.is-fresh .forecast-reports-kind {
  font-weight: 700;
}

.forecast-reports-item.is-stale,
.forecast-reports-item.is-stale:visited,
.forecast-reports-item.is-stale .forecast-reports-amount,
.forecast-reports-item.is-stale .forecast-reports-kind {
  color: var(--color-muted);
  font-weight: 400;
}

.forecast-reports-item.is-stale .report-icon {
  color: var(--color-muted);
}

.forecast-reports-place {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-reports-when {
  font-size: 0.75rem;
  color: var(--color-muted);
  white-space: nowrap;
}

.forecast-reports-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  white-space: nowrap;
}

.forecast-reports-kind .report-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
}

.forecast-reports-amount {
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-ink);
}

.forecast-reports-miles {
  font-size: 0.75rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ---------- Outlook Today (docs/how-to-outlook-today.md) ---------- */
:root {
  --today-warm: #c2410c;
  --today-cool: #0369a1;
  --today-rain: #2563eb;
  --today-snow: #7c3aed;
  --today-ice: #0891b2;
  --today-severe: #b45309;
  --today-band: rgb(203 213 225 / 0.35);
  --today-band-edge: #cbd5e1;
  --today-now: #2563eb;
  --today-faint: #9ca3af;
  --today-night: rgb(100 116 139 / 0.1); /* the Sun tile's night slate */
  --today-day: transparent;
}

[data-theme="dark"] {
  --today-warm: #fb923c;
  --today-cool: #38bdf8;
  --today-rain: #60a5fa;
  --today-snow: #a78bfa;
  --today-ice: #22d3ee;
  --today-severe: #fbbf24;
  --today-band: rgb(36 50 74 / 0.6);
  --today-band-edge: #334766;
  --today-now: #60a5fa;
  --today-faint: #64748b;
  /* Day lifts a little and night drops well below the surface, so the two
     stay apart under the see-through normal band. */
  --today-night: rgb(2 6 23 / 0.5);
  --today-day: rgb(148 163 184 / 0.08);
}

/* Same gap above as the Outlook board it replaces. */
turbo-frame#forecast-today {
  display: block;
  margin-top: 1.5rem;
}

.today-outlook {
  container-type: inline-size;
}

.today-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.today-head .kicker {
  margin: 0;
}

.today-date {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.today-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.today-facts {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

@container (min-width: 40rem) {
  .today-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
  }

  .today-chart-col {
    display: flex;
    flex-direction: column;
  }

  .today-chart-col .today-legend {
    order: -1;
    justify-content: flex-end;
    margin: 0 0 0.25rem;
  }

  /* A chart taller than the facts pushes the rows down to meet its axis. */
  .today-facts > .today-rows {
    margin-top: auto;
  }
}

.today-lede {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.today-headline {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.2;
  text-wrap: balance;
}

.today-temps {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  font-variant-numeric: tabular-nums;
}

.today-temp {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.today-temp small {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.today-temp b {
  font-size: 2.1rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.02em;
}

.today-temp.is-minor b {
  font-size: 1.25rem;
  font-weight: 650;
}

.today-temp b.is-high {
  color: var(--today-warm);
}

.today-temp b.is-low {
  color: var(--today-cool);
}

.today-temp-note {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.today-was {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: -0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.today-was svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
}

.today-was b {
  color: var(--color-ink);
  font-weight: 650;
}

.today-rows {
  margin: 0;
  border-top: 1px solid var(--color-line);
}

.today-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--color-line);
}

.today-row > dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.today-row > dd {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.today-row b {
  font-weight: 650;
}

.today-row.is-severe .today-row-lead b {
  color: var(--today-severe);
}

.today-row-note {
  font-size: 0.84rem;
  color: var(--color-muted);
}

.today-row-note b {
  color: var(--color-ink);
}

.today-spc {
  display: inline-flex;
  gap: 2px;
  margin-inline: 0.35rem 0.1rem;
  vertical-align: -1px;
}

.today-spc i {
  width: 0.5rem;
  height: 0.65rem;
  border-radius: 1.5px;
  background: var(--color-line);
}

.today-spc i.is-on {
  background: var(--today-severe);
}

.today-kinds {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.6rem;
  margin: 0;
  font-size: 0.86rem;
}

.today-kinds dt {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

.today-kinds dd {
  margin: 0;
  color: var(--color-muted);
}

.today-kinds dd b {
  color: var(--color-ink);
}

/* One color per kind, fell or expected alike: the now line tells them apart. */
.today-swatch,
.today-bar { --kind: var(--today-rain); }
.today-swatch.is-snow,
.today-bar.is-snow { --kind: var(--today-snow); }
.today-swatch.is-ice,
.today-bar.is-ice { --kind: var(--today-ice); }

.today-swatch {
  display: inline-block;
  box-sizing: border-box;
  width: 0.5rem;
  height: 0.6rem;
  border-radius: 2px;
  background: var(--kind);
}

.today-chart-col {
  min-width: 0;
}

.today-chart-col.is-pending {
  min-height: 260px;
}

.today-chart {
  flex: 1;
  min-height: 0;
}

.today-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.today-chart text {
  font-size: 11px;
  fill: var(--color-muted);
}

.today-chart .today-block-label {
  font-size: 10px;
}

.today-chart .today-label {
  font-size: 12px;
  font-weight: 700;
  fill: var(--color-ink);
}

.today-chart .today-label.is-past {
  font-weight: 600;
  fill: var(--color-muted);
}

.today-chart .today-ghost {
  font-weight: 600;
  fill: var(--today-faint);
}

.today-night { fill: var(--today-night); }
.today-day { fill: var(--today-day); }
.today-band { fill: var(--today-band); }
.today-band-edge { stroke: var(--today-band-edge); stroke-width: 1; }
.today-now { stroke: var(--today-now); stroke-width: 1.5; }
.today-divider, .today-baseline { stroke: var(--color-line); }
.today-tick { stroke: var(--color-border); }
.today-midnight { stroke: var(--color-border); stroke-dasharray: 2 3; }

.today-line {
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

/* After the now line. Before it is always solid. */
.today-line.is-ahead { stroke-width: 2; stroke-dasharray: 5 4; opacity: 0.75; }

.today-rate-guide { stroke: var(--color-line); stroke-dasharray: 1 3; }

.today-chart .today-rate-label {
  font-size: 8.5px;
  fill: var(--color-muted);
}

.today-chart .today-rate-label.is-over {
  paint-order: stroke;
  stroke: var(--color-surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.today-bar { fill: var(--kind); }

.today-dot { stroke-width: 2; }
.today-dot.is-high { fill: var(--today-warm); stroke: var(--today-warm); }
.today-dot.is-high.is-past { fill: var(--color-surface); stroke: var(--color-muted); }
.today-dot.is-low { fill: var(--today-cool); stroke: var(--today-cool); }
.today-dot.is-ghost { fill: var(--color-surface); stroke: var(--today-faint); stroke-width: 1.5; }

.today-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--color-muted);
}

.today-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.today-words {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-line);
}

.today-prose,
.today-next {
  max-width: 70ch;
  margin: 0;
}

.today-prose {
  color: var(--color-prose);
}

/* The label is a kicker. The words under it read as prose, not kicker grey. */
.today-next {
  display: grid;
  gap: 0.2rem;
}

.today-next p {
  margin: 0;
  color: var(--color-prose);
}

.today-next .kicker {
  color: var(--color-muted);
}
