/* Responsive homepage layout; detail pages keep their own layout. */
.home-layout .site.home { width: min(1180px, calc(100% - 40px)); }
.home-layout .home .hero { height: clamp(340px, 29vw, 430px); }
.home-layout .home .hero h1 { font-size: clamp(24px, 2.1vw, 34px); text-align: right; }
.home-layout .home .weather-map-frame { position: relative; width: 100%; height: 640px; overflow: hidden; }
.home-layout .home .weather-map { position: absolute; inset: 0 auto auto 0; transform-origin: top left; }
.home-layout .home .home-grid { grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 400px); gap: 20px; padding: 20px; }
.home-layout .home .social-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; height: auto; gap: 10px; margin-bottom: 10px; padding: 8px; border: 1px solid #d5ded8; border-radius: 12px; background: linear-gradient(#fff, #f4f7f3); }
.home-layout .social-toolbar .clock { margin: 0; box-shadow: none; }
.home-layout .overview-social { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.home-layout .overview-social a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9px; }
.home-layout .social-toolbar a:hover { background: #e6ede7; }
.home-layout .social-toolbar a:focus-visible { outline: 2px solid #315d73; outline-offset: 2px; }
.home-layout .overview-social img { width: 30px; max-width: 30px; height: auto; }
.home-layout .social-toolbar .donate-link { justify-self: end; display: flex; align-items: center; min-height: 44px; border-radius: 9px; }
.home-layout .social-toolbar .donate-link img { width: 116px; max-width: 100%; height: auto; }
.home-layout .station-list { display: block; }
.home-layout .weather-legend { margin: 0; padding: 7px calc(8px * var(--row-scale, 1)); border-bottom: 1px solid #d9e1dc; background: #f8faf7; color: #38473d; font: 12px/1.5 Arial, sans-serif; overflow-wrap: anywhere; }
.home-layout .station-region { display: block; width: 100%; margin: 0 0 8px; break-inside: avoid; min-width: 0; border: 1px solid #d5ded8; border-radius: 12px; background: #fff; overflow: hidden; }
.home-layout .region-heading { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #d9e1dc; background: linear-gradient(#fff, #f4f7f3); }
.home-layout .region-icon { display: grid; place-items: center; width: 52px; height: 40px; flex: 0 0 52px; color: #bc4443; }
.home-layout .region-icon svg { width: 52px; height: 38px; }
.home-layout .region-icon.region-brand { width: 88px; height: 48px; flex-basis: 88px; }
.home-layout .region-brand-logo { display: block; width: 88px; height: 48px; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.home-layout [data-group="group-9"] .region-brand-logo { width: 72px; height: 40px; }
.home-layout [data-group="group-10"] .region-brand-logo { width: 64px; height: 40px; }
.home-layout .region-heading h3 { min-width: 0; margin: 0; font: 700 18px/1.25 Arial, sans-serif; color: #273b31; overflow-wrap: anywhere; }
.home-layout .region-count { margin-left: auto; flex-shrink: 0; white-space: nowrap; padding: 5px 8px; border: 1px solid #dce5dd; border-radius: 7px; color: #627167; background: #fff; font: 600 11px Arial, sans-serif; }
.home-layout .station-region .station-row { border-bottom: 1px solid #e1e7e2; }
.home-layout .station-region .station-row:last-child { border-bottom: 0; }
.home-layout .station-region .station-row iframe { border: 0; }
.home-layout .home .sidebar { min-width: 0; border: 1px solid #dce1dc; border-radius: 12px; overflow: hidden; }
.home-layout .home .partners { border-top: 1px solid #dce1dc; gap: 24px; padding: 28px 20px; }
@media (min-width: 1600px) {
  .home-layout .site.home { width: min(1800px, calc(100% - 64px)); }
  .home-layout .home .hero { height: 430px; }
  .home-layout .home .home-grid { grid-template-columns: minmax(0, 1fr) clamp(340px, 24vw, 440px); gap: 24px; padding: 24px; }
  .home-layout .home .station-list { column-count: 2; column-gap: 20px; }
  .home-layout .home .weather-map-frame { height: 680px; }
}
@media (max-width: 1000px) {
  .home-layout .site.home { width: calc(100% - 24px); }
  .home-layout .home .home-grid { display: block; padding: 14px; }
  .home-layout .home .station-column { max-width: 740px; margin: auto; }
  .home-layout .home .sidebar { width: min(100%, 500px); max-width: none; margin: 24px auto 0; }
  .home-layout .home .hero { height: 48vw; }
  .home-layout .home .hero h1 { font-size: min(3vw, 24px); left: 16px; right: 16px; }
  .home-layout .home .weather-map-frame { height: 500px; }
}
@media (max-width: 620px) {
  .home-layout .site.home { width: calc(100% - 16px); margin: 8px auto; }
  .home-layout .home .home-grid { padding: 8px; }
  .home-layout .home .hero h1 { font-size: 3vw; left: 12px; right: 12px; }
  .home-layout .home .weather-map-frame { width: 100vw; margin-left: calc(50% - 50vw); height: 460px; }
  .home-layout .home .social-toolbar { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
  .home-layout .overview-social { grid-column: 1 / -1; justify-content: space-evenly; border-top: 1px solid #d9e1dc; padding-top: 6px; }
  .home-layout .region-heading { gap: 10px; padding: 12px; }
  .home-layout .region-heading h3 { font-size: 16px; }
  .home-layout .weather-legend { font-size: min(12px, calc(12px * var(--row-scale, 1))); padding-block: calc(7px * var(--row-scale, 1)); }
}

.home-layout .region-map-credits { flex-basis: 100%; color: #6a736d; font: 11px/1.5 Arial, sans-serif; }
.home-layout .region-map-credits a { color: #456757; }
.home-layout .home .sidebar > a:first-child { display: block; border-radius: 12px; overflow: hidden; }
.home-layout .home .sidebar > a:first-child img { border-radius: inherit; }
